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 103 of file TrigEgammaFastCaloHypoTool.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 120 of file TrigEgammaFastCaloHypoTool.py.

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

Member Function Documentation

◆ addMonitoring()

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

Definition at line 273 of file TrigEgammaFastCaloHypoTool.py.

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

◆ chain()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.chain (   self)

Definition at line 163 of file TrigEgammaFastCaloHypoTool.py.

163  def chain(self):
164  return self.__name
165 

◆ compile()

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

Definition at line 242 of file TrigEgammaFastCaloHypoTool.py.

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

◆ etcut()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.etcut (   self)

Definition at line 205 of file TrigEgammaFastCaloHypoTool.py.

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

◆ etthr()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.etthr (   self)

Definition at line 169 of file TrigEgammaFastCaloHypoTool.py.

169  def etthr(self):
170  return self.__threshold
171 

◆ gsfinfo()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.gsfinfo (   self)

Definition at line 181 of file TrigEgammaFastCaloHypoTool.py.

181  def gsfinfo(self):
182  return self.__gsfinfo
183 

◆ idperfinfo()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.idperfinfo (   self)

Definition at line 184 of file TrigEgammaFastCaloHypoTool.py.

184  def idperfinfo(self):
185  return self.__idperfinfo
186 

◆ isElectron()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.isElectron (   self)

Definition at line 172 of file TrigEgammaFastCaloHypoTool.py.

172  def isElectron(self):
173  return 'e' in self.__cand
174 

◆ isPhoton()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.isPhoton (   self)

Definition at line 175 of file TrigEgammaFastCaloHypoTool.py.

175  def isPhoton(self):
176  return 'g' in self.__cand
177 

◆ nocut()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.nocut (   self)

Definition at line 191 of file TrigEgammaFastCaloHypoTool.py.

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

◆ nominal()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.nominal (   self)

Definition at line 229 of file TrigEgammaFastCaloHypoTool.py.

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

◆ noringer()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.noringer (   self)

Definition at line 218 of file TrigEgammaFastCaloHypoTool.py.

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

◆ noringerinfo()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.noringerinfo (   self)

Definition at line 178 of file TrigEgammaFastCaloHypoTool.py.

178  def noringerinfo(self):
179  return self.__noringerinfo
180 

◆ pidname()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.pidname (   self)

Definition at line 166 of file TrigEgammaFastCaloHypoTool.py.

166  def pidname( self ):
167  return self.__sel
168 

◆ tool()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.tool (   self)

Definition at line 187 of file TrigEgammaFastCaloHypoTool.py.

187  def tool(self):
188  return self.__tool
189 
190 

Member Data Documentation

◆ __calibThreshold

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__calibThreshold
private

Definition at line 132 of file TrigEgammaFastCaloHypoTool.py.

◆ __cand

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__cand
private

Definition at line 124 of file TrigEgammaFastCaloHypoTool.py.

◆ __gsfinfo

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__gsfinfo
private

Definition at line 127 of file TrigEgammaFastCaloHypoTool.py.

◆ __idperfinfo

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__idperfinfo
private

Definition at line 128 of file TrigEgammaFastCaloHypoTool.py.

◆ __log

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__log
private

Definition at line 122 of file TrigEgammaFastCaloHypoTool.py.

◆ __monGroups

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__monGroups
private

Definition at line 131 of file TrigEgammaFastCaloHypoTool.py.

◆ __name

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__name
private

Definition at line 123 of file TrigEgammaFastCaloHypoTool.py.

◆ __noringerinfo

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__noringerinfo
private

Definition at line 130 of file TrigEgammaFastCaloHypoTool.py.

◆ __operation_points

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__operation_points
staticprivate

Definition at line 105 of file TrigEgammaFastCaloHypoTool.py.

◆ __sel

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__sel
private

Definition at line 126 of file TrigEgammaFastCaloHypoTool.py.

◆ __threshold

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__threshold
private

Definition at line 125 of file TrigEgammaFastCaloHypoTool.py.

◆ __tool

python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolConfig.__tool
private

Definition at line 154 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:89
GenericMonitoringTool
Definition: GenericMonitoringTool.h:53
python.TrigEgammaFastCaloHypoTool.same
def same(val, tool)
Definition: TrigEgammaFastCaloHypoTool.py:12
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:453
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
readCCLHist.float
float
Definition: readCCLHist.py:83