def TMEF_MuonStauInsideOutRecoTool(name='TMEF_MuonStauInsideOutRecoTool', **kwargs): kwargs.setdefault('MuonTrackBuilder', 'TMEF_CombinedMuonTrackBuilder') kwargs.setdefault( 'MuonCandidateTrackBuilderTool', CfgGetter.getPublicTool('TMEF_MuonStauCandidateTrackBuilderTool')) return CfgMgr.MuonCombined__MuonInsideOutRecoTool(name, **kwargs)
def LArPileUpToolDefault(useLArFloat=True, isOverlay=False, outputKey='LArDigitContainer_MC', outputKey_DigiHSTruth='LArDigitContainer_DigiHSTruth', name='LArPileUpToolDefault'): if isOverlay: #For all other cases, this is already done by LArConditionsCommon_MC_jobOptions.py from LArRecUtils.LArRecUtilsConf import LArSymConditionsAlg_LArfSamplMC_LArfSamplSym_ as LArfSamplSymAlg condSeq = AthSequencer("AthCondSeq") condSeq += LArfSamplSymAlg(ReadKey="LArfSampl", WriteKey="LArfSamplSym") try: from AthenaCommon import CfgGetter theTool = CfgGetter.getPublicTool("LArPileUpTool") theTool.DigitContainer = outputKey theTool.DigitContainer_DigiHSTruth = outputKey_DigiHSTruth from Digitization.DigitizationFlags import digitizationFlags theTool.DoDigiTruthReconstruction = digitizationFlags.doDigiTruth() except Exception as configException: import traceback traceback.print_exc() return theTool
def MuonHolesOnTrack(name='MuonHolesOnTrack', **kwargs): kwargs.setdefault("ExtrapolatorName", "MuonExtrapolator") kwargs.setdefault("RIO_OnTrackCreator", "MuonRotCreator") kwargs.setdefault("DoHolesIdentification", True) kwargs.setdefault("DoParameterUpdate", True) kwargs.setdefault("LowerTrackMomentumCut", 2000.0) AtlasTrackingGeometrySvc = CfgGetter.getService("AtlasTrackingGeometrySvc") kwargs.setdefault("TrackingGeometryName", AtlasTrackingGeometrySvc.TrackingGeometryName) from MuonTGRecTools.MuonTGRecToolsConf import Muon__MuonHolesOnTrackTool return Muon__MuonHolesOnTrackTool(name, **kwargs)
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
def LArPileUpToolDefault(useLArFloat=True,isOverlay=False,outputKey='LArDigitContainer_MC',outputKey_DigiHSTruth='LArDigitContainer_DigiHSTruth',name='LArPileUpToolDefault'): try: from AthenaCommon import CfgGetter theTool = CfgGetter.getPublicTool("LArPileUpTool") theTool.DigitContainer = outputKey theTool.DigitContainer_DigiHSTruth = outputKey_DigiHSTruth from Digitization.DigitizationFlags import digitizationFlags theTool.DoDigiTruthReconstruction = digitizationFlags.doDigiTruth() except Exception as configException: print configException print "ERROR Problem with configuration" return theTool
def __init__(self, name="TrigMuonEFStandaloneTrackTool", **kwargs): super(TrigMuonEFStandaloneTrackToolConfig, self).__init__(name, **kwargs) self.CscClusterProvider = CfgGetter.getPublicTool( "CscThresholdClusterBuilderTool") self.SegmentsFinderTool = CfgGetter.getPublicToolClone( "TMEF_SegmentsFinderTool", "MooSegmentFinder", WriteIntermediateResults=False, HoughPatternFinder=CfgGetter.getPublicTool("MuonLayerHoughTool"), DoSegmentCombinations=True) CfgGetter.getPublicTool("MuonHoughPatternFinderTool").RecordAll = False CfgGetter.getPublicTool("MuonLayerHoughTool").DoTruth = False CfgGetter.getPublicTool("MooTrackFitter").SLFit = False # use seeded decoding if (TriggerFlags.MuonSlice.doEFRoIDrivenAccess()): self.useMdtSeededDecoding = True self.useRpcSeededDecoding = True self.useTgcSeededDecoding = True self.useCscSeededDecoding = True # use ROB based seeded decoding instead of PRD based self.useMdtRobDecoding = True self.useRpcRobDecoding = True self.useTgcRobDecoding = False # neither available nor needed self.useCscRobDecoding = False # neither available nor needed from MuonRecExample.MuonRecFlags import muonRecFlags self.useRpcData = muonRecFlags.doRPCs() self.useTgcData = muonRecFlags.doTGCs() self.useCscData = muonRecFlags.doCSCs() # to select barrel(useMdtData=2), endcap(useMdtData=3) if muonRecFlags.doMDTs(): self.useMdtData = 1 else: self.useMdtData = 0 self.useTGCInPriorNextBC = False self.doTimeOutChecks = False self.doTimeOutGuard = False self.maxTgcHits = 0 self.maxCscHits = 0 self.maxRpcHits = 0 self.maxMdtHits = 0 self.doCache = True self.IgnoreMisalginedCSCs = True self.TrackBuilderTool = "TMEF_TrackBuilderTool" self.TrkSummaryTool = "TMEF_TrackSummaryTool" self.MuonCandidateTool = "TMEF_MuonCandidateTool" self.TrackToTrackParticleConvTool = "MuonParticleCreatorTool"
def TMEF_MuonCreatorTool(name="TMEF_MuonCreatorTool", **kwargs): from TrkExTools.AtlasExtrapolator import AtlasExtrapolator from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool pcExtensionTool = Trk__ParticleCaloExtensionTool( Extrapolator=AtlasExtrapolator()) kwargs.setdefault("ParticleCaloExtensionTool", pcExtensionTool) kwargs.setdefault('TrackParticleCreator', 'TMEF_TrkToTrackParticleConvTool') kwargs.setdefault("AmbiguityProcessor", CfgGetter.getPublicTool('TrigMuonAmbiProcessor')) kwargs.setdefault('MakeTrackAtMSLink', True) kwargs.setdefault("CaloMaterialProvider", "TMEF_TrkMaterialProviderTool") kwargs.setdefault("FillTimingInformation", False) kwargs.setdefault("MuonSelectionTool", "") kwargs.setdefault("TrackQuery", "TMEF_MuonTrackQuery") kwargs.setdefault("TrackSummaryTool", "TMEF_TrackSummaryTool") return CfgMgr.MuonCombined__MuonCreatorTool(name, **kwargs)
def InDetKalmanTrackFitterBase(name='InDetKalmanTrackFitterBase', **kwargs): from InDetRecExample import TrackingCommon as TrackingCommon from TrkKalmanFitter.TrkKalmanFitterConf import Trk__KalmanFitter from AthenaCommon.AppMgr import ToolSvc split_cluster_map_extension = kwargs.get('SplitClusterMapExtension', '') kwargs.setdefault('ExtrapolatorHandle', TrackingCommon.getInDetExtrapolator()) if 'RIO_OnTrackCreatorHandle' not in kwargs: from InDetRecExample import TrackingCommon as TrackingCommon kwargs = setDefaults( kwargs, RIO_OnTrackCreatorHandle=TrackingCommon.getInDetRefitRotCreator( SplitClusterMapExtension=split_cluster_map_extension)) kwargs.setdefault('MeasurementUpdatorHandle', ToolSvc.InDetUpdator) setTool('KalmanSmootherHandle', 'InDetBKS', kwargs) setTool('KalmanOutlierLogicHandle', 'InDetKOL', kwargs) kwargs.setdefault('DynamicNoiseAdjustorHandle', None) kwargs.setdefault('BrempointAnalyserHandle', None) kwargs.setdefault('AlignableSurfaceProviderHandle', None) if len(split_cluster_map_extension) > 0: if 'RecalibratorHandle' not in kwargs: the_tool_name = 'InDetMeasRecalibST' kwargs.setdefault( 'RecalibratorHandle', CfgGetter.getPublicToolClone( the_tool_name + split_cluster_map_extension, the_tool_name, SplitClusterMapExtension=split_cluster_map_extension)) else: setTool('RecalibratorHandle', 'InDetMeasRecalibST', kwargs) # setTool('InternalDAFHandle','KalmanInternalDAF',kwargs ) # from InDetRecExample.InDetJobProperties import InDetFlags # kwargs.setdefault('DoDNAForElectronsOnly', True if InDetFlags.doBremRecovery() and InDetFlags.trackFitterType() is 'KalmanFitter' else False) return Trk__KalmanFitter(name, **kwargs)
def LArFEBMonConfigCore(helper, algoinstance, inputFlags, cellDebug=False, dspDebug=False): from LArMonitoring.GlobalVariables import lArDQGlobals larFEBMonAlg = helper.addAlgorithm(algoinstance, 'larFEBMonAlg') GroupName = "FEBMon" nslots = [] for i in range(0, len(lArDQGlobals.FEB_Slot)): nslots.append(lArDQGlobals.FEB_Slot[lArDQGlobals.Partitions[i]][1]) larFEBMonAlg.MonGroup = GroupName larFEBMonAlg.PartitionNames = lArDQGlobals.Partitions larFEBMonAlg.SubDetNames = lArDQGlobals.SubDet larFEBMonAlg.Streams = lArDQGlobals.defaultStreamNames isCOMP200 = False from AthenaConfiguration.ComponentFactory import isRun3Cfg if isRun3Cfg(): if "COMP200" in inputFlags.IOVDb.DatabaseInstance: isCOMP200 = True else: from IOVDbSvc.CondDB import conddb if conddb.GetInstance() == 'COMP200': isCOMP200 = True if not isCOMP200: dbString = "<db>COOLONL_LAR/CONDBR2</db>" persClass = "AthenaAttributeList" fld = "/LAR/Configuration/DSPThresholdFlat/Thresholds" if isRun3Cfg(): iovDbSvc = helper.resobj.getService("IOVDbSvc") condLoader = helper.resobj.getCondAlgo("CondInputLoader") else: from AthenaCommon import CfgGetter iovDbSvc = CfgGetter.getService("IOVDbSvc") from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") condLoader = condSeq.CondInputLoader iovDbSvc.Folders.append(fld + dbString) condLoader.Load.append((persClass, fld)) larFEBMonAlg.Run2DSPThresholdsKey = fld else: fld = '/LAR/Configuration/DSPThreshold/Thresholds' db = 'LAR_ONL' obj = 'LArDSPThresholdsComplete' if isRun3Cfg(): helper.resobj.addFolderList(inputFlags, [(fld, db, obj)]) else: conddb.addFolder(db, fld, className=obj) larFEBMonAlg.Run1DSPThresholdsKey = 'LArDSPThresholds' # adding LArFebErrorSummary algo if isRun3Cfg(): from LArROD.LArFebErrorSummaryMakerConfig import LArFebErrorSummaryMakerCfg acc = LArFebErrorSummaryMakerCfg(inputFlags) helper.resobj.merge(acc) else: #put here what to do else pass Group = helper.addGroup(larFEBMonAlg, GroupName, '/LAr/' + GroupName + 'NewAlg/') #Summary histos summary_hist_path = 'Summary/' #-- TTree for corrupted events timestamp Group.defineTree( 'timestamp,time_ns,febHwId,febError;LArCorrupted', path=summary_hist_path, title='Timestamps of corrupted LAr events', treedef= 'timestamp/i:time_ns/i:febHwId/vector<int>:febErrorType/vector<int>') Group.defineHistogram('nbFEB;NbOfReadoutFEBGlobal', title='# of readout FEB/DSP header', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.N_FEB + 11, xmin=-0.5, xmax=lArDQGlobals.N_FEB + 10 + 0.5) Group.defineHistogram( 'nbFEBpart,part;NbOfEvts2d', title='# of readout FEB/DSP header:Num. FEBs:Partition', type='TH2I', path=summary_hist_path, xbins=lArDQGlobals.N_FEB_Parttions_Max, xmin=-0.5, xmax=lArDQGlobals.N_FEB_Parttions_Max - 0.5, ybins=lArDQGlobals.N_Partitions, ymin=-0.5, ymax=lArDQGlobals.N_Partitions - 0.5, ylabels=lArDQGlobals.Partitions) Group.defineHistogram('febError,part;NbOfLArFEBMonErrors_dE', title='# of data corruption errors', type='TH2I', path=summary_hist_path, xbins=lArDQGlobals.N_FEBErrors, xmin=0.5, xmax=lArDQGlobals.N_FEBErrors + 0.5, ybins=lArDQGlobals.N_Partitions, ymin=-0.5, ymax=lArDQGlobals.N_Partitions - 0.5, xlabels=lArDQGlobals.FEBErrors, ylabels=lArDQGlobals.Partitions) Group.defineHistogram( 'dspThrADC;dspThresholdsADC', title= 'DSP thresholds to readout samples:Number of cells:Cell threshold in ADC counts', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.DSPThr_Bins + 1, xmin=-0.5, xmax=lArDQGlobals.DSPThr_Bins + 0.5) Group.defineHistogram( 'dspThrQT;dspThresholds_qfactortime', title= 'DSP thresholds to readout (qfactor+time):Number of cells:Cell threshold in ADC counts', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.DSPThr_Bins + 1, xmin=-0.5, xmax=lArDQGlobals.DSPThr_Bins + 0.5) Group.defineHistogram('EvtType;Eventtype', title='Event type (1st readout FEB)', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.Evt_Bins, xmin=lArDQGlobals.Evt_Min, xmax=lArDQGlobals.Evt_Max, xlabels=lArDQGlobals.Evt_labels) Group.defineHistogram( 'LVL1Trig;TriggerWord', title='Number of Events per L1 trigger word (8 bits):L1 trigger word', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.L1Trig_Bins, xmin=lArDQGlobals.L1Trig_Min, xmax=lArDQGlobals.L1Trig_Max) Group.defineHistogram( 'LVL1TrigAllDSP;TriggerWordAllDSP', title='Number of L1 trigger word per DSP (8 bits):L1 trigger word', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.L1Trig_Bins, xmin=lArDQGlobals.L1Trig_Min, xmax=lArDQGlobals.L1Trig_Max) Group.defineHistogram('EvtRej;EventsRejected', title='Nb of events rejected (at least one error)', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.EvtRej_Bins, xmin=lArDQGlobals.EvtRej_Min, xmax=lArDQGlobals.EvtRej_Max, xlabels=lArDQGlobals.EvtRej_labels) Group.defineHistogram( 'EvtRej,EvtRejYield1D;EventsRejectedYield', title='Data corruption yield:Corruption type:Yield(%)', type='TProfile', path=summary_hist_path, xbins=lArDQGlobals.EvtRej_Bins - 1, xmin=lArDQGlobals.EvtRej_Min, xmax=lArDQGlobals.EvtRej_Max - 1, xlabels=lArDQGlobals.EvtRejYield_labels) Group.defineHistogram( 'LB0,EvtRejYield;YieldOfRejectedEventsVsLB', title= 'Yield of corrupted events (DATACORRUPTED):Luminosity Block:Yield(%)', type='TProfile', path=summary_hist_path, xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max) Group.defineHistogram( 'LB0,EvtRejYieldOut;YieldOfRejectedEventsVsLBout', title= 'Yield of corrupted events (DATACORRUPTED) not vetoed by time window:Luminosity Block:Yield(%)', type='TProfile', path=summary_hist_path, xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max) Group.defineHistogram( 'rejBits;rejectionBits', title= 'Errors at the origin of event rejection:Bits:Number of (rejected) events', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.rejBits_Bins, xmin=-0.5, xmax=lArDQGlobals.rejBits_Bins - 0.5) Group.defineHistogram('LB0;NbOfEventsVsLB', title='Nb of events per LB:Luminosity Block', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max) Group.defineHistogram( 'NbOfSweet2;NbOfSw2', title= '# of cells with samples readout:Number of cells:Number of events', type='TH1I', path=summary_hist_path, xbins=int(lArDQGlobals.N_Cells / 10), xmin=-1000, xmax=lArDQGlobals.N_Cells - 1000) Group.defineHistogram( 'LB0,LArEvSize;eventSizeVsLB', title='LAr event size (w/o ROS headers):Luminosity Block:Megabytes', type='TProfile', path=summary_hist_path, xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max) Group.defineHistogram( 'NbOfSamp;NbOfSamples', title='# of samples (1st readout FEB):Samples:Number of events', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.Samples_Bins, xmin=lArDQGlobals.Samples_Min, xmax=lArDQGlobals.Samples_Max) isOnline = False if isRun3Cfg(): if inputFlags.DQ.Environment == 'online': isOnline = True else: from AthenaCommon.AthenaCommonFlags import athenaCommonFlags if athenaCommonFlags.isOnline: isOnline = True if isOnline: Group.defineHistogram( 'LBf,EvtRejYield;EventsRejectedLB', titile='% of events rejected in current LB (online only)', type='TProfile', path=summary_hist_path, xbins=1, xmin=0, xmax=1, xlabels=['% of events']) Group.defineHistogram( 'LB,streamBin,LArEvSizePart;eventSizeStreamVsLB', titile='LAr event size per stream per LB (w/o ROS headers)', type='TProfile2D', path=summary_hist_path, xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max, ybins=len(larFEBMonAlg.Streams), ymin=-0.5, ymax=len(larFEBMonAlg.Streams) - 0.5, ylabels=larFEBMonAlg.Streams) # Now per partition histograms for subdet in range(0, lArDQGlobals.N_SubDet): hist_path = '/LAr/' + GroupName + 'NewAlg/' + lArDQGlobals.SubDet[ subdet] + '/' slot_low = lArDQGlobals.FEB_Slot[lArDQGlobals.Partitions[subdet * 2]][0] - 0.5 slot_up = lArDQGlobals.FEB_Slot[lArDQGlobals.Partitions[subdet * 2]][1] + 0.5 slot_n = int(slot_up - slot_low) ft_low = lArDQGlobals.FEB_Feedthrough[lArDQGlobals.Partitions[ subdet * 2]][0] - 0.5 ft_up = lArDQGlobals.FEB_Feedthrough[lArDQGlobals.Partitions[ subdet * 2]][1] + 0.5 ft_n = int(ft_up - ft_low) darray = helper.addArray( [lArDQGlobals.Partitions[2 * subdet:2 * subdet + 2]], larFEBMonAlg, lArDQGlobals.SubDet[subdet]) darray.defineHistogram('slotPar,FTPar;Parity', title='Parity error:Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram( 'slotBcid,FTBcid;BCID', title='BCID mismatch betw. 2 halves of FEB:Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram( 'slotRadd,FTRadd;RADD', title='Sample header mismatch betw. 2 halves of FEB:Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram( 'slotEvtid,FTEvtid;EVTID', title='EVTID mismatch betw. 2 halves of FEB:Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram( 'slotScac,FTScac;SCACStatus', title='Wrong SCAC status in one half of a FEB:Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotscout,FTscout;scaOutOfRange', title='Sca out of range:Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram( 'slotgain,FTgain;gainMismatch', title='Gain mismatch within time samples:Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slottype,FTtype;typeMismatch', title='Event type mismatch:Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotsmp,FTsmp;badNbOfSamp', title='Non uniform number of samples:Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotzero,FTzero;zeroSamp', title='Empty FEB data blocks:Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotsum,FTsum;checkSum', title='Checksum / DSP block size:Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotmis,FTmis;missingHeader', title='Missing header :Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotgain,FTgain;badGain', title='Bad gain :Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram( 'slotabs,FTabs;LArFEBMonErrorsAbsolute', title='Nb of events with at least one error :Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram( 'slotmist,FTmist;missingTriggerType', title= 'LVL1 trigger type missing or different from event type :Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram( 'slotnb,FTnb;nbOfEvts', title='Nb of events (DSP header check only) :Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram( 'slotnb,FTnb,weightsweet1;NbOfSweet1PerFEB', title='Average # of cells with (qfactor+time) readout :Slot:FT', type='TProfile2D', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram( 'slotnb,FTnb,weightsweet2;NbOfSweet2PerFEB', title='Average # of cells with samples readout :Slot:FT', type='TProfile2D', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram( 'nbFEBpart;nbOfFebBlocks', title='# of readout FEBs (DSP header check only) :Slot:FT', type='TH1I', path=hist_path, xbins=lArDQGlobals.N_FEB_Parttions_Max, xmin=-0.5, xmax=lArDQGlobals.N_FEB_Parttions_Max - 0.5) darray.defineHistogram( 'slotMasked,FTMasked;knownFaultyFEB', title='FEB with known errors (1:err. ignored 2:FEB masked):Slot:FT', type='TH2I', path=hist_path, xbins=slot_n, xmin=slot_low, xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram( 'LB,LArEvSizePart;eventSizeVsLB', title='LAr event size per LB (w/o ROS headers):Luminosity Block', type='TProfile', path=hist_path, xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max) if isOnline: darray.defineHistogram( 'LBf,erronl;EventsRejectedLB', titile='% of events rejected in current LB (online only)', type='TProfile', path=hist_path, xbins=1, xmin=0, xmax=1, xlabels=['% of events']) darray.defineHistogram( 'LB,streamBin,LArEvSizePart;eventSizeStreamVsLB', titile='LAr event size per stream per LB (w/o ROS headers)', type='TProfile2D', path=hist_path, xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max, ybins=len(larFEBMonAlg.Streams), ymin=-0.5, ymax=len(larFEBMonAlg.Streams) - 0.5, ylabels=larFEBMonAlg.Streams) pass
): raise RuntimeError( "SteppingCache is incompatible with PileUpTools. Please switch off either digitizationFlags.SignalPatternForSteppingCache or digitizationFlags.doXingByXingPileUp." ) include("Digitization/ConfigPileUpEventLoopMgr.py") if DetFlags.pileup.any_on(): logConfigDigitization.info("PILEUP CONFIGURATION:") logConfigDigitization.info(" -----> Luminosity = %s cm^-2 s^-1", jobproperties.Beam.estimatedLuminosity()) logConfigDigitization.info(" -----> Bunch Spacing = %s ns", digitizationFlags.bunchSpacing.get_Value()) # in any case we need the PileUpMergeSvc for the digitize algos if not hasattr(ServiceMgr, 'PileUpMergeSvc'): from AthenaCommon import CfgGetter ServiceMgr += CfgGetter.getService("PileUpMergeSvc") #-------------------------------------------------------------- # Subdetector-specific configuration #-------------------------------------------------------------- include("Digitization/DetectorDigitization.py") #-------------------------------------------------------------- # Random Number Engine and Seeds #-------------------------------------------------------------- # attach digi and pileup seeds to random number service configurable and print them out from AthenaCommon.ConfigurableDb import getConfigurable ServiceMgr += getConfigurable(digitizationFlags.rndmSvc.get_Value())() digitizationFlags.rndmSeedList.addtoService() digitizationFlags.rndmSeedList.printSeeds()
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
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)
MuonDetectorTool.SelectedStations += ["EIS*"] MuonDetectorTool.SelectedStations += ["EIL10"] MuonDetectorTool.SelectedStations += ["EIL11"] MuonDetectorTool.SelectedStations += ["EIL12"] MuonDetectorTool.SelectedStations += ["EIL17"] MuonDetectorTool.SelectedStations += ["CSS*"] MuonDetectorTool.SelectedStations += ["CSL*"] MuonDetectorTool.SelectedStations += ["T4E*"] MuonDetectorTool.SelectedStations += ["T4F*"] ## Additional material in the muon system from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc AGDD2Geo = AGDDtoGeoSvc() from AthenaCommon import CfgGetter if not "MuonAGDDTool/MuonSpectrometer" in AGDD2Geo.Builders: ToolSvc += CfgGetter.getPublicTool("MuonSpectrometer", checkType=True) AGDD2Geo.Builders += ["MuonAGDDTool/MuonSpectrometer"] if hasattr(simFlags, 'SimulateNewSmallWheel'): if simFlags.SimulateNewSmallWheel(): if not "NSWAGDDTool/NewSmallWheel" in AGDD2Geo.Builders: ToolSvc += CfgGetter.getPublicTool("NewSmallWheel", checkType=True) AGDD2Geo.Builders += ["NSWAGDDTool/NewSmallWheel"] theApp.CreateSvc += ["AGDDtoGeoSvc"] ServiceMgr += AGDD2Geo ## Add configured GeoModelSvc to service manager ServiceMgr += gms ## AtlasSimSkeleton._do_metadata from G4AtlasApps.SimFlags import simFlags
if muonRecFlags.writeMuonExitLayer(): topSequence += TrackRecordFilter("TrackRecordFilterMuonExitLayer", inputName="MuonExitLayer", outputName="MuonExitLayerFilter") # only do PRD truth if PRD's are being made if rec.doTruth() and DetFlags.makeRIO.Muon_on(): from MuonTruthAlgs.MuonTruthAlgsConf import MuonPRD_MultiTruthMaker topSequence += MuonPRD_MultiTruthMaker() from AthenaCommon.CfgGetter import getService getService("AtlasTrackingGeometrySvc") from MuonTruthAlgs.MuonTruthAlgsConf import Muon__MuonTruthDecorationAlg topSequence += Muon__MuonTruthDecorationAlg("MuonTruthDecorationAlg") from AthenaCommon import CfgGetter topSequence.MuonTruthDecorationAlg.MCTruthClassifier = CfgGetter.getPublicTool( "MCTruthClassifier") try: from RecExConfig.InputFilePeeker import inputFileSummary truthStrategy = inputFileSummary['metadata']['/Simulation/Parameters'][ 'TruthStrategy'] if truthStrategy in ['MC15', 'MC18', 'MC18LLP']: topSequence.MuonTruthDecorationAlg.BarcodeOffset = 10000000 except: print "Failed to read /Simulation/Parameters/ metadata" pass #load default tools: if muonRecFlags.doStandalone() or muonRecFlags.doPseudoTracking(): include("MuonRecExample/MuonRecLoadTools.py")
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
try: from JetRec.JetRecFlags import jetFlags jetFlags.Enabled = False except ImportError: pass # bug in RecExCond does not pass rec.doTau() try: from tauRec.tauRecFlags import jobproperties jobproperties.tauRecFlags.Enabled = rec.doTau() except ImportError: pass if ConfigOutputLevel <= DEBUG: from AthenaCommon import CfgGetter CfgGetter.setLogLevel(ConfigOutputLevel) def MuonOnly(): global TriggerFlags, doOldChains, doNewChains, doIsolation, v4Menus from TriggerMenuPython.StreamingSliceFlags import StreamingSliceFlags # not included in TriggerFlags TriggerFlags.Slices_all_setOff() TriggerFlags.MuonSlice.setAll() from AthenaCommon.JobProperties import JobPropertyContainer for prop in TriggerFlags.__dict__.values(): if isinstance(prop, JobPropertyContainer) and prop.__name__ != 'MuonSlice': try: prop.signatures = [] except AttributeError:
include.block("MdtOverlay/MdtOverlay_jobOptions.py") #from Digitization.DigitizationFlags import jobproperties from AthenaCommon import CfgGetter #from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import MuonRdoToMuonDigitTool #MuonRdoToMuonDigitTool = MuonRdoToMuonDigitTool ( # "MdtRdoToMdtDigit", # DecodeMdtRDO = True, # DecodeRpcRDO = False, # DecodeTgcRDO = False, # DecodeCscRDO = False ) #ToolSvc += CfgGetter.getPrivateTool("MdtRdoToMdtDigit") ToolSvc += CfgGetter.getPrivateTool("MdtRdoToMdtDigit") #job += MdtRdoToMdtDigit() #include ( "MDT_Digitization/MdtDigitizationTool_jobOptions.py" ) #if readBS and isRealData: # 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 )
simFlags.ReleaseGeoModel = False include("G4AtlasApps/G4Atlas.flat.configuration.py") ## Add the G4 sim to the alg sequence after the generator from AthenaCommon.CfgGetter import getAlgorithm job += getAlgorithm("G4AtlasAlg",tryDefaultConfigurable=True) # User algorithms from AthenaCommon.AppMgr import ServiceMgr from GaudiSvc.GaudiSvcConf import THistSvc ServiceMgr += THistSvc("THistSvc") ServiceMgr.THistSvc.Output = ["truth DATAFILE='truth.root' OPT='RECREATE'"]; from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from G4AtlasTests.G4AtlasTestsConf import G4TestAlg job += G4TestAlg() from AthenaCommon import CfgGetter job.G4TestAlg.SimTestTools += [CfgGetter.getPrivateTool("TruthTestTool", checkType=True)] #job.G4TestAlg.SimTestTools.['TruthTestTool'].DumpMcEvent=5 job.G4TestAlg.SimTestTools += [CfgGetter.getPrivateTool( "EvgenTruthTestTool", checkType=True)] job.G4TestAlg.SimTestTools += [CfgGetter.getPrivateTool("PixelHitsTestTool", checkType=True)] job.G4TestAlg.SimTestTools += [CfgGetter.getPrivateTool("SCT_HitsTestTool", checkType=True)] job.G4TestAlg.SimTestTools += [CfgGetter.getPrivateTool("TrtHitsTestTool", checkType=True)] ## Check of memory during the RTT tests from G4AtlasApps.atlas_utilities import MemorySnooper job += MemorySnooper()
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')})
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), }
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_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), }
def TMEF_CombinedStauTrackBuilderFit(name='TMEF_CombinedStauTrackBuilderFit', **kwargs): kwargs.setdefault( 'MdtRotCreator', CfgGetter.getPublicTool('MdtDriftCircleOnTrackCreatorStau')) return TMEF_CombinedMuonTrackBuilder(name, **kwargs)
def __init__(self, InputCollections=None, ResolvedTrackCollectionKey=None, SiSPSeededTrackCollectionKey=None, NewTrackingCuts=None, TrackCollectionKeys=[], TrackCollectionTruthKeys=[]): from InDetRecExample.InDetJobProperties import InDetFlags from InDetRecExample.InDetKeys import InDetKeys # # --- get ToolSvc and topSequence # from AthenaCommon.AppMgr import ToolSvc from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() # # --- decide if use the association tool # if (len(InputCollections) > 0) and ( NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode() == "VeryLowPt" or NewTrackingCuts.mode() == "LargeD0" or NewTrackingCuts.mode() == "LowPtLargeD0" or NewTrackingCuts.mode() == "DisplacedSoftPion" or NewTrackingCuts.mode() == "BeamGas" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "PixelPrdAssociation" or NewTrackingCuts.mode() == "VeryForwardSLHCTracks" or NewTrackingCuts.mode() == "SLHCConversionFinding"): usePrdAssociationTool = True else: usePrdAssociationTool = False # # --- get list of already associated hits (always do this, even if no other tracking ran before) # if usePrdAssociationTool: from InDetTrackPRD_Association.InDetTrackPRD_AssociationConf import InDet__InDetTrackPRD_Association InDetPRD_Association = InDet__InDetTrackPRD_Association( name='InDetPRD_Association' + NewTrackingCuts.extension(), AssociationTool=InDetPrdAssociationTool, TracksName=list(InputCollections)) topSequence += InDetPRD_Association if (InDetFlags.doPrintConfigurables()): print InDetPRD_Association # ------------------------------------------------------------ # # ----------- SiSPSeededTrackFinder # # ------------------------------------------------------------ if InDetFlags.doSiSPSeededTrackFinder(): # # --- Space points seeds maker, use different ones for cosmics and collisions # if NewTrackingCuts.mode() == "DBM": from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_ATLxk as SiSpacePointsSeedMaker elif InDetFlags.doCosmics(): from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_Cosmic as SiSpacePointsSeedMaker elif InDetFlags.doHeavyIon(): from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_HeavyIon as SiSpacePointsSeedMaker elif NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode( ) == "VeryLowPt" or (NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()): from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_LowMomentum as SiSpacePointsSeedMaker elif NewTrackingCuts.mode() == "BeamGas": from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_BeamGas as SiSpacePointsSeedMaker elif NewTrackingCuts.mode() == "SLHC" or NewTrackingCuts.mode( ) == "ForwardSLHCTracks" or NewTrackingCuts.mode( ) == "VeryForwardSLHCTracks": from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_ITK as SiSpacePointsSeedMaker elif NewTrackingCuts.mode() == "DisplacedSoftPion": from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_TrkSeeded as SiSpacePointsSeedMaker else: from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_ATLxk as SiSpacePointsSeedMaker InDetSiSpacePointsSeedMaker = SiSpacePointsSeedMaker( name="InDetSpSeedsMaker" + NewTrackingCuts.extension(), pTmin=NewTrackingCuts.minPT(), maxdImpact=NewTrackingCuts.maxPrimaryImpact(), maxZ=NewTrackingCuts.maxZImpact(), minZ=-NewTrackingCuts.maxZImpact(), usePixel=NewTrackingCuts.usePixel(), SpacePointsPixelName=InDetKeys.PixelSpacePoints(), # useSCT = NewTrackingCuts.useSCT(), useSCT=(NewTrackingCuts.useSCT() and NewTrackingCuts.useSCTSeeding()), SpacePointsSCTName=InDetKeys.SCT_SpacePoints(), # useOverlapSpCollection = NewTrackingCuts.useSCT(), useOverlapSpCollection=(NewTrackingCuts.useSCT() and NewTrackingCuts.useSCTSeeding()), SpacePointsOverlapName=InDetKeys.OverlapSpacePoints(), radMax=NewTrackingCuts.radMax(), RapidityCut=NewTrackingCuts.maxEta()) if NewTrackingCuts.mode() == "Offline" or InDetFlags.doHeavyIon( ) or NewTrackingCuts.mode() == "ForwardTracks": InDetSiSpacePointsSeedMaker.maxdImpactPPS = NewTrackingCuts.maxdImpactPPSSeeds( ) InDetSiSpacePointsSeedMaker.maxdImpactSSS = NewTrackingCuts.maxdImpactSSSSeeds( ) if usePrdAssociationTool: # not all classes have that property !!! InDetSiSpacePointsSeedMaker.UseAssociationTool = True InDetSiSpacePointsSeedMaker.AssociationTool = InDetPrdAssociationTool if not InDetFlags.doCosmics(): InDetSiSpacePointsSeedMaker.maxRadius1 = 0.75 * NewTrackingCuts.radMax( ) InDetSiSpacePointsSeedMaker.maxRadius2 = NewTrackingCuts.radMax( ) InDetSiSpacePointsSeedMaker.maxRadius3 = NewTrackingCuts.radMax( ) if NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode( ) == "VeryLowPt" or (NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()): try: InDetSiSpacePointsSeedMaker.pTmax = NewTrackingCuts.maxPT() except: pass InDetSiSpacePointsSeedMaker.mindRadius = 4.0 if NewTrackingCuts.mode() == "SLHC" or NewTrackingCuts.mode( ) == "SLHCConversionFinding": InDetSiSpacePointsSeedMaker.minRadius1 = 0 InDetSiSpacePointsSeedMaker.minRadius2 = 0 InDetSiSpacePointsSeedMaker.minRadius3 = 0 InDetSiSpacePointsSeedMaker.maxRadius1 = 1000. * Units.mm InDetSiSpacePointsSeedMaker.maxRadius2 = 1000. * Units.mm InDetSiSpacePointsSeedMaker.maxRadius3 = 1000. * Units.mm if NewTrackingCuts.mode( ) == "ForwardTracks" or NewTrackingCuts.mode( ) == "ForwardSLHCTracks" or NewTrackingCuts.mode( ) == "VeryForwardSLHCTracks": InDetSiSpacePointsSeedMaker.checkEta = True InDetSiSpacePointsSeedMaker.etaMin = NewTrackingCuts.minEta() InDetSiSpacePointsSeedMaker.etaMax = NewTrackingCuts.maxEta() InDetSiSpacePointsSeedMaker.RapidityCut = NewTrackingCuts.maxEta( ) if NewTrackingCuts.mode() == "DBM": InDetSiSpacePointsSeedMaker.etaMin = NewTrackingCuts.minEta() InDetSiSpacePointsSeedMaker.etaMax = NewTrackingCuts.maxEta() InDetSiSpacePointsSeedMaker.useDBM = True if NewTrackingCuts.mode() == "PixelThreeLayer": InDetSiSpacePointsSeedMaker.SkipIBLcut = True if NewTrackingCuts.mode() == "DisplacedSoftPion": InDetSiSpacePointsSeedMaker.maxSeedsForSpacePoint = 50 InDetSiSpacePointsSeedMaker.DeltaThetaRoISP = 0.8 InDetSiSpacePointsSeedMaker.DeltaPhiRoISP = 0.8 InDetSiSpacePointsSeedMaker.RoISeedTool = RoISeedTool #InDetSiSpacePointsSeedMaker.OutputLevel = VERBOSE ToolSvc += InDetSiSpacePointsSeedMaker if (InDetFlags.doPrintConfigurables()): print InDetSiSpacePointsSeedMaker # # --- Z-coordinates primary vertices finder (only for collisions) # if InDetFlags.useZvertexTool() and NewTrackingCuts.mode() != "DBM": from SiZvertexTool_xk.SiZvertexTool_xkConf import InDet__SiZvertexMaker_xk InDetZvertexMaker = InDet__SiZvertexMaker_xk( name='InDetZvertexMaker' + NewTrackingCuts.extension(), Zmax=NewTrackingCuts.maxZImpact(), Zmin=-NewTrackingCuts.maxZImpact(), minRatio=0.17) # not default InDetZvertexMaker.SeedMakerTool = InDetSiSpacePointsSeedMaker if InDetFlags.doHeavyIon(): InDetZvertexMaker.HistSize = 2000 ###InDetZvertexMaker.minContent = 200 InDetZvertexMaker.minContent = 30 ToolSvc += InDetZvertexMaker if (InDetFlags.doPrintConfigurables()): print InDetZvertexMaker else: InDetZvertexMaker = None # # --- SCT and Pixel detector elements road builder # from SiDetElementsRoadTool_xk.SiDetElementsRoadTool_xkConf import InDet__SiDetElementsRoadMaker_xk InDetSiDetElementsRoadMaker = InDet__SiDetElementsRoadMaker_xk( name='InDetSiRoadMaker' + NewTrackingCuts.extension(), PropagatorTool=InDetPatternPropagator, usePixel=NewTrackingCuts.usePixel(), PixManagerLocation=InDetKeys.PixelManager(), useSCT=NewTrackingCuts.useSCT(), SCTManagerLocation=InDetKeys.SCT_Manager(), RoadWidth=NewTrackingCuts.RoadWidth()) #InDetSiDetElementsRoadMaker.OutputLevel = VERBOSE ToolSvc += InDetSiDetElementsRoadMaker if (InDetFlags.doPrintConfigurables()): print InDetSiDetElementsRoadMaker # # --- Local track finding using sdCaloSeededSSSpace point seed # useBremMode = NewTrackingCuts.mode( ) == "Offline" or NewTrackingCuts.mode( ) == "SLHC" or NewTrackingCuts.mode() == "DBM" from SiTrackMakerTool_xk.SiTrackMakerTool_xkConf import InDet__SiTrackMaker_xk as SiTrackMaker InDetSiTrackMaker = SiTrackMaker( name='InDetSiTrackMaker' + NewTrackingCuts.extension(), useSCT=NewTrackingCuts.useSCT(), usePixel=NewTrackingCuts.usePixel(), RoadTool=InDetSiDetElementsRoadMaker, CombinatorialTrackFinder=InDetSiComTrackFinder, pTmin=NewTrackingCuts.minPT(), pTminBrem=NewTrackingCuts.minPTBrem(), pTminSSS=InDetFlags.pT_SSScut(), nClustersMin=NewTrackingCuts.minClusters(), nHolesMax=NewTrackingCuts.nHolesMax(), nHolesGapMax=NewTrackingCuts.nHolesGapMax(), SeedsFilterLevel=NewTrackingCuts.seedFilterLevel(), Xi2max=NewTrackingCuts.Xi2max(), Xi2maxNoAdd=NewTrackingCuts.Xi2maxNoAdd(), nWeightedClustersMin=NewTrackingCuts.nWeightedClustersMin(), CosmicTrack=InDetFlags.doCosmics(), Xi2maxMultiTracks=NewTrackingCuts.Xi2max(), # was 3. useSSSseedsFilter=InDetFlags.doSSSfilter(), doMultiTracksProd=True, useBremModel=InDetFlags.doBremRecovery() and useBremMode, # only for NewTracking the brem is debugged !!! doCaloSeededBrem=InDetFlags.doCaloSeededBrem(), doHadCaloSeedSSS=InDetFlags.doHadCaloSeededSSS(), phiWidth=NewTrackingCuts.phiWidthBrem(), etaWidth=NewTrackingCuts.etaWidthBrem(), InputClusterContainerName=InDetKeys.CaloClusterROIContainer( ), # "InDetCaloClusterROIs" InputHadClusterContainerName=InDetKeys. HadCaloClusterROIContainer(), # "InDetCaloClusterROIs" UseAssociationTool=usePrdAssociationTool) if NewTrackingCuts.mode() == "SLHC" or NewTrackingCuts.mode( ) == "ForwardSLHCTracks" or NewTrackingCuts.mode( ) == "VeryForwardSLHCTracks": InDetSiTrackMaker.ITKGeometry = True if NewTrackingCuts.mode() == "DBM": InDetSiTrackMaker.MagneticFieldMode = "NoField" InDetSiTrackMaker.useBremModel = False InDetSiTrackMaker.doMultiTracksProd = False InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSPSeededFinder' InDetSiTrackMaker.pTminSSS = -1 InDetSiTrackMaker.CosmicTrack = False InDetSiTrackMaker.useSSSseedsFilter = False InDetSiTrackMaker.doCaloSeededBrem = False InDetSiTrackMaker.doHadCaloSeedSSS = False InDetSiTrackMaker.UseAssociationTool = False elif InDetFlags.doCosmics(): InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_Cosmic' elif InDetFlags.doHeavyIon(): InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_HeavyIon' elif NewTrackingCuts.mode() == "LowPt": InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_LowMomentum' elif NewTrackingCuts.mode() == "VeryLowPt" or ( NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()): InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_VeryLowMomentum' elif NewTrackingCuts.mode() == "BeamGas": InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_BeamGas' elif NewTrackingCuts.mode() == "ForwardTracks": InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_ForwardTracks' elif NewTrackingCuts.mode() == "ForwardSLHCTracks": InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_ForwardSLHCTracks' elif NewTrackingCuts.mode() == "VeryForwardSLHCTracks": InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_VeryForwardSLHCTracks' elif NewTrackingCuts.mode() == "SLHCConversionFinding": InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_SLHCConversionTracks' elif NewTrackingCuts.mode() == "LargeD0" or NewTrackingCuts.mode( ) == "LowPtLargeD0" or NewTrackingCuts.mode( ) == "DisplacedSoftPion": InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_LargeD0' elif NewTrackingCuts.mode() == "PixelThreeLayer": InDetSiTrackMaker.CombinatorialTrackFinder = InDetSiComTrackFinderThreeLayerTracking else: InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSPSeededFinder' if InDetFlags.doStoreTrackSeeds(): InDetSiTrackMaker.SeedSegmentsWrite = True InDetSiTrackMaker.SeedToTrackConversion = InDet_SeedToTrackConversion #InDetSiTrackMaker.OutputLevel = VERBOSE ToolSvc += InDetSiTrackMaker if (InDetFlags.doPrintConfigurables()): print InDetSiTrackMaker # # set output track collection name # self.__SiTrackCollection = SiSPSeededTrackCollectionKey # # --- Setup Track finder using space points seeds # from SiSPSeededTrackFinder.SiSPSeededTrackFinderConf import InDet__SiSPSeededTrackFinder if NewTrackingCuts.mode( ) == "ForwardSLHCTracks" or NewTrackingCuts.mode( ) == "ForwardTracks": InDetSiSPSeededTrackFinder = InDet__SiSPSeededTrackFinder( name='InDetSiSpTrackFinder' + NewTrackingCuts.extension(), TrackTool=InDetSiTrackMaker, TracksLocation=self.__SiTrackCollection, SeedsTool=InDetSiSpacePointsSeedMaker, useZvertexTool=InDetFlags.useZvertexTool(), ZvertexTool=InDetZvertexMaker, useNewStrategy=False, useMBTSTimeDiff=InDetFlags.useMBTSTimeDiff(), useZBoundFinding=False) if InDetFlags.doHeavyIon(): InDetSiSPSeededTrackFinder.FreeClustersCut = 2 #Heavy Ion optimization from Igor else: InDetSiSPSeededTrackFinder = InDet__SiSPSeededTrackFinder( name='InDetSiSpTrackFinder' + NewTrackingCuts.extension(), TrackTool=InDetSiTrackMaker, TracksLocation=self.__SiTrackCollection, SeedsTool=InDetSiSpacePointsSeedMaker, useZvertexTool=InDetFlags.useZvertexTool() and NewTrackingCuts.mode() != "DBM", ZvertexTool=InDetZvertexMaker, useNewStrategy=InDetFlags.useNewSiSPSeededTF() and NewTrackingCuts.mode() != "DBM", useMBTSTimeDiff=InDetFlags.useMBTSTimeDiff(), useZBoundFinding=NewTrackingCuts.doZBoundary() and NewTrackingCuts.mode() != "DBM") if InDetFlags.doHeavyIon(): InDetSiSPSeededTrackFinder.FreeClustersCut = 2 #Heavy Ion optimization from Igor #InDetSiSPSeededTrackFinder.OutputLevel =VERBOSE topSequence += InDetSiSPSeededTrackFinder if (InDetFlags.doPrintConfigurables()): print InDetSiSPSeededTrackFinder if not InDetFlags.doSGDeletion(): if InDetFlags.doTruth(): # # set up the truth info for this container # include("InDetRecExample/ConfiguredInDetTrackTruth.py") InDetTracksTruth = ConfiguredInDetTrackTruth( self.__SiTrackCollection, self.__SiTrackCollection + "DetailedTruth", self.__SiTrackCollection + "TruthCollection") # # add final output for statistics # TrackCollectionKeys += [InDetTracksTruth.Tracks()] TrackCollectionTruthKeys += [ InDetTracksTruth.TracksTruth() ] else: TrackCollectionKeys += [self.__SiTrackCollection] # ------------------------------------------------------------ # # ---------- Ambiguity solving # # ------------------------------------------------------------ if InDetFlags.doAmbiSolving(): # # --- load InnerDetector TrackSelectionTool # prob1 = InDetFlags.pixelClusterSplitProb1() prob2 = InDetFlags.pixelClusterSplitProb2() nhitsToAllowSplitting = 9 if geoFlags.Run() == 1: prob1 = InDetFlags.pixelClusterSplitProb1_run1() prob2 = InDetFlags.pixelClusterSplitProb2_run1() nhitsToAllowSplitting = 8 if InDetFlags.doTIDE_Ambi() and not ( NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "DBM"): from InDetAmbiTrackSelectionTool.InDetAmbiTrackSelectionToolConf import InDet__InDetDenseEnvAmbiTrackSelectionTool as AmbiTrackSelectionTool else: from InDetAmbiTrackSelectionTool.InDetAmbiTrackSelectionToolConf import InDet__InDetAmbiTrackSelectionTool as AmbiTrackSelectionTool InDetAmbiTrackSelectionTool = AmbiTrackSelectionTool( name='InDetAmbiTrackSelectionTool' + NewTrackingCuts.extension(), AssociationTool=InDetPrdAssociationTool, DriftCircleCutTool=InDetTRTDriftCircleCut, minHits=NewTrackingCuts.minClusters(), minNotShared=NewTrackingCuts.minSiNotShared(), maxShared=NewTrackingCuts.maxShared(), minTRTHits=0, # used for Si only tracking !!! sharedProbCut=0.10, UseParameterization=False, Cosmics=InDetFlags.doCosmics(), doPixelSplitting=InDetFlags.doPixelClusterSplitting() and NewTrackingCuts.mode != "DBM") if InDetFlags.doTIDE_Ambi() and not ( NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "DBM"): InDetAmbiTrackSelectionTool.sharedProbCut = prob1 InDetAmbiTrackSelectionTool.sharedProbCut2 = prob2 InDetAmbiTrackSelectionTool.minSiHitsToAllowSplitting = nhitsToAllowSplitting InDetAmbiTrackSelectionTool.minUniqueSCTHits = 4 InDetAmbiTrackSelectionTool.minTrackChi2ForSharedHits = 3 InDetAmbiTrackSelectionTool.InputHadClusterContainerName = InDetKeys.HadCaloClusterROIContainer( ) InDetAmbiTrackSelectionTool.doHadCaloSeed = False #Only split in cluster in region of interest InDetAmbiTrackSelectionTool.minPtSplit = InDetFlags.pixelClusterSplitMinPt( ) #Only allow split clusters on track withe pt greater than this MeV InDetAmbiTrackSelectionTool.phiWidth = 0.2 #Split cluster ROI size InDetAmbiTrackSelectionTool.etaWidth = 0.2 #Split cluster ROI size InDetAmbiTrackSelectionTool.InputEmClusterContainerName = InDetKeys.CaloClusterROIContainer( ) InDetAmbiTrackSelectionTool.doEmCaloSeed = False #Only split in cluster in region of interest InDetAmbiTrackSelectionTool.minPtConv = 10000 #Only allow split clusters on track withe pt greater than this MeV InDetAmbiTrackSelectionTool.phiWidthEM = 0.05 #Split cluster ROI size InDetAmbiTrackSelectionTool.etaWidthEM = 0.05 #Split cluster ROI size if NewTrackingCuts.mode() == "DBM": InDetAmbiTrackSelectionTool.Cosmics = False InDetAmbiTrackSelectionTool.UseParameterization = False InDetAmbiTrackSelectionTool.doPixelSplitting = False InDetAmbiTrackSelectionTool.maxShared = 1000 InDetAmbiTrackSelectionTool.maxTracksPerSharedPRD = 2 InDetAmbiTrackSelectionTool.minHits = 0 InDetAmbiTrackSelectionTool.minNotShared = 0 InDetAmbiTrackSelectionTool.minScoreShareTracks = 0.0 InDetAmbiTrackSelectionTool.minTRTHits = 0 InDetAmbiTrackSelectionTool.sharedProbCut = 0.1 if InDetFlags.doTIDE_AmbiTrackMonitoring( ) and InDetFlags.doTIDE_Ambi() and not ( NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "PixelPrdAssociation" or NewTrackingCuts.mode() == "DBM" or NewTrackingCuts.mode() == "PixelFourLayer" or NewTrackingCuts.mode() == "PixelThreeLayer"): InDetAmbiTrackSelectionTool.ObserverTool = TrackObserverTool #observerTool InDetAmbiTrackSelectionTool.MonitorAmbiguitySolving = True # if NewTrackingCuts.mode() == "ForwardTracks": # InDetAmbiTrackSelectionTool.OutputLevel = VERBOSE ToolSvc += InDetAmbiTrackSelectionTool if (InDetFlags.doPrintConfigurables()): print InDetAmbiTrackSelectionTool # # --- set up different Scoring Tool for collisions and cosmics # if InDetFlags.doCosmics() and NewTrackingCuts.mode() != "DBM": from InDetTrackScoringTools.InDetTrackScoringToolsConf import InDet__InDetCosmicScoringTool InDetAmbiScoringTool = InDet__InDetCosmicScoringTool( name='InDetCosmicsScoringTool' + NewTrackingCuts.extension(), nWeightedClustersMin=NewTrackingCuts.nWeightedClustersMin( ), minTRTHits=0, SummaryTool=InDetTrackSummaryTool) else: from InDetTrackScoringTools.InDetTrackScoringToolsConf import InDet__InDetAmbiScoringTool InDetAmbiScoringTool = InDet__InDetAmbiScoringTool( name='InDetAmbiScoringTool' + NewTrackingCuts.extension(), Extrapolator=InDetExtrapolator, SummaryTool=InDetTrackSummaryTool, DriftCircleCutTool=InDetTRTDriftCircleCut, useAmbigFcn=True, # this is NewTracking useTRT_AmbigFcn=False, minPt=NewTrackingCuts.minPT(), maxRPhiImp=NewTrackingCuts.maxPrimaryImpact(), maxZImp=NewTrackingCuts.maxZImpact(), maxEta=NewTrackingCuts.maxEta(), minSiClusters=NewTrackingCuts.minClusters(), minPixel=NewTrackingCuts.minPixel(), maxSiHoles=NewTrackingCuts.maxHoles(), maxPixelHoles=NewTrackingCuts.maxPixelHoles(), maxSCTHoles=NewTrackingCuts.maxSCTHoles(), maxDoubleHoles=NewTrackingCuts.maxDoubleHoles(), usePixel=NewTrackingCuts.usePixel(), useSCT=NewTrackingCuts.useSCT(), InputEmClusterContainerName=InDetKeys. CaloClusterROIContainer(), doEmCaloSeed=True and InDetFlags.doCaloSeededBrem(), minTRTonTrk=0, minTRTPrecisionFraction=0) # allow for some overlap for low-pt tracking #if InDetFlags.doLowPt() and not NewTrackingCuts.mode() == "LowPt": # InDetAmbiScoringTool.minPt = NewTrackingCuts.minPT()-100.*Units.MeV # if NewTrackingCuts.mode() == "ForwardTracks": # InDetAmbiScoringTool.OutputLevel = VERBOSE ToolSvc += InDetAmbiScoringTool if (InDetFlags.doPrintConfigurables()): print InDetAmbiScoringTool # # --- load Ambiguity Processor # useBremMode = NewTrackingCuts.mode( ) == "Offline" or NewTrackingCuts.mode() == "SLHC" if InDetFlags.doTIDE_Ambi() and not ( NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "DBM"): from TrkAmbiguityProcessor.TrkAmbiguityProcessorConf import Trk__DenseEnvironmentsAmbiguityProcessorTool as ProcessorTool use_low_pt_fitter = True if NewTrackingCuts.mode( ) == "LowPt" or NewTrackingCuts.mode() == "VeryLowPt" or ( NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()) else False fitter_list = [(InDetTrackFitter if not use_low_pt_fitter else InDetTrackFitterLowPt)] if InDetFlags.doRefitInvalidCov(): from AthenaCommon import CfgGetter fitter_list.append(CfgGetter.getPublicTool('KalmanFitter')) fitter_list.append( CfgGetter.getPublicTool('ReferenceKalmanFitter')) InDetAmbiguityProcessor = ProcessorTool( name='InDetAmbiguityProcessor' + NewTrackingCuts.extension(), Fitter=fitter_list, ScoringTool=InDetAmbiScoringTool, SelectionTool=InDetAmbiTrackSelectionTool, SuppressHoleSearch=False, tryBremFit=InDetFlags.doBremRecovery() and useBremMode and NewTrackingCuts.mode() != "DBM", caloSeededBrem=InDetFlags.doCaloSeededBrem() and NewTrackingCuts.mode() != "DBM", pTminBrem=NewTrackingCuts.minPTBrem(), RefitPrds=True, RejectTracksWithInvalidCov=InDetFlags.doRejectInvalidCov()) else: from TrkAmbiguityProcessor.TrkAmbiguityProcessorConf import Trk__SimpleAmbiguityProcessorTool as ProcessorTool InDetAmbiguityProcessor = ProcessorTool( name='InDetAmbiguityProcessor' + NewTrackingCuts.extension(), Fitter=InDetTrackFitter, ScoringTool=InDetAmbiScoringTool, SelectionTool=InDetAmbiTrackSelectionTool, SuppressHoleSearch=False, tryBremFit=InDetFlags.doBremRecovery() and useBremMode and NewTrackingCuts.mode() != "DBM", caloSeededBrem=InDetFlags.doCaloSeededBrem() and NewTrackingCuts.mode() != "DBM", pTminBrem=NewTrackingCuts.minPTBrem(), RefitPrds=True) if InDetFlags.doTIDE_Ambi() and not ( NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "DBM"): InDetAmbiguityProcessor.SplitProbTool = NnPixelClusterSplitProbTool InDetAmbiguityProcessor.sharedProbCut = prob1 InDetAmbiguityProcessor.sharedProbCut2 = prob2 InDetAmbiguityProcessor.SplitClusterAmbiguityMap = InDetKeys.SplitClusterAmbiguityMap( ) if InDetFlags.doTIDE_RescalePixelCovariances(): InDetAmbiguityProcessor.applydRcorrection = True if NewTrackingCuts.mode() == "Pixel" or NewTrackingCuts.mode( ) == "DBM": InDetAmbiguityProcessor.SuppressHoleSearch = True if NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode( ) == "VeryLowPt" or (NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()): if InDetAmbiguityProcessor.getName().find('Dense'): pass else: InDetAmbiguityProcessor.Fitter = InDetTrackFitterLowPt if InDetFlags.materialInteractions(): InDetAmbiguityProcessor.MatEffects = InDetFlags.materialInteractionsType( ) else: InDetAmbiguityProcessor.MatEffects = 0 # if NewTrackingCuts.mode() == "ForwardTracks": # InDetAmbiguityProcessor.OutputLevel = VERBOSE if InDetFlags.doTIDE_AmbiTrackMonitoring( ) and InDetFlags.doTIDE_Ambi() and not ( NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "PixelPrdAssociation" or NewTrackingCuts.mode() == "DBM" or NewTrackingCuts.mode() == "PixelFourLayer" or NewTrackingCuts.mode() == "PixelThreeLayer"): InDetAmbiguityProcessor.ObserverTool = TrackObserverTool #observerTool InDetAmbiguityProcessor.MonitorAmbiguitySolving = True ToolSvc += InDetAmbiguityProcessor if (InDetFlags.doPrintConfigurables()): print InDetAmbiguityProcessor # # --- set input and output collection # InputTrackCollection = self.__SiTrackCollection self.__SiTrackCollection = ResolvedTrackCollectionKey # # --- configure Ambiguity solver # from TrkAmbiguitySolver.TrkAmbiguitySolverConf import Trk__TrkAmbiguitySolver InDetAmbiguitySolver = Trk__TrkAmbiguitySolver( name='InDetAmbiguitySolver' + NewTrackingCuts.extension(), TrackInput=[InputTrackCollection], TrackOutput=self.__SiTrackCollection, AmbiguityProcessor=InDetAmbiguityProcessor) topSequence += InDetAmbiguitySolver if (InDetFlags.doPrintConfigurables()): print InDetAmbiguitySolver # # --- Delete Silicon Sp-Seeded tracks # from InDetRecExample.ConfiguredInDetSGDeletion import InDetSGDeletionAlg InDetSGDeletionAlg(key=SiSPSeededTrackCollectionKey) if ((NewTrackingCuts.mode() in ["Pixel", "SCT"]) or not InDetFlags.doSGDeletion()): if InDetFlags.doTruth(): # # set up the truth info for this container # include("InDetRecExample/ConfiguredInDetTrackTruth.py") InDetTracksTruth = ConfiguredInDetTrackTruth( self.__SiTrackCollection, self.__SiTrackCollection + "DetailedTruth", self.__SiTrackCollection + "TruthCollection") # # add final output for statistics # TrackCollectionKeys += [InDetTracksTruth.Tracks()] TrackCollectionTruthKeys += [ InDetTracksTruth.TracksTruth() ] else: TrackCollectionKeys += [self.__SiTrackCollection]
def getTestPileUpTool(name="TestPileUpTool", **kwargs): kwargs.setdefault('OutputLevel', VERBOSE) kwargs.setdefault('FirstXing', -300) kwargs.setdefault('LastXing', +300) return CfgGetter.TestPileUpTool(name, **kwargs)
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
from AthenaCommon.DetFlags import DetFlags if not (DetFlags.pileup.any_on()): AthError("this *pileup* job needs some DetFlags.pileup on") from AthenaCommon.Logging import logging logConfigPileUpEventLoopMgr = logging.getLogger('ConfigPileUpEventLoopMgr') #-------------------------------------------------------------- # setup the Pile-Up Event Loop Mgr #-------------------------------------------------------------- theApp.EventLoop = "PileUpEventLoopMgr" from AthenaCommon import CfgGetter from AthenaCommon.AppMgr import ServiceMgr ServiceMgr += CfgGetter.getService('PileUpEventLoopMgr') pileUpEventLoopMgr = ServiceMgr.PileUpEventLoopMgr
print 'NSWGeoSetup: no need to override tag on the MuonSpectrometer Node with ATLAS tag ', DetDescrVersion print 'Be aware that the job is running with NSW TDR setup!' else: GeoModelSvc.MuonVersionOverride="MuonSpectrometer-R.07.00-NSW" print GeoModelSvc #***************************************************** HERE setup MuonDetectorManager from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool MuonDetectorTool = MuonDetectorTool() MuonDetectorTool.StationSelection = 2 MuonDetectorTool.SelectedStations = [ "EIL1" ] MuonDetectorTool.SelectedStations += [ "EIL2" ] MuonDetectorTool.SelectedStations += [ "EIS*" ] MuonDetectorTool.SelectedStations += [ "EIL10" ] MuonDetectorTool.SelectedStations += [ "EIL11" ] MuonDetectorTool.SelectedStations += [ "CSS*" ] MuonDetectorTool.SelectedStations += [ "CSL*" ] MuonDetectorTool.SelectedStations += [ "T4E*" ] MuonDetectorTool.SelectedStations += [ "T4F*" ] from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc Agdd2GeoSvc = AGDDtoGeoSvc() if not "NSWAGDDTool/NewSmallWheel" in Agdd2GeoSvc.Builders: from AthenaCommon import CfgGetter ToolSvc += CfgGetter.getPublicTool("NewSmallWheel", checkType=True) Agdd2GeoSvc.Builders += ["NSWAGDDTool/NewSmallWheel"] theApp.CreateSvc += ["AGDDtoGeoSvc"] ServiceMgr += Agdd2GeoSvc
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)
ServiceMgr.EventSelector.SkipEvents = 0 ## User algorithms from AthenaCommon.AppMgr import ServiceMgr from GaudiSvc.GaudiSvcConf import THistSvc ServiceMgr += THistSvc("THistSvc") # This line doesn't seem to be needed #ServiceMgr.THistSvc.Output = ["atlasTest DATAFILE='atlasTest_2.muons.histo.root' OPT='RECREATE'"]; ServiceMgr.THistSvc.Output = ["truth DATAFILE='truth_2.root' OPT='RECREATE'"] from G4AtlasTests.G4AtlasTestsConf import G4TestAlg job += G4TestAlg() from AthenaCommon import CfgGetter job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("TruthTestTool", checkType=True) ] job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("PixelHitsTestTool", checkType=True) ] job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("SCT_HitsTestTool", checkType=True) ] job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("TrtHitsTestTool", checkType=True) ] job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("EMBHitsTestTool", checkType=True) ] job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("EMECHitsTestTool", checkType=True)
## User algorithms from AthenaCommon.AppMgr import ServiceMgr from GaudiSvc.GaudiSvcConf import THistSvc ServiceMgr += THistSvc("THistSvc") #ServiceMgr.THistSvc.Output = ["atlasTest DATAFILE='atlasTest.muons.histo.root' OPT='RECREATE'"]; ServiceMgr.THistSvc.Output = ["truth DATAFILE='truth.root' OPT='RECREATE'"] from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from G4AtlasTests.G4AtlasTestsConf import G4TestAlg job += G4TestAlg() from AthenaCommon import CfgGetter job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("TruthTestTool", checkType=True) ] job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("EvgenTruthTestTool", checkType=True) ] job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("CaloEntryLayerTestTool", checkType=True) ] job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("MuonEntryLayerTestTool", checkType=True) ] #job.G4TestAlg.SimTestTools += [CfgGetter.getPrivateTool("MuonExitLayerTestTool", checkType=True)] job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("PixelHitsTestTool", checkType=True) ] job.G4TestAlg.SimTestTools += [
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 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
job += getAlgorithm("G4AtlasAlg", tryDefaultConfigurable=True) # User algorithms from AthenaCommon.AppMgr import ServiceMgr from GaudiSvc.GaudiSvcConf import THistSvc ServiceMgr += THistSvc("THistSvc") ServiceMgr.THistSvc.Output = ["truth DATAFILE='truth.root' OPT='RECREATE'"] from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from G4AtlasTests.G4AtlasTestsConf import G4TestAlg job += G4TestAlg() from AthenaCommon import CfgGetter job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("TruthTestTool", checkType=True) ] job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("EvgenTruthTestTool", checkType=True) ] job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("PixelHitsTestTool", checkType=True) ] job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("SCT_HitsTestTool", checkType=True) ] job.G4TestAlg.SimTestTools += [ CfgGetter.getPrivateTool("TrtHitsTestTool", checkType=True) ] ## Check of memory during the RTT tests
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), }