Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig Class Reference
Collaboration diagram for python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig:

Public Member Functions

def __init__ (self, name, monGroups, cpart, tool=None)
 
def chain (self)
 
def pidname (self)
 
def etthr (self)
 
def isoInfo (self)
 
def d0Info (self)
 
def gsfInfo (self)
 
def tool (self)
 
def nocut (self)
 
def noPid (self)
 
def addLRTCut (self)
 
def acceptAll (self)
 
def addIsoCut (self, flags)
 
def nominal (self)
 
def compile (self, flags)
 
def addMonitoring (self, flags)
 

Private Attributes

 __log
 
 __name
 
 __threshold
 
 __sel
 
 __iso
 
 __d0
 
 __gsfInfo
 
 __lhInfo
 
 __monGroups
 
 __tool
 

Static Private Attributes

 __operation_points
 
 __operation_points_lhInfo
 
 __operation_points_gsfInfo
 
 __isolationCut
 
 __lrtD0Cut
 

Detailed Description

Definition at line 59 of file TrigEgammaPrecisionElectronHypoTool.py.

Constructor & Destructor Documentation

◆ __init__()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__init__ (   self,
  name,
  monGroups,
  cpart,
  tool = None 
)

Definition at line 117 of file TrigEgammaPrecisionElectronHypoTool.py.

117  def __init__(self, name, monGroups, cpart, tool=None):
118 
119  from AthenaCommon.Logging import logging
120  self.__log = logging.getLogger('TrigEgammaPrecisionElectronHypoTool')
121  self.__name = name
122  self.__threshold = float(cpart['threshold'])
123  self.__sel = cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo']
124  self.__iso = cpart['isoInfo']
125  self.__d0 = cpart['lrtInfo']
126  self.__gsfInfo = cpart['gsfInfo']
127  self.__lhInfo = cpart['lhInfo']
128  self.__monGroups = monGroups
129 
130  if not tool:
131  from AthenaConfiguration.ComponentFactory import CompFactory
132  tool = CompFactory.TrigEgammaPrecisionElectronHypoTool( name )
133 
134  tool.EtaBins = [0.0, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37, 2.47]
135  tool.ETthr = same( self.__threshold*GeV, tool )
136  tool.dETACLUSTERthr = 0.1
137  tool.dPHICLUSTERthr = 0.1
138  tool.RelPtConeCut = -999
139  tool.PidName = ""
140  tool.d0Cut = -1
141  tool.AcceptAll = False
142  tool.DoNoPid = False
143  tool.IsoValidation = False
144  self.__tool = tool
145 
146  self.__log.debug( 'Electron_Chain :%s', self.__name )
147  self.__log.debug( 'Electron_Threshold :%s', self.__threshold )
148  self.__log.debug( 'Electron_Pidname :%s', self.pidname() )
149  self.__log.debug( 'Electron_iso :%s', self.__iso )
150  self.__log.debug( 'Electron_d0 :%s', self.__d0 )
151 

Member Function Documentation

◆ acceptAll()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.acceptAll (   self)

Definition at line 209 of file TrigEgammaPrecisionElectronHypoTool.py.

209  def acceptAll(self):
210  self.tool().AcceptAll = True

◆ addIsoCut()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.addIsoCut (   self,
  flags 
)

Definition at line 214 of file TrigEgammaPrecisionElectronHypoTool.py.

214  def addIsoCut(self,flags):
215  if not self.isoInfo() in self.__isolationCut:
216  self.__log.fatal(f"Bad Iso selection name: {self.isoInfo()}")
217  if flags.Trigger.egamma.isoValidation:
218  self.tool().IsoValidation = flags.Trigger.egamma.isoValidation
219  valIsoCut = {None: None,'ivarloose': 0.15,'ivarmedium': 0.065,'ivartight': 0.06}
220  self.tool().RelPtConeCut = valIsoCut[self.isoInfo()]
221  else:
222  self.tool().RelPtConeCut = self.__isolationCut[self.isoInfo()]
223 
224 
225 
226 

◆ addLRTCut()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.addLRTCut (   self)

Definition at line 204 of file TrigEgammaPrecisionElectronHypoTool.py.

204  def addLRTCut(self):
205  if not self.d0Info() in self.__lrtD0Cut:
206  self.__log.fatal(f"Bad LRT selection name: {self.d0Info()}")
207  self.__tool.d0Cut = self.__lrtD0Cut[self.d0Info()]
208 

◆ addMonitoring()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.addMonitoring (   self,
  flags 
)

Definition at line 265 of file TrigEgammaPrecisionElectronHypoTool.py.

265  def addMonitoring(self, flags):
266 
267  monTool = GenericMonitoringTool(flags, "MonTool_"+self.chain(),HistPath = 'PrecisionElectronHypo/'+self.chain())
268  monTool.defineHistogram('dEta', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo #Delta#eta_{EF L1}; #Delta#eta_{EF L1}", xbins=80, xmin=-0.01, xmax=0.01)
269  monTool.defineHistogram('dPhi', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo #Delta#phi_{EF L1}; #Delta#phi_{EF L1}", xbins=80, xmin=-0.01, xmax=0.01)
270  monTool.defineHistogram('Et_em', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo cluster E_{T}^{EM};E_{T}^{EM} [MeV]", xbins=50, xmin=-2000, xmax=100000)
271  monTool.defineHistogram('Eta', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo entries per Eta;Eta", xbins=100, xmin=-2.5, xmax=2.5)
272  monTool.defineHistogram('Phi', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo entries per Phi;Phi", xbins=128, xmin=-3.2, xmax=3.2)
273  monTool.defineHistogram('EtaBin', type='TH1I', path='EXPERT', title="PrecisionElectron Hypo entries per Eta bin;Eta bin no.", xbins=11, xmin=-0.5, xmax=10.5)
274  monTool.defineHistogram('LikelihoodRatio', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo LH", xbins=100, xmin=-5, xmax=5)
275  monTool.defineHistogram('mu', type='TH1F', path='EXPERT', title="Average interaction per crossing", xbins=100, xmin=0, xmax=100)
276  monTool.defineHistogram('relptvarcone20',type='TH1F',path='EXPERT',title= "PrecisionElectron Hypo; ptvarcone20/pt;", xbins=50, xmin=0, xmax=2)
277  monTool.defineHistogram('relptvarcone30',type='TH1F',path='EXPERT',title= "PrecisionElectron Hypo; ptvarcone30/pt;", xbins=50, xmin=0, xmax=2)
278  monTool.defineHistogram('ptvarcone20',type='TH1F',path='EXPERT',title= "PrecisionElectron Hypo ptvarcone20; ptvarcone20;", xbins=50, xmin=0, xmax=5.0)
279  monTool.defineHistogram('ptvarcone30',type='TH1F',path='EXPERT',title= "PrecisionElectron Hypo ptvarcone30; ptvarcone30;", xbins=50, xmin=0, xmax=5.0)
280 
281 
282  cuts=['Input','#Delta #eta EF-L1', '#Delta #phi EF-L1','eta','E_{T}^{EM}','LH','Isolation']
283  monTool.defineHistogram('CutCounter', type='TH1I', path='EXPERT', title="PrecisionElectron Hypo Cut Counter;Cut Counter", xbins=7, xmin=0, xmax=7, opt="kCumulative",xlabels=cuts)
284 
285 
286 
287  if flags.Trigger.doValidationMonitoring:
288  monTool.defineHistogram('relptcone20',type='TH1F',path='EXPERT',title= "PrecisionElectron Hypo; ptcone20/pt;", xbins=50, xmin=0, xmax=2)
289  monTool.defineHistogram('relptcone30',type='TH1F',path='EXPERT',title= "PrecisionElectron Hypo; ptcone30/pt;", xbins=50, xmin=0, xmax=2)
290  monTool.defineHistogram('ptcone20',type='TH1F',path='EXPERT',title= "PrecisionElectron Hypo ptcone20; ptcone20;", xbins=50, xmin=0, xmax=5.0)
291  monTool.defineHistogram('ptcone30',type='TH1F',path='EXPERT',title= "PrecisionElectron Hypo ptcone30; ptcone30;", xbins=50, xmin=0, xmax=5.0)
292  monTool.defineHistogram('trk_d0', type="TH1F", path='EXPERT', title="PrecisionElectron Hypo Track d0; d0 [mm]", xbins=100, xmin=-1, xmax=1)
293 
294  self.tool().MonTool = monTool
295 
296 

◆ chain()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.chain (   self)

Definition at line 152 of file TrigEgammaPrecisionElectronHypoTool.py.

152  def chain(self):
153  return self.__name
154 

◆ compile()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.compile (   self,
  flags 
)

Definition at line 236 of file TrigEgammaPrecisionElectronHypoTool.py.

236  def compile(self, flags):
237 
238  if 'nocut' == self.pidname():
239  self.nocut()
240  elif 'nopid' == self.pidname():
241  self.noPid()
242  else: # nominal chain using pid selection
243  self.nominal()
244 
245 
246  # secundary cut configurations
247  if self.isoInfo() and self.isoInfo()!="":
248  self.addIsoCut(flags)
249  if self.d0Info() and self.d0Info()!="":
250  self.addLRTCut()
251 
252 
253  if hasattr(self.tool(), "MonTool"):
254 
255  doValidationMonitoring = flags.Trigger.doValidationMonitoring # True to monitor all chains for validation purposes
256  monGroups = self.__monGroups
257 
258  if (any('egammaMon:online' in group for group in monGroups) or doValidationMonitoring):
259  self.addMonitoring(flags)
260 
261 

◆ d0Info()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.d0Info (   self)

Definition at line 176 of file TrigEgammaPrecisionElectronHypoTool.py.

176  def d0Info(self):
177  return self.__d0
178 

◆ etthr()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.etthr (   self)

Definition at line 170 of file TrigEgammaPrecisionElectronHypoTool.py.

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

◆ gsfInfo()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.gsfInfo (   self)

Definition at line 179 of file TrigEgammaPrecisionElectronHypoTool.py.

179  def gsfInfo(self):
180  return self.__gsfInfo
181 

◆ isoInfo()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.isoInfo (   self)

Definition at line 173 of file TrigEgammaPrecisionElectronHypoTool.py.

173  def isoInfo(self):
174  return self.__iso
175 

◆ nocut()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.nocut (   self)

Definition at line 185 of file TrigEgammaPrecisionElectronHypoTool.py.

185  def nocut(self):
186 
187  self.__log.debug( 'Configure nocut' )
188  self.tool().ETthr = same( self.etthr()*GeV, self.tool())
189  self.tool().dETACLUSTERthr = 9999.
190  self.tool().dPHICLUSTERthr = 9999.
191 

◆ nominal()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.nominal (   self)

Definition at line 227 of file TrigEgammaPrecisionElectronHypoTool.py.

227  def nominal(self):
228  if not self.pidname() in self.__operation_points:
229  self.__log.fatal("Bad selection name: %s" % self.pidname())
230  self.tool().PidName = self.pidname()
231 
232 

◆ noPid()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.noPid (   self)

Definition at line 192 of file TrigEgammaPrecisionElectronHypoTool.py.

192  def noPid(self):
193 
194  self.tool().DoNoPid = True
195  self.__log.debug( 'Configure noPid' )
196  self.tool().ETthr = same( self.etthr()*GeV, self.tool())
197  # No other cuts applied
198  self.tool().dETACLUSTERthr = 9999.
199  self.tool().dPHICLUSTERthr = 9999.
200 

◆ pidname()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.pidname (   self)

Definition at line 158 of file TrigEgammaPrecisionElectronHypoTool.py.

158  def pidname( self ):
159  # if LLH, we should append the LH extra information if exist
160  pidname = self.__sel
161 
162  extra = ""
163  if 'lh' in self.__sel and self.__gsfInfo and self.__gsfInfo in self.__operation_points_gsfInfo:
164  extra += '_' + self.__gsfInfo
165  if 'lh' in self.__sel and self.__lhInfo and self.__lhInfo in self.__operation_points_lhInfo:
166  extra += '_' + self.__lhInfo
167 
168  return pidname+extra
169 

◆ tool()

def python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.tool (   self)

Definition at line 182 of file TrigEgammaPrecisionElectronHypoTool.py.

182  def tool(self):
183  return self.__tool
184 

Member Data Documentation

◆ __d0

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__d0
private

Definition at line 125 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __gsfInfo

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__gsfInfo
private

Definition at line 126 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __iso

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__iso
private

Definition at line 124 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __isolationCut

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__isolationCut
staticprivate

Definition at line 98 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __lhInfo

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__lhInfo
private

Definition at line 127 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __log

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__log
private

Definition at line 120 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __lrtD0Cut

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__lrtD0Cut
staticprivate

Definition at line 106 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __monGroups

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__monGroups
private

Definition at line 128 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __name

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__name
private

Definition at line 121 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __operation_points

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__operation_points
staticprivate

Definition at line 62 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __operation_points_gsfInfo

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__operation_points_gsfInfo
staticprivate

Definition at line 93 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __operation_points_lhInfo

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__operation_points_lhInfo
staticprivate

Definition at line 89 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __sel

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__sel
private

Definition at line 123 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __threshold

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__threshold
private

Definition at line 122 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __tool

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__tool
private

Definition at line 144 of file TrigEgammaPrecisionElectronHypoTool.py.


The documentation for this class was generated from the following file:
python.TrigEgammaPrecisionElectronHypoTool.same
def same(val, tool)
Definition: TrigEgammaPrecisionElectronHypoTool.py:11
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
GenericMonitoringTool
Definition: GenericMonitoringTool.h:53
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
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65