Difference: DaVinciConfigurable (1 vs. 28)

Revision 282018-12-05 - EduardoRodrigues

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"
Added:
>
>
!!! PAGE NO LONGER MAINTAINED. KEPT FOR HISTORICAL REASONS !!!
 

DaVinci Configuration

Revision 272011-01-13 - UlrikEgede

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 113 to 113
 DaVinci().MainOptions : '' # Main option file to execute DaVinci().UserAlgorithms : [] # User algorithms to run. DaVinci().RedoMCLinks : False # On some stripped DST one needs to redo the Track<->MC link table. Set to true if problems with association.
Changed:
<
<
DaVinci().InputType : 'DST' # or 'DIGI' or 'ETC' or 'RDST' or 'DST'. Nothing means the input type is compatible with being a DST.
>
>
DaVinci().InputType : 'DST' # or 'MDST' or 'DIGI' or 'ETC' or 'RDST' or 'DST'. Nothing means the input type is compatible with being a DST.
 # Trigger running DaVinci().L0 : False # Run L0. DaVinci().ReplaceL0BanksWithEmulated : False # Re-run L0

Revision 262009-07-02 - KazuyoshiAkiba

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 80 to 80
 This works because internally DaVinci() resets the topalgs. There is thus a full control on the ordering.

Units

Added:
>
>
before anything else (or, if you are using a DaVinci version prior to v22r1, importOptions("$DAVINCIROOT/options/PreloadUnits.opts")).
 If you need units in your text options do
<!-- SyntaxHighlightingPlugin -->
importOptions("$STDOPTS/PreloadUnits.opts")
<!-- end SyntaxHighlightingPlugin -->
Changed:
<
<
before anything else (or, if you are using a DaVinci version prior to v22r1, importOptions("$DAVINCIROOT/options/PreloadUnits.opts")).
>
>
 

Run it

In all three cases run it doing
<!-- SyntaxHighlightingPlugin -->
gaudirun.py MyOpts.py $DAVINCIROOT/options/DaVinciTestsData.py
<!-- end SyntaxHighlightingPlugin -->

Revision 252009-03-19 - MarcoCattaneo

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 161 to 161
 

See also

Added:
>
>
 

-- PatrickKoppenburg - 23 Dec 2008

Revision 242009-03-16 - MarcoCattaneo

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 81 to 81
 

Units

If you need units in your text options do
Changed:
<
<
<!-- SyntaxHighlightingPlugin -->
importOptions("$DAVINCIROOT/options/PreloadUnits.opts")
<!-- end SyntaxHighlightingPlugin -->
before anything else.
>
>
<!-- SyntaxHighlightingPlugin -->
importOptions("$STDOPTS/PreloadUnits.opts")
<!-- end SyntaxHighlightingPlugin -->
before anything else (or, if you are using a DaVinci version prior to v22r1, importOptions("$DAVINCIROOT/options/PreloadUnits.opts")).
 

Run it

In all three cases run it doing
<!-- SyntaxHighlightingPlugin -->
gaudirun.py MyOpts.py $DAVINCIROOT/options/DaVinciTestsData.py
<!-- end SyntaxHighlightingPlugin -->

Revision 232009-03-11 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 93 to 93
 The available options are: %SYNTAX{ syntax="python"}% # Application Configuration : sent to LHCbApp and Gaudi
Changed:
<
<
"EvtMax" : -1 # Number of events to analyse , "SkipEvents" : 0 # Number of events to skip at beginning for file , "PrintFreq" : 100 # The frequency at which to print event numbers , "DataType" : 'DC06' # Data type, can be ['DC06','2008'] Forwarded to PhysConf , "Simulation" : True # set to True to use SimCond. Forwarded to PhysConf , "DDDBtag" : "default" # Tag for DDDB. Default as set in DDDBConf for DataType , "CondDBtag" : "default" # Tag for CondDB. Default as set in DDDBConf for DataType , "UseOracle" : False # if False, use SQLDDDB instead
>
>
DaVinci().EvtMax : -1 # Number of events to analyse DaVinci().SkipEvents : 0 # Number of events to skip at beginning for file DaVinci().PrintFreq : 100 # The frequency at which to print event numbers DaVinci().DataType : 'DC06' # Data type, can be ['DC06','2008'] Forwarded to PhysConf DaVinci().Simulation : True # set to True to use SimCond. Forwarded to PhysConf DaVinci().DDDBtag : 'default' # Tag for DDDB. Default as set in DDDBConf for DataType DaVinci().CondDBtag : 'default' # Tag for CondDB. Default as set in DDDBConf for DataType
  # Input
Changed:
<
<
, "Input" : [] # Input data. Can also be passed as a second option file.
>
>
DaVinci().Input : [] # Input data. Can also be passed as a second option file.
  # Output
Changed:
<
<
, "HistogramFile" : "" # Write name of output Histogram file , "TupleFile" : "" # Write name of output Tuple file , "ETCFile" : "" # Write name of output ETC file @todo Not yet implemented , "DstFile" : "" # Write name of output DST file @todo Not yet implemented
>
>
DaVinci().HistogramFile : '' # Write name of output Histogram file DaVinci().TupleFile : '' # Write name of output Tuple file DaVinci().ETCFile : '' # Name of ETC file
  # Monitoring
Changed:
<
<
, "MoniSequence" : [ ] # Add your monitors here
>
>
DaVinci().MoniSequence : [] # Add your monitors here
  # DaVinci Options
Changed:
<
<
, "MainOptions" : "" # Main option file to execute , "UserAlgorithms" : [] # User algorithms to run. , "RedoMCLinks" : False # On some stripped DST one needs to redo the Track<->MC link table. Set to true if problems with association.

# Hlt running , "HltType" : '' # HltType : No Hlt. Use Hlt1+Hlt2 to run Hlt , "HltUserAlgorithms" : [ ] # put here user algorithms to add , "ReplaceL0BanksWithEmulated" : False # Re-run L0 , "Hlt2IgnoreHlt1Decision" : False # run Hlt2 even if Hlt1 failed , "InputType" : "DST" # or "DIGI" or "ETC" or "RDST" or "DST". Most of the time it's irrelevant.

>
>
DaVinci().MainOptions : '' # Main option file to execute DaVinci().UserAlgorithms : [] # User algorithms to run. DaVinci().RedoMCLinks : False # On some stripped DST one needs to redo the Track<->MC link table. Set to true if problems with association. DaVinci().InputType : 'DST' # or 'DIGI' or 'ETC' or 'RDST' or 'DST'. Nothing means the input type is compatible with being a DST. # Trigger running DaVinci().L0 : False # Run L0. DaVinci().ReplaceL0BanksWithEmulated : False # Re-run L0 DaVinci().HltType : '' # HltType : No Hlt. Use Hlt1+Hlt2 to run Hlt DaVinci().HltUserAlgorithms : [ ] # put here user algorithms to add DaVinci().Hlt2Requires : 'L0+Hlt1' # Say what Hlt2 requires
 %ENDSYNTAX% This was correct at the time of writing. Check doxygen for the most recent changes, or look into $DAVINCIROOT/python/DaVinci/Configuration.py.

Revision 222009-02-16 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Deleted:
<
<

Preview

DaVinci v22r0 is not yet out, but all what is below works from the nightlies. Check that this night's build has compiled at http://lhcb-nightlies.web.cern.ch/lhcb-nightlies/cgi-bin/nightlies.py and do
<!-- SyntaxHighlightingPlugin -->
SetupProject DaVinci --nightly lhcb1
<!-- end SyntaxHighlightingPlugin -->
or any previous day that compiled.
 

Introduction

Since DaVinci v22r0 the run configuration can only be done using the DaVinci() configurable. This backward incompatible change is necessary to allow the use of DC06 and 2008 data in a transparent way. The alternative would be to force the user to have a deep knowledge of conditions database tags, optional calibrations, etc... which need to be set depending on the data.

Revision 212009-01-21 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 84 to 84
 %ENDSYNTAX% This works because internally DaVinci() resets the topalgs. There is thus a full control on the ordering.
Added:
>
>

Units

If you need units in your text options do
<!-- SyntaxHighlightingPlugin -->
importOptions("$DAVINCIROOT/options/PreloadUnits.opts")
<!-- end SyntaxHighlightingPlugin -->
before anything else.
 

Run it

In all three cases run it doing
<!-- SyntaxHighlightingPlugin -->
gaudirun.py MyOpts.py $DAVINCIROOT/options/DaVinciTestsData.py
<!-- end SyntaxHighlightingPlugin -->

Revision 202009-01-12 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 89 to 89
 
<!-- SyntaxHighlightingPlugin -->
gaudirun.py MyOpts.py $DAVINCIROOT/options/DaVinciTestsData.py
<!-- end SyntaxHighlightingPlugin -->
This will work for DC06 as well as for 2008 data.

DaVinci() configurable

Changed:
<
<
There are many things one can set via the DaVinci() configurable. The basic rule is if you can use DaVinci() to set something, don't try to do it differently!.
>
>
There are many things one can set via the DaVinci() configurable. The basic rule is if you can use DaVinci() to set something, don't try to do it differently!
  The available options are: %SYNTAX{ syntax="python"}%
Line: 99 to 99
  , "PrintFreq" : 100 # The frequency at which to print event numbers , "DataType" : 'DC06' # Data type, can be ['DC06','2008'] Forwarded to PhysConf , "Simulation" : True # set to True to use SimCond. Forwarded to PhysConf
Changed:
<
<
, "DDDBtag" : "" # Tag for DDDB. Default as set in DDDBConf for DataType , "CondDBtag" : "" # Tag for CondDB. Default as set in DDDBConf for DataType
>
>
, "DDDBtag" : "default" # Tag for DDDB. Default as set in DDDBConf for DataType , "CondDBtag" : "default" # Tag for CondDB. Default as set in DDDBConf for DataType
  , "UseOracle" : False # if False, use SQLDDDB instead # Input , "Input" : [] # Input data. Can also be passed as a second option file.
Line: 109 to 109
  , "TupleFile" : "" # Write name of output Tuple file , "ETCFile" : "" # Write name of output ETC file @todo Not yet implemented , "DstFile" : "" # Write name of output DST file @todo Not yet implemented
Added:
>
>
# Monitoring , "MoniSequence" : [ ] # Add your monitors here
  # DaVinci Options , "MainOptions" : "" # Main option file to execute , "UserAlgorithms" : [] # User algorithms to run.
Changed:
<
<
, "RedoMCLinks" : False # On some stripped DST one needs to redo the Track<->MC link table.
>
>
, "RedoMCLinks" : False # On some stripped DST one needs to redo the Track<->MC link table. Set to true if problems with association.

  # Hlt running , "HltType" : '' # HltType : No Hlt. Use Hlt1+Hlt2 to run Hlt , "HltUserAlgorithms" : [ ] # put here user algorithms to add
Deleted:
<
<
, "HltOldStyle" : False # old style options configuration
  , "ReplaceL0BanksWithEmulated" : False # Re-run L0 , "Hlt2IgnoreHlt1Decision" : False # run Hlt2 even if Hlt1 failed
Added:
>
>
, "InputType" : "DST" # or "DIGI" or "ETC" or "RDST" or "DST". Most of the time it's irrelevant.
 %ENDSYNTAX% This was correct at the time of writing. Check doxygen for the most recent changes, or look into $DAVINCIROOT/python/DaVinci/Configuration.py.
Line: 161 to 164
 

See also

Added:
>
>
  -- PatrickKoppenburg - 23 Dec 2008

Revision 192009-01-05 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 7 to 7
 

Preview

DaVinci v22r0 is not yet out, but all what is below works from the nightlies. Check that this night's build has compiled at http://lhcb-nightlies.web.cern.ch/lhcb-nightlies/cgi-bin/nightlies.py and do
<!-- SyntaxHighlightingPlugin -->
SetupProject DaVinci --nightly lhcb1
<!-- end SyntaxHighlightingPlugin -->
Changed:
<
<
or any passed day that compiled.
>
>
or any previous day that compiled.
 

Introduction

Changed:
<
<
Since DaVinci v22r0 the run configuration can only be done using the DaVinci() configurable. This backward incompatible change is necessary to allow the use of DC06 and 2008 data in a transparent way. The alternative would be to force the user to have a deep knowledge of conditions database tags, optional calibrations, etc which need to be set depending on the data.
>
>
Since DaVinci v22r0 the run configuration can only be done using the DaVinci() configurable. This backward incompatible change is necessary to allow the use of DC06 and 2008 data in a transparent way. The alternative would be to force the user to have a deep knowledge of conditions database tags, optional calibrations, etc... which need to be set depending on the data.
  With v22r0 there are two main backward-incompatible changes:
  • DaVinciCommon.opts has been removed. Any option file including it will not work.

Revision 182008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Revision 172008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 116 to 116
  # Hlt running , "HltType" : '' # HltType : No Hlt. Use Hlt1+Hlt2 to run Hlt , "HltUserAlgorithms" : [ ] # put here user algorithms to add
Changed:
<
<
, "HltOldStyle" : True # old style options configuration
>
>
, "HltOldStyle" : False # old style options configuration
  , "ReplaceL0BanksWithEmulated" : False # Re-run L0 , "Hlt2IgnoreHlt1Decision" : False # run Hlt2 even if Hlt1 failed %ENDSYNTAX%

Revision 162008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Added:
>
>

Preview

DaVinci v22r0 is not yet out, but all what is below works from the nightlies. Check that this night's build has compiled at http://lhcb-nightlies.web.cern.ch/lhcb-nightlies/cgi-bin/nightlies.py and do
<!-- SyntaxHighlightingPlugin -->
SetupProject DaVinci --nightly lhcb1
<!-- end SyntaxHighlightingPlugin -->
or any passed day that compiled.
 

Introduction

Since DaVinci v22r0 the run configuration can only be done using the DaVinci() configurable. This backward incompatible change is necessary to allow the use of DC06 and 2008 data in a transparent way. The alternative would be to force the user to have a deep knowledge of conditions database tags, optional calibrations, etc which need to be set depending on the data.

With v22r0 there are two main backward-incompatible changes:

Changed:
<
<
  • DaVinciCommon.opts has been removed. Any option file including it should be edited.
  • The only way of configuring the main job options is DaVinci().
>
>
  • DaVinciCommon.opts has been removed. Any option file including it will not work.
  • The only way of configuring the main job options is DaVinci(). It contains all which used to be in DaVinciCommon.opts.
 

Examples

There is a full example below and there are many examples in the release. The pattern for main options should be as in one of the examples given below.
Line: 79 to 84
 %ENDSYNTAX% This works because internally DaVinci() resets the topalgs. There is thus a full control on the ordering.
Added:
>
>

Run it

In all three cases run it doing
<!-- SyntaxHighlightingPlugin -->
gaudirun.py MyOpts.py $DAVINCIROOT/options/DaVinciTestsData.py
<!-- end SyntaxHighlightingPlugin -->
This will work for DC06 as well as for 2008 data.
 

DaVinci() configurable

There are many things one can set via the DaVinci() configurable. The basic rule is if you can use DaVinci() to set something, don't try to do it differently!.
Line: 155 to 164
  -- PatrickKoppenburg - 23 Dec 2008
Changed:
<
<
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

>
>
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 152008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 9 to 9
  With v22r0 there are two main backward-incompatible changes:
  • DaVinciCommon.opts has been removed. Any option file including it should be edited.
Changed:
<
<
  • The only way of configuring the main job options is DaVinci()
>
>
  • The only way of configuring the main job options is DaVinci().
 
Changed:
<
<

bla

>
>

Examples

There is a full example below and there are many examples in the release. The pattern for main options should be as in one of the examples given below.
 
Added:
>
>
The most important thing you need to remember is that DaVinci() resets ApplicationMgr().TopAlg when being configured (which is always after what you do). Therefore all your topalgs will be ignored if you don't pass them via UserAlgorithms or MainOptions.

The local approach

You can define everything in a single main option file MyOpts.py.
<!-- SyntaxHighlightingPlugin -->
from Gaudi.Configuration import *                                                # Always at top
##########################################
# Define your sequencer
#
from Configurables import GaudiSequencer
mySeq = GaudiSequencer("MySeq")
#
# Add algorithms to your sequencer here:
# mySeq.Members += ....
##########################################
# Configure the job
#
from Configurables import DaVinci
DaVinci().EvtMax = 100                                                           # Number of events
DaVinci().DataType = "DC06"                                                      # Default is "DC06"
DaVinci().Simulation   = True                                                    # It is MC 
DaVinci().UserAlgorithms = [ mySeq ]                                             # Declare your sequencer
<!-- end SyntaxHighlightingPlugin -->

Load an option file

You can also define only the DaVinci() part in your main option file and import the rest from another file.

<!-- SyntaxHighlightingPlugin -->
from Gaudi.Configuration import *                                                # Always at top
##########################################
# Configure the job
#
from Configurables import DaVinci
DaVinci().EvtMax = 100                                                           # Number of events
DaVinci().DataType = "DC06"                                                      # Default is "DC06"
DaVinci().Simulation   = True                                                    # It is MC 
DaVinci().MainOptions = "$DAVINCIROOT/options/MySequence.py"
<!-- end SyntaxHighlightingPlugin -->
You can combine MainOptions and UserAlgorithms. In that case the MainOptions are imported first.

This way also allows you to re-use some old text option file. Simply do

<!-- SyntaxHighlightingPlugin -->
DaVinci().MainOptions = "$B2DILEPTONROOT/options/DoPreselBu2LLK.opts"
<!-- end SyntaxHighlightingPlugin -->

Preload an option file and catch a sequencer

If you need to mix several imports of options you may do the following:
<!-- SyntaxHighlightingPlugin -->
from Gaudi.Configuration import *                                                # Always at top
from Configurables import GaudiSequencer
##########################################
# Import two predefined sequences
#
importOptions("$B2DILEPTONROOT/options/DoDC06SelBu2MuMuK.py")
importOptions("$CCBARROOT/options/DoDC06SelBs2JpsieePhi.py")
##########################################
# Now catch the sequencers
#
mmK = GaudiSequencer("SeqPreselBu2LLK")
eePhi = GaudiSequencer("DC06SelBs2JpsieePhiFilterSequence")
##########################################
# Configure the job
#
from Configurables import DaVinci
DaVinci().EvtMax = 100                                                           # Number of events
DaVinci().DataType = "DC06"                                                      # Default is "DC06"
DaVinci().Simulation   = True                                                    # It is MC 
DaVinci().UserAlgorithms = [ mmK, eePhi ]                                        # Declare your sequencers
<!-- end SyntaxHighlightingPlugin -->
This works because internally DaVinci() resets the topalgs. There is thus a full control on the ordering.

DaVinci() configurable

There are many things one can set via the DaVinci() configurable. The basic rule is if you can use DaVinci() to set something, don't try to do it differently!.

The available options are:

<!-- SyntaxHighlightingPlugin -->
# Application Configuration : sent to LHCbApp and Gaudi     
         "EvtMax"             :  -1           # Number of events to analyse 
       , "SkipEvents"         :   0           # Number of events to skip at beginning for file  
       , "PrintFreq"          : 100           # The frequency at which to print event numbers  
       , "DataType"           : 'DC06'        # Data type, can be ['DC06','2008'] Forwarded to PhysConf  
       , "Simulation"         : True          # set to True to use SimCond. Forwarded to PhysConf   
       , "DDDBtag"            : ""            # Tag for DDDB. Default as set in DDDBConf for DataType  
       , "CondDBtag"          : ""            # Tag for CondDB. Default as set in DDDBConf for DataType  
       , "UseOracle"          : False         # if False, use SQLDDDB instead  
         # Input    
       , "Input"              : []            # Input data. Can also be passed as a second option file.  
         # Output      
       , "HistogramFile"      : ""            # Write name of output Histogram file   
       , "TupleFile"          : ""            # Write name of output Tuple file   
       , "ETCFile"            : ""            # Write name of output ETC file @todo Not yet implemented   
       , "DstFile"            : ""            # Write name of output DST file @todo Not yet implemented   
         # DaVinci Options              
       , "MainOptions"        : ""            # Main option file to execute   
       , "UserAlgorithms"     : []            # User algorithms to run.           
       , "RedoMCLinks"        : False         # On some stripped DST one needs to redo the Track<->MC link table. 
         # Hlt running                                      
       , "HltType"            : ''            # HltType : No Hlt. Use Hlt1+Hlt2 to run Hlt    
       , "HltUserAlgorithms"  : [ ]           # put here user algorithms to add    
       , "HltOldStyle"        : True          # old style options configuration   
       , "ReplaceL0BanksWithEmulated" : False # Re-run L0        
       , "Hlt2IgnoreHlt1Decision" : False     # run Hlt2 even if Hlt1 failed   
<!-- end SyntaxHighlightingPlugin -->
This was correct at the time of writing. Check doxygen for the most recent changes, or look into $DAVINCIROOT/python/DaVinci/Configuration.py.
 

Translating options to python

While .opts files are still supported, it is recommended to translate them to python. The translation is straight-forward, essentially replacing some characters and declaring some imports. Here is an example:
Line: 29 to 128
 EvtMax = 100 ; %ENDSYNTAX% becomes
Changed:
<
<
%SYNTAX{ syntax="python"}% from Gaudi.Configuration import * # Always at top
>
>
%SYNTAX{ syntax="python"}%from Gaudi.Configuration import * # Always at top
 ## Make a D0 # Comments start with a # from Configurables import CombineParticles, PhysDesktop # Every configubable must be imported d0 = CombineParticles("D0") # Create a Combine Particles instance
Line: 56 to 154
 

-- PatrickKoppenburg - 23 Dec 2008

Changed:
<
<
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

>
>
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 142008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 56 to 56
 

-- PatrickKoppenburg - 23 Dec 2008

Changed:
<
<
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

>
>
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 132008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 56 to 56
 

-- PatrickKoppenburg - 23 Dec 2008

Changed:
<
<
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

>
>
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 122008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 56 to 56
 

-- PatrickKoppenburg - 23 Dec 2008

Changed:
<
<
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

>
>
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 112008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 56 to 56
 

-- PatrickKoppenburg - 23 Dec 2008

Changed:
<
<
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

>
>
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 102008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 56 to 56
 

-- PatrickKoppenburg - 23 Dec 2008 \ No newline at end of file

Added:
>
>
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 92008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 56 to 56
 

-- PatrickKoppenburg - 23 Dec 2008

Deleted:
<
<
|*META PREFERENCE*|name="SyntaxHighlightingPlugin_FORMAT_PREPEND" title="SyntaxHighlightingPlugin_FORMAT_PREPEND" type="Set" value="
"|

Revision 82008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 56 to 56
 

-- PatrickKoppenburg - 23 Dec 2008

Changed:
<
<
|*META PREFERENCE*|name="FORMAT_PREPEND" title="FORMAT_PREPEND" type="Set" value="
"|

>
>
|*META PREFERENCE*|name="SyntaxHighlightingPlugin_FORMAT_PREPEND" title="SyntaxHighlightingPlugin_FORMAT_PREPEND" type="Set" value="
"|

Revision 72008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Revision 62008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 56 to 56
 

-- PatrickKoppenburg - 23 Dec 2008 \ No newline at end of file

Added:
>
>
|*META PREFERENCE*|name="FORMAT_PREPEND" title="FORMAT_PREPEND" type="Set" value="
"|

Revision 52008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 56 to 56
 

-- PatrickKoppenburg - 23 Dec 2008

Deleted:
<
<
|*META PREFERENCE*|name="FORMAT_PREPEND" title="FORMAT_PREPEND" type="Set" value="
"|

Revision 42008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 56 to 56
 

-- PatrickKoppenburg - 23 Dec 2008

Changed:
<
<
|*META PREFERENCE*|name="FORMAT_PREPEND" title="FORMAT_PREPEND" type="Set" value="
"|

>
>
|*META PREFERENCE*|name="FORMAT_PREPEND" title="FORMAT_PREPEND" type="Set" value="
"|

Revision 32008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Line: 56 to 56
 

-- PatrickKoppenburg - 23 Dec 2008 \ No newline at end of file

Added:
>
>
|*META PREFERENCE*|name="FORMAT_PREPEND" title="FORMAT_PREPEND" type="Set" value="
"|

Revision 22008-12-23 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Revision 12008-12-23 - unknown

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="DaVinci"

DaVinci Configuration

Introduction

Since DaVinci v22r0 the run configuration can only be done using the DaVinci() configurable. This backward incompatible change is necessary to allow the use of DC06 and 2008 data in a transparent way. The alternative would be to force the user to have a deep knowledge of conditions database tags, optional calibrations, etc which need to be set depending on the data.

With v22r0 there are two main backward-incompatible changes:

  • DaVinciCommon.opts has been removed. Any option file including it should be edited.
  • The only way of configuring the main job options is DaVinci()

bla

Translating options to python

While .opts files are still supported, it is recommended to translate them to python. The translation is straight-forward, essentially replacing some characters and declaring some imports. Here is an example:
<!-- SyntaxHighlightingPlugin -->
#include "$DAVINCIROOT/options/DaVinciCommon.opts"
// Make a D0
ApplicationMgr.TopAlg += { "CombineParticles/D0" };
D0.PhysDesktop.InputLocations = { "StdLooseKaons", "StdLoosePions" };
D0.DecayDescriptor = "[D0 -> K+ pi-]cc" ;
D0.DaughtersCuts = { "K+" : "(PT>300*MeV) & (P>2*GeV) & (MIPCHI2DV(PRIMARY)>4)",
                    "pi+" : "(PT>300*MeV) & (P>2*GeV) & (MIPCHI2DV(PRIMARY)>4)"};
D0.CombinationCut = "(ADAMASS('D0')<50) & (APT>1*GeV)";
D0.MotherCut = "(VFASPF(VCHI2/VDOF)<25)";
// Run on 100 events
ApplicationMgr.EvtMax = 100 ;
<!-- end SyntaxHighlightingPlugin -->
becomes
<!-- SyntaxHighlightingPlugin -->
from Gaudi.Configuration import *                                                # Always at top
## Make a D0                                                                     # Comments start with a #
from Configurables import CombineParticles, PhysDesktop                          # Every configubable must be imported
d0 = CombineParticles("D0")                                                      # Create a Combine Particles instance
d0.addTool(PhysDesktop())                                                        # Tell d0 that you'd like to configure PhysDesktop
d0.PhysDesktop.InputLocations = [ "StdLooseKaons", "StdLoosePions" ]             # Lists have square brackets
d0.DecayDescriptor = "[D0 -> K+ pi-]cc"                                          # Note there's no ; anymore
d0.DaughtersCuts = { "K+" : "(PT>300*MeV) & (P>2*GeV) & (MIPCHI2DV(PRIMARY)>4)", # Dictionaries have {}
                    "pi+" : "(PT>300*MeV) & (P>2*GeV) & (MIPCHI2DV(PRIMARY)>4)"}
d0.CombinationCut = "(ADAMASS('D0')<50) & (APT>1*GeV)"                            
d0.MotherCut = "(VFASPF(VCHI2/VDOF)<25)" 
#
# DaVinci() :
#
from Configurables import DaVinci
DaVinci().EvtMax = 100                                                           # Number of events
DaVinci().DataType = "DC06"                                                      # Default is "DC06"
DaVinci().Simulation   = True                                                    # It is MC 
DaVinci().UserAlgorithms = [ d0 ]                                                # Declare d0
<!-- end SyntaxHighlightingPlugin -->

See also

-- PatrickKoppenburg - 23 Dec 2008

 
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