def setup_muXX_MSOnly(self): L2AlgName = self.getL2AlgName() muFastThresh = self.getMuFastThresh() EFExtrapolatorThresh = self.getEFExtrapolatorThresh() ########### L2 algos ################# if "l2muonSA" in self.chainPart['L2SAAlg']: from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAConfig theL2StandAloneAlg = TrigL2MuonSAConfig(L2AlgName) from TrigMuonHypo.TrigMuonHypoConfig import MufastHypoConfig theL2StandAloneHypo = MufastHypoConfig(L2AlgName, muFastThresh) else: logMuonDef.error("Chain built with %s but so far only l2muonSA is supported." % (self.chainPart['L2SAAlg'])) return False ########### EF algos ################# if 'SuperEF' in self.chainPart['EFAlg']: from AthenaCommon import CfgGetter theTrigMuSuperEF = CfgGetter.getAlgorithm("TrigMuSuperEF_SAonly") theEFAlg = theTrigMuSuperEF EFRecoAlgName = "Muon" else: logMuonDef.error("Chain built with %s but so far only SuperEF is supported." % (self.chainPart['EFAlg'])) return False from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFExtrapolatorHypoConfig theTrigMuonEFExtrapolatorHypoConfig = TrigMuonEFExtrapolatorHypoConfig(EFRecoAlgName, EFExtrapolatorThresh) ########### Sequence List ############## self.L2sequenceList += [[self.L2InputTE, [theL2StandAloneAlg, theL2StandAloneHypo], 'L2_mu_step1']] self.EFsequenceList += [[['L2_mu_step1'], [theEFAlg, theTrigMuonEFExtrapolatorHypoConfig], 'EF_mu_step1']] ########### Signatures ########### self.L2signatureList += [ [['L2_mu_step1']*self.mult] ] self.EFsignatureList += [ [['EF_mu_step1']*self.mult] ] ########### TE renaming ########## self.TErenamingDict = { 'L2_mu_step1': mergeRemovingOverlap('L2_mu_SA_', L2AlgName+muFastThresh+'_'+self.L2InputTE), 'EF_mu_step1': mergeRemovingOverlap('EF_SuperEF_', self.chainPartNameNoMult), }
def configure(self): mlog = logging.getLogger( 'LArDigitGetter.py::configure :' ) mlog.info ('entering') from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() try: from AthenaCommon import CfgGetter # if using new scheme for pileup from Digitization.DigitizationFlags import digitizationFlags if digitizationFlags.doXingByXingPileUp(): # Defined in LArDigitizationConfig.py job.PileUpToolsAlg.PileUpTools += [ CfgGetter.getPrivateTool("LArPileUpTool", checkType=True) ] job.PileUpToolsAlg.PileUpTools["LArPileUpTool"].DigitContainer = self.outputKey() job.PileUpToolsAlg.PileUpTools["LArPileUpTool"].DigitContainer_DigiHSTruth = self.outputKey_DigiHSTruth() job.PileUpToolsAlg.PileUpTools["LArPileUpTool"].DoDigiTruthReconstruction = digitizationFlags.doDigiTruth() else: # Defined in LArDigitizationConfig.py print "call CfgGetter for digitmaker1 " job += CfgGetter.getAlgorithm("digitmaker1", tryDefaultConfigurable=True) job.digitmaker1.LArPileUpTool.DigitContainer = self.outputKey() job.digitmaker1.LArPileUpTool.DigitContainer_DigiHSTruth = self.outputKey_DigiHSTruth() #job.digitmaker1.LArPileUpTool.DigitContainer_DigiHSTruth = "LArDigitContainer_DigiHSTruth" job.digitmaker1.LArPileUpTool.DoDigiTruthReconstruction = digitizationFlags.doDigiTruth() # if pileup or overlay from AthenaCommon.DetFlags import DetFlags from LArDigitization.LArDigitizationConfig import isOverlay if DetFlags.pileup.LAr_on() or isOverlay(): from AthenaCommon.AppMgr import ServiceMgr # Defined in LArDigitizationConfig.py ServiceMgr.PileUpMergeSvc.Intervals += [ CfgGetter.getPrivateTool("LArRangeEM", checkType=True) ] ServiceMgr.PileUpMergeSvc.Intervals += [ CfgGetter.getPrivateTool("LArRangeHEC", checkType=True) ] ServiceMgr.PileUpMergeSvc.Intervals += [ CfgGetter.getPrivateTool("LArRangeFCAL", checkType=True) ] except Exception as configException: print configException print "ERROR Problem with configuration" return True
job += DeepCopyObjects("BkgRdo1") job.BkgRdo1.InDetObjects = True include("InDetEventAthenaPool/InDetEventAthenaPool_joboptions.py" ) # FIXME: is needed? from InDetOverlay.InDetOverlayConf import InDetOverlay indetovl = InDetOverlay() jobproperties.Digitization.doInDetNoise = False #if readBS and isRealData: # include( "InDetCosmicRecExample/InDetCosmicFlags_jobOptions.py" ) if DetFlags.overlay.pixel_on(): job += CfgGetter.getAlgorithm("PixelOverlayDigitization") indetovl.do_Pixel = True if readBS and isRealData: job.InDetPixelRawDataProvider.EvtStore = "OriginalEvent_SG" #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "PixelRDO_Container/PixelRDOs" ] #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "Trk::PixelClusterContainer/PixelOnlineClusters" ] else: if not conddb.folderRequested('PIXEL/PixReco'): conddb.addFolder('PIXEL_OFL', '/PIXEL/PixReco') else: indetovl.do_Pixel = False if DetFlags.overlay.SCT_on(): # Setup the ReadCalibChip folders and Svc
def setup_muXX_cosmicEF(self): if 'SuperEF' in self.chainPart['EFAlg']: from AthenaCommon import CfgGetter theTrigMuSuperEF = CfgGetter.getAlgorithm("TrigMuSuperEF") theEFAlg = theTrigMuSuperEF EFRecoAlgName = "Muon" else: logMuonDef.error("Chain built with %s but so far only SuperEF is supported." % (self.chainPart['EFAlg'])) return False ##This is a problem.. SuperEF and msonly are not in the same chainPart... if 'msonly' in self.chainPart['reccalibInfo']: theTrigMuSuperEF = CfgGetter.getAlgorithm("TrigMuSuperEF_SAonly") theEFAlg = theTrigMuSuperEF from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFExtrapolatorHypoConfig EFExtrapolatorThresh = self.getEFExtrapolatorThresh() theTrigMuonEFExtrapolatorHypoConfig = TrigMuonEFExtrapolatorHypoConfig(EFRecoAlgName, EFExtrapolatorThresh) ########### Sequence List ############## self.EFsequenceList += [[[self.L2InputTE], [theEFAlg, theTrigMuonEFExtrapolatorHypoConfig], 'EF_mu_step1']] else: EFCombinerThresh = self.getEFCombinerThresh() ########### EF algos ################# from InDetTrigRecExample.EFInDetConfig import TrigEFIDInsideOut_CosmicsN theEFIDTracking=TrigEFIDInsideOut_CosmicsN() from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFCombinerHypoConfig theTrigMuonEFCombinerHypoConfig = TrigMuonEFCombinerHypoConfig(EFRecoAlgName,EFCombinerThresh) ########### Sequence List ############## self.EFsequenceList += [[[self.L2InputTE], ## old ## theTrigEFIDDataPrep_Muon+[theTrigFastTrackFinder_Muon,theTrigEFIDInsideOutMerged_Muon.getSequence()], #theTrigEFIDDataPrep_Muon+[theEFIDTracking,theTrigEFIDInsideOutMerged_Muon.getSequence()], theEFIDTracking.getSequence(), 'EF_mu_step1']] self.EFsequenceList += [[['EF_mu_step1'], [theEFAlg, theTrigMuonEFCombinerHypoConfig], 'EF_mu_step2']] ########### Signatures ########### self.EFsignatureList += [ [['EF_mu_step1']*self.mult] ] if not (self.chainPart['reccalibInfo'] == "msonly"): self.EFsignatureList += [ [['EF_mu_step2']*self.mult] ] ########### TE renaming ########## if (self.chainPart['reccalibInfo'] == "msonly"): self.TErenamingDict = { 'EF_mu_step1': mergeRemovingOverlap('EF_SuperEF_Extrapolator_', self.chainPartNameNoMult), } else: self.TErenamingDict = { 'EF_mu_step1': mergeRemovingOverlap('EF_CosmicsN_', self.chainPartNameNoMult), 'EF_mu_step2': mergeRemovingOverlap('EF_SuperEF_', self.chainPartNameNoMult), }
def setup_muXX_ID(self): L2AlgName = self.getL2AlgName() muFastThresh = self.getMuFastThresh() EFCombinerThresh = self.getEFCombinerThresh() #--- L2 algos --- if "l2muonSA" in self.chainPart['L2SAAlg']: from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAConfig theL2StandAloneAlg = TrigL2MuonSAConfig(L2AlgName) from TrigMuonHypo.TrigMuonHypoConfig import MufastHypoConfig theL2StandAloneHypo = MufastHypoConfig(L2AlgName, muFastThresh) else: logMuonDef.error("Chain built with %s but so far only l2muonSA is supported." % (self.chainPart['L2SAAlg'])) return False from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Muon theTrigFastTrackFinder_Muon = TrigFastTrackFinder_Muon() from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence theTrigEFIDDataPrep_Muon = TrigEFIDSequence("Muon","muon","DataPrep").getSequence() #if "L2StarA" in self.chainPart['L2IDAlg']: # ---> this is Run1 tracking - keep it here # from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_MuonA # theTrigL2SiTrackFinder_MuonA = TrigL2SiTrackFinder_MuonA() # from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_muonIsoA # theTrigL2SiTrackFinder_muonIsoA = TrigL2SiTrackFinder_muonIsoA() # id_alg_output = "STRATEGY_A" #depends on id_alg #else: # logMuonDef.error("Chain built with %s but so far only L2StarA,B and C are supported." % (self.chainPart['L2IDAlg'])) # return False #id_alg_output = "STRATEGY_A" id_alg_output = "TrigFastTrackFinder_Muon" if "muComb" in self.chainPart['L2CBAlg']: muCombThresh = self.getMuCombThresh() from TrigmuComb.TrigmuCombConfig import TrigmuCombConfig theL2CombinedAlg = TrigmuCombConfig(L2AlgName, id_alg_output) from TrigMuonHypo.TrigMuonHypoConfig import MucombHypoConfig theL2CombinedHypo = MucombHypoConfig(L2AlgName, muCombThresh) else: logMuonDef.error("Chain built with %s but so far only muComb is supported." % (self.chainPart['L2CBAlg'])) return False if "wOvlpRm" in self.chainPart['overlapRemoval']: from TrigMuonHypo.TrigL2MuonOverlapRemoverConfig import TrigL2MuonOverlapRemoverConfig theL2OvlpRmConfig_mufast = TrigL2MuonOverlapRemoverConfig('Mufast','nominal') theL2OvlpRmConfig_mucomb = TrigL2MuonOverlapRemoverConfig('Mucomb','nominal') #--- EF algos --- if 'SuperEF' in self.chainPart['EFAlg']: from AthenaCommon import CfgGetter theTrigMuSuperEF = CfgGetter.getAlgorithm("TrigMuSuperEF") EFRecoAlgName = "Muon" if ("ds2" in self.chainPart['addInfo']): theEFAlg= theTrigMuSuperEF theEFAlg.MuonContName = "HLT_MuonEFInfoDSOnly" else: theEFAlg = theTrigMuSuperEF else: logMuonDef.error("Chain built with %s but so far only SuperEF is supported." % (self.chainPart['EFAlg'])) return False from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFCombinerHypoConfig theTrigMuonEFCombinerHypoConfig = TrigMuonEFCombinerHypoConfig(EFRecoAlgName,EFCombinerThresh) from TrigMuonEF.TrigMuonEFConfig import TrigMuonEFTrackIsolationConfig from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFTrackIsolationHypoConfig from TrigInDetConf.TrigInDetSequence import TrigInDetSequence theFastTrackFinderxAOD = TrigInDetSequence("Muon","muon","FastxAOD").getSequence() from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence #theTrigEFIDInsideOut_Muon = TrigEFIDSequence("Muon","muon") # ---> this is Run1 tracking - keep it here theTrigEFIDInsideOutMerged_Muon = TrigEFIDSequence("Muon","muon","InsideOutMerged") theTrigEFIDInsideOut_MuonIso = TrigEFIDSequence("MuonIso","muonIso","InsideOut") #----Sequence list--- self.L2sequenceList += [[self.L2InputTE, [theL2StandAloneAlg , theL2StandAloneHypo], 'L2_mu_step1']] EFinputTE = '' if (self.doOvlpRm): self.L2sequenceList += [[['L2_mu_step1'], [theL2OvlpRmConfig_mufast ],'L2_step1a_wOvlpRm']] #self.L2sequenceList += [[['L2_muon_standalone_wOvlpRm'], # ---> this is Run1 tracking - keep it here # [theTrigL2SiTrackFinder_MuonA, # theL2CombinedAlg, theL2CombinedHypo], # 'L2_step1a_wOvlpRm']] self.L2sequenceList += [[['L2_step1a_wOvlpRm'], theTrigEFIDDataPrep_Muon+ [theTrigFastTrackFinder_Muon]+theFastTrackFinderxAOD+[theL2CombinedAlg, theL2CombinedHypo], 'L2_step1b_wOvlpRm']] self.L2sequenceList += [[['L2_step1b_wOvlpRm'], [ theL2OvlpRmConfig_mucomb ], 'L2_step2_wOvlpRm']] EFinputTE = 'L2_step2_wOvlpRm' else: #self.L2sequenceList += [[['L2_mu_step1'], # ---> this is Run1 tracking - keep it here # [theTrigL2SiTrackFinder_MuonA, # theL2CombinedAlg, theL2CombinedHypo], # #], # 'L2_mu_step2']] self.L2sequenceList += [[['L2_mu_step1'], theTrigEFIDDataPrep_Muon+ [theTrigFastTrackFinder_Muon]+theFastTrackFinderxAOD+ [theL2CombinedAlg, theL2CombinedHypo], 'L2_mu_step2']] EFinputTE = 'L2_mu_step2' #self.EFsequenceList += [[[EFinputTE], # ---> this is Run1 tracking - keep it here # theTrigEFIDInsideOut_Muon.getSequence(), # 'EF_mu_step1']] self.EFsequenceList += [[[EFinputTE], theTrigEFIDInsideOutMerged_Muon.getSequence(), 'EF_mu_step1']] self.EFsequenceList += [[['EF_mu_step1'], [theEFAlg, theTrigMuonEFCombinerHypoConfig], 'EF_mu_step2']] if self.chainPart['isoInfo']: if self.chainPart['isoInfo'] == "iloose": theTrigMuonEFTrackIsolationHypoConfig = TrigMuonEFTrackIsolationHypoConfig("Muon","RelEFOnlyMedium") elif self.chainPart['isoInfo'] == "imedium": theTrigMuonEFTrackIsolationHypoConfig = TrigMuonEFTrackIsolationHypoConfig("Muon","RelEFOnlyTightWide") else: logMuonDef.error("Isolation %s not yet supported." % (self.chainPart['isoInfo'])) return False self.EFsequenceList += [[['EF_mu_step2'], theTrigEFIDInsideOut_MuonIso.getSequence(), 'EF_mu_step3']] self.EFsequenceList += [[['EF_mu_step3'], [TrigMuonEFTrackIsolationConfig("TrigMuonEFTrackIsolation"),theTrigMuonEFTrackIsolationHypoConfig], 'EF_mu_step4']] #--- adding signatures ---- self.L2signatureList += [ [['L2_mu_step1']*self.mult] ] if (self.doOvlpRm): self.L2signatureList += [ [['L2_step1a_wOvlpRm']*self.mult] ] self.L2signatureList += [ [['L2_step1b_wOvlpRm']*self.mult] ] self.L2signatureList += [ [['L2_step2_wOvlpRm']*self.mult] ] else: self.L2signatureList += [ [['L2_mu_step2']*self.mult] ] self.EFsignatureList += [ [['EF_mu_step1']*self.mult] ] self.EFsignatureList += [ [['EF_mu_step2']*self.mult] ] if (self.chainPart['isoInfo']):# == "iloose" or self.chainPart['isoInfo'] == "imedium": self.EFsignatureList += [ [['EF_mu_step3']*self.mult] ] self.EFsignatureList += [ [['EF_mu_step4']*self.mult] ] if "ds" in self.chainPart['addInfo']: self.EFsignatureList += [ [['EF_mu_ds']] ] #--- renaming TEs --- self.TErenamingDict = { 'L2_mu_step1': mergeRemovingOverlap('L2_mu_SA_', L2AlgName+muFastThresh+'_'+self.L2InputTE), 'L2_mu_step2': mergeRemovingOverlap('L2_mucomb_', self.chainPartNameNoMult.replace('_'+self.chainPart['isoInfo'], '')+'_'+self.L2InputTE), 'EF_mu_step1': mergeRemovingOverlap('EF_EFIDInsideOut_', self.chainPartNameNoMult+'_'+self.L2InputTE), 'EF_mu_step2': mergeRemovingOverlap('EF_SuperEF_', self.chainPartNameNoMult+'_'+self.L2InputTE), } if (("ds1" in self.chainPart['addInfo'])): chainPartNameNoMultNoDS = self.chainPartNameNoMult.replace('_ds1', '') elif (("ds2" in self.chainPart['addInfo'])): chainPartNameNoMultNoDS = self.chainPartNameNoMult.replace('_ds2', '') else: chainPartNameNoMultNoDS = self.chainPartNameNoMult if (self.chainPart['isoInfo']): self.TErenamingDict.update({'EF_mu_step1': mergeRemovingOverlap('EF_EFIDInsideOut_', chainPartNameNoMultNoDS.replace('_'+self.chainPart['isoInfo'],'')), 'EF_mu_step2': mergeRemovingOverlap('EF_SuperEF_', chainPartNameNoMultNoDS.replace('_'+self.chainPart['isoInfo'],'')), 'EF_mu_step3': mergeRemovingOverlap('EF_muI_efid_', chainPartNameNoMultNoDS), 'EF_mu_step4': mergeRemovingOverlap('EF_trkIso_', chainPartNameNoMultNoDS)}) if self.doOvlpRm: self.TErenamingDict.update({'L2_step1a_wOvlpRm' : mergeRemovingOverlap('L2_mu_SAOvlpRm_', L2AlgName+muFastThresh+'_'+self.L2InputTE+'_wOvlpRm' ), 'L2_step1b_wOvlpRm' : mergeRemovingOverlap('L2_muon_comb', L2AlgName+muCombThresh+'_'+self.L2InputTE+'_wOvlpRm' ), 'L2_step2_wOvlpRm' : mergeRemovingOverlap('L2_mu_combOvlpRm_', L2AlgName+muCombThresh+'_'+self.L2InputTE+'_wOvlpRm'), 'EF_mu_step1': mergeRemovingOverlap('EF_EFIDInsideOut_', chainPartNameNoMultNoDS+'_wOvlpRm'), 'EF_mu_step2': mergeRemovingOverlap('EF_SuperEF_', chainPartNameNoMultNoDS+'_wOvlpRm')}) if self.doOvlpRm and self.chainPart['isoInfo']: self.TErenamingDict.update({'L2_step1a_wOvlpRm' : mergeRemovingOverlap('L2_mu_SAOvlpRm_', L2AlgName+muFastThresh+'_'+self.L2InputTE+'_wOvlpRm' ), 'L2_step1b_wOvlpRm' : mergeRemovingOverlap('L2_muon_comb', L2AlgName+muCombThresh+'_'+self.L2InputTE+'_wOvlpRm' ), 'L2_step2_wOvlpRm' : mergeRemovingOverlap('L2_mu_combOvlpRm_', L2AlgName+muCombThresh+'_'+self.L2InputTE+'_wOvlpRm'), 'EF_mu_step1': mergeRemovingOverlap('EF_EFIDInsideOut_', chainPartNameNoMultNoDS+'_wOvlpRm'), 'EF_mu_step2': mergeRemovingOverlap('EF_SuperEF_', chainPartNameNoMultNoDS+'_wOvlpRm'), 'EF_mu_step3': mergeRemovingOverlap('EF_muI_efid_', chainPartNameNoMultNoDS+'_wOvlpRm'), 'EF_mu_step4': mergeRemovingOverlap('EF_trkIso_', chainPartNameNoMultNoDS+'_wOvlpRm')})
include.block("PixelDigitization/PixelDigitization_jobOptions.py") # from GaudiKernel.GaudiHandles import ServiceHandle # make sure ToolSvc is there... if not "ToolSvc" in theApp.ExtSvc and \ not "ToolSvc/ToolSvc" in theApp.ExtSvc: theApp.ExtSvc += [ "ToolSvc/ToolSvc"] pass from Digitization.DigitizationFlags import digitizationFlags from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from AthenaCommon import CfgGetter if 'doSplitDigi' in jobproperties.Digitization.experimentalDigi(): job += CfgGetter.getAlgorithm("PixelDigitizationHS") job += CfgGetter.getAlgorithm("PixelDigitizationPU") pix=ToolSvc.PixelDigitizationToolHS pix2=ToolSvc.PixelDigitizationToolPU print "Number Of Collisions per beam crossing", digitizationFlags.numberOfCollisions.get_Value() print "************************************************************************************************************" print pix print pix2 else: # this will create one digitization with all default properties job += CfgGetter.getAlgorithm("PixelDigitization/PixelDigitization", tryDefaultConfigurable=True) pix = ToolSvc.PixelDigitizationTool print "Number Of Collisions per beam crossing", digitizationFlags.numberOfCollisions.get_Value() print "************************************************************************************************************" print pix
job.TileHitToTTL1.TileTTL1Container = overlayFlags.sigPrefix( ) + 'TileTTL1Cnt' job.TileHitToTTL1.TileMBTSTTL1Container = overlayFlags.sigPrefix( ) + 'TileTTL1MBTS' else: job.TileHitToTTL1.TileTTL1Container = overlayFlags.evtStore( ) + '+TileTTL1Cnt' job.TileHitToTTL1.TileMBTSTTL1Container = overlayFlags.evtStore( ) + '+TileTTL1MBTS' include("TileSimAlgs/TileMuonReceiver_jobOptions.py") # Add special TTL1 overlay algorithm only for MC+MC overlay if not overlayFlags.isDataOverlay() and DetFlags.simulateLVL1.LAr_on( ) and DetFlags.simulateLVL1.Tile_on(): job += CfgGetter.getAlgorithm("OverlayTTL1") if DetFlags.digitize.LVL1_on(): #-------------------------------------------------------------- # set up TrigConfigSvc for LVL1 simulation #-------------------------------------------------------------- #In case TriggerFlags are not setup if 'TriggerFlags' not in dir(): log.info( "TriggerFlags not previously defined so using default XML file" ) # enable reading from XML file option and then set trigger menu from TriggerJobOpts.TriggerFlags import TriggerFlags # default is taken from TriggerFlags of TriggerJobOpts package TriggerFlags.triggerConfig = "LVL1:default"
from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from AthenaCommon import CfgGetter job += CfgGetter.getAlgorithm("ALFA_DigiAlg/ALFA_DigiAlg", tryDefaultConfigurable=True) alfa = job.ALFA_DigiAlg.DigitizationTool
include.block("EventOverlayJobTransforms/ConfiguredOverlay_jobOptions.py") #-------------------------------------------------------------- # Load POOL support # (modified by Piyali.Banerjee to include skip events) #-------------------------------------------------------------- from AthenaCommon import CfgGetter from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() topSequence = job if not overlayFlags.isDataOverlay(): job += CfgGetter.getAlgorithm("CopyTimings") # Always schedule beam spot conditions for overlay include("Digitization/BeamSpot.py") #======================================================================= from AthenaCommon.AppMgr import ServiceMgr from PileUpComps.PileUpCompsConf import PileUpEventLoopMgr from PileUpComps.PileUpCompsConf import BkgStreamsCache import AthenaPoolCnvSvc.WriteAthenaPool from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import EventSelectorAthenaPool from StoreGate.StoreGateConf import StoreGateSvc from Digitization.DigitizationFlags import digitizationFlags from OverlayCommonAlgs.OverlayFlags import overlayFlags pileUpEventLoopMgr = PileUpEventLoopMgr(EventInfoName="Input_EventInfo")
include.block ( "EventOverlayJobTransforms/BeamOverlay_jobOptions.py" ) from AthenaCommon.DetFlags import DetFlags from AthenaCommon.Resilience import treatException,protectedInclude if DetFlags.overlay.BCM_on(): protectedInclude( "InDetBCM_EventAthenaPool/InDetBCM_EventAthenaPool_joboptions.py" ) from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from AthenaCommon import CfgGetter job += CfgGetter.getAlgorithm("BCM_OverlayDigitization")
from AthenaCommon import CfgGetter CfgGetter.getAlgorithm("BCM_Digitization")
AddressRemappingSvc.addInputRename("McEventCollection", "TruthEvent", "Sig_TruthEvent") AddressRemappingSvc.addInputRename("RecoTimingObj", "EVNTtoHITS_timings", "Sig_EVNTtoHITS_timings") svcMgr.AddressRemappingSvc.OutputLevel = DEBUG #-------------------------------------------------------------- # Event related parameters #-------------------------------------------------------------- theApp.EvtMax = 10 #-------------------------------------------------------------- # Algorithms #-------------------------------------------------------------- from AthenaCommon import CfgGetter topSequence += CfgGetter.getAlgorithm("CopyMcEventCollection") topSequence += CfgGetter.getAlgorithm("CopyTimings") #-------------------------------------------------------------- # Athena EventLoop Manager #-------------------------------------------------------------- from AthenaCommon.ConcurrencyFlags import jobproperties as jp nThreads = jp.ConcurrencyFlags.NumThreads() from AthenaServices import AthenaServicesConf if nThreads > 0: EventLoop = AthenaServicesConf.AthenaHiveEventLoopMgr() else: EventLoop = AthenaServicesConf.AthenaEventLoopMgr() EventLoop.UseSecondaryEventNumber = True EventLoop.OutputLevel = INFO svcMgr += EventLoop
muonRecFlags.doCSCs.set_Value_and_Lock = True #FIXME should not be setting jobproperties at this point in the configuration. from MuonByteStream.MuonByteStreamFlags import muonByteStreamFlags muonByteStreamFlags.TgcDataType = "atlas" #FIXME should not be setting jobproperties at this point in the configuration. muonByteStreamFlags.RpcDataType = "atlas" #FIXME should not be setting jobproperties at this point in the configuration. muonByteStreamFlags.MdtDataType = "atlas" #FIXME should not be setting jobproperties at this point in the configuration. import MuonCnvExample.MuonCablingConfig digitizationFlags.doMuonNoise = False #FIXME should not be setting jobproperties at this point in the configuration. if overlayFlags.isDataOverlay(): include("MuonCnvExample/MuonReadBS_jobOptions.py") if DetFlags.overlay.CSC_on(): job += CfgGetter.getAlgorithm("CscOverlayDigitBuilder") job += CfgGetter.getAlgorithm("CscDigitToCscRDO4") job += CfgGetter.getAlgorithm("CscOverlay") if not overlayFlags.isDataOverlay(): job += CfgGetter.getAlgorithm("CscTruthOverlay") if DetFlags.overlay.MDT_on(): job += CfgGetter.getAlgorithm("MdtRdoToMdtDigitAlg") job += CfgGetter.getAlgorithm("MDT_OverlayDigitizer") job += CfgGetter.getAlgorithm("MdtOverlay") if not overlayFlags.isDataOverlay(): job += CfgGetter.getAlgorithm("MdtTruthOverlay") job += CfgGetter.getAlgorithm("MdtDigitToMdtRDO") if DetFlags.overlay.sTGC_on(): # As of July 2019, the input RDOs still hold a DigitContainer
include.block("MuonByteStreamCnvTest/CscDigitToCscRDO_jobOptions.py") print "DEPRECATION WARNING: please replace include(\"MuonByteStreamCnvTest/CscDigitToCscRDO_jobOptions.py\")\nwith:\nfrom AthenaCommon import CfgGetter\njob += CfgGetter.getAlgorithm(\"CscDigitToCscRDO/CscDigitToCscRDO\", tryDefaultConfigurable=True)" from AthenaCommon.AlgSequence import AlgSequence from AthenaCommon import CfgGetter job = AlgSequence() job += CfgGetter.getAlgorithm("CscDigitToCscRDO/CscDigitToCscRDO", tryDefaultConfigurable=True) # defined in MuonCnvExample/python/MuonCnvConfig.py
theApp.EvtMax = 100 #-------------------------------------------------------------- # Algorithms #-------------------------------------------------------------- # Beam spot conditions from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") from IOVDbSvc.CondDB import conddb conddb.addFolderSplitOnline("INDET", "/Indet/Onl/Beampos", "/Indet/Beampos", className="AthenaAttributeList") from BeamSpotConditions.BeamSpotConditionsConf import BeamSpotCondAlg condSeq += BeamSpotCondAlg("BeamSpotCondAlg") # Run the overlay from AthenaCommon import CfgGetter EventInfoOverlay = CfgGetter.getAlgorithm("EventInfoOverlay") EventInfoOverlay.OutputLevel = DEBUG topSequence += EventInfoOverlay #-------------------------------------------------------------- # EventLoop #-------------------------------------------------------------- from AthenaCommon.ConcurrencyFlags import jobproperties as jp nThreads = jp.ConcurrencyFlags.NumThreads() if nThreads > 0: EventLoop = Service("AthenaHiveEventLoopMgr") else: EventLoop = Service("AthenaEventLoopMgr") EventLoop.UseSecondaryEventNumber = True svcMgr += EventLoop
# ToolSvc.MdtDigitizationTool.GetT0FromBD = True #t if readBS and isRealData: #t if not hasattr(ToolSvc, 'Mdt_OverlayDigitizationTool'): # t from AthenaCommon import CfgGetter # t ToolSvc += CfgGetter.getPrivateTool("Mdt_OverlayDigitizationTool") #, checkType=True) # ToolSvc.Mdt_OverlayDigitizationTool.GetT0FromBD = True #jobproperties.Digitization.rndmSeedList.addSeed("MDTResponse", 49261510,105132394 ) #jobproperties.Digitization.rndmSeedList.addSeed("MDT_Digitization", 393242561, 857132381 ) #from AthenaCommon import CfgGetter #from MdtOverlay.MdtOverlayConf import MdtOverlay job += CfgGetter.getAlgorithm("MdtOverlay") #job.MdtOverlay.mainInputMDT_Name = "MDT_DIGITS" #job.MdtOverlay.overlayInputMDT_Name = "MDT_DIGITS" #job.MdtOverlay.IntegrationWindow = 20 #job.MdtOverlay.DigitizationTool = ToolSvc.Mdt_OverlayDigitizationTool #job.MdtOverlay.ConvertRDOToDigitTool = MuonRdoToMuonDigitTool #job.MdtOverlay.DigitizationTool.EvtStore = job.MdtOverlay.MCStore #job.MdtOverlay.ConvertRDOToDigitTool.RetrievePrivateCopy = True #job.MdtOverlay.ConvertRDOToDigitTool.DataStore = job.MdtOverlay.DataStore #from OverlayCommonAlgs.OverlayFlags import overlayFlags #if overlayFlags.doSignal==True: # job.MdtOverlay.CopyObject = True #from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import MdtDigitToMdtRDO #job += MdtDigitToMdtRDO()
#------------------------- # Timings #------------------------- try: from RecAlgs.RecAlgsConf import TimingAlg job += TimingAlg("OverlayTimerBegin", TimingObjOutputName="HITStoRDO_timings") except Exception: from AthenaCommon.Logging import logging logOverlay = logging.getLogger('Overlay') logOverlay.warning( 'Could not add TimingAlg, no timing info will be written out.') # Copy over timings if needed if not overlayFlags.isDataOverlay(): job += CfgGetter.getAlgorithm("CopyTimings") #------------------------- # Double event selector #------------------------- import AthenaPoolCnvSvc.ReadAthenaPoolDouble from AthenaCommon.AppMgr import ServiceMgr from AthenaCommon.AthenaCommonFlags import athenaCommonFlags if overlayFlags.isDataOverlay(): ServiceMgr.DoubleEventSelector.InputCollections = athenaCommonFlags.PoolHitsInput( ) ServiceMgr.SecondaryEventSelector.Input = athenaCommonFlags.FilesInput() ServiceMgr.SecondaryEventSelector.ProcessBadEvent = True else: ServiceMgr.DoubleEventSelector.InputCollections = athenaCommonFlags.PoolRDOInput( )
def setup_xeXX(self): ##EF only chain, run FEB or topo_cluster ##NoAlg at L2 ##if at a certain point different steps are used at EF, ## we need a way to encode the information of the threshold at both the two steps ##could be a dict here, or adding something to the SignatureDictionary threshold = int(self.chainPart['threshold']) calibration = self.chainPart['calib'] L2recoAlg = self.chainPart['L2recoAlg'] EFrecoAlg = self.chainPart['EFrecoAlg'] L2muon = self.chainPart['L2muonCorr'] EFmuon = self.chainPart['EFmuonCorr'] #muonSeed="EF_SuperEF_mu8" muonSeed="EF_mu_step2" logMETDef.info("Creating muon sequence") ## --- HARD-CODED MUON CHAIN --- muThreshold=8 L2AlgName = 'Muon' muFastThresh = '6GeV_v11a' muCombThresh = str(muThreshold)+"GeV" #id_alg_output = "STRATEGY_A" id_alg_output = "TrigFastTrackFinder_Muon" EFRecoAlgName = "Muon" from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAConfig theL2StandAloneAlg = TrigL2MuonSAConfig(L2AlgName) from TrigMuonHypo.TrigMuonHypoConfig import MufastHypoConfig theL2StandAloneHypo = MufastHypoConfig(L2AlgName, muFastThresh) from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Muon theTrigFastTrackFinder_Muon = TrigFastTrackFinder_Muon() from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence theTrigEFIDDataPrep_Muon = TrigEFIDSequence("Muon","muon","DataPrep").getSequence() #from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_MuonA #theTrigL2SiTrackFinder_MuonA = TrigL2SiTrackFinder_MuonA() #theL2IDAlg = theTrigL2SiTrackFinder_MuonA from TrigmuComb.TrigmuCombConfig import TrigmuCombConfig theL2CombinedAlg = TrigmuCombConfig(L2AlgName, id_alg_output) from TrigMuonHypo.TrigMuonHypoConfig import MucombHypoConfig theL2CombinedHypo = MucombHypoConfig(L2AlgName, muCombThresh) from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence theTrigEFIDInsideOut_Muon = TrigEFIDSequence("Muon","muon","InsideOutMerged") #theTrigEFIDInsideOut_Muon = TrigEFIDSequence("Muon","muon") ##Run1 tracking from AthenaCommon import CfgGetter theTrigMuSuperEF = CfgGetter.getAlgorithm("TrigMuSuperEF") theEFAlg = theTrigMuSuperEF from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFCombinerHypoConfig theTrigMuonEFCombinerHypoConfig = TrigMuonEFCombinerHypoConfig(EFRecoAlgName,str(muThreshold)+"GeV") L2_mu_step1_TE = 'muonstandalone_'+L2AlgName+'_muFast'+muFastThresh L2muonInputTE = 'MU6' self.L2sequenceList += [[L2muonInputTE, [theL2StandAloneAlg , theL2StandAloneHypo], 'L2_mu_step1']] self.L2sequenceList += [[['L2_mu_step1'], theTrigEFIDDataPrep_Muon+ [theTrigFastTrackFinder_Muon, theL2CombinedAlg, theL2CombinedHypo], 'L2_mu_step2']] self.EFsequenceList += [[['L2_mu_step2'], theTrigEFIDInsideOut_Muon.getSequence(), 'EF_mu_step1']] self.EFsequenceList += [[['EF_mu_step1'], [ theEFAlg, theTrigMuonEFCombinerHypoConfig], 'EF_mu_step2']] ########### Imports for hypos and fexes ########### ##L1 MET from TrigL2MissingET.TrigL2MissingETConfig import L2MissingET_Fex theL2Fex = L2MissingET_Fex() from TrigMissingETMuon.TrigMissingETMuonConfig import L2TrigMissingETMuon_Fex theL2MuonFex = L2TrigMissingETMuon_Fex() ##FEB MET at L2 from TrigL2MissingET.TrigL2MissingETConfig import L2CaloMissingET_Fex_ReadL2L1 theL2FEBL1Check = L2CaloMissingET_Fex_ReadL2L1() from TrigMissingETMuon.TrigMissingETMuonConfig import L2CaloTrigMissingETMuon_Fex theL2FEBMuonFex = L2CaloTrigMissingETMuon_Fex() mucorr= '_wMu' if L2muon else '' if L2recoAlg=="L2FS": from TrigMissingETHypo.TrigMissingETHypoConfig import L2MetHypoFEBXE theL2MuonHypo = L2MetHypoFEBXE(name='L2MetHypo_xe%d%s_FEB'%(threshold,mucorr),l2_thr=threshold*GeV) else: from TrigMissingETHypo.TrigMissingETHypoConfig import L2MetHypoXE theL2MuonHypo = L2MetHypoXE('L2MetHypo_xe_noL2%s' %mucorr,l2_thr=threshold*GeV) ##MET with topo-cluster if EFrecoAlg=='tc' or EFrecoAlg=='pueta': ##Topo-cluster if EFrecoAlg=='tc': #MET fex from TrigEFMissingET.TrigEFMissingETConfig import EFMissingET_Fex_topoClusters theEFMETFex = EFMissingET_Fex_topoClusters() #Muon correction fex from TrigMissingETMuon.TrigMissingETMuonConfig import EFTrigMissingETMuon_Fex_topocl theEFMETMuonFex = EFTrigMissingETMuon_Fex_topocl() #TC hypo mucorr= '_wMu' if EFmuon else '' from TrigMissingETHypo.TrigMissingETHypoConfig import EFMetHypoTCXE if self.chainPart['trigType'] == "xs": from TrigMissingETHypo.TrigMissingETHypoConfig import EFMetHypoXS_2sided theEFMETHypo = EFMetHypoXS_2sided('EFMetHypo_xs_2sided_%i%s' % (threshold, mucorr),ef_thr=float(threshold)*0.1) elif self.chainPart['trigType'] == "te": from TrigMissingETHypo.TrigMissingETHypoConfig import EFMetHypoTE theEFMETHypo = EFMetHypoTE('EFMetHypo_te%d' % threshold,ef_thr=float(threshold)*GeV) else: theEFMETHypo = EFMetHypoTCXE('EFMetHypo_TC_xe%s_tc%s%s'%(threshold,calibration,mucorr),ef_thr=float(threshold)*GeV) ##Topo-cluster with Pile-up suppression if EFrecoAlg=='pueta': #MET fex from TrigEFMissingET.TrigEFMissingETConfig import EFMissingET_Fex_topoClustersPS theEFMETFex = EFMissingET_Fex_topoClustersPS() #Muon correction fex from TrigMissingETMuon.TrigMissingETMuonConfig import EFTrigMissingETMuon_Fex_topoclPS theEFMETMuonFex = EFTrigMissingETMuon_Fex_topoclPS() mucorr= '_wMu' if EFmuon else '' from TrigMissingETHypo.TrigMissingETHypoConfig import EFMetHypoTCPSXE theEFMETHypo = EFMetHypoTCPSXE('EFMetHypo_TCPS_xe%s_tc%s%s'%(threshold,calibration,mucorr),ef_thr=float(threshold)*GeV) ##2-SidedNoise Cell elif EFrecoAlg=='cell': #MET fex from TrigEFMissingET.TrigEFMissingETConfig import EFMissingET_Fex_2sidednoiseSupp theEFMETFex = EFMissingET_Fex_2sidednoiseSupp() #Muon correction fex from TrigMissingETMuon.TrigMissingETMuonConfig import EFTrigMissingETMuon_Fex theEFMETMuonFex = EFTrigMissingETMuon_Fex() #Hypo if self.chainPart['trigType'] == "xs": from TrigMissingETHypo.TrigMissingETHypoConfig import EFMetHypoXS_2sided theEFMETHypo = EFMetHypoXS_2sided('EFMetHypo_xs_2sided_%d%s' % (threshold, mucorr),ef_thr=float(threshold)*0.1) elif self.chainPart['trigType'] == "te": from TrigMissingETHypo.TrigMissingETHypoConfig import EFMetHypoTE theEFMETHypo = EFMetHypoTE('EFMetHypo_te%d'% threshold,ef_thr=threshold*GeV) else: from TrigMissingETHypo.TrigMissingETHypoConfig import EFMetHypoXE theEFMETHypo = EFMetHypoXE('EFMetHypo_xe%s%s'%(threshold,mucorr),ef_thr=float(threshold)*GeV) else: logMETDef.warning("MET EF algorithm not recognised") from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo as DummyAlgo roi_topo = DummyAlgo('RoiCreator') from TrigCaloRec.TrigCaloRecConfig import TrigCaloCellMaker_jet_fullcalo cell_maker_fullcalo_topo = TrigCaloCellMaker_jet_fullcalo("CellMakerFullCalo_topo",doNoise=0, AbsE=True, doPers=True) from TrigCaloRec.TrigCaloRecConfig import TrigCaloClusterMaker_topo topocluster_maker_fullcalo = TrigCaloClusterMaker_topo('TrigCaloClusterMaker_topo_fullscan',doMoments=True,doLC=True) ########### Sequences ########### #Run L2-like algos only for l2fsperf and L2FS chains if L2recoAlg=="l2fsperf" or L2recoAlg=="L2FS": ##L1 MET self.L2sequenceList += [[ self.l2_input_tes, [theL2Fex], 'L2_xe_step1']] ##Moun Correction to L1 MET self.L2sequenceList += [[ ['L2_xe_step1', muonSeed], [theL2MuonFex], 'L2_xe_step2']] ##FEB Met self.L2sequenceList += [[ 'L2_xe_step2', [theL2FEBL1Check], 'L2_xe_step3']] if L2recoAlg=="l2fsperf": #Only execute Muon FEB MET and muon correction self.L2sequenceList += [[ ['L2_xe_step3',muonSeed], [theL2FEBMuonFex], 'L2_xe_step4']] if L2recoAlg=="L2FS": #Hypo on FEB MET self.L2sequenceList += [[ ['L2_xe_step3',muonSeed], [theL2FEBMuonFex,theL2MuonHypo], 'L2_xe_step4']] # --- EF --- #topocluster if EFrecoAlg=='tc' or EFrecoAlg=='pueta': self.EFsequenceList +=[[ '',[roi_topo],'EF_full']] self.EFsequenceList +=[[ 'EF_full',[cell_maker_fullcalo_topo, topocluster_maker_fullcalo],'EF_full_cluster']] self.EFsequenceList +=[[ ['EF_full_cluster'], [theEFMETFex], 'EF_xe_step1' ]] self.EFsequenceList +=[[ ['EF_xe_step1',muonSeed], [theEFMETMuonFex, theEFMETHypo], 'EF_xe_step2' ]] #cell based MET elif EFrecoAlg=='cell': self.EFsequenceList +=[[ [''], [theEFMETFex], 'EF_xe_step1' ]] self.EFsequenceList +=[[ ['EF_xe_step1',muonSeed], [theEFMETMuonFex, theEFMETHypo], 'EF_xe_step2' ]] ########### Signatures ########### #if L2muonSeed or EFmuonSeed: # self.L2signatureList += [ [['L2_mu_step1']*self.mult] ] # self.L2signatureList += [ [['L2_mu_step2']*self.mult] ] # self.EFsignatureList += [ [['EF_mu_step1']*self.mult] ] # self.EFsignatureList += [ [['EF_mu_step2']*self.mult] ] if L2recoAlg=="l2fsperf" or L2recoAlg=="L2FS" : self.L2signatureList += [ [['L2_xe_step1']] ] self.L2signatureList += [ [['L2_xe_step2']] ] self.L2signatureList += [ [['L2_xe_step3']] ] self.L2signatureList += [ [['L2_xe_step4']] ] #if EFrecoAlg=='tc': #self.EFsignatureList += [ [['EF_FSTopoClusters']] ] #self.EFsignatureList += [ [['EF_topocluster_step1']] ] #self.EFsignatureList += [ [['EF_topocluster_step2']] ] self.EFsignatureList += [ [['EF_xe_step1']] ] self.EFsignatureList += [ [['EF_xe_step2']] ] ########### TE renaming ########### self.TErenamingDict = {} if L2muon or EFmuon: muchain = 'mu8' self.TErenamingDict['L2_mu_step1']= mergeRemovingOverlap('L2_mu_SA_',L2AlgName+muFastThresh+'_'+L2muonInputTE) self.TErenamingDict['L2_mu_step2']= mergeRemovingOverlap('L2_mucomb_',muchain +'_'+L2muonInputTE) self.TErenamingDict['EF_mu_step1']= mergeRemovingOverlap('EF_EFIDInsideOut_' ,muchain) self.TErenamingDict['EF_mu_step2']= mergeRemovingOverlap('EF_SuperEF_', muchain) #self.TErenamingDict['L2_mu_step1']= mergeRemovingOverlap('L2_', "muon_standalone_"+ muchain) #self.TErenamingDict['L2_mu_step2']= mergeRemovingOverlap('L2_', muchain) #self.TErenamingDict['EF_mu_step1']= mergeRemovingOverlap('EFID_', muchain) #self.TErenamingDict['EF_mu_step2']= mergeRemovingOverlap('EF_', muchain) if L2recoAlg=="l2fsperf" or L2recoAlg=="L2FS" : self.TErenamingDict['L2_xe_step1']= mergeRemovingOverlap('L2_', self.sig_id_noMult+'_step1') self.TErenamingDict['L2_xe_step2']= mergeRemovingOverlap('L2_', self.sig_id_noMult+'_step2') self.TErenamingDict['L2_xe_step3']= mergeRemovingOverlap('L2_', self.sig_id_noMult+'_step3') self.TErenamingDict['L2_xe_step4']= mergeRemovingOverlap('L2_', self.sig_id_noMult+'_step4') self.TErenamingDict['EF_xe_step1']= mergeRemovingOverlap('EF_', self.sig_id_noMult+'_step1') self.TErenamingDict['EF_xe_step2']= mergeRemovingOverlap('EF_', self.sig_id_noMult)
from AthenaCommon.DetFlags import DetFlags from AthenaCommon import CfgGetter # Set up ComTimeRec for cosmics digitization from AthenaCommon.BeamFlags import jobproperties if jobproperties.Beam.beamType == "cosmics" : from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() from CommissionRec.CommissionRecConf import ComTimeRec comTimeRec = ComTimeRec("ComTimeRec") topSequence += comTimeRec from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from Digitization.DigitizationFlags import digitizationFlags job += CfgGetter.getAlgorithm(digitizationFlags.digiSteeringConf.get_Value(), tryDefaultConfigurable=True) if 'doFastPixelDigi' in digitizationFlags.experimentalDigi() or 'doFastSCT_Digi' in digitizationFlags.experimentalDigi() or 'doFastTRT_Digi' in digitizationFlags.experimentalDigi(): print "WARNING Setting doFastPixelDigi ,doFastSCT_Digi or doFastTRT_Digi in digitizationFlags.experimentalDigi no longer overrides digitizationFlags.digiSteeringConf." elif 'doSplitDigi' in digitizationFlags.experimentalDigi(): print "WARNING Setting doSplitDigi in digitizationFlags.experimentalDigi no longer overrides digitizationFlags.digiSteeringConf. Use --digiSteeringConf 'Split' on the command-line instead." # MC Truth info #if DetFlags.Truth_on(): # include( "Digitization/TruthDigitization.py" ) # Forward Detectors #if DetFlags.Forward_on(): # include( "Digitization/FwdDetDigitization.py" ) # Inner Detector
include.block("EventOverlayJobTransforms/TruthOverlay_jobOptions.py") from AthenaCommon import CfgGetter from OverlayCommonAlgs.OverlayFlags import overlayFlags # Copy McEventCollection job += CfgGetter.getAlgorithm("CopyMcEventCollection") # Copy CaloCalibrationHitContainer(s) and TrackRecordCollection(s) if 'TrackRecordCollection' in overlayFlags.optionalContainerMap(): for collection in overlayFlags.optionalContainerMap( )['TrackRecordCollection']: job += CfgGetter.getAlgorithmClone('CopyTrackRecordCollection' + collection, 'CopyTrackRecordCollection', collectionName=collection) if 'CaloCalibrationHitContainer' in overlayFlags.optionalContainerMap(): for collection in overlayFlags.optionalContainerMap( )['CaloCalibrationHitContainer']: job += CfgGetter.getAlgorithmClone('CopyCaloCalibrationHitContainer' + collection, 'CopyCaloCalibrationHitContainer', collectionName=collection) # Copy jet truth if not overlayFlags.isDataOverlay(): job += CfgGetter.getAlgorithm("CopyInTimeJetTruthInfo") job += CfgGetter.getAlgorithm("CopyOutOfTimeJetTruthInfo")
include.block("EventOverlayJobTransforms/TileMcSignal_jobOptions.py") from AthenaCommon.AppMgr import ToolSvc from AthenaCommon.GlobalFlags import globalflags from AthenaCommon import CfgGetter if DetFlags.overlay.Tile_on(): #copy stuff back into the MC before persstency from OverlayCommonAlgs.OverlayCommonAlgsConf import RemoveObjects job += RemoveObjects("RemoveTileOldMC") if globalflags.DataSource() == 'data': job.RemoveTileOldMC.RemoveTileMC = True from TileRecUtils.TileRecFlags import jobproperties job += CfgGetter.getAlgorithm("TileHitVecToCnt/tilehitvect", tryDefaultConfigurable=True) tileHitVecToCnt = job.tilehitvect.DigitizationTool tileHitVecToCnt.EvtStore = "BkgEvent_0_SG" tileHitVecToCnt.RndmEvtOverlay = False tileHitVecToCnt.RndmSvc = job.TileHitVecToCnt.DigitizationTool.RndmSvc tileHitVecToCnt.TileHitVectors = job.TileHitVecToCnt.DigitizationTool.TileHitVectors tileHitVecToCnt.TileInfoName = job.TileHitVecToCnt.DigitizationTool.TileInfoName tileHitVecToCnt.TileHitContainer = job.TileHitVecToCnt.DigitizationTool.TileHitContainer from TileSimAlgs.TileSimAlgsConf import TileDigitsMaker theTileDigits = TileDigitsMaker("tiledigitmaker2") theTileDigits.EvtStore = "BkgEvent_0_SG" theTileDigits.TileHitContainer = job.TileDigitsMaker.TileHitContainer theTileDigits.TileInfoName = job.TileDigitsMaker.TileInfoName theTileDigits.IntegerDigits = job.TileDigitsMaker.IntegerDigits theTileDigits.CalibrationRun = job.TileDigitsMaker.CalibrationRun theTileDigits.TileDigitsContainer = job.TileDigitsMaker.TileDigitsContainer
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Always schedule beam spot conditions for digi from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") if not hasattr(condSeq, "BeamSpotCondAlg"): from IOVDbSvc.CondDB import conddb conddb.addFolderSplitOnline("INDET", "/Indet/Onl/Beampos", "/Indet/Beampos", className="AthenaAttributeList") from BeamSpotConditions.BeamSpotConditionsConf import BeamSpotCondAlg condSeq += BeamSpotCondAlg("BeamSpotCondAlg") # Add beam spot fixer from AthenaCommon import CfgGetter from AthenaCommon.DetFlags import DetFlags from AthenaCommon.GlobalFlags import globalflags from Digitization.DigitizationFlags import digitizationFlags from OverlayCommonAlgs.OverlayFlags import overlayFlags if (DetFlags.pileup.any_on() or digitizationFlags.doXingByXingPileUp()) or (globalflags.isOverlay() and not overlayFlags.isOverlayMT()): from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() job += CfgGetter.getAlgorithm("BeamSpotFixerAlg")
from AthenaCommon.DetFlags import DetFlags from Digitization.DigitizationFlags import digitizationFlags from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from AthenaCommon import CfgGetter from AthenaCommon.AppMgr import ServiceMgr ################################################################## # LArCalorimeter ################################################################## if DetFlags.LAr_on(): if DetFlags.digitize.LAr_on(): job += CfgGetter.getAlgorithm("LArRawChannelBuilder", tryDefaultConfigurable=True) from LArROD.LArDigits import DefaultLArDigitThinner LArDigitThinner = DefaultLArDigitThinner( 'LArDigitThinner') # automatically added to topSequence if digitizationFlags.doDigiTruth(): from LArROD.LArRawChannelGetter_DigiHSTruth import LArRawChannelGetter_DigiHSTruth LArRawChannelGetter_DigiHSTruth() ################################################################## # TileCalorimeter ################################################################## if DetFlags.Tile_on(): if DetFlags.digitize.Tile_on(): protectedInclude("TileSimAlgs/TileDigiCommon_jobOptions.py") protectedInclude("TileL2Algs/TileL2Algs_jobOptions.py") ##################################################################
def setup_muXX_idperf(self): L2AlgName = self.getL2AlgName() muFastThresh = self.getMuFastThresh() EFExtrapolatorThresh = self.getEFExtrapolatorThresh() EFCombinerThresh = self.getEFCombinerThresh() ########### L2 algos ################# if "l2muonSA" in self.chainPart['L2SAAlg']: from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAConfig theL2StandAloneAlg = TrigL2MuonSAConfig(L2AlgName) from TrigMuonHypo.TrigMuonHypoConfig import MufastHypoConfig theL2StandAloneHypo = MufastHypoConfig(L2AlgName, muFastThresh) else: logMuonDef.error("Chain built with %s but so far only l2muonSA is supported." % (self.chainPart['L2SAAlg'])) return False from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_MuonA # ---> this is Run1 tracking - keep it here theTrigL2SiTrackFinder_MuonA = TrigL2SiTrackFinder_MuonA() from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_MuonB theTrigL2SiTrackFinder_MuonB = TrigL2SiTrackFinder_MuonB() from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_MuonC theTrigL2SiTrackFinder_MuonC = TrigL2SiTrackFinder_MuonC() from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Muon theTrigFastTrackFinder_Muon = TrigFastTrackFinder_Muon() from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence from TrigInDetConf.TrigInDetSequence import TrigInDetSequence theFastTrackFinderxAOD = TrigInDetSequence("Muon","muon","FastxAOD").getSequence() theTrigEFIDDataPrep_Muon = TrigEFIDSequence("Muon","muon","DataPrep").getSequence() #id_alg_output = "STRATEGY_A" id_alg_output = "TrigFastTrackFinder_Muon" if "muComb" in self.chainPart['L2CBAlg']: muCombThresh = self.getMuCombThresh() from TrigmuComb.TrigmuCombConfig import TrigmuCombConfig theL2CombinedAlg = TrigmuCombConfig(L2AlgName, id_alg_output) from TrigMuonHypo.TrigMuonHypoConfig import MucombHypoConfig theL2CombinedHypo = MucombHypoConfig(L2AlgName, muCombThresh) else: logMuonDef.error("Chain built with %s but so far only muComb is supported." % (self.chainPart['L2CBAlg'])) return False ########### EF algos ################# if 'SuperEF' in self.chainPart['EFAlg']: from AthenaCommon import CfgGetter theTrigMuSuperEF = CfgGetter.getAlgorithm("TrigMuSuperEF_TMEFonly") theEFAlg = theTrigMuSuperEF EFRecoAlgName = "Muon" else: logMuonDef.error("Chain built with %s but so far only SuperEF is supported." % (self.chainPart['EFAlg'])) return False from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFCombinerHypoConfig theTrigMuonEFCombinerHypoConfig = TrigMuonEFCombinerHypoConfig(EFRecoAlgName,EFCombinerThresh) from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence theTrigEFIDInsideOutMerged_Muon = TrigEFIDSequence("Muon","muon","InsideOutMerged") theTrigEFIDInsideOut_Muon = TrigEFIDSequence("Muon","muon") # ---> this is Run1 tracking - keep it here #theTrigEFIDInsideOut_Muon_MergedDP = TrigEFIDSequence("Muon","muon","DataPrep") theTrigEFIDOutsideInTRTOnly_Muon = TrigEFIDSequence("Muon","muon","TRTOnly") from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFExtrapolatorHypoConfig theTrigMuonEFExtrapolatorHypoConfig = TrigMuonEFExtrapolatorHypoConfig(EFRecoAlgName, EFExtrapolatorThresh) ########### Sequence List ############## self.L2sequenceList += [[self.L2InputTE, [theL2StandAloneAlg , theL2StandAloneHypo], 'L2_mu_step1']] EFinputTE = '' if "L2Star" in self.chainPart['L2IDAlg']: # ---> this is Run1 tracking - keep it here self.L2sequenceList += [[['L2_mu_step1'], [theTrigL2SiTrackFinder_MuonA, theTrigL2SiTrackFinder_MuonB, theTrigL2SiTrackFinder_MuonC, theL2CombinedAlg, theL2CombinedHypo], 'L2_mu_step2']] else: self.L2sequenceList += [[['L2_mu_step1'], theTrigEFIDDataPrep_Muon+ [theTrigFastTrackFinder_Muon]+theFastTrackFinderxAOD+ [theL2CombinedAlg,theL2CombinedHypo], 'L2_mu_step2']] EFinputTE = 'L2_mu_step2' if "L2Star" in self.chainPart['L2IDAlg']: # ---> this is Run1 tracking - keep it here self.EFsequenceList += [[[EFinputTE], theTrigEFIDInsideOut_Muon.getSequence(), 'EF_mu_step1']] else: self.EFsequenceList += [[[EFinputTE], theTrigEFIDInsideOutMerged_Muon.getSequence(), 'EF_mu_step1']] #self.EFsequenceList += [[['EF_mu_step1'], # [theTrigEFIDOutsideInTRTOnly_Muon.getSequence()], # 'EF_mu_step2']] self.EFsequenceList += [[['EF_mu_step1'], [theEFAlg, theTrigMuonEFExtrapolatorHypoConfig], 'EF_mu_step3']] self.EFsequenceList += [[['EF_mu_step3'], [theTrigMuonEFCombinerHypoConfig], 'EF_mu_step4']] ########### Signatures ########### self.L2signatureList += [ [['L2_mu_step1']*self.mult] ] self.L2signatureList += [ [['L2_mu_step2']*self.mult] ] self.EFsignatureList += [ [['EF_mu_step1']*self.mult] ] #self.EFsignatureList += [ [['EF_mu_step2']*self.mult] ] self.EFsignatureList += [ [['EF_mu_step3']*self.mult] ] self.EFsignatureList += [ [['EF_mu_step4']*self.mult] ] ########### TE renaming ########## self.TErenamingDict = { 'L2_mu_step1': mergeRemovingOverlap('L2_mu_SA_', L2AlgName+muFastThresh+'_'+self.L2InputTE), 'L2_mu_step2': mergeRemovingOverlap('L2_mucomb_', self.chainPartNameNoMult.replace('_'+self.chainPart['isoInfo'], '')+'_'+self.L2InputTE), 'EF_mu_step1': mergeRemovingOverlap('EF_EFIDInsideOutMerged_', self.chainPartNameNoMult), #'EF_mu_step2': mergeRemovingOverlap('EF_TRT_', self.chainPartNameNoMult), 'EF_mu_step3': mergeRemovingOverlap('EF_SuperEF_TMEFOnly_', self.chainPartNameNoMult), 'EF_mu_step4': mergeRemovingOverlap('EF_Comb_', self.chainPartNameNoMult), }
include("CscOverlay/CscOverlay_jobOptions.py") job.CscOverlay.IsByteStream = readBS job.CscOverlay.DataStore = "OriginalEvent_SG" #print "ACH123: Setting DEBUG v99" #job.CscOverlay.MakeRDOTool.OutputLevel=DEBUG #job.CscOverlay.MakeRDOTool.cscCalibTool.OutputLevel=DEBUG #job.CscOverlay.OutputLevel=DEBUG #MessageSvc.debugLimit = 100000 #print "ACH123: NumSamples = 2 for MakeRDOTool" #job.CscOverlay.MakeRDOTool.NumSamples=2 if DetFlags.overlay.MDT_on(): # include ( "MdtOverlay/MdtOverlay_jobOptions.py" ) job += CfgGetter.getAlgorithm("MdtOverlay") from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import MdtDigitToMdtRDO job += MdtDigitToMdtRDO() job.MdtDigitToMdtRDO.EvtStore = job.MdtOverlay.OutputStore if readBS: ToolSvc.MdtRawDataProviderTool.EvtStore = "OriginalEvent_SG" job.MdtOverlay.ConvertRDOToDigitTool.RetrievePrivateCopy = False #job.MdtOverlay.OutputLevel = VERBOSE #job.MdtDigitToMdtRDO.OutputLevel = VERBOSE if DetFlags.overlay.RPC_on(): job += CfgGetter.getAlgorithm("RpcOverlay") from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import RpcDigitToRpcRDO job += RpcDigitToRpcRDO()
def setup_muXX_noL1(self): ########### EF algos ################# from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo from AthenaCommon import CfgGetter from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFExtrapolatorMultiHypoConfig, TrigMuonEFExtrapolatorHypoConfig ##Use list of muon threshold in the chain to correctly configure the FS hypos if len(self.allMuThrs) == 0: log.error("The list of allMuonThreshold is empty for a noL1 chain! It should never happen") if len(self.allMuThrs) == 1: theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorHypoConfig('Muon', '0GeV') hypocut = '0GeV' elif len(self.allMuThrs) == 2: theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig('Muon', '0GeV','0GeV') hypocut = '0GeV_0GeV' elif len(self.allMuThrs) == 3: theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig('Muon', '0GeV','0GeV','0GeV') hypocut = '0GeV_0GeV_0GeV' else: log.error("No MuonEFExtrapolatorHypo config yet for events with more than 3 muons") from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence from TrigInDetConf.TrigInDetSequence import TrigInDetSequence theTrigEFIDDataPrep_Muon = TrigEFIDSequence("Muon","muon","DataPrep").getSequence() from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Muon theTrigFastTrackFinder_Muon = TrigFastTrackFinder_Muon() theTrigEFIDInsideOutMerged_Muon = TrigEFIDSequence("Muon","muon","InsideOutMerged").getSequence() theTrigEFIDInsideOut_Muon = TrigEFIDSequence("Muon","muon","InsideOut").getSequence() theFastTrackFinderxAOD = TrigInDetSequence("Muon","muon","FastxAOD").getSequence() from TrigMuonEF.TrigMuonEFConfig import TrigMuonEFRoiAggregatorConfig from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFCombinerMultiHypoConfig, TrigMuonEFCombinerHypoConfig if len(self.allMuThrs) == 1: theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerHypoConfig('Muon', self.allMuThrs[0]) elif len(self.allMuThrs) == 2: theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerMultiHypoConfig('Muon',self.allMuThrs[0], self.allMuThrs[1]) elif len(self.allMuThrs) == 3: theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerMultiHypoConfig('Muon',self.allMuThrs[0],self.allMuThrs[1],self.allMuThrs[2]) else: log.error("No TrigMuonEFCombinerHypo config yet for events with more than 3 muons") hypocutEF="MultiComb" for i in range(0,len(self.allMuThrs)): hypocutEF += "_%s" %(self.allMuThrs[i]) ########### Sequence List ############## self.EFsequenceList += [['', [PESA__DummyUnseededAllTEAlgo("EFDummyAlgo")]+ [CfgGetter.getAlgorithm("TrigMuSuperEF_FSSA"), theTrigMuonEFSA_FS_Hypo], 'EF_SA_FS']] self.EFsequenceList += [['EF_SA_FS', [CfgGetter.getAlgorithm("TrigMuonEFFSRoiMaker")], 'EF_SAR_FS']] self.EFsequenceList += [['EF_SAR_FS', theTrigEFIDDataPrep_Muon+[theTrigFastTrackFinder_Muon]+theFastTrackFinderxAOD+theTrigEFIDInsideOutMerged_Muon, #theTrigEFIDInsideOut_Muon, #a fallback - it should be replaced by the previous line if it works 'EF_FStracksMuon']] self.EFsequenceList += [['EF_FStracksMuon', [CfgGetter.getAlgorithm("TrigMuSuperEF_TMEFCombinerOnly")], 'EF_CB_FS_single']] self.EFsequenceList += [['EF_CB_FS_single', [TrigMuonEFRoiAggregatorConfig('TrigMuonEFFSRoiAggregator'), theTrigMuonEFCombinerMultiHypoConfig], 'EF_CB_FS']] ########### Signatures ########### #self.EFsignatureList += [ [['EF_SA_FS']*self.mult] ] #self.EFsignatureList += [ [['EF_SAR_FS']*self.mult] ] #self.EFsignatureList += [ [['EF_FStracksMuon']*self.mult] ] #self.EFsignatureList += [ [['EF_CB_FS_single']*self.mult] ] #self.EFsignatureList += [ [['EF_CB_FS']*self.mult] ] self.EFsignatureList += [ [['EF_SA_FS']] ] self.EFsignatureList += [ [['EF_SAR_FS']] ] self.EFsignatureList += [ [['EF_FStracksMuon']] ] self.EFsignatureList += [ [['EF_CB_FS_single']] ] self.EFsignatureList += [ [['EF_CB_FS']] ] ########### TE renaming ########## self.TErenamingDict = { 'EF_SA_FS': mergeRemovingOverlap('EF_SA_FS_','SAFSHypo'+hypocut+'_'+hypocutEF), 'EF_SAR_FS': mergeRemovingOverlap('EF_SAR_FS_','SAFSHypo'+hypocut+'_'+hypocutEF), 'EF_FStracksMuon': mergeRemovingOverlap('EF_FStracksMuon_', 'SAFSHypo'+hypocut+'_'+hypocutEF), 'EF_CB_FS_single': mergeRemovingOverlap('EF_CB_FS_single_','SAFSHypo'+hypocut+'_'+hypocutEF), 'EF_CB_FS': mergeRemovingOverlap('EF_CB_FS_', 'SAFSHypo'+hypocut+'_'+hypocutEF), }
from AthenaCommon.DetFlags import DetFlags from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from AthenaCommon import CfgGetter ################################################################## #Digit -> RDO Conversion ################################################################## if DetFlags.digitize.Muon_on(): # Convert Digits to RDOs #---------------- import MuonCnvExample.MuonCablingConfig #---------------- if DetFlags.digitize.CSC_on(): job += CfgGetter.getAlgorithm("CscDigitToCscRDO/CscDigitToCscRDO", tryDefaultConfigurable=True) #---------------- if DetFlags.digitize.MDT_on(): job += CfgGetter.getAlgorithm("MdtDigitToMdtRDO/MdtDigitToMdtRDO", tryDefaultConfigurable=True) #---------------- if DetFlags.digitize.RPC_on(): job += CfgGetter.getAlgorithm("RpcDigitToRpcRDO/RpcDigitToRpcRDO", tryDefaultConfigurable=True) #---------------- if DetFlags.digitize.TGC_on(): job += CfgGetter.getAlgorithm("TgcDigitToTgcRDO/TgcDigitToTgcRDO", tryDefaultConfigurable=True) #---------------- if DetFlags.digitize.sTGC_on(): job += CfgGetter.getAlgorithm("STGC_DigitToRDO/STGC_DigitToRDO",
from TileConditions.TileCondProxyConf import getTileCondProxy ToolSvc.TileCondToolNoiseSample.ProxyNoiseSample = getTileCondProxy('FILE','Flt','Tile2003.ped','TileCondProxyFile_NoiseSample') ToolSvc.TileBadChanTool.ProxyOflBch = getTileCondProxy('FILE','Bch','TileNoBad.oflBch','TileCondProxyFile_OflBch') #---------------- # Add Algorithms #---------------- ## get a handle on the top sequence of algorithms from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() if doTileHitToDigit or doTileHitToRawChannelDirect: topSequence += CfgGetter.getAlgorithm("TileHitVecToCnt/TileHitVecToCnt", tryDefaultConfigurable=True) theTileHitVecToCnt = topSequence.TileHitVecToCnt.DigitizationTool if doTileHitToRawChannelDirect: from TileSimAlgs.TileRawChannelFromHitsGetter import * theTileRawChannelFromHitsGetter=TileRawChannelFromHitsGetter() if doTileHitToDigit: from TileSimAlgs.TileDigitsGetter import * theTileDigitsGetter=TileDigitsGetter() from TileSimAlgs.TileSimAlgsConf import *
def setup_muXX_ID(self): L2AlgName = self.getL2AlgName() muFastThresh = self.getMuFastThresh() EFCombinerThresh = self.getEFCombinerThresh() ########### L2 algos ################# if "l2muonSA" in self.chainPart['L2SAAlg']: from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAConfig theL2StandAloneAlg = TrigL2MuonSAConfig(L2AlgName) from TrigMuonHypo.TrigMuonHypoConfig import MufastHypoConfig theL2StandAloneHypo = MufastHypoConfig(L2AlgName, muFastThresh) else: logMuonDef.error( "Chain built with %s but so far only l2muonSA is supported." % (self.chainPart['L2SAAlg'])) return False from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Muon theTrigFastTrackFinder_Muon = TrigFastTrackFinder_Muon() from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence theTrigEFIDDataPrep_Muon = TrigEFIDSequence("Muon", "muon", "DataPrep").getSequence() id_alg_output = "TrigFastTrackFinder_Muon" if "muComb" in self.chainPart['L2CBAlg']: muCombThresh = self.getMuCombThresh() from TrigmuComb.TrigmuCombConfig import TrigmuCombConfig theL2CombinedAlg = TrigmuCombConfig(L2AlgName, id_alg_output) from TrigMuonHypo.TrigMuonHypoConfig import MucombHypoConfig theL2CombinedHypo = MucombHypoConfig(L2AlgName, muCombThresh) else: logMuonDef.error( "Chain built with %s but so far only muComb is supported." % (self.chainPart['L2CBAlg'])) return False if "wOvlpRm" in self.chainPart['overlapRemoval']: from TrigMuonHypo.TrigL2MuonOverlapRemoverConfig import TrigL2MuonOverlapRemoverConfig theL2OvlpRmConfig_mufast = TrigL2MuonOverlapRemoverConfig( 'Mufast', 'nominal') theL2OvlpRmConfig_mucomb = TrigL2MuonOverlapRemoverConfig( 'Mucomb', 'nominal') ########### EF algos ################# if 'SuperEF' in self.chainPart['EFAlg']: from AthenaCommon import CfgGetter theTrigMuSuperEF = CfgGetter.getAlgorithm("TrigMuSuperEF") theEFAlg = theTrigMuSuperEF EFRecoAlgName = "Muon" else: logMuonDef.error( "Chain built with %s but so far only SuperEF is supported." % (self.chainPart['EFAlg'])) return False from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFCombinerHypoConfig theTrigMuonEFCombinerHypoConfig = TrigMuonEFCombinerHypoConfig( EFRecoAlgName, EFCombinerThresh) from TrigMuonEF.TrigMuonEFConfig import TrigMuonEFTrackIsolationConfig from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFTrackIsolationHypoConfig from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence #theTrigEFIDInsideOut_Muon = TrigEFIDSequence("Muon","muon") # ---> this is Run1 tracking - keep it here theTrigEFIDInsideOutMerged_Muon = TrigEFIDSequence( "Muon", "muon", "InsideOutMerged") theTrigEFIDInsideOut_MuonIso = TrigEFIDSequence( "MuonIso", "muonIso", "InsideOut") ########### Sequence List ############## self.L2sequenceList += [[ self.L2InputTE, [theL2StandAloneAlg, theL2StandAloneHypo], 'L2_mu_step1' ]] EFinputTE = '' if (self.doOvlpRm): self.L2sequenceList += [[['L2_mu_step1'], [theL2OvlpRmConfig_mufast], 'L2_step1a_wOvlpRm']] self.L2sequenceList += [[['L2_step1a_wOvlpRm'], theTrigEFIDDataPrep_Muon + [ theTrigFastTrackFinder_Muon, theL2CombinedAlg, theL2CombinedHypo ], 'L2_step1b_wOvlpRm']] self.L2sequenceList += [[['L2_step1b_wOvlpRm'], [theL2OvlpRmConfig_mucomb], 'L2_step2_wOvlpRm']] EFinputTE = 'L2_step2_wOvlpRm' else: self.L2sequenceList += [[['L2_mu_step1'], theTrigEFIDDataPrep_Muon + [ theTrigFastTrackFinder_Muon, theL2CombinedAlg, theL2CombinedHypo ], 'L2_mu_step2']] EFinputTE = 'L2_mu_step2' #self.EFsequenceList += [[[EFinputTE], # ---> this is Run1 tracking - keep it here # theTrigEFIDInsideOut_Muon.getSequence(), # 'EF_mu_step1']] self.EFsequenceList += [[[EFinputTE], theTrigEFIDInsideOutMerged_Muon.getSequence(), 'EF_mu_step1']] self.EFsequenceList += [[['EF_mu_step1'], [theEFAlg, theTrigMuonEFCombinerHypoConfig], 'EF_mu_step2']] if self.chainPart['isoInfo']: if self.chainPart['isoInfo'] == "iloose": theTrigMuonEFTrackIsolationHypoConfig = TrigMuonEFTrackIsolationHypoConfig( "Muon", "RelEFOnlyMedium") elif self.chainPart['isoInfo'] == "imedium": theTrigMuonEFTrackIsolationHypoConfig = TrigMuonEFTrackIsolationHypoConfig( "Muon", "RelEFOnlyTightWide") else: logMuonDef.error("Isolation %s not yet supported." % (self.chainPart['isoInfo'])) return False self.EFsequenceList += [ [['EF_mu_step2'], theTrigEFIDInsideOut_MuonIso.getSequence(), 'EF_mu_step3'] ] self.EFsequenceList += [[ ['EF_mu_step3'], [ TrigMuonEFTrackIsolationConfig("TrigMuonEFTrackIsolation"), theTrigMuonEFTrackIsolationHypoConfig ], 'EF_mu_step4' ]] ########### Signatures ########### self.L2signatureList += [[['L2_mu_step1'] * self.mult]] if (self.doOvlpRm): self.L2signatureList += [[['L2_step1a_wOvlpRm'] * self.mult]] self.L2signatureList += [[['L2_step1b_wOvlpRm'] * self.mult]] self.L2signatureList += [[['L2_step2_wOvlpRm'] * self.mult]] else: self.L2signatureList += [[['L2_mu_step2'] * self.mult]] self.EFsignatureList += [[['EF_mu_step1'] * self.mult]] self.EFsignatureList += [[['EF_mu_step2'] * self.mult]] if (self.chainPart['isoInfo'] ): # == "iloose" or self.chainPart['isoInfo'] == "imedium": self.EFsignatureList += [[['EF_mu_step3'] * self.mult]] self.EFsignatureList += [[['EF_mu_step4'] * self.mult]] ########### TE renaming ########## self.TErenamingDict = { 'L2_mu_step1': mergeRemovingOverlap( 'L2_mu_SA_', L2AlgName + muFastThresh + '_' + self.L2InputTE), 'L2_mu_step2': mergeRemovingOverlap( 'L2_mucomb_', self.chainPartNameNoMult.replace( '_' + self.chainPart['isoInfo'], '') + '_' + self.L2InputTE), 'EF_mu_step1': mergeRemovingOverlap('EF_EFIDInsideOut_', self.chainPartNameNoMult), 'EF_mu_step2': mergeRemovingOverlap('EF_SuperEF_', self.chainPartNameNoMult), } if (self.chainPart['isoInfo']): self.TErenamingDict.update({ 'EF_mu_step1': mergeRemovingOverlap( 'EF_EFIDInsideOut_', self.chainPartNameNoMult.replace( '_' + self.chainPart['isoInfo'], '')), 'EF_mu_step2': mergeRemovingOverlap( 'EF_SuperEF_', self.chainPartNameNoMult.replace( '_' + self.chainPart['isoInfo'], '')), 'EF_mu_step3': mergeRemovingOverlap('EF_muI_efid_', self.chainPartNameNoMult), 'EF_mu_step4': mergeRemovingOverlap('EF_trkIso_', self.chainPartNameNoMult) }) if self.doOvlpRm: self.TErenamingDict.update({ 'L2_step1a_wOvlpRm': mergeRemovingOverlap( 'L2_mu_SAOvlpRm_', L2AlgName + muFastThresh + '_' + self.L2InputTE + '_wOvlpRm'), 'L2_step1b_wOvlpRm': mergeRemovingOverlap( 'L2_muon_comb', L2AlgName + muCombThresh + '_' + self.L2InputTE + '_wOvlpRm'), 'L2_step2_wOvlpRm': mergeRemovingOverlap( 'L2_mu_combOvlpRm_', L2AlgName + muCombThresh + '_' + self.L2InputTE + '_wOvlpRm'), 'EF_mu_step1': mergeRemovingOverlap('EF_EFIDInsideOut_', self.chainPartNameNoMult + '_wOvlpRm'), 'EF_mu_step2': mergeRemovingOverlap('EF_SuperEF_', self.chainPartNameNoMult + '_wOvlpRm') }) if self.doOvlpRm and self.chainPart['isoInfo']: self.TErenamingDict.update({ 'L2_step1a_wOvlpRm': mergeRemovingOverlap( 'L2_mu_SAOvlpRm_', L2AlgName + muFastThresh + '_' + self.L2InputTE + '_wOvlpRm'), 'L2_step1b_wOvlpRm': mergeRemovingOverlap( 'L2_muon_comb', L2AlgName + muCombThresh + '_' + self.L2InputTE + '_wOvlpRm'), 'L2_step2_wOvlpRm': mergeRemovingOverlap( 'L2_mu_combOvlpRm_', L2AlgName + muCombThresh + '_' + self.L2InputTE + '_wOvlpRm'), 'EF_mu_step1': mergeRemovingOverlap('EF_EFIDInsideOut_', self.chainPartNameNoMult + '_wOvlpRm'), 'EF_mu_step2': mergeRemovingOverlap('EF_SuperEF_', self.chainPartNameNoMult + '_wOvlpRm'), 'EF_mu_step3': mergeRemovingOverlap('EF_muI_efid_', self.chainPartNameNoMult + '_wOvlpRm'), 'EF_mu_step4': mergeRemovingOverlap('EF_trkIso_', self.chainPartNameNoMult + '_wOvlpRm') })
from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from AthenaCommon import CfgGetter job += CfgGetter.getAlgorithm("AFP_DigiTop/AFP_DigiTop", tryDefaultConfigurable=True) afp = job.AFP_DigiTop.DigitizationTool
def setup_muXX_idperf(self): L2AlgName = self.getL2AlgName() muFastThresh = self.getMuFastThresh() EFExtrapolatorThresh = self.getEFExtrapolatorThresh() EFCombinerThresh = self.getEFCombinerThresh() ########### L2 algos ################# if "l2muonSA" in self.chainPart['L2SAAlg']: from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAConfig theL2StandAloneAlg = TrigL2MuonSAConfig(L2AlgName) from TrigMuonHypo.TrigMuonHypoConfig import MufastHypoConfig theL2StandAloneHypo = MufastHypoConfig(L2AlgName, muFastThresh) else: logMuonDef.error( "Chain built with %s but so far only l2muonSA is supported." % (self.chainPart['L2SAAlg'])) return False from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Muon theTrigFastTrackFinder_Muon = TrigFastTrackFinder_Muon() from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence theTrigEFIDDataPrep_Muon = TrigEFIDSequence("Muon", "muon", "DataPrep").getSequence() #id_alg_output = "STRATEGY_A" id_alg_output = "TrigFastTrackFinder_Muon" if "muComb" in self.chainPart['L2CBAlg']: muCombThresh = self.getMuCombThresh() from TrigmuComb.TrigmuCombConfig import TrigmuCombConfig theL2CombinedAlg = TrigmuCombConfig(L2AlgName, id_alg_output) from TrigMuonHypo.TrigMuonHypoConfig import MucombHypoConfig theL2CombinedHypo = MucombHypoConfig(L2AlgName, muCombThresh) else: logMuonDef.error( "Chain built with %s but so far only muComb is supported." % (self.chainPart['L2CBAlg'])) return False ########### EF algos ################# if 'SuperEF' in self.chainPart['EFAlg']: from AthenaCommon import CfgGetter theTrigMuSuperEF = CfgGetter.getAlgorithm("TrigMuSuperEF_TMEFonly") theEFAlg = theTrigMuSuperEF EFRecoAlgName = "Muon" else: logMuonDef.error( "Chain built with %s but so far only SuperEF is supported." % (self.chainPart['EFAlg'])) return False from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFCombinerHypoConfig theTrigMuonEFCombinerHypoConfig = TrigMuonEFCombinerHypoConfig( EFRecoAlgName, EFCombinerThresh) from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence theTrigEFIDInsideOutMerged_Muon = TrigEFIDSequence( "Muon", "muon", "InsideOutMerged") theTrigEFIDInsideOut_Muon = TrigEFIDSequence( "Muon", "muon") # ---> this is Run1 tracking - keep it here #theTrigEFIDInsideOut_Muon_MergedDP = TrigEFIDSequence("Muon","muon","DataPrep") #theTrigEFIDOutsideInTRTOnly_Muon = TrigEFIDSequence("Muon","muon","TRTOnly") from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFExtrapolatorHypoConfig theTrigMuonEFExtrapolatorHypoConfig = TrigMuonEFExtrapolatorHypoConfig( EFRecoAlgName, EFExtrapolatorThresh) ########### Sequence List ############## self.L2sequenceList += [[ self.L2InputTE, [theL2StandAloneAlg, theL2StandAloneHypo], 'L2_mu_step1' ]] self.L2sequenceList += [[ ['L2_mu_step1'], theTrigEFIDDataPrep_Muon + [theTrigFastTrackFinder_Muon, theL2CombinedAlg, theL2CombinedHypo], 'L2_mu_step2' ]] EFinputTE = 'L2_mu_step2' if "L2Star" in self.chainPart[ 'L2IDAlg']: # ---> this is Run1 tracking - keep it here self.EFsequenceList += [[[EFinputTE], theTrigEFIDInsideOut_Muon.getSequence(), 'EF_mu_step1']] else: self.EFsequenceList += [ [[EFinputTE], theTrigEFIDInsideOutMerged_Muon.getSequence(), 'EF_mu_step1'] ] #self.EFsequenceList += [[['EF_mu_step1'], # [theTrigEFIDOutsideInTRTOnly_Muon.getSequence()], # 'EF_mu_step2']] self.EFsequenceList += [[['EF_mu_step1'], [ theEFAlg, theTrigMuonEFExtrapolatorHypoConfig ], 'EF_mu_step3']] self.EFsequenceList += [[['EF_mu_step3'], [theTrigMuonEFCombinerHypoConfig], 'EF_mu_step4']] ########### Signatures ########### self.L2signatureList += [[['L2_mu_step1'] * self.mult]] self.L2signatureList += [[['L2_mu_step2'] * self.mult]] self.EFsignatureList += [[['EF_mu_step1'] * self.mult]] #self.EFsignatureList += [ [['EF_mu_step2']*self.mult] ] self.EFsignatureList += [[['EF_mu_step3'] * self.mult]] self.EFsignatureList += [[['EF_mu_step4'] * self.mult]] ########### TE renaming ########## self.TErenamingDict = { 'L2_mu_step1': mergeRemovingOverlap( 'L2_mu_SA_', L2AlgName + muFastThresh + '_' + self.L2InputTE), 'L2_mu_step2': mergeRemovingOverlap( 'L2_mucomb_', self.chainPartNameNoMult.replace( '_' + self.chainPart['isoInfo'], '') + '_' + self.L2InputTE), 'EF_mu_step1': mergeRemovingOverlap('EF_EFIDInsideOutMerged_', self.chainPartNameNoMult), #'EF_mu_step2': mergeRemovingOverlap('EF_TRT_', self.chainPartNameNoMult), 'EF_mu_step3': mergeRemovingOverlap('EF_SuperEF_TMEFOnly_', self.chainPartNameNoMult), 'EF_mu_step4': mergeRemovingOverlap('EF_Comb_', self.chainPartNameNoMult), }
from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from AthenaCommon import CfgGetter from Digitization.DigitizationFlags import jobproperties if jobproperties.Digitization.doXingByXingPileUp(): # PileUpTool approach job.PileUpToolsAlg.PileUpTools += [ CfgGetter.getPrivateTool("TgcDigitizationTool", checkType=True) ] else : # Algorithm approach job += CfgGetter.getAlgorithm("TGCDigitizer", tryDefaultConfigurable=True)
def setup_muXX_MSOnly(self): L2AlgName = self.getL2AlgName() muFastThresh = self.getMuFastThresh() EFExtrapolatorThresh = self.getEFExtrapolatorThresh() ########### L2 algos ################# if "l2muonSA" in self.chainPart['L2SAAlg']: from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAConfig theL2StandAloneAlg = TrigL2MuonSAConfig(L2AlgName) from TrigMuonHypo.TrigMuonHypoConfig import MufastHypoConfig theL2StandAloneHypo = MufastHypoConfig(L2AlgName, muFastThresh) else: logMuonDef.error( "Chain built with %s but so far only l2muonSA is supported." % (self.chainPart['L2SAAlg'])) return False ########### EF algos ################# if 'SuperEF' in self.chainPart['EFAlg']: from AthenaCommon import CfgGetter theTrigMuSuperEF = CfgGetter.getAlgorithm("TrigMuSuperEF_SAonly") theEFAlg = theTrigMuSuperEF EFRecoAlgName = "Muon" else: logMuonDef.error( "Chain built with %s but so far only SuperEF is supported." % (self.chainPart['EFAlg'])) return False from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFExtrapolatorHypoConfig theTrigMuonEFExtrapolatorHypoConfig = TrigMuonEFExtrapolatorHypoConfig( EFRecoAlgName, EFExtrapolatorThresh) ########### Sequence List ############## self.L2sequenceList += [[ self.L2InputTE, [theL2StandAloneAlg, theL2StandAloneHypo], 'L2_mu_step1' ]] self.EFsequenceList += [[['L2_mu_step1'], [ theEFAlg, theTrigMuonEFExtrapolatorHypoConfig ], 'EF_mu_step1']] ########### Signatures ########### self.L2signatureList += [[['L2_mu_step1'] * self.mult]] self.EFsignatureList += [[['EF_mu_step1'] * self.mult]] ########### TE renaming ########## self.TErenamingDict = { 'L2_mu_step1': mergeRemovingOverlap( 'L2_mu_SA_', L2AlgName + muFastThresh + '_' + self.L2InputTE), 'EF_mu_step1': mergeRemovingOverlap('EF_SuperEF_', self.chainPartNameNoMult), }
def configure(self): mlog = logging.getLogger( 'Py:LArRawChannelGetter::configure %s:' % self.__class__ ) from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() from AthenaCommon.AppMgr import ToolSvc # get LArDigitGetter in MC case from AthenaCommon.DetFlags import DetFlags if DetFlags.digitize.LAr_on() : try: from LArDigitization.LArDigitGetter import LArDigitGetter theLArDigitGetter = LArDigitGetter() except Exception as configException: mlog.error("could not get handle to LArDigitGetter Quit") import traceback mlog.error(traceback.format_exc()) return False if not theLArDigitGetter.usable(): mlog.error("LArDigitGetter unusable. Quite") return False from LArROD.LArRODFlags import larRODFlags from AthenaCommon.GlobalFlags import globalflags if globalflags.DataSource()=='data' or larRODFlags.forceIter() : # ADC2MeV tool from LArRecUtils.LArADC2MeVToolDefault import LArADC2MeVToolDefault theADC2MeVTool = LArADC2MeVToolDefault() ToolSvc += theADC2MeVTool from AthenaCommon.AppMgr import ServiceMgr as svcMgr # Data case if larRODFlags.readDigits(): from AthenaCommon.GlobalFlags import globalflags if globalflags.InputFormat() == 'bytestream': if not larRODFlags.keepDSPRaw(): topSequence.LArRawDataReaderAlg.LArRawChannelKey="" if globalflags.DetGeo() == 'ctbh6' or globalflags.DetGeo() == 'ctbh8': from LArROD.LArRODConf import LArRawChannelBuilder theLArRawChannelBuilder=LArRawChannelBuilder() topSequence += theLArRawChannelBuilder return True from LArROD.LArRODConf import LArRawChannelBuilderDriver theLArRawChannelBuilder=LArRawChannelBuilderDriver("LArRawChannelBuilder") topSequence += theLArRawChannelBuilder if larRODFlags.keepDSPRaw(): theLArRawChannelBuilder.LArRawChannelContainerName=larRODFlags.RawChannelFromDigitsContainerName() # bad channel masking if required if not larRODFlags.doBuildBadChannel(): # The first tool filters out bad channels from LArROD.LArRODConf import LArRawChannelBuilderToolBadChannelTool theLArRawChannelBuilderToolBadChannel=LArRawChannelBuilderToolBadChannelTool() from LArBadChannelTool.LArBadChannelToolConf import LArBadChannelMasker theLArRCBMasker=LArBadChannelMasker("LArRCBMasker") theLArRCBMasker.DoMasking=True theLArRCBMasker.ProblemsToMask=[ "deadReadout","deadPhys","almostDead","short", "lowNoiseHG","highNoiseHG","unstableNoiseHG", "lowNoiseMG","highNoiseMG","unstableNoiseMG", "lowNoiseLG","highNoiseLG","unstableNoiseLG" ] theLArRawChannelBuilderToolBadChannel.BadChannelMask=theLArRCBMasker theLArRawChannelBuilder.BuilderTools += [theLArRawChannelBuilderToolBadChannel] ToolSvc+=theLArRawChannelBuilderToolBadChannel # Pulse reconstruction # main method: OFC iteration from LArROD.LArRODConf import LArRawChannelBuilderToolOFCIter theLArRawChannelBuilderToolOFCIter=LArRawChannelBuilderToolOFCIter() theLArRawChannelBuilderToolOFCIter.minSample = 2 theLArRawChannelBuilderToolOFCIter.maxSample = 12 theLArRawChannelBuilderToolOFCIter.minADCforIterInSigma=4 # ADCmax at least 4 sigma above noise for iteration theLArRawChannelBuilderToolOFCIter.minADCforIter=15 # min adc for iteration (only if no pedestalRMS found) theLArRawChannelBuilderToolOFCIter.defaultPhase=0 # starting delay, also the fixed delay for ADC below min. theLArRawChannelBuilderToolOFCIter.ECut=250. # Energy to save quality theLArRawChannelBuilder.BuilderTools += [theLArRawChannelBuilderToolOFCIter] theLArRawChannelBuilder+=theLArRawChannelBuilderToolOFCIter # no fallback when emulating exactly DSP computation if not larRODFlags.doDSP(): # fallback(1): cubic method from LArROD.LArRODConf import LArRawChannelBuilderToolCubic theLArRawChannelBuilderToolCubic=LArRawChannelBuilderToolCubic() theLArRawChannelBuilderToolCubic.minADCforCubic=30 theLArRawChannelBuilder.BuilderTools += [theLArRawChannelBuilderToolCubic] theLArRawChannelBuilder += theLArRawChannelBuilderToolCubic # fallback(2) averageing from LArROD.LArRODConf import LArRawChannelBuilderToolAverage theLArRawChannelBuilderToolAverage=LArRawChannelBuilderToolAverage() theLArRawChannelBuilderToolAverage.NScan=0 theLArRawChannelBuilder.BuilderTools += [theLArRawChannelBuilderToolAverage] theLArRawChannelBuilder += theLArRawChannelBuilderToolAverage # Pedestal # main method from database from LArROD.LArRODConf import LArRawChannelBuilderPedestalDataBase theLArRawChannelBuilderPedestalDataBase=LArRawChannelBuilderPedestalDataBase() theLArRawChannelBuilderPedestalDataBase.LArPedestalKey = "LArPedestal" theLArRawChannelBuilder.PedestalTools = [theLArRawChannelBuilderPedestalDataBase] theLArRawChannelBuilder += theLArRawChannelBuilderPedestalDataBase # no fallback when emulating exactly DSP computation if not larRODFlags.doDSP(): # fallback. sample 0 from LArROD.LArRODConf import LArRawChannelBuilderPedestalSampleZero theLArRawChannelBuilderPedestalSampleZero=LArRawChannelBuilderPedestalSampleZero() theLArRawChannelBuilder.PedestalTools += [theLArRawChannelBuilderPedestalSampleZero] theLArRawChannelBuilder += theLArRawChannelBuilderPedestalSampleZero # ADC to energy # main method from database from LArROD.LArRODConf import LArRawChannelBuilderADC2EDataBase theLArRawChannelBuilderADC2EDataBase=LArRawChannelBuilderADC2EDataBase() theLArRawChannelBuilder.ADCtoEnergyTools = [theLArRawChannelBuilderADC2EDataBase] theLArRawChannelBuilderADC2EDataBase.ADC2MeVTool = theADC2MeVTool theLArRawChannelBuilder += theLArRawChannelBuilderADC2EDataBase # no fallback when emulating exactly DSP computation if not larRODFlags.doDSP(): # fallback, constant conversion factors from LArROD.LArRODConf import LArRawChannelBuilderADC2EConstants theLArRawChannelBuilderADC2EConstants=LArRawChannelBuilderADC2EConstants() theLArRawChannelBuilder.ADCtoEnergyTools += [theLArRawChannelBuilderADC2EConstants] theLArRawChannelBuilder += theLArRawChannelBuilderADC2EConstants #more tools to be configured from LArRecUtils.LArRecUtilsConf import LArOFPeakRecoTool theLArOFPeakRecoTool=LArOFPeakRecoTool() from LArConditionsCommon.LArCondFlags import larCondFlags theLArOFPeakRecoTool.UseShape=larCondFlags.useShape() if larCondFlags.LArCoolChannelSelection.statusOn: if len(larCondFlags.LArCoolChannelSelection())>0: theLArOFPeakRecoTool.forceHighGain=larCondFlags.useOFCOnlyCoolChannelSelection() ToolSvc += theLArOFPeakRecoTool # # adjust default timing to match first sample information written in cool from Lar online configuration # nominalPeakSample=2 if globalflags.DataSource()=='data': from LArConditionsCommon.LArCool import larcool if (larcool is not None): nominalPeakSample = larcool.firstSample() # don't use ramp intercept in calibration if gain type is not auto if larcool.gainType() > 0 : mlog.info(" Gain Type: %d don't use intercept in ADC to Energy ramp calibration",larcool.gainType()) theLArRawChannelBuilderADC2EDataBase.UseHighGainRampIntercept = False theLArRawChannelBuilderADC2EDataBase.UseMedGainRampIntercept = False theLArRawChannelBuilderADC2EDataBase.UseLowGainRampIntercept = False else : mlog.info(" Gain Type: %d use intercept in ADC to energy ramp calibraion ",larcool.gainType()) if (nominalPeakSample > 1) : theLArRawChannelBuilder.DefaultShiftTimeSample=nominalPeakSample-2 else : theLArRawChannelBuilder.DefaultShiftTimeSample=0 theLArRawChannelBuilder.DataLocation = "FREE" else: from AthenaCommon.GlobalFlags import globalflags if globalflags.InputFormat() == 'bytestream': if not "LArRawChannelContainer/LArRawChannels" in svcMgr.ByteStreamAddressProviderSvc.TypeNames: svcMgr.ByteStreamAddressProviderSvc.TypeNames+=["LArRawChannelContainer/LArRawChannels"] # In the case of DSP monitoring and reading rawchannels, need to give a different name to the LArRawChannels container # read from the bytestream ... # This name has to be coherent with the name in LArMonTools/LArRODMonTool_jobOptions.py if larRODFlags.doDSP() and larRODFlags.readRawChannels(): #Reading LArRawChannel print ("Reading RawChannels in DSP physics mode") # !!! The name of the LArRawChannels container read from the Bytestream is LArRawChannels_fB !!! if not "LArRawChannelContainer/LArRawChannels_fB" in svcMgr.ByteStreamAddressProviderSvc.TypeNames: svcMgr.ByteStreamAddressProviderSvc.TypeNames+=["LArRawChannelContainer/LArRawChannels_fB"] print (svcMgr.ByteStreamAddressProviderSvc.TypeNames) else: # MC Case try: from AthenaCommon import CfgGetter topSequence += CfgGetter.getAlgorithm("LArRawChannelBuilder", tryDefaultConfigurable=True) except Exception as cfgException: mlog.error("Failed to retrieve LArRawChannelBuilder. Quit") import traceback mlog.error(traceback.format_exc()) return False return True
def setup_muXX_noL1(self): ########### EF algos ################# from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo from AthenaCommon import CfgGetter from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFExtrapolatorMultiHypoConfig if self.chainName.find("2g20_loose1") or self.chainName.find( "e28_tight1_iloose"): if self.chainName.find("2mu"): if self.chainName.find("mu2") >= 0: hypocut = '0GeV_0GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig( 'Muon', '0GeV', '0GeV') else: hypocut = '2GeV_2GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig( 'Muon', '2GeV', '2GeV') else: if self.chainName.find("mu2") >= 0: hypocut = '0GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig( 'Muon', '0GeV') else: hypocut = '2GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig( 'Muon', '2GeV') else: if self.chainName.find("2mu"): if self.chainName.find("mu2") >= 0: hypocut = '0GeV_0GeV_0GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig( 'Muon', '0GeV', '0GeV', '0GeV') else: hypocut = '2GeV_2GeV_2GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig( 'Muon', '2GeV', '2GeV', '2GeV') else: if self.chainName.find("mu2") >= 0: hypocut = '0GeV_0GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig( 'Muon', '0GeV', '0GeV') else: hypocut = '2GeV_2GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig( 'Muon', '2GeV', '2GeV') from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence theTrigEFIDDataPrep_Muon = TrigEFIDSequence("Muon", "muon", "DataPrep").getSequence() from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Muon theTrigFastTrackFinder_Muon = TrigFastTrackFinder_Muon() theTrigEFIDInsideOutMerged_Muon = TrigEFIDSequence( "Muon", "muon", "InsideOutMerged").getSequence() #theTrigEFIDInsideOut_Muon = TrigEFIDSequence("Muon","muon","InsideOut").getSequence() for the fallback on line 605 from TrigMuonEF.TrigMuonEFConfig import TrigMuonEFRoiAggregatorConfig from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFCombinerMultiHypoConfig if self.chainName == "mu20_mu8noL1" or self.chainName == "mu20_iloose_mu8noL1" or self.chainName == "mu20_imedium_mu8noL1": theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerMultiHypoConfig( 'Muon', '20GeV', '8GeV') hypocutEF = 'MultiComb_20GeV_8GeV' elif self.chainName == "mu20_2mu4noL1" or self.chainName == "mu20_iloose_2mu4noL1" or self.chainName == "mu20_imedium_2mu4noL1": theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerMultiHypoConfig( 'Muon', '20GeV', '4GeV', '4GeV') hypocutEF = 'MultiComb_20GeV_4GeV_4GeV' elif self.chainName == "mu24_mu8noL1": theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerMultiHypoConfig( 'Muon', '24GeV', '8GeV') hypocutEF = 'MultiComb_24GeV_8GeV' elif self.chainName == "mu24_2mu4noL1": theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerMultiHypoConfig( 'Muon', '24GeV', '4GeV', '4GeV') hypocutEF = 'MultiComb_24GeV_4GeV_4GeV' elif self.chainName == "e28_tight1_iloose_mu8noL1": theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerMultiHypoConfig( 'Muon', '8GeV') hypocutEF = 'MultiComb_8GeV' elif self.chainName == "2g20_loose1_mu20noL1": theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerMultiHypoConfig( 'Muon', '20GeV') hypocutEF = 'MultiComb_20GeV' else: logMuonDef.error("Chain %s is not yet supported." % (self.chainName)) ########### Sequence List ############## self.EFsequenceList += [[ '', [PESA__DummyUnseededAllTEAlgo("EFDummyAlgo")] + [ CfgGetter.getAlgorithm("TrigMuSuperEF_FSSA"), theTrigMuonEFSA_FS_Hypo ], 'EF_SA_FS' ]] self.EFsequenceList += [[ 'EF_SA_FS', [CfgGetter.getAlgorithm("TrigMuonEFFSRoiMaker")], 'EF_SAR_FS' ]] self.EFsequenceList += [[ 'EF_SAR_FS', theTrigEFIDDataPrep_Muon + [theTrigFastTrackFinder_Muon] + theTrigEFIDInsideOutMerged_Muon, #theTrigEFIDInsideOut_Muon, #a fallback - it should be replaced by the previous line if it works 'EF_FStracksMuon' ]] self.EFsequenceList += [[ 'EF_FStracksMuon', [CfgGetter.getAlgorithm("TrigMuSuperEF_TMEFCombinerOnly")], 'EF_CB_FS_single' ]] self.EFsequenceList += [[ 'EF_CB_FS_single', [ TrigMuonEFRoiAggregatorConfig('TrigMuonEFFSRoiAggregator'), theTrigMuonEFCombinerMultiHypoConfig ], 'EF_CB_FS' ]] ########### Signatures ########### self.EFsignatureList += [[['EF_SA_FS'] * self.mult]] self.EFsignatureList += [[['EF_SAR_FS'] * self.mult]] self.EFsignatureList += [[['EF_FStracksMuon'] * self.mult]] self.EFsignatureList += [[['EF_CB_FS_single'] * self.mult]] self.EFsignatureList += [[['EF_CB_FS'] * self.mult]] ########### TE renaming ########## self.TErenamingDict = { 'EF_SA_FS': mergeRemovingOverlap('EF_SA_FS_', 'SAFSHypo' + hypocut + '_' + hypocutEF), 'EF_SAR_FS': mergeRemovingOverlap('EF_SAR_FS_', 'SAFSHypo' + hypocut + '_' + hypocutEF), 'EF_FStracksMuon': mergeRemovingOverlap('EF_FStracksMuon_', 'SAFSHypo' + hypocut + '_' + hypocutEF), 'EF_CB_FS_single': mergeRemovingOverlap('EF_CB_FS_single_', 'SAFSHypo' + hypocut + '_' + hypocutEF), 'EF_CB_FS': mergeRemovingOverlap('EF_CB_FS_', 'SAFSHypo' + hypocut + '_' + hypocutEF), }
include.block("MuonByteStreamCnvTest/TgcDigitToTgcRDO_jobOptions.py") from AthenaCommon.AlgSequence import AlgSequence from AthenaCommon import CfgGetter job = AlgSequence() job += CfgGetter.getAlgorithm("TgcDigitToTgcRDO/TgcDigitToTgcRDO", tryDefaultConfigurable=True) job.TgcDigitToTgcRDO.isNewTgcDigit = True
def setup_muXX_noL1(self): ########### EF algos ################# from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo from AthenaCommon import CfgGetter from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFExtrapolatorMultiHypoConfig if self.chainName.find("2g20_loose1") or self.chainName.find("e28_tight1_iloose"): if self.chainName.find("2mu"): if self.chainName.find("mu2") >= 0: hypocut = '0GeV_0GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig('Muon', '0GeV', '0GeV') else: hypocut = '2GeV_2GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig('Muon', '2GeV', '2GeV') else: if self.chainName.find("mu2") >= 0: hypocut = '0GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig('Muon', '0GeV') else: hypocut = '2GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig('Muon', '2GeV') else: if self.chainName.find("2mu"): if self.chainName.find("mu2") >= 0: hypocut = '0GeV_0GeV_0GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig('Muon', '0GeV', '0GeV', '0GeV') else: hypocut = '2GeV_2GeV_2GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig('Muon', '2GeV', '2GeV', '2GeV') else: if self.chainName.find("mu2") >= 0: hypocut = '0GeV_0GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig('Muon', '0GeV', '0GeV') else: hypocut = '2GeV_2GeV' theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig('Muon', '2GeV', '2GeV') from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence theTrigEFIDDataPrep_Muon = TrigEFIDSequence("Muon","muon","DataPrep").getSequence() from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Muon theTrigFastTrackFinder_Muon = TrigFastTrackFinder_Muon() theTrigEFIDInsideOutMerged_Muon = TrigEFIDSequence("Muon","muon","InsideOutMerged").getSequence() theTrigEFIDInsideOut_Muon = TrigEFIDSequence("Muon","muon","InsideOut").getSequence() from TrigMuonEF.TrigMuonEFConfig import TrigMuonEFRoiAggregatorConfig from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFCombinerMultiHypoConfig if self.chainName == "mu20_mu8noL1" or self.chainName == "mu20_iloose_mu8noL1" or self.chainName == "mu20_imedium_mu8noL1": theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerMultiHypoConfig('Muon', '20GeV', '8GeV') hypocutEF = 'MultiComb_20GeV_8GeV' elif self.chainName == "mu20_2mu4noL1" or self.chainName== "mu20_iloose_2mu4noL1" or self.chainName== "mu20_imedium_2mu4noL1": theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerMultiHypoConfig('Muon', '20GeV', '4GeV', '4GeV') hypocutEF = 'MultiComb_20GeV_4GeV_4GeV' elif self.chainName == "mu24_mu8noL1": theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerMultiHypoConfig('Muon', '24GeV', '8GeV') hypocutEF = 'MultiComb_24GeV_8GeV' elif self.chainName == "mu24_2mu4noL1": theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerMultiHypoConfig('Muon', '24GeV', '4GeV', '4GeV') hypocutEF = 'MultiComb_24GeV_4GeV_4GeV' elif self.chainName == "e28_tight1_iloose_mu8noL1": theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerMultiHypoConfig('Muon', '8GeV') hypocutEF = 'MultiComb_8GeV' elif self.chainName == "2g20_loose1_mu20noL1": theTrigMuonEFCombinerMultiHypoConfig = TrigMuonEFCombinerMultiHypoConfig('Muon', '20GeV') hypocutEF = 'MultiComb_20GeV' else: logMuonDef.error("Chain %s is not yet supported." % (self.chainName)) ########### Sequence List ############## self.EFsequenceList += [['', [PESA__DummyUnseededAllTEAlgo("EFDummyAlgo")]+ [CfgGetter.getAlgorithm("TrigMuSuperEF_FSSA"), theTrigMuonEFSA_FS_Hypo], 'EF_SA_FS']] self.EFsequenceList += [['EF_SA_FS', [CfgGetter.getAlgorithm("TrigMuonEFFSRoiMaker")], 'EF_SAR_FS']] self.EFsequenceList += [['EF_SAR_FS', theTrigEFIDDataPrep_Muon+[theTrigFastTrackFinder_Muon]+theTrigEFIDInsideOutMerged_Muon, #theTrigEFIDInsideOut_Muon, #a fallback - it should be replaced by the previous line if it works 'EF_FStracksMuon']] self.EFsequenceList += [['EF_FStracksMuon', [CfgGetter.getAlgorithm("TrigMuSuperEF_TMEFCombinerOnly")], 'EF_CB_FS_single']] self.EFsequenceList += [['EF_CB_FS_single', [TrigMuonEFRoiAggregatorConfig('TrigMuonEFFSRoiAggregator'), theTrigMuonEFCombinerMultiHypoConfig], 'EF_CB_FS']] ########### Signatures ########### self.EFsignatureList += [ [['EF_SA_FS']*self.mult] ] self.EFsignatureList += [ [['EF_SAR_FS']*self.mult] ] self.EFsignatureList += [ [['EF_FStracksMuon']*self.mult] ] self.EFsignatureList += [ [['EF_CB_FS_single']*self.mult] ] self.EFsignatureList += [ [['EF_CB_FS']*self.mult] ] ########### TE renaming ########## self.TErenamingDict = { 'EF_SA_FS': mergeRemovingOverlap('EF_SA_FS_','SAFSHypo'+hypocut+'_'+hypocutEF), 'EF_SAR_FS': mergeRemovingOverlap('EF_SAR_FS_','SAFSHypo'+hypocut+'_'+hypocutEF), 'EF_FStracksMuon': mergeRemovingOverlap('EF_FStracksMuon_', 'SAFSHypo'+hypocut+'_'+hypocutEF), 'EF_CB_FS_single': mergeRemovingOverlap('EF_CB_FS_single_','SAFSHypo'+hypocut+'_'+hypocutEF), 'EF_CB_FS': mergeRemovingOverlap('EF_CB_FS_', 'SAFSHypo'+hypocut+'_'+hypocutEF), }