def __init__(self, name="T2CaloEgamma_eGamma_NoHad"): super(T2CaloEgamma_eGamma_NoHad, self).__init__(name) # here put your customizations self.IAlgToolList = [ EgammaSamp2Fex(), EgammaSamp1Fex(), EgammaEmEnFex() ] self.EtaWidth = 0.2 self.PhiWidth = 0.2 self.EtaWidthForID = 0.1 self.PhiWidthForID = 0.1 #self.TimerNtuple="T2CaloEgamma.T2CaEgtTot" self.TrigEMClusterKey = "TrigT2CaloEgamma" #self.Monitoring=False #self.OutputLevel = DEBUG #self.AthenaMonTools += [t2catime] self.AthenaMonTools = [ TrigT2CaloEgammaValMonitoring(), TrigT2CaloEgammaCosmicMonitoring(), TrigT2CaloEgammaOnMonitoring() ] #self.CalibList=[] self.CalibListEndcap = [EgammaSshapeCalibrationEndcapConfig()] self.CalibListBarrel = [EgammaSshapeCalibrationBarrelConfig()] self.CalibListBarrel += [EgammaHitsCalibrationBarrelConfig()] self.CalibListBarrel += [EgammaGapCalibrationConfig()] self.CalibListBarrel += [EgammaTransitionRegionsConfig()] self.CalibListEndcap += [EgammaHitsCalibrationEndcapConfig()] self.CalibListEndcap += [EgammaGapCalibrationConfig()]
def __init__(self, name="T2CaloEgamma_cells"): super(T2CaloEgamma_cells, self).__init__(name) # here put your customizations self.IAlgToolList = [ EgammaSamp2FexConfig('EgammaSamp2FexConfigDebug'), EgammaSamp1Fex('EgammaSamp1FexDebug'), EgammaEmEnFex('EgammaEmEnFexDebug'), EgammaHadEnFex('EgammaHadEnFexDebug') ] # Save cells for item in self.IAlgToolList: item.SaveCellsInContainer = True item.ThresholdKeepCells = 400.0 if item.name( ) == 'EgammaHadEnFexDebug': # HadEn should have a different threshold item.ThresholdKeepCells = 150.0 self.StoreCells = True self.EtaWidth = 0.2 self.PhiWidth = 0.2 self.EtaWidthForID = 0.1 self.PhiWidthForID = 0.1 #self.TimerNtuple="T2CaloEgamma.T2CaEgtTot" self.TrigEMClusterKey = "TrigT2CaloEgamma" #t2catime.TimerHistLimits = [0,20] #self.AthenaMonTools += [t2catime] self.AthenaMonTools += [ TrigT2CaloEgammaValMonitoring(), TrigT2CaloEgammaCosmicMonitoring(), TrigT2CaloEgammaOnMonitoring(), TrigT2CaloEgammaTimeMonitoring() ] self.CalibListEndcap = [EgammaSshapeCalibrationEndcapConfig()] self.CalibListBarrel = [EgammaSshapeCalibrationBarrelConfig()] self.CalibListBarrel += [EgammaHitsCalibrationBarrelConfig()] self.CalibListBarrel += [EgammaGapCalibrationConfig()] self.CalibListBarrel += [EgammaTransitionRegionsConfig()] self.CalibListEndcap += [EgammaHitsCalibrationEndcapConfig()] self.CalibListEndcap += [EgammaGapCalibrationConfig()] self.doTiming = True
def __init__(self, name="T2CaloEgamma_eGamma"): super(T2CaloEgamma_eGamma, self).__init__(name) # here put your customizations self.IAlgToolList = [ EgammaSamp2FexConfig(), EgammaSamp1Fex(), EgammaEmEnFex(), EgammaHadEnFex() ] self.EtaWidth = 0.2 self.PhiWidth = 0.2 self.EtaWidthForID = 0.1 self.PhiWidthForID = 0.1 #self.TimerNtuple="T2CaloEgamma.T2CaEgtTot" self.TrigEMClusterKey = "TrigT2CaloEgamma" #self.Monitoring=False #self.OutputLevel = 1 # detailed timing #t2catime=TrigTimeTreeToolConfig("T2CaloEgammaTimer") #t2catime=TrigTimeHistToolConfig("T2CaloEgammaTimer") #t2catime.Key = ["ESamp2.ESamp2Total","ESamp2.ESamp2RegSel","ESamp2.ESamp2BSCnv","ESamp2.ESamp2Algor","ESamp2.ESamp2SaveEM","ESamp2.ESamp2Eta","ESamp2.ESamp2Total:ESamp2Eta"] #t2catime.TimerHistLimits = [0,20] self.AthenaMonTools += [ TrigT2CaloEgammaValMonitoring(), TrigT2CaloEgammaCosmicMonitoring(), TrigT2CaloEgammaOnMonitoring( name="TrigT2CaloEgammaOnMonitoring_doTimeHist", doTimeHist=True), TrigT2CaloEgammaTimeMonitoring() ] self.CalibListEndcap = [EgammaSshapeCalibrationEndcapConfig()] self.CalibListBarrel = [EgammaSshapeCalibrationBarrelConfig()] self.CalibListBarrel += [EgammaHitsCalibrationBarrelConfig()] self.CalibListBarrel += [EgammaGapCalibrationConfig()] self.CalibListBarrel += [EgammaTransitionRegionsConfig()] self.CalibListEndcap += [EgammaHitsCalibrationEndcapConfig()] self.CalibListEndcap += [EgammaGapCalibrationConfig()] self.doTiming = True # code to suport Z of the vertex calculation self.RhoFirstLayer = [ 1542.22, 1543.34, 1542.56, 1543.39, 1543.10, # Eta range: 0.00 ~ 0.05 ~ 0.10 ~ 0.15 ~ 0.20 ~ 0.25 1543.91, 1543.19, 1541.05, 1540.18, 1538.67, # Eta range: 0.25 ~ 0.30 ~ 0.35 ~ 0.40 ~ 0.45 ~ 0.50 1538.55, 1536.49, 1535.31, 1535.93, 1536.14, # Eta range: 0.50 ~ 0.55 ~ 0.60 ~ 0.65 ~ 0.70 ~ 0.75 1535.93, 1524.32, 1524.82, 1525.86, 1523.97, # Eta range: 0.75 ~ 0.80 ~ 0.85 ~ 0.90 ~ 0.95 ~ 1.00 1526.66, 1524.73, 1524.00, 1522.18, 1520.65, # Eta range: 1.00 ~ 1.05 ~ 1.10 ~ 1.15 ~ 1.20 ~ 1.25 1519.67, 1517.90 ] # Eta range: 1.25 ~ 1.30 ~ 1.37 self.RhoMiddleLayer = [ 1756.75, 1757.91, 1757.06, 1758.25, 1757.40, # Eta range: 0.00 ~ 0.05 ~ 0.10 ~ 0.15 ~ 0.20 ~ 0.25 1758.75, 1757.90, 1756.01, 1754.76, 1748.07, # Eta range: 0.25 ~ 0.30 ~ 0.35 ~ 0.40 ~ 0.45 ~ 0.50 1740.84, 1735.52, 1732.03, 1721.71, 1716.65, # Eta range: 0.50 ~ 0.55 ~ 0.60 ~ 0.65 ~ 0.70 ~ 0.75 1710.82, 1739.15, 1728.36, 1722.92, 1716.45, # Eta range: 0.75 ~ 0.80 ~ 0.85 ~ 0.90 ~ 0.95 ~ 1.00 1707.56, 1697.96, 1689.75, 1684.23, 1671.07, # Eta range: 1.00 ~ 1.05 ~ 1.10 ~ 1.15 ~ 1.20 ~ 1.25 1663.98, 1662.04 ] # Eta range: 1.25 ~ 1.30 ~ 1.37 self.RhoEta = [ 0, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 0.55, # eta point 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95, 1.00, 1.05, 1.10, 1.15, # eta point 1.20, 1.25, 1.30, 1.37 ] self.ZFirstLayer = [ 3790.00, 3790.00, 3790.00, 3790.00, 3790.00, # 1.52 - 1.55 ~ 1.60 - 1.65 ~ 1.70 - 1.75 3790.00, 3790.00, 3790.00, 3790.00, 3790.00, # 1.75 - 1.80 ~ 1.85 - 1.90 ~ 1.95 - 2.00 3790.00, 3790.00, 3790.00, 3790.00, 3790.00, # 2.00 - 2.05 ~ 2.10 - 2.15 ~ 2.20 - 2.25 3790.00, 3781.74, 3778.00, 3778.00, 3778.00, 3778.00 ] # 2.25 - 2.30 ~ 2.35 - 2.40 ~ 2.45 - 2.50 ~ 2.55 self.ZMiddleLayer = [ 4006.00, 4006.00, 4002.00, 4002.00, 4002.00, # 1.52 - 1.55 ~ 1.60 - 1.65 ~ 1.70 - 1.75 3990.00, 3990.00, 3990.00, 3990.00, 3990.00, # 1.75 - 1.80 ~ 1.85 - 1.90 ~ 1.95 - 2.00 3986.21, 3979.21, 3978.00, 3974.47, 3963.42, # 2.00 - 2.05 ~ 2.10 - 2.15 ~ 2.20 - 2.25 3962.00, 3952.39, 3940.42, 3934.71, 3934.00, 3934.00 ] # 2.25 - 2.30 ~ 2.35 - 2.40 ~ 2.45 - 2.50 ~ 2.55 self.ZEta = [ 1.50, 1.55, 1.60, 1.65, 1.70, 1.75, 1.80, 1.85, 1.90, 1.95, 2.00, 2.05, 2.10, 2.15, 2.20, 2.25, 2.30, 2.35, 2.40, 2.45, 2.50, 2.55 ]
def fastL2EgammaClusteringAlg(flags, roisKey="EMCaloRoIs", doRinger=False): acc = ComponentAccumulator() # configure calo data access from TrigT2CaloCommon.TrigCaloDataAccessConfig import trigCaloDataAccessSvcCfg cdaSvcAcc = trigCaloDataAccessSvcCfg(flags) cdaSvc = cdaSvcAcc.getService("TrigCaloDataAccessSvc") acc.merge(cdaSvcAcc) from TileConditions.TileEMScaleConfig import TileEMScaleCondAlgCfg acc.merge(TileEMScaleCondAlgCfg(flags)) from TileConditions.TileBadChannelsConfig import TileBadChannelsCondAlgCfg acc.merge(TileBadChannelsCondAlgCfg(flags)) # configure tools (this can be simplified further, EgammaReEmEnFex, EgammaReHadEnFex, EgammaReSamp1Fex, EgammaReSamp2Fex = CompFactory.getComps( "EgammaReEmEnFex", "EgammaReHadEnFex", "EgammaReSamp1Fex", "EgammaReSamp2Fex", ) samp2 = EgammaReSamp2Fex(name='FaAlgoSamp2FexConfig', MaxDetaHotCell=0.15, MaxDphiHotCell=0.15) acc.addPublicTool(samp2) samp1 = EgammaReSamp1Fex('FaAlgoSamp1FexConfig') acc.addPublicTool(samp1) sampe = EgammaReEmEnFex('FaAlgoEmEnFexConfig') sampe.ExtraInputs = [('LArOnOffIdMapping', 'ConditionStore+LArOnOffIdMap')] acc.addPublicTool(sampe) samph = EgammaReHadEnFex('FaAlgoHadEnFexConfig') samph.ExtraInputs = [('TileEMScale', 'ConditionStore+TileEMScale'), ('TileBadChannels', 'ConditionStore+TileBadChannels')] acc.addPublicTool(samph) alg = CompFactory.T2CaloEgammaReFastAlgo("FastEMCaloAlgo") from TrigEDMConfig.TriggerEDMRun3 import recordable alg.ClustersName = recordable('HLT_FastCaloEMClusters') alg.RoIs = roisKey alg.EtaWidth = 0.2 alg.PhiWidth = 0.2 __fex_tools = [samp2, samp1, sampe, samph] #, ring ] if doRinger: from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import RingerReFexConfig ringer = RingerReFexConfig('FaAlgoRingerFexConfig') ringer.RingerKey = recordable("HLT_FastCaloRinger") ringer.ClustersName = alg.ClustersName acc.addPublicTool(ringer) __fex_tools.append(ringer) alg.IReAlgToolList = __fex_tools for t in __fex_tools: t.trigDataAccessMT = cdaSvc # set data access svc # set calibration from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaSshapeCalibrationBarrelConfig, EgammaHitsCalibrationBarrelConfig, \ EgammaGapCalibrationConfig, EgammaTransitionRegionsConfig alg.CalibListBarrel = [EgammaSshapeCalibrationBarrelConfig()] alg.CalibListBarrel += [EgammaHitsCalibrationBarrelConfig()] alg.CalibListBarrel += [EgammaGapCalibrationConfig()] alg.CalibListBarrel += [EgammaTransitionRegionsConfig()] from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaSshapeCalibrationEndcapConfig, EgammaHitsCalibrationEndcapConfig, \ EgammaGapCalibrationConfig alg.CalibListEndcap = [EgammaSshapeCalibrationEndcapConfig()] alg.CalibListEndcap += [EgammaHitsCalibrationEndcapConfig()] alg.CalibListEndcap += [EgammaGapCalibrationConfig()] acc.addEventAlgo(alg) return acc
def __init__(self, name="T2CaloEgamma_ReFastAlgo", ClustersName="HLT_FastCaloEMClusters", doRinger=False, RingerKey="HLT_FastCaloRinger"): super(T2CaloEgamma_ReFastAlgo, self).__init__(name) # here put your customizations from AthenaCommon.AppMgr import ServiceMgr as svcMgr if not hasattr(svcMgr, 'TrigCaloDataAccessSvc'): from TrigT2CaloCommon.TrigT2CaloCommonConfig import TrigCaloDataAccessSvc svcMgr += TrigCaloDataAccessSvc() samp2 = EgammaReSamp2FexConfig( name="ReFaAlgoSamp2FexConfig", trigDataAccessMT=svcMgr.TrigCaloDataAccessSvc, ExtraInputs=[('LArOnOffIdMapping', 'ConditionStore+LArOnOffIdMap') ]) samp1 = EgammaReSamp1FexConfig( "ReFaAlgoSamp1FexConfig", trigDataAccessMT=svcMgr.TrigCaloDataAccessSvc, ExtraInputs=[('LArOnOffIdMapping', 'ConditionStore+LArOnOffIdMap') ]) sampe = EgammaReEmEnFexConfig( "ReFaAlgoEmEnFexConfig", trigDataAccessMT=svcMgr.TrigCaloDataAccessSvc, ExtraInputs=[('LArOnOffIdMapping', 'ConditionStore+LArOnOffIdMap') ]) samph = EgammaReHadEnFexConfig( "ReFaAlgoHadEnFexConfig", trigDataAccessMT=svcMgr.TrigCaloDataAccessSvc, ExtraInputs=[('LArOnOffIdMapping', 'ConditionStore+LArOnOffIdMap') ]) samph.ExtraInputs = [('TileEMScale', 'ConditionStore+TileEMScale'), ('TileBadChannels', 'ConditionStore+TileBadChannels')] self.IReAlgToolList = [samp2, samp1, sampe, samph] if doRinger: from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import RingerReFexConfig ringer = RingerReFexConfig('ReFaAlgoRingerFexConfig') ringer.RingerKey = RingerKey #"HLT_FastCaloRinger" ringer.trigDataAccessMT = svcMgr.TrigCaloDataAccessSvc ringer.ClustersName = ClustersName #ToolSvc+=ringer self.IReAlgToolList += [ringer] self.EtaWidth = 0.2 self.PhiWidth = 0.2 #self.EtaWidthForID = 0.1 #self.PhiWidthForID = 0.1 #self.TrigEMClusterKey="TrigT2CaloEgamma" self.CalibListEndcap = [EgammaSshapeCalibrationEndcapConfig()] self.CalibListBarrel = [EgammaSshapeCalibrationBarrelConfig()] self.CalibListBarrel += [EgammaHitsCalibrationBarrelConfig()] self.CalibListBarrel += [EgammaGapCalibrationConfig()] self.CalibListBarrel += [EgammaTransitionRegionsConfig()] self.CalibListEndcap += [EgammaHitsCalibrationEndcapConfig()] self.CalibListEndcap += [EgammaGapCalibrationConfig()] from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool monTool = GenericMonitoringTool('MonTool') monTool.defineHistogram( 'TrigEMCluster_eT', path='EXPERT', type='TH1F', title="T2Calo Egamma E_T; E_T [ GeV ] ; Nclusters", xbins=80, xmin=0.0, xmax=80.0) monTool.defineHistogram( 'TrigEMCluster_had1', path='EXPERT', type='TH1F', title= "T2Calo Egamma had E_T samp1; had E_T samp1 [ GeV ] ; Nclusters", xbins=80, xmin=0.0, xmax=8.0) monTool.defineHistogram('TrigEMCluster_eta', path='EXPERT', type='TH1F', title="T2Calo Egamma #eta; #eta ; Nclusters", xbins=100, xmin=-2.5, xmax=2.5) monTool.defineHistogram('TrigEMCluster_phi', path='EXPERT', type='TH1F', title="T2Calo Egamma #phi; #phi ; Nclusters", xbins=128, xmin=-3.2, xmax=3.2) monTool.defineHistogram( 'TrigEMCluster_rEta', path='EXPERT', type='TH1F', title="T2Calo Egamma rEta; rEta (e237/e277) ; Nclusters", xbins=140, xmin=-0.2, xmax=1.2) monTool.defineHistogram( 'TIME_exec', path='EXPERT', type='TH1F', title="T2Calo Egamma time; time [ us ] ; Nruns", xbins=80, xmin=0.0, xmax=8000.0) monTool.defineHistogram( 'TrigEMCluster_eta,TIME_exec', path='EXPERT', type='TH2F', title="T2Calo Egamma time vs #eta ; #eta ; time [ us ]", xbins=100, xmin=-2.5, xmax=2.5, ybins=80, ymin=0.0, ymax=8000.0) self.MonTool = monTool