How can I build a useful database ?

Setting up the files

Getting ready :
  • First, you need to getpack Tell1/Vetra package, which will contain the xml and sqlite files.
  • Then run write_st_xml_cond detType (detType can be either 'IT' or 'TT').
  • source the $VETRAROOT/scripts/create_dettype_sqlite_file_from_xml.sh (dettype is 'it' or 'tt').
Now you have a "blank" database, which contains only default values (ie pedestal values = 128, hit threshold = 6, ...).

Nota bene : the class ID of the condition has been changed from 5 to 9105, meaning you won't be able to read it with standard getDet, please use the STVetraCfg tool (in Tell1/VetraKernel).

Determining the TELL1 constants

All the parameters are deduced from the noise info and the strip status that is read from LHCBCOND. The first step is then to be sure the version you'll use is up to date. But the problems come with the fact that the noise depends on the TELL1 configuration... The way it is meant to work is the following. An "ideal" configuration exists, with reasonable thresholds, pedestals and masks. Then the steps needed to produce a new configuration are :

  1. update the pedestal values,
  2. update the header correction values,
  3. update the noise per sector.

Once this is done, running UpdateVetraCondFromLHCBCOND.py will produce the new configuration.

From now on, I'll assume we want to set the IT TELL1 parameters, with one 20'000 events sample. It is also assumed that you have a Vetra Cond DB in $MYDATABASES/ITCOND.db. I'll only put the minimal ST Vetra Analysis configuration, for more options, please read the ST Vetra Analysis page.

Update the pedestal values

In your python option file, put
STVetraAnalysis().DataSetName = "$MYRESULTS/Example"
STVetraAnalysis().DetType     = "IT"
STVetraAnalysis().Process     = "Pedestal"
STVetraAnalysis().VetraCondDB = "$MYDATABASES/ITCOND.db"
STVetraAnalysis().XMLAuthor      = "J Luisier"
STVetraAnalysis().XMLTag         = "2010/03/25"
STVetraAnalysis().XMLDescription = "Based on run 67240"
STVetraAnalysis().Convergence    = 19995

This will create a $MYRESULTS/Example-IT-Pedestal-TELL1Cond.xml file, which is the copy of $MYDATABASES/ITCOND.db, but the pedestal values were updated. An empy root file is created as well. Then move the xml file to $VETRAROOT/VetraCondDB/IT/CondDB/TELL1Cond.xml and source $VETRAROOT/scripts/create_it_sqlite_from_xml.sh. You'll have a $VETRAROOT/VetraCondDB/ITCOND.db file created.

Update the header correction values

In your python option file, put
STVetraAnalysis().DataSetName = "$MYRESULTS/Example"
STVetraAnalysis().DetType     = "IT"
STVetraAnalysis().Process     = "HeaderCorr"
STVetraAnalysis().VetraCondDB = "$VETRAROOT/VetraCondDB/ITCOND.db"
STVetraAnalysis().XMLAuthor      = "J Luisier"
STVetraAnalysis().XMLTag         = "2010/03/25"
STVetraAnalysis().XMLDescription = "Based on run 67240"
STVetraAnalysis().Convergence    = 12000

This will create a $MYRESULTS/Example-IT-HeaderCorr-TELL1Cond.xml file and a $MYRESULTS/Example-IT-HeaderCoor.root file. Do the same manipulation with the output xml file to regenerate the .db file.

Update the noise values

In your python option file, put
STVetraAnalysis().DataSetName = "$MYRESULTS/Example"
STVetraAnalysis().DetType     = "IT"
STVetraAnalysis().Process     = "Noise"
STVetraAnalysis().VetraCondDB = "$VETRAROOT/VetraCondDB/ITCOND.db"
STVetraAnalysis().XMLAuthor      = "J Luisier"
STVetraAnalysis().XMLTag         = "2010/03/25"
STVetraAnalysis().XMLDescription = "Based on run 67240"
STVetraAnalysis().Convergence    = 12000

This will produce a $MYRESULTS/Example-IT-NoiseValuesInfo.xml file and a $MYRESULTS/Example-IT-Noise.root file. The xml has to go in LHCBCOND.

Getting the new configuration

Once the noise is correctly set in LHCBCOND and the pedestal values / header correction are up to date in Vetra Cond DB, you just have to run UpdateVetraCondFromLHCBCOND.py to get the desired configuration. The output file is the wanted file.

What can I do now?

You can create new cfg files from old ones, copying the old ones' line but overwriting the thresholds and pedestals. Suppose you have a set of cfg files in $HOME/ST5v26/, just run

ConfigFileWriter IT $HOME/ST5v26/ST5v26TELL01.cfg
and you'll get new files (the old ones won't be erased).

The TELL1Cond.xml file is used by PVSS to create recipes.

-- JohanLuisier - 14 May 2009

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2010-03-31 - JohanLuisier
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback