""" Options for building Stripping20r0p3, for indep tests. """ from Gaudi.Configuration import * MessageSvc().Format = "% F%30W%S%7W%R%T %0W%M" # Tighten Trk Chi2 to <3 from CommonParticles.Utils import DefaultTrackingCuts DefaultTrackingCuts().Cuts = { "Chi2Cut" : [ 0, 3 ], "CloneDistCut" : [5000, 9e+99 ] } # # Build the streams and stripping object # from StrippingConf.Configuration import StrippingConf, StrippingStream from StrippingSettings.Utils import strippingConfiguration from StrippingArchive.Utils import buildStreams, cloneLinesFromStream from StrippingArchive import strippingArchive #from StrippingSelections.Utils import buildStreams, cloneLinesFromStream stripping='stripping20r0p3' #tck = 0x32220201 #get the configuration dictionary from the database config = strippingConfiguration(stripping) #get the line builders from the archive archive = strippingArchive(stripping) streams = buildStreams(stripping = config, archive = archive ) #streams = buildStreams(stripping = config) from Configurables import ProcStatusCheck filterBadEvents = ProcStatusCheck() declist = [] file = open('lines.txt','w') for stream in streams : for line in stream.lines : if line.prescale() > 0 : print line.name() file.write(line.name()+'\n') declist += [ line.name() + 'Decision' ] file.close() sc = StrippingConf( Streams = streams, MaxCandidates = 2000, AcceptBadEvents = False, BadEventSelection = filterBadEvents, TESPrefix = 'Strip' ) enablePacking = True from DSTWriters.microdstelements import * from DSTWriters.Configuration import (SelDSTWriter, stripDSTStreamConf, stripDSTElements, stripMicroDSTStreamConf, stripMicroDSTElements, stripCalibMicroDSTStreamConf ) # # Configuration of MicroDST # mdstStreamConf = stripMicroDSTStreamConf(pack=enablePacking) mdstElements = stripMicroDSTElements(pack=enablePacking) leptonicMicroDSTname = 'Leptonic' charmMicroDSTname = 'Charm' pidMicroDSTname = 'PID' bhadronMicroDSTname = 'Bhadron' dimuonNoRAWname = 'Dimuon' dimuonVELORAWname = 'DimuonVELORAW' # # Configuration of SelDSTWriter # SelDSTWriterElements = { 'default' : stripDSTElements(pack=enablePacking), charmMicroDSTname : mdstElements, leptonicMicroDSTname : mdstElements, pidMicroDSTname : mdstElements, bhadronMicroDSTname : mdstElements } SelDSTWriterConf = { 'default' : stripDSTStreamConf(pack=enablePacking), dimuonNoRAWname : stripDSTStreamConf(pack=enablePacking, vetoItems = [ "/Event/Calo/RawEvent", "/Event/Rich/RawEvent", "/Event/Other/RawEvent"]), dimuonVELORAWname : stripDSTStreamConf(pack=enablePacking, vetoItems = [ "/Event/Calo/RawEvent", "/Event/Rich/RawEvent"]), charmMicroDSTname : mdstStreamConf, leptonicMicroDSTname : mdstStreamConf, bhadronMicroDSTname : mdstStreamConf, pidMicroDSTname : stripCalibMicroDSTStreamConf(pack=enablePacking) } dstWriter = SelDSTWriter( "MyDSTWriter", StreamConf = SelDSTWriterConf, MicroDSTElements = SelDSTWriterElements, OutputFileSuffix ='000000', SelectionSequences = sc.activeStreams() ) from Configurables import EventTuple from Configurables import TupleToolStripping tag = EventTuple("tuple") tag.ToolList = [ "TupleToolStripping" ] tag.addTool( TupleToolStripping ) tag.TupleToolStripping.StrippigReportsLocations = "Strip/Phys/DecReports" #Deliberate typo for old TTS tag.TupleToolStripping.StrippingList = declist #tag.TupleToolStripping.OutputLevel = VERBOSE # # DaVinci Configuration # from Configurables import DaVinci DaVinci().EvtMax = 100000 #Default for indep tests is 100k DaVinci().PrintFreq = 2000 DaVinci().DataType = "2012" #DaVinci().HistogramFile = "DVHistos_indep_all.root" DaVinci().appendToMainSequence( [ sc.sequence() ] ) DaVinci().appendToMainSequence( [ tag ] ) DaVinci().appendToMainSequence( [ dstWriter.sequence() ] ) DaVinci().ProductionType = "Stripping" DaVinci().TupleFile = "tuple.root" # input file (for local tests only) #importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco14_Run125113.py") # Change the column size of Timing table from Configurables import TimingAuditor, SequencerTimerTool TimingAuditor().addTool(SequencerTimerTool,name="TIMER") TimingAuditor().TIMER.NameSize = 60 # For tests from Configurables import StrippingReport sr = StrippingReport(Selections = sc.selections(), OnlyPositive = False, EveryEvent = False, ReportFrequency=2000) DaVinci().appendToMainSequence( [ sr ] )