#------------------------------------------------------------------------------ # $Id: MyMiniAnalysis.tcl,v 1.26 2004/04/30 05:44:34 lockman Exp $ # Sample MyMiniAnalysis.tcl file #------------------------------------------------------------------------------ # always source the error logger early in your main tcl script jobReport filename $jobReportName sourceFoundFile ErrLogger/ErrLog.tcl sourceFoundFile FrameScripts/FwkCfgVar.tcl sourceFoundFile FrameScripts/talkto.tcl # Disable the use of envvars set ProdTclOnly true # set the error logging level to 'warning'. If you encounter a configuration # error you can get more information using 'trace' ErrLoggingLevel warning ## allowed values of BetaMiniReadPersistence are (currently) "Kan", "Bdb" ## set BetaMiniReadPersistence Kan ## allowed (non-expert) values of levelOfDetail are "micro", "cache", "extend" ## or "refit" ## FwkCfgVar levelOfDetail "micro" ## allowed values of ConfigPatch are "Run1", "Run2" or "MC". This MUST be set ## consistent ## with your input data type or you will get INCONSISTENT OR ## INCORRECT RESULTS ## FwkCfgVar ConfigPatch "Run2" ## ## You can enter input collections two ways: either append them to a list, or ## explicitly enter them in the input module. Do one or the other, BUT NOT ## BOTH. ## If inputList is set before executing btaMini.tcl, that will automatically ## add the collections to the appropriate input module, otherwise make sure you ## talk to the right one. ## ## lappend inputList collection1 collection2 ... ## lappend inputList /work/users/phnic/TwoPhotonSkim/anal21/AllEvents_0123/TwoPhotonPentaquarkSkim ## ## OR THE FOLLOWING (choose the correct one based on persistence) ## ## talkto BdbEventInput { ## talkto KanEventInput { ## input add collection1 ## input add collection2 ## ... ## } ## ## Set the number of events to run. If this isn't set, all events in the ## input collections will be processed. ## FwkCfgVar NEvent ## choose the flavor of ntuple to write (hbook or root) and the file name ## FwkCfgVar BetaMiniTuple "root" FwkCfgVar histFileName "/dev/null" ## create Everything path and add core sequences to it. btaMiniPhysics is the ## same as btaMini, just appending a few standard list generating modules. For ## reading data with stored composites, you may have a conflict running ## btaMiniPhyscs.tcl ## ## You can also run (most of) the PhysProdSequence, complete with its 3 gamma ## conversion finders, etc. Consider disabling the portion of this sequence ## that you do not need to save yourself some time. The BetaLumiSequence ## and TagProd sequences are left off, as they otherwise cause problems. ## # sourceFoundFile BetaMiniUser/btaMini.tcl sourceFoundFile BetaMiniUser/btaMiniPhysics.tcl #sourceFoundFile BetaMiniUser/btaMiniPhysProdSequence.tcl ## Add Analysis module ## path append Everything GamGamTo4pi FwkCfgVar jobReportName FwkCfgVar rootName talkto GamGamTo4pi { ttreeName set $rootName # chargedTracksList set piLHLoose } ## ## If your job has a tag-level filter, here is how you should run it ## so as to avoid wasting time reading the mini when the tag filter fails ## Here's a simple example that restricts to just multi-hadron events ## on Kan input # module clone TagFilterByName TagBGFMultiHadron # module talk TagBGFMultiHadron # andList set BGFMultiHadron # assertIfMissing set true # exit mod talk EvtCounter print set t printFreq set 10000 exit #sequence append BetaMiniReadSequence -a KanEventUpdateTag TagBGFMultiHadron path list if [info exists NEvent] { ev begin -nev $NEvent } else { ev begin } ErrMsg trace "completed OK" exit