ATLAS Offline Software
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 58 of file TrigEgammaPrecisionElectronHypoTool.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 116 of file TrigEgammaPrecisionElectronHypoTool.py.

116  def __init__(self, name, monGroups, cpart, tool=None):
117 
118  from AthenaCommon.Logging import logging
119  self.__log = logging.getLogger('TrigEgammaPrecisionElectronHypoTool')
120  self.__name = name
121  self.__threshold = float(cpart['threshold'])
122  self.__sel = cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo']
123  self.__iso = cpart['isoInfo']
124  self.__d0 = cpart['lrtInfo']
125  self.__gsfInfo = cpart['gsfInfo']
126  self.__lhInfo = cpart['lhInfo']
127  self.__monGroups = monGroups
128 
129  if not tool:
130  from AthenaConfiguration.ComponentFactory import CompFactory
131  tool = CompFactory.TrigEgammaPrecisionElectronHypoTool( name )
132 
133  tool.EtaBins = [0.0, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37, 2.47]
134  tool.ETthr = same( self.__threshold*GeV, tool )
135  tool.dETACLUSTERthr = 0.1
136  tool.dPHICLUSTERthr = 0.1
137  tool.RelPtConeCut = -999
138  tool.PidName = ""
139  tool.d0Cut = -1
140  tool.AcceptAll = False
141  tool.DoNoPid = False
142  tool.UseRelptvarcone30 = False
143  tool.UseTopoetcone20 = 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  # rely on flag rather than self.__isolationCut
216  valIsoCut = {None:None, 'ivarloose':flags.Trigger.egamma.isoWPs[0], 'ivarmedium':flags.Trigger.egamma.isoWPs[1], 'ivartight':flags.Trigger.egamma.isoWPs[2]}
217  topoIsoCut = {None:None, 'ivarloose':flags.Trigger.egamma.topoIsoWPs[0], 'ivarmedium':flags.Trigger.egamma.topoIsoWPs[1], 'ivartight':flags.Trigger.egamma.topoIsoWPs[2]}
218  if not self.isoInfo() in valIsoCut:
219  self.__log.fatal(f"Bad Iso selection name: {self.isoInfo()}")
220  self.tool().UseRelptvarcone30 = flags.Trigger.egamma.useRelptvarcone30
221  self.tool().RelPtConeCut = valIsoCut[self.isoInfo()]
222  self.tool().UseTopoetcone20 = flags.Trigger.egamma.useTopoetcone20
223  self.tool().TopoEtConeCut = topoIsoCut[self.isoInfo()]
224 
225 
226 
227 

◆ 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 266 of file TrigEgammaPrecisionElectronHypoTool.py.

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

◆ 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 237 of file TrigEgammaPrecisionElectronHypoTool.py.

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

◆ 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 228 of file TrigEgammaPrecisionElectronHypoTool.py.

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

◆ 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 124 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __gsfInfo

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__gsfInfo
private

Definition at line 125 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __iso

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__iso
private

Definition at line 123 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __isolationCut

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__isolationCut
staticprivate

Definition at line 97 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __lhInfo

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__lhInfo
private

Definition at line 126 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __log

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__log
private

Definition at line 119 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __lrtD0Cut

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__lrtD0Cut
staticprivate

Definition at line 105 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __monGroups

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__monGroups
private

Definition at line 127 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __name

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__name
private

Definition at line 120 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __operation_points

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__operation_points
staticprivate

Definition at line 61 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __operation_points_gsfInfo

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__operation_points_gsfInfo
staticprivate

Definition at line 92 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __operation_points_lhInfo

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__operation_points_lhInfo
staticprivate

Definition at line 88 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __sel

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__sel
private

Definition at line 122 of file TrigEgammaPrecisionElectronHypoTool.py.

◆ __threshold

python.TrigEgammaPrecisionElectronHypoTool.TrigEgammaPrecisionElectronHypoToolConfig.__threshold
private

Definition at line 121 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:10
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:452
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