5from AthenaCommon.Logging
import logging
6logging.getLogger().info(
"Importing %s",__name__)
7log = logging.getLogger(__name__)
9from AthenaConfiguration.ComponentFactory
import CompFactory
10from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
11from ..Config.ChainConfigurationBase
import ChainConfigurationBase
12from ..CommonSequences.CaloSequences
import fastCaloSequenceGenCfg
13from ..Photon.FastPhotonMenuSequences
import fastPhotonSequenceGenCfg
14from ..Photon.PrecisionPhotonCaloIsoMenuSequences
import precisionPhotonCaloIsoSequenceGenCfg
15from ..Photon.PrecisionPhotonMenuSequences
import precisionPhotonSequenceGenCfg
16from ..Photon.PrecisionCaloMenuSequences
import precisionCaloSequenceGenCfg
17from ..Photon.HipTRTMenuSequences
import TRTHitGeneratorSequenceGenCfg
21 name = chainDict[
'chainName']
23 HistPath =
'EgammaMassHypo/'+name)
24 monTool.defineHistogram(
'DphiOfAccepted', type=
'TH1F', path=
'EXPERT', title=
"PrecisionCalo Hypo entries per Phi;Phi", xbins=128, xmin=-3.2, xmax=3.2)
25 monTool.defineHistogram(
'MassOfAccepted', type=
'TH1F', path=
'EXPERT', title=
"Mass in accepted combinations [MeV]", xbins=75, xmin=0, xmax=150000)
27 tool= CompFactory.TrigEgammaTopoHypoTool(name,
29 ApplyMassCut = applymass,
30 LowerMassEgammaClusterCut = lowermass,
31 UpperMassEgammaClusterCut = uppermass,
32 ApplyDPhiCut = applydphi,
33 ThresholdDPhiCut = dphi,
50 ChainConfigurationBase.__init__(self,chainDict)
66 stepNames += [
'getFastCalo']
69 if self.chainPart[
'extra'] ==
'hiptrt':
70 stepNames += [
'getHipTRT']
76 stepNames += [
'getFastPhoton']
81 stepNames += [
'getPrecisionCaloPhoton']
84 if 'etcut' in self.chainPart[
'IDinfo']:
91 stepNames += [
'getPrecisionPhoton']
95 if 'noiso' in self.chainPart[
'isoInfo']
or 'icaloloose' in self.chainPart[
'isoInfo']
or 'icalomedium' in self.chainPart[
'isoInfo']
or 'icalotight' in self.chainPart[
'isoInfo']:
96 stepNames += [
'getPhotonCaloIso']
113 log.debug(
"stepNames: %s", steps)
115 log.debug(
'Adding photon trigger step %s', step)
116 is_probe_leg = self.chainPart[
'tnpInfo']==
'probe'
117 chainstep = getattr(self, step)(flags, is_probe_leg=is_probe_leg)
118 chainSteps+=[chainstep]
120 myChain = self.buildChain(chainSteps)
128 stepName =
"PhotonFastCalo"
130 return self.getStep(flags, stepName,[fastCaloSequenceGenCfg], name=
'Photon', is_probe_leg=is_probe_leg)
133 stepName =
"FastPhoton"
134 return self.getStep(flags, stepName,[fastPhotonSequenceGenCfg], is_probe_leg=is_probe_leg)
137 do_ion =
'ion' in self.chainPart[
'extra']
138 stepName =
"PhotonPrecisionHICalo" if do_ion
else "PhotonPrecisionCalo"
140 return self.getStep(flags, stepName,[precisionCaloSequenceGenCfg], ion=do_ion, is_probe_leg=is_probe_leg)
144 return self.getStep(flags, stepName,[TRTHitGeneratorSequenceGenCfg], is_probe_leg=is_probe_leg)
148 stepName =
"precision_photon"
149 do_ion =
'ion' in self.chainPart[
'extra'] ==
'ion'
154 return self.getStep(flags, stepName,sequenceCfgArray=[precisionPhotonSequenceGenCfg], ion=do_ion, is_probe_leg=is_probe_leg)
158 stepName =
"precision_photon_CaloIso"
160 do_ion =
'ion' in self.chainPart[
'extra']
169 comboTools.append(diphotonDPhiMassHypoToolFromDict)
171 comboTools.append(diphotonDPhiHypoToolFromDict)
173 return self.getStep(flags, stepName,sequenceCfgArray=[precisionPhotonCaloIsoSequenceGenCfg], name=
'Photon', comboTools=comboTools, ion=do_ion, is_probe_leg=is_probe_leg)
getFastPhoton(self, flags, is_probe_leg=False)
getHipTRT(self, flags, is_probe_leg=False)
getFastCalo(self, flags, is_probe_leg=False)
getPrecisionPhoton(self, flags, is_probe_leg=False)
assembleChainImpl(self, flags)
getPhotonCaloIso(self, flags, is_probe_leg=False)
__init__(self, chainDict)
getPrecisionCaloPhoton(self, flags, is_probe_leg=False)
_diPhotonComboHypoToolFromDict(flags, chainDict, lowermass=80000, uppermass=-999, dphi=1.5, applymass=False, applydphi=False)
diphotonDPhiMassHypoToolFromDict(flags, chainDict)
diphotonDPhiHypoToolFromDict(flags, chainDict)