Skip to content
Snippets Groups Projects

Add S28r1 test

Merged Michael Thomas Alexander requested to merge 2016-patches-stripping-tests into 2016-patches
1 file
+ 134
0
Compare changes
  • Side-by-side
  • Inline
"""
Options for building Stripping24.
"""
#use CommonParticlesArchive
stripping='stripping28r1'
from CommonParticlesArchive import CommonParticlesArchiveConf
CommonParticlesArchiveConf().redirect(stripping)
from Gaudi.Configuration import *
MessageSvc().Format = "% F%30W%S%7W%R%T %0W%M"
#
# Disable the cache in Tr/TrackExtrapolators
#
from Configurables import TrackStateProvider
TrackStateProvider().CacheStatesOnDemand = False
#
#Fix for TrackEff lines
#
from Configurables import DecodeRawEvent
DecodeRawEvent().setProp("OverrideInputs",4.2)
#
# Build the streams and stripping object
#
from StrippingConf.Configuration import StrippingConf, StrippingStream
from StrippingSettings.Utils import strippingConfiguration
#from StrippingArchive.Utils import buildStreams
from StrippingArchive import strippingArchive
#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)
from StrippingSelections import buildersConf
from StrippingSelections.Utils import buildStreams
# Get the names of configs from S24 & S24r0p1
confnames = set(strippingConfiguration('stripping28').keys())
# Get configs from StrippingSelections
config = dict((name, conf) for name, conf in buildersConf().items() if name in confnames)
streams = buildStreams(config)
leptonicMicroDSTname = 'Leptonic'
charmMicroDSTname = 'Charm'
pidMicroDSTname = 'PID'
bhadronMicroDSTname = 'Bhadron'
mdstStreams = [ leptonicMicroDSTname,charmMicroDSTname,pidMicroDSTname,bhadronMicroDSTname ]
dstStreams = [ "BhadronCompleteEvent", "CharmCompleteEvent", "Dimuon",
"EW", "Semileptonic", "Calibration", "MiniBias", "Radiative" ]
stripTESPrefix = 'Strip'
from Configurables import ProcStatusCheck, GaudiSequencer
sc = StrippingConf( Streams = streams,
MaxCandidates = 2000,
AcceptBadEvents = False,
BadEventSelection = ProcStatusCheck(),
ActiveMDSTStream = True,
TESPrefix = stripTESPrefix,
DSTStreams = dstStreams,
MicroDSTStreams = mdstStreams )
#
# Configure the dst writers for the output
#
enablePacking = True
from DSTWriters.microdstelements import *
from DSTWriters.Configuration import ( SelDSTWriter,
stripDSTStreamConf,
stripDSTElements,
stripMicroDSTStreamConf,
stripMicroDSTElements,
stripCalibMicroDSTStreamConf )
#
# Configuration of MicroDST
# per-event an per-line selective writing of the raw event is active (selectiveRawEvent=True)
#
mdstStreamConf = stripMicroDSTStreamConf(pack=enablePacking, selectiveRawEvent=True)
mdstElements = stripMicroDSTElements(pack=enablePacking)
#
# Configuration of SelDSTWriter
# per-event an per-line selective writing of the raw event is active (selectiveRawEvent=True)
#
SelDSTWriterElements = {
'default' : stripDSTElements(pack=enablePacking),
charmMicroDSTname : mdstElements,
leptonicMicroDSTname : mdstElements,
pidMicroDSTname : mdstElements,
bhadronMicroDSTname : mdstElements
}
SelDSTWriterConf = {
'default' : stripDSTStreamConf(pack=enablePacking, selectiveRawEvent=True),
charmMicroDSTname : mdstStreamConf,
leptonicMicroDSTname : mdstStreamConf,
bhadronMicroDSTname : mdstStreamConf,
pidMicroDSTname : stripCalibMicroDSTStreamConf(pack=enablePacking, selectiveRawEvent=True)
}
dstWriter = SelDSTWriter( "MyDSTWriter",
StreamConf = SelDSTWriterConf,
MicroDSTElements = SelDSTWriterElements,
OutputFileSuffix ='000000',
SelectionSequences = sc.activeStreams() )
# Add stripping TCK
from Configurables import StrippingTCK
stck = StrippingTCK(HDRLocation = '/Event/Strip/Phys/DecReports', TCK=0x38102400)
#
# DaVinci Configuration
#
from Configurables import DaVinci
DaVinci().EvtMax = -1 # Number of events
DaVinci().HistogramFile = "DVHistos.root"
DaVinci().appendToMainSequence( [ sc.sequence() ] )
DaVinci().appendToMainSequence( [ stck ] )
DaVinci().appendToMainSequence( [ dstWriter.sequence() ] )
DaVinci().ProductionType = "Stripping"
# Change the column size of Timing table
from Configurables import AuditorSvc, TimingAuditor, SequencerTimerTool, NameAuditor
TimingAuditor().addTool(SequencerTimerTool,name="TIMER")
TimingAuditor().TIMER.NameSize = 60
Loading