StrippingSettings and StrippingArchive

The configuration of the Stripping lines is stored in a database (python shelve) in StrippingSettings. The format of configuration dictionary is outlined below. When running the Stripping in production the line configuration in StrippingSettings is used to generate and configure the complete set of Stripping lines.

Adding a line in StrippingSettings

In StrippingSettings you will find a set of LineConfigDictionaries for each Stripping version, see for example Stripping13. There should be one LineConfigDictionaries.py file for each of the physics WGs that roughly groups all of the Stripping lines belonging to that WG.

To add a line to the Stripping you should add a new configuration dictionary to the appropriate LineConfigDictionaries.py file in:

        Phys/StrippingSettings/python/StrippingSettings/StrippingDev

The example below is for the B2XMuMu Rare Decay Stripping line from StrippingB2XMuMu.py

B2XMuMu =  {
    'BUILDERTYPE' : 'B2XMuMuConf',
    'CONFIG' : {
    'BVXCHI2NDOF'        : 4.0           # dimensionless
    , 'BIPCHI2'            : 9.0           # dimensionless 
    , 'BDIRA'              : 0.999968      # dimensionless
    , 'BFDCHI2'            : 100.0         # dimensionless
    , 'KpiMINIPCHI2'       : 9.0           # dimensionless
    , 'KpiTRACKCHI2'       : 4.0           # dimensionless         
    , 'KpiVXCHI2NDOF'      : 9.0           # dimensionless       
    , 'MuonMINIPCHI2'      : 16.0           # dimensionless      
    , 'MuonTRACKCHI2'      : 4.0           # dimensionless    
    , 'MuonPID'            : 0.0           # dimensionless            
    , 'DimuonVXCHI2NDOF'   : 9.0           # dimensionless 
    , 'DimuonUPPERMASS'    : 5050.0        # MeV      
    , 'Pi0MINPT'           : 800.0         # MeV  
    , 'DplusLOWERMASS'     : 1600.0        # MeV
    , 'DplusUPPERMASS'     : 2300.0        # MeV 
    , 'KstarplusWINDOW'    : 300.0         # MeV
    },
    'WGs' : [ 'RD' ],
    'STREAMS' : [ 'Dimuon' ]
    }

The contents of the dictionary is important. This information is used to create and configure the line builder instance. Behind the scenes what is done is essentially:

        from StrippingConf.StrippingStream import StrippingStream
        stream = StrippingStream('Dimuon')
        
        linebuilder = B2XMuMuConf(name='B2XMuMu',config=B2XMuMu['CONFIG'])
        stream.appendLines( linebuilder.lines() )

i.e. it will create a line builder instance of type 'BUILDERTYPE' and configure it with the 'CONFIG' dictionary. The name passed to the line builder is the name of the dictionary you add in the LineConfigDictionaries.py file. If you are only adding a single instance of your line builder we recommend using the name that appears after 'Stripping' in the name of your python file. In this case StrippingB2XMuMu.py has become B2XMuMu.

Creating a new database file:

To create a new database from a set of configuration dictionaries in StrippingSettings you can do:

 
python $STRIPPINGSETTINGSROOT/python/StrippingSettings/makeDB.py StrippingDev

This will create a new database called stripping.tmp in your local directory. To test this database copy the file to Phys/StrippingSettings/dbase and make StrippingSettings.

Reading a database:

To read back the database in a Stripping job:

        from StrippingSelections.Utils import buildStreams
        streams = buildStreams('stripping.tmp')

        from StrippingConf.Configuration import StrippingConf
        sc = StrippingConf( streams = streams )

This will create an instance of every line builder appearing in the database and create all of the streams needed for the stripping job.

-- ThomasBlake - 02-Jun-2011

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2011-06-02 - unknown
 
    • 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