5 from AthenaCommon.Logging
import logging
6 logging.getLogger().
info(
"Importing %s",__name__)
7 log = logging.getLogger(__name__)
9 from AthenaConfiguration.ComponentFactory
import CompFactory
10 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
11 from ..Config.ChainConfigurationBase
import ChainConfigurationBase
12 from ..CommonSequences.CaloSequences
import fastCaloSequenceGenCfg
13 from ..Photon.FastPhotonMenuSequences
import fastPhotonSequenceGenCfg
14 from ..Photon.PrecisionPhotonCaloIsoMenuSequences
import precisionPhotonCaloIsoSequenceGenCfg
15 from ..Photon.PrecisionPhotonMenuSequences
import precisionPhotonSequenceGenCfg
16 from ..Photon.PrecisionCaloMenuSequences
import precisionCaloSequenceGenCfg
17 from ..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']
107 log.debug(
"Assembling chain for %s", self.chainName)
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']
139 stepName =
"PhotonPrecisionHICalo"
141 stepName =
"PhotonPrecisionCalo"
143 return self.getStep(flags, stepName,[precisionCaloSequenceGenCfg], ion=do_ion, is_probe_leg=is_probe_leg)
147 return self.getStep(flags, stepName,[TRTHitGeneratorSequenceGenCfg], is_probe_leg=is_probe_leg)
151 stepName =
"precision_photon"
152 do_ion =
'ion' in self.chainPart[
'extra'] ==
'ion'
157 return self.getStep(flags, stepName,sequenceCfgArray=[precisionPhotonSequenceGenCfg], ion=do_ion, is_probe_leg=is_probe_leg)
161 stepName =
"precision_photon_CaloIso"
163 do_ion =
'ion' in self.chainPart[
'extra']
172 comboTools.append(diphotonDPhiMassHypoToolFromDict)
174 comboTools.append(diphotonDPhiHypoToolFromDict)
176 return self.getStep(flags, stepName,sequenceCfgArray=[precisionPhotonCaloIsoSequenceGenCfg], name=
'Photon', comboTools=comboTools, ion=do_ion, is_probe_leg=is_probe_leg)