ATLAS Offline Software
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig Class Reference
Collaboration diagram for python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig:

Public Member Functions

def __init__ (self, flags, name, monGroups, cpart, tool=None)
 
def chain (self)
 
def pidname (self)
 
def etthr (self)
 
def isElectron (self)
 
def isPhoton (self)
 
def noringerinfo (self)
 
def gsfinfo (self)
 
def idperfinfo (self)
 
def tool (self)
 
def nocut (self)
 
def etcut (self)
 
def noringer (self)
 
def nominal (self)
 
def compile (self, flags)
 
def addMonitoring (self, flags)
 

Private Attributes

 __log
 
 __name
 
 __cand
 
 __threshold
 
 __sel
 
 __gsfinfo
 
 __idperfinfo
 
 __noringerinfo
 
 __monGroups
 
 __calibThreshold
 
 __tool
 

Static Private Attributes

 __operation_points
 

Detailed Description

Definition at line 101 of file TrigEgammaFastCaloHypoTool.py.

Constructor & Destructor Documentation

◆ __init__()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__init__ (   self,
  flags,
  name,
  monGroups,
  cpart,
  tool = None 
)

Definition at line 118 of file TrigEgammaFastCaloHypoTool.py.

118  def __init__(self, flags, name, monGroups, cpart, tool=None):
119 
120  self.__log = logging.getLogger('TrigEgammaFastCaloHypoTool')
121  self.__name = name
122  self.__cand = cpart['trigType']
123  self.__threshold = float(cpart['threshold'])
124  self.__sel = 'ion' if 'ion' in cpart['extra'] else (cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo'])
125  self.__gsfinfo = cpart['gsfInfo'] if cpart['trigType']=='e' and cpart['gsfInfo'] else ''
126  self.__idperfinfo = cpart['idperfInfo'] if cpart['trigType']=='e' and cpart['idperfInfo'] else ''
127  # self.__noringerinfo = cpart['L2IDAlg'] if cpart['trigType']=='e' else ''
128  self.__noringerinfo = cpart['L2IDAlg']
129  self.__monGroups = monGroups
130  self.__calibThreshold = flags.Trigger.egamma.CalibrationETThreshold
131 
132  if not tool:
133  tool = CompFactory.TrigEgammaFastCaloHypoTool( name )
134 
135  tool.AcceptAll = False
136  tool.UseRinger = False
137  tool.EtaBins = [0.0, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37, 2.47]
138  tool.ETthr = same( self.__threshold*GeV, tool )
139  tool.dETACLUSTERthr = 0.1
140  tool.dPHICLUSTERthr = 0.1
141  tool.F1thr = same( 0.005 , tool)
142  tool.ET2thr = same( 90.0*GeV, tool )
143  tool.HADET2thr = same( 999.0 , tool)
144  tool.HADETthr = same( 0.058 , tool)
145  tool.WETA2thr = same( 99999. , tool)
146  tool.WSTOTthr = same( 99999. , tool)
147  tool.F3thr = same( 99999. , tool)
148  tool.CARCOREthr = same( -9999. , tool)
149  tool.CAERATIOthr = same( -9999. , tool)
150  tool.PidName = ""
151 
152  self.__tool = tool
153 
154  self.__log.debug( 'Chain :%s' , self.__name )
155  self.__log.debug( 'Signature :%s' , self.__cand )
156  self.__log.debug( 'Threshold :%s' , self.__threshold )
157  self.__log.debug( 'Pidname :%s' , self.__sel )
158  self.__log.debug( 'noringerinfo :%s', self.__noringerinfo )
159 
160 

Member Function Documentation

◆ addMonitoring()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.addMonitoring (   self,
  flags 
)

Definition at line 271 of file TrigEgammaFastCaloHypoTool.py.

271  def addMonitoring(self, flags):
272 
273  if self.tool().UseRinger:
274  monTool = GenericMonitoringTool(flags, 'MonTool'+self.__name)
275  monTool.defineHistogram('Eta', type='TH1F', path='EXPERT',title="#eta of Clusters; #eta; number of RoIs", xbins=50,xmin=-2.5,xmax=2.5)
276  monTool.defineHistogram('Phi',type='TH1F', path='EXPERT',title="#phi of Clusters; #phi; number of RoIs", xbins=64,xmin=-3.2,xmax=3.2)
277  monTool.defineHistogram('Et',type='TH1F', path='EXPERT',title="E_{T} of Clusters; E_{T} [MeV]; number of RoIs", xbins=60,xmin=0,xmax=5e4)
278  monTool.defineHistogram('NNOutput',type='TH1F', path='EXPERT',title="NN Output; NN; Count", xbins=17,xmin=-8,xmax=+8)
279 
280  monTool.HistPath= 'FastCaloL2EgammaHypo/'+self.__name
281  self.tool().MonTool=monTool
282 
283  else:
284 
285  monTool = GenericMonitoringTool(flags, "MonTool_"+self.__name,
286  HistPath = 'FastCaloL2EgammaHypo/'+self.__name)
287  monTool.defineHistogram('dEta', type='TH1F', path='EXPERT', title="L2Calo Hypo #Delta#eta_{L2 L1}; #Delta#eta_{L2 L1}",
288  xbins=80, xmin=-0.01, xmax=0.01)
289  monTool.defineHistogram('dPhi', type='TH1F', path='EXPERT', title="L2Calo Hypo #Delta#phi_{L2 L1}; #Delta#phi_{L2 L1}",
290  xbins=80, xmin=-0.01, xmax=0.01)
291  monTool.defineHistogram('Et_em', type='TH1F', path='EXPERT', title="L2Calo Hypo cluster E_{T}^{EM};E_{T}^{EM} [MeV]",
292  xbins=50, xmin=-2000, xmax=100000)
293  monTool.defineHistogram('Eta', type='TH1F', path='EXPERT', title="L2Calo Hypo entries per Eta;Eta", xbins=100, xmin=-2.5, xmax=2.5)
294  monTool.defineHistogram('Phi', type='TH1F', path='EXPERT', title="L2Calo Hypo entries per Phi;Phi", xbins=128, xmin=-3.2, xmax=3.2)
295 
296  cuts=['Input','has one TrigEMCluster', '#Delta #eta L2-L1', '#Delta #phi L2-L1','eta','rCore',
297  'eRatio','E_{T}^{EM}', 'E_{T}^{Had}','f_{1}','Weta2','Wstot','F3']
298 
299  monTool.defineHistogram('CutCounter', type='TH1I', path='EXPERT', title="L2Calo Hypo Passed Cuts;Cut",
300  xbins=13, xmin=-1.5, xmax=12.5, opt="kCumulative", xlabels=cuts)
301 
302  if flags.Trigger.doValidationMonitoring:
303  monTool.defineHistogram('Et_had', type='TH1F', path='EXPERT', title="L2Calo Hypo E_{T}^{had} in first layer;E_{T}^{had} [MeV]",
304  xbins=50, xmin=-2000, xmax=100000)
305  monTool.defineHistogram('RCore', type='TH1F', path='EXPERT', title="L2Calo Hypo R_{core};E^{3x7}/E^{7x7} in sampling 2",
306  xbins=48, xmin=-0.1, xmax=1.1)
307  monTool.defineHistogram('Eratio', type='TH1F', path='EXPERT',
308  title="L2Calo Hypo E_{ratio};E^{max1}-E^{max2}/E^{max1}+E^{max2} in sampling 1 (excl.crack)",
309  xbins=64, xmin=-0.1, xmax=1.5)
310  monTool.defineHistogram('EtaBin', type='TH1I', path='EXPERT', title="L2Calo Hypo entries per Eta bin;Eta bin no.",
311  xbins=11, xmin=-0.5, xmax=10.5)
312  monTool.defineHistogram('F1', type='TH1F', path='EXPERT', title="L2Calo Hypo f_{1};f_{1}", xbins=34, xmin=-0.5, xmax=1.2)
313  monTool.defineHistogram('Weta2', type='TH1F', path='EXPERT', title="L2Calo Hypo Weta2; E Width in sampling 2",
314  xbins=96, xmin=-0.1, xmax=0.61)
315  monTool.defineHistogram('Wstot', type='TH1F', path='EXPERT', title="L2Calo Hypo Wstot; E Width in sampling 1",
316  xbins=48, xmin=-0.1, xmax=11.)
317  monTool.defineHistogram('F3', type='TH1F', path='EXPERT', title="L2Calo Hypo F3; E3/(E0+E1+E2+E3)",
318  xbins=96, xmin=-0.1, xmax=1.1)
319 
320 
321  self.tool().MonTool = monTool
322 
323 
324 

◆ chain()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.chain (   self)

Definition at line 161 of file TrigEgammaFastCaloHypoTool.py.

161  def chain(self):
162  return self.__name
163 

◆ compile()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.compile (   self,
  flags 
)

Definition at line 240 of file TrigEgammaFastCaloHypoTool.py.

240  def compile(self, flags):
241 
242  if self.pidname() in ('etcut', 'ion', 'nopid'):
243  self.etcut()
244 
245  elif self.pidname() in self.__operation_points and 'noringer' in self.noringerinfo() and self.isElectron():
246  self.noringer()
247 
248  elif self.pidname() in self.__operation_points and 'noringer' not in self.noringerinfo() and self.isElectron():
249  self.nominal()
250 
251  elif self.pidname() in self.__operation_points and self.isPhoton() and 'noringer' in self.noringerinfo():
252  self.etcut()
253  elif self.pidname() in self.__operation_points and self.isPhoton() and 'noringer' not in self.noringerinfo():
254  self.nominal()
255 
256  elif self.etthr()==0:
257  self.nocut()
258 
259  if hasattr(self.tool(), "MonTool"):
260 
261  doValidationMonitoring = flags.Trigger.doValidationMonitoring # True to monitor all chains for validation purposes
262  monGroups = self.__monGroups
263 
264  if (any('egammaMon:online' in group for group in monGroups) or doValidationMonitoring):
265  self.addMonitoring(flags)
266 
267 

◆ etcut()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.etcut (   self)

Definition at line 203 of file TrigEgammaFastCaloHypoTool.py.

203  def etcut(self):
204 
205  self.__log.debug( 'Configure etcut or nopid' )
206  self.tool().UseRinger = False
207  self.tool().ETthr = same( ( self.etthr() - self.__calibThreshold )*GeV, self.tool() )
208  self.tool().dETACLUSTERthr = 9999.
209  self.tool().dPHICLUSTERthr = 9999.
210  self.tool().F1thr = same( 0.0 ,self.tool())
211  self.tool().HADETthr = same( 9999. ,self.tool())
212  self.tool().CARCOREthr = same( -9999. ,self.tool())
213  self.tool().CAERATIOthr = same( -9999. ,self.tool())
214 
215 

◆ etthr()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.etthr (   self)

Definition at line 167 of file TrigEgammaFastCaloHypoTool.py.

167  def etthr(self):
168  return self.__threshold
169 

◆ gsfinfo()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.gsfinfo (   self)

Definition at line 179 of file TrigEgammaFastCaloHypoTool.py.

179  def gsfinfo(self):
180  return self.__gsfinfo
181 

◆ idperfinfo()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.idperfinfo (   self)

Definition at line 182 of file TrigEgammaFastCaloHypoTool.py.

182  def idperfinfo(self):
183  return self.__idperfinfo
184 

◆ isElectron()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.isElectron (   self)

Definition at line 170 of file TrigEgammaFastCaloHypoTool.py.

170  def isElectron(self):
171  return 'e' in self.__cand
172 

◆ isPhoton()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.isPhoton (   self)

Definition at line 173 of file TrigEgammaFastCaloHypoTool.py.

173  def isPhoton(self):
174  return 'g' in self.__cand
175 

◆ nocut()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.nocut (   self)

Definition at line 189 of file TrigEgammaFastCaloHypoTool.py.

189  def nocut(self):
190 
191  self.__log.debug( 'Configure nocut' )
192  self.tool().AcceptAll = True
193  self.tool().UseRinger = False
194  self.tool().ETthr = same( self.etthr()*GeV , self.tool())
195  self.tool().dETACLUSTERthr = 9999.
196  self.tool().dPHICLUSTERthr = 9999.
197  self.tool().F1thr = same( 0.0 , self.tool())
198  self.tool().HADETthr = same( 9999. , self.tool())
199  self.tool().CARCOREthr = same( -9999. , self.tool())
200  self.tool().CAERATIOthr = same( -9999. , self.tool())
201 
202 

◆ nominal()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.nominal (   self)

Definition at line 227 of file TrigEgammaFastCaloHypoTool.py.

227  def nominal(self):
228 
229  self.__log.debug( 'Configure ringer' )
230  self.tool().UseRinger = True
231  self.tool().EtCut = (self.etthr()-self.__calibThreshold)*GeV
232  if not self.pidname() in self.__operation_points:
233  self.__log.fatal("Bad selection name: %s" % self.pidname())
234  self.tool().PidName = treatPidName(self.pidname())
235 
236 

◆ noringer()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.noringer (   self)

Definition at line 216 of file TrigEgammaFastCaloHypoTool.py.

216  def noringer(self):
217 
218  self.__log.debug( 'Configure noringer' )
219  from TrigEgammaHypo.TrigEgammaFastCutDefs import TrigFastCaloElectronCutMaps
220  self.tool().UseRinger = False
221  self.tool().ETthr = same( ( self.etthr() - self.__calibThreshold )*GeV , self.tool())
222  self.tool().HADETthr = TrigFastCaloElectronCutMaps( self.etthr() ).MapsHADETthr[self.pidname()]
223  self.tool().CARCOREthr = TrigFastCaloElectronCutMaps( self.etthr() ).MapsCARCOREthr[self.pidname()]
224  self.tool().CAERATIOthr = TrigFastCaloElectronCutMaps( self.etthr() ).MapsCAERATIOthr[self.pidname()]
225 
226 

◆ noringerinfo()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.noringerinfo (   self)

Definition at line 176 of file TrigEgammaFastCaloHypoTool.py.

176  def noringerinfo(self):
177  return self.__noringerinfo
178 

◆ pidname()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.pidname (   self)

Definition at line 164 of file TrigEgammaFastCaloHypoTool.py.

164  def pidname( self ):
165  return self.__sel
166 

◆ tool()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.tool (   self)

Definition at line 185 of file TrigEgammaFastCaloHypoTool.py.

185  def tool(self):
186  return self.__tool
187 
188 

Member Data Documentation

◆ __calibThreshold

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__calibThreshold
private

Definition at line 130 of file TrigEgammaFastCaloHypoTool.py.

◆ __cand

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__cand
private

Definition at line 122 of file TrigEgammaFastCaloHypoTool.py.

◆ __gsfinfo

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__gsfinfo
private

Definition at line 125 of file TrigEgammaFastCaloHypoTool.py.

◆ __idperfinfo

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__idperfinfo
private

Definition at line 126 of file TrigEgammaFastCaloHypoTool.py.

◆ __log

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__log
private

Definition at line 120 of file TrigEgammaFastCaloHypoTool.py.

◆ __monGroups

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__monGroups
private

Definition at line 129 of file TrigEgammaFastCaloHypoTool.py.

◆ __name

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__name
private

Definition at line 121 of file TrigEgammaFastCaloHypoTool.py.

◆ __noringerinfo

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__noringerinfo
private

Definition at line 128 of file TrigEgammaFastCaloHypoTool.py.

◆ __operation_points

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__operation_points
staticprivate

Definition at line 103 of file TrigEgammaFastCaloHypoTool.py.

◆ __sel

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__sel
private

Definition at line 124 of file TrigEgammaFastCaloHypoTool.py.

◆ __threshold

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__threshold
private

Definition at line 123 of file TrigEgammaFastCaloHypoTool.py.

◆ __tool

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__tool
private

Definition at line 152 of file TrigEgammaFastCaloHypoTool.py.


The documentation for this class was generated from the following file:
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
python.TrigEgammaFastCaloHypoTool.treatPidName
def treatPidName(pidname)
Definition: TrigEgammaFastCaloHypoTool.py:87
GenericMonitoringTool
Definition: GenericMonitoringTool.h:53
python.TrigEgammaFastCaloHypoTool.same
def same(val, tool)
Definition: TrigEgammaFastCaloHypoTool.py:10
xAOD::EgammaHelpers::isElectron
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Definition: EgammaxAODHelpers.cxx:12
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:452
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
xAOD::EgammaHelpers::isPhoton
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
Definition: EgammaxAODHelpers.cxx:21
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65