ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
Trig::TrigEgammaEmulationPrecisionElectronHypoTool Class Reference

#include <TrigEgammaEmulationPrecisionElectronHypoTool.h>

Inheritance diagram for Trig::TrigEgammaEmulationPrecisionElectronHypoTool:
Collaboration diagram for Trig::TrigEgammaEmulationPrecisionElectronHypoTool:

Public Member Functions

 TrigEgammaEmulationPrecisionElectronHypoTool (const std::string &myname)
 
 ~TrigEgammaEmulationPrecisionElectronHypoTool ()=default
 
virtual bool emulate (const TrigData &input, bool &pass) const override
 ========================================================================== More...
 
virtual StatusCode initialize () override
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

float avgmu () const
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

ToolHandle< Trig::TrigDecisionToolm_trigdec
 Trigger decision tool. More...
 
ToolHandle< ILumiBlockMuToolm_lumiBlockMuTool
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

bool decide (const Trig::TrigData &input, const xAOD::Electron *el) const
 
int findCutIndex (float eta) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

Gaudi::Property< std::string > m_pidName { this, "PidName", "" }
 
Gaudi::Property< float > m_detacluster { this, "dETACLUSTERthr", 0. , "" }
 
Gaudi::Property< float > m_dphicluster { this, "dPHICLUSTERthr", 0. , "" }
 
Gaudi::Property< float > m_RelPtConeCut { this, "RelPtConeCut", -999., "Track isolation cut" }
 
Gaudi::Property< std::vector< float > > m_etabin { this, "EtaBins", {} , "Bins of eta" }
 selection variable for PRECISION electron selection:eta bins More...
 
Gaudi::Property< std::vector< float > > m_eTthr { this, "ETthr", {}, "ET Threshold" }
 
Gaudi::Property< float > m_d0 { this, "d0Cut", -1, "d0 cut" }
 
Gaudi::Property< bool > m_acceptAll { this, "AcceptAll", false, "Accept all events" }
 
Gaudi::Property< bool > m_doNoPid { this, "DoNoPid", false , "No Pid/Isolation applied" }
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 19 of file TrigEgammaEmulationPrecisionElectronHypoTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TrigEgammaEmulationPrecisionElectronHypoTool()

TrigEgammaEmulationPrecisionElectronHypoTool::TrigEgammaEmulationPrecisionElectronHypoTool ( const std::string &  myname)

Definition at line 9 of file TrigEgammaEmulationPrecisionElectronHypoTool.cxx.

11 {}

◆ ~TrigEgammaEmulationPrecisionElectronHypoTool()

Trig::TrigEgammaEmulationPrecisionElectronHypoTool::~TrigEgammaEmulationPrecisionElectronHypoTool ( )
default

Member Function Documentation

◆ avgmu()

float TrigEgammaEmulationBaseHypoTool::avgmu ( ) const
protectedinherited

Definition at line 26 of file TrigEgammaEmulationBaseHypoTool.cxx.

27 {
28  return m_lumiBlockMuTool->averageInteractionsPerCrossing();
29 }

◆ decide()

bool TrigEgammaEmulationPrecisionElectronHypoTool::decide ( const Trig::TrigData input,
const xAOD::Electron el 
) const
private

Definition at line 54 of file TrigEgammaEmulationPrecisionElectronHypoTool.cxx.

58 {
59  const TrigRoiDescriptor *roi = input.roi;
60 
61  // when leaving scope it will ship data to monTool
62  unsigned PassedCuts = 0; //got called (data in place)
63 
64 
65  if ( std::abs( roi->eta() ) > 2.6 ) {
66  ATH_MSG_DEBUG( "REJECT The electron had eta coordinates beyond the EM fiducial volume : " << roi->eta() << "; stop the chain now" );
67  return false;
68  }
69 
70  ATH_MSG_DEBUG( "RoI ID = " << roi->roiId() << ": Eta = " << roi->eta() << ", Phi = " << roi->phi() );
71 
72  // fill local variables for RoI reference position
73  double etaRef = roi->eta();
74  double phiRef = roi->phi();
75  ATH_MSG_DEBUG("etaRef: "<<etaRef);
76  // correct phi the to right range ( probably not needed anymore )
77  if ( std::abs( phiRef ) > M_PI ) phiRef -= 2*M_PI; // correct phi if outside range
78 
79 
80  ATH_MSG_DEBUG("Electron : et " << el->pt() << " eta = " << el->eta() << " phi = " << el->phi());
81 
82  auto pClus = el->caloCluster();
83 
84  if(!pClus){
85  ATH_MSG_DEBUG("No calo cluster for this electron");
86  return false;
87  }
88 
89  float absEta = std::abs( pClus->eta() );
90 
91  ATH_MSG_DEBUG("absEta: "<<absEta);
92 
93  const int cutIndex = findCutIndex( absEta );
94 
95 
96 
97 
98  float dEta = pClus->eta() - etaRef;
99  // Deal with angle diferences greater than Pi
100  float dPhi = std::abs( pClus->phi() - phiRef );
101  dPhi = ( dPhi < M_PI ? dPhi : 2*M_PI - dPhi ); // TB why only <
102  float ET = pClus->et();
103 
104 
105  // eta range
106  if( absEta > 2.47 ){
107  ATH_MSG_DEBUG( "Electron : " << absEta << " outside eta range ");
108  return false;
109  }
110 
111  PassedCuts = PassedCuts + 1; // passed eta cut
112 
113 
114  // apply cuts: DeltaEta( clus-ROI )
115  ATH_MSG_DEBUG( "Electron : eta=" << pClus->eta() << " roi eta=" << etaRef << " DeltaEta=" << dEta
116  << " cut: <" << m_detacluster );
117 
118  if ( std::abs( pClus->eta() - etaRef ) > m_detacluster ) {
119  ATH_MSG_DEBUG("REJECT Electron a cut failed");
120  return false;
121  }
122  PassedCuts = PassedCuts + 1; //Deta
123 
124  // DeltaPhi( clus-ROI )
125  ATH_MSG_DEBUG( ": phi=" << pClus->phi() << " roi phi="<< phiRef << " DeltaPhi="<< dPhi << " cut: <" << m_dphicluster );
126 
127  if( dPhi > m_dphicluster ) {
128  ATH_MSG_DEBUG("REJECT Clsuter dPhi cut failed");
129  return false;
130  }
131  PassedCuts = PassedCuts + 1; //DPhi
132 
133 
134 
135  // eta range
136  if ( cutIndex == -1 ) { // VD
137  ATH_MSG_DEBUG( "Electron : " << absEta << " outside eta range " << m_etabin[m_etabin.size()-1] );
138  return false;
139  } else {
140  ATH_MSG_DEBUG( "eta bin used for cuts " << cutIndex );
141  }
142  PassedCuts = PassedCuts + 1; // passed eta cut
143 
144  // ET_em
145  ATH_MSG_DEBUG( "Electron: ET_em=" << ET << " cut: >" << m_eTthr[cutIndex] );
146  if ( ET < m_eTthr[cutIndex] ) {
147  ATH_MSG_DEBUG("REJECT et cut failed");
148  return false;
149  }
150  PassedCuts = PassedCuts + 1; // ET_em
151  if(m_doNoPid) return true;
152 
153 
154 
155  // d0 for LRT
156  if (m_d0 and m_d0>0.)
157  {
158  float trk_d0 = std::abs(el->trackParticle()->d0());
159  ATH_MSG_DEBUG( "Electron: trk_d0=" << trk_d0 << " cut: >" << m_d0 );
160  if ( trk_d0 < m_d0 ) {
161  ATH_MSG_DEBUG("REJECT d0 cut failed");
162  return false;
163  }
164  PassedCuts = PassedCuts + 1; // d0
165  }
166 
167 
168  ATH_MSG_DEBUG("Average mu " << avgmu());
169 
170  bool pass = input.isPassed(el , avgmu(), m_pidName);
171 
172 
173  float Rhad1(0), Rhad(0), Reta(0), Rphi(0), e277(0), weta2c(0), //emax2(0),
174  Eratio(0), DeltaE(0), f1(0), weta1c(0), wtot(0), fracm(0);
175  float ptcone20(999), ptcone30(999), ptcone40(999), etcone20(999), etcone30(999), etcone40(999), topoetcone20(999), topoetcone30(999), topoetcone40(999), relptcone20(999);
176 
177 
178  // variables based on HCAL
179  // transverse energy in 1st scintillator of hadronic calorimeter/ET
180  el->showerShapeValue(Rhad1, xAOD::EgammaParameters::Rhad1);
181  // transverse energy in hadronic calorimeter/ET
182  el->showerShapeValue(Rhad, xAOD::EgammaParameters::Rhad);
183 
184  // variables based on S2 of EM CAL
185  // E(7*7) in 2nd sampling
186  el->showerShapeValue(e277, xAOD::EgammaParameters::e277);
187  // E(3*7)/E(7*7) in 2nd sampling
188  el->showerShapeValue(Reta, xAOD::EgammaParameters::Reta);
189  // E(3*3)/E(3*7) in 2nd sampling
190  el->showerShapeValue(Rphi, xAOD::EgammaParameters::Rphi);
191  // shower width in 2nd sampling
192  el->showerShapeValue(weta2c, xAOD::EgammaParameters::weta2);
193 
194  // variables based on S1 of EM CAL
195  // fraction of energy reconstructed in the 1st sampling
196  el->showerShapeValue(f1, xAOD::EgammaParameters::f1);
197  // shower width in 3 strips in 1st sampling
198  el->showerShapeValue(weta1c, xAOD::EgammaParameters::weta1);
199  // E of 2nd max between max and min in strips [NOT USED]
200  // eg->showerShapeValue(emax2, xAOD::EgammaParameters::e2tsts1);
201  // (E of 1st max in strips-E of 2nd max)/(E of 1st max+E of 2nd max)
202  el->showerShapeValue(Eratio, xAOD::EgammaParameters::Eratio);
203  // E(2nd max)-E(min) in strips
204  el->showerShapeValue(DeltaE, xAOD::EgammaParameters::DeltaE);
205  // total shower width in 1st sampling
206  el->showerShapeValue(wtot, xAOD::EgammaParameters::wtots1);
207  // E(+/-3)-E(+/-1)/E(+/-1)
208  el->showerShapeValue(fracm, xAOD::EgammaParameters::fracs1);
209 
210  el->isolationValue(ptcone20, xAOD::Iso::ptcone20);
211 
212  el->isolationValue(ptcone30, xAOD::Iso::ptcone30);
213 
214  el->isolationValue(ptcone40, xAOD::Iso::ptcone40);
215 
216  el->isolationValue(etcone20, xAOD::Iso::etcone20);
217 
218  el->isolationValue(etcone30, xAOD::Iso::etcone30);
219 
220  el->isolationValue(etcone40, xAOD::Iso::etcone40);
221 
222  el->isolationValue(topoetcone20, xAOD::Iso::topoetcone20);
223 
224  el->isolationValue(topoetcone30, xAOD::Iso::topoetcone30);
225 
226  el->isolationValue(topoetcone40, xAOD::Iso::topoetcone40);
227 
228  ATH_MSG_DEBUG(" electron Cluster Et "<<ET);
229  ATH_MSG_DEBUG( " Rhad1 " << Rhad1 ) ;
230  ATH_MSG_DEBUG( " Rhad " << Rhad ) ;
231  ATH_MSG_DEBUG( " e277 " << e277 ) ;
232  ATH_MSG_DEBUG( " Reta " << Reta ) ;
233  ATH_MSG_DEBUG( " Rphi " << Rphi ) ;
234  ATH_MSG_DEBUG( " weta2c " << weta2c ) ;
235  ATH_MSG_DEBUG( " f1 " << f1 ) ;
236  ATH_MSG_DEBUG( " weta1c " << weta1c ) ;
237  ATH_MSG_DEBUG( " Eratio " << Eratio ) ;
238  ATH_MSG_DEBUG( " DeltaE " << DeltaE ) ;
239  ATH_MSG_DEBUG( " wtot " << wtot ) ;
240  ATH_MSG_DEBUG( " fracm " << fracm ) ;
241  ATH_MSG_DEBUG( " trackPT "<<el->trackParticle()->pt());
242  ATH_MSG_DEBUG( " d0 "<<el->trackParticle()->d0());
243  ATH_MSG_DEBUG( " z0 "<<el->trackParticle()->z0());
244  ATH_MSG_DEBUG( " ptcone20 " << ptcone20 ) ;
245  ATH_MSG_DEBUG( " ptcone30 " << ptcone30 ) ;
246  ATH_MSG_DEBUG( " ptcone40 " << ptcone40 ) ;
247  ATH_MSG_DEBUG( " etcone20 " << etcone20 ) ;
248  ATH_MSG_DEBUG( " etcone30 " << etcone30 ) ;
249  ATH_MSG_DEBUG( " etcone40 " << etcone40 ) ;
250  ATH_MSG_DEBUG( " topoetcone20 " << topoetcone20 ) ;
251  ATH_MSG_DEBUG( " topoetcone30 " << topoetcone30 ) ;
252  ATH_MSG_DEBUG( " topoetcone40 " << topoetcone40 ) ;
253 
254  // Monitor showershapes
255  relptcone20 = ptcone20/el->pt();
256  ATH_MSG_DEBUG("relptcone20 = " <<relptcone20 );
257  ATH_MSG_DEBUG("m_RelPtConeCut = " << m_RelPtConeCut );
258 
259  // Evaluating lh *after* retrieving variables for monitoing and DEBUGing purposes
260  ATH_MSG_DEBUG("AthenaLHSelectorTool: TAccept = " << pass);
261  if ( !pass ){
262  ATH_MSG_DEBUG("REJECT Likelihood failed");
263  return false;
264  } else {
265  ATH_MSG_DEBUG("ACCEPT Likelihood passed");
266  }
267 
268  // Check if need to apply isolation
269  // First check logic. if cut is very negative, then no isolation cut is defined
270  // if m_RelPtConeCut <-100 then hypo is configured not to apply isolation
271  if (m_RelPtConeCut < -100){
272  ATH_MSG_DEBUG(" not applying isolation. Returning NOW");
273  ATH_MSG_DEBUG("TAccept = " << pass);
274  return true;
275  }
276  // Then, It will pass if relptcone20 is less than cut:
277  pass = (relptcone20 < m_RelPtConeCut);
278  //
279  // Reach this point successfully
280  ATH_MSG_DEBUG( "pass = " << pass );
281  return pass;
282 
283 
284 
285 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ emulate()

bool TrigEgammaEmulationPrecisionElectronHypoTool::emulate ( const TrigData input,
bool &  pass 
) const
overridevirtual

==========================================================================

Implements Trig::ITrigEgammaEmulationBaseHypoTool.

Definition at line 25 of file TrigEgammaEmulationPrecisionElectronHypoTool.cxx.

27 {
28  pass=false;
29 
30  if( !input.roi ) return false;
31 
32  if( input.electrons.empty() ) return false;
33 
34  if (m_acceptAll){
35  pass=true;
36  return true;
37  }
38 
39  for ( const auto& el : input.electrons )
40  {
41  if( decide( input, el ) ){
42  pass=true;
43  return true;
44  }
45  }
46  return false;
47 
48 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ findCutIndex()

int TrigEgammaEmulationPrecisionElectronHypoTool::findCutIndex ( float  eta) const
private

Definition at line 288 of file TrigEgammaEmulationPrecisionElectronHypoTool.cxx.

288  {
289  const float absEta = std::abs(eta);
290  auto binIterator = std::adjacent_find( m_etabin.begin(), m_etabin.end(), [=](float left, float right){ return left < absEta and absEta < right; } );
291  if ( binIterator == m_etabin.end() ) {
292  return -1;
293  }
294  return binIterator - m_etabin.begin();
295 }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ initialize()

StatusCode TrigEgammaEmulationPrecisionElectronHypoTool::initialize ( )
overridevirtual

Implements Trig::ITrigEgammaEmulationBaseHypoTool.

Definition at line 17 of file TrigEgammaEmulationPrecisionElectronHypoTool.cxx.

18 {
20  return StatusCode::SUCCESS;
21 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_acceptAll

Gaudi::Property<bool> Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_acceptAll { this, "AcceptAll", false, "Accept all events" }
private

◆ m_d0

Gaudi::Property<float> Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_d0 { this, "d0Cut", -1, "d0 cut" }
private

◆ m_detacluster

Gaudi::Property< float > Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_detacluster { this, "dETACLUSTERthr", 0. , "" }
private

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doNoPid

Gaudi::Property< bool > Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_doNoPid { this, "DoNoPid", false , "No Pid/Isolation applied" }
private

◆ m_dphicluster

Gaudi::Property< float > Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_dphicluster { this, "dPHICLUSTERthr", 0. , "" }
private

◆ m_etabin

Gaudi::Property< std::vector<float> > Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_etabin { this, "EtaBins", {} , "Bins of eta" }
private

selection variable for PRECISION electron selection:eta bins

Definition at line 44 of file TrigEgammaEmulationPrecisionElectronHypoTool.h.

◆ m_eTthr

Gaudi::Property< std::vector<float> > Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_eTthr { this, "ETthr", {}, "ET Threshold" }
private

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_lumiBlockMuTool

ToolHandle<ILumiBlockMuTool> Trig::TrigEgammaEmulationBaseHypoTool::m_lumiBlockMuTool
protectedinherited

Definition at line 41 of file TrigEgammaEmulationBaseHypoTool.h.

◆ m_pidName

Gaudi::Property< std::string > Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_pidName { this, "PidName", "" }
private

◆ m_RelPtConeCut

Gaudi::Property< float > Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_RelPtConeCut { this, "RelPtConeCut", -999., "Track isolation cut" }
private

◆ m_trigdec

ToolHandle<Trig::TrigDecisionTool> Trig::TrigEgammaEmulationBaseHypoTool::m_trigdec
protectedinherited

Trigger decision tool.

Definition at line 40 of file TrigEgammaEmulationBaseHypoTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAOD::Iso::topoetcone20
@ topoetcone20
Topo-cluster ET-sum.
Definition: IsolationType.h:48
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::EgammaParameters::Reta
@ Reta
e237/e277
Definition: EgammaEnums.h:154
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trig::TrigEgammaEmulationBaseHypoTool::TrigEgammaEmulationBaseHypoTool
TrigEgammaEmulationBaseHypoTool(const std::string &myname)
Definition: TrigEgammaEmulationBaseHypoTool.cxx:10
Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_pidName
Gaudi::Property< std::string > m_pidName
Definition: TrigEgammaEmulationPrecisionElectronHypoTool.h:40
xAOD::Iso::ptcone30
@ ptcone30
Definition: IsolationType.h:41
M_PI
#define M_PI
Definition: ActiveFraction.h:11
xAOD::Iso::ptcone20
@ ptcone20
Track isolation.
Definition: IsolationType.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::Iso::etcone40
@ etcone40
Definition: IsolationType.h:34
xAOD::Iso::topoetcone30
@ topoetcone30
Definition: IsolationType.h:49
Trig::TrigEgammaEmulationPrecisionElectronHypoTool::findCutIndex
int findCutIndex(float eta) const
Definition: TrigEgammaEmulationPrecisionElectronHypoTool.cxx:288
Trig::TrigEgammaEmulationBaseHypoTool::m_lumiBlockMuTool
ToolHandle< ILumiBlockMuTool > m_lumiBlockMuTool
Definition: TrigEgammaEmulationBaseHypoTool.h:41
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Definition: TrigRoiDescriptor.h:56
xAOD::Iso::etcone30
@ etcone30
Definition: IsolationType.h:33
xAOD::EgammaParameters::Rphi
@ Rphi
e233/e237
Definition: EgammaEnums.h:156
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_doNoPid
Gaudi::Property< bool > m_doNoPid
Definition: TrigEgammaEmulationPrecisionElectronHypoTool.h:49
Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_acceptAll
Gaudi::Property< bool > m_acceptAll
Definition: TrigEgammaEmulationPrecisionElectronHypoTool.h:48
xAOD::EgammaParameters::wtots1
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
Definition: EgammaEnums.h:140
Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_etabin
Gaudi::Property< std::vector< float > > m_etabin
selection variable for PRECISION electron selection:eta bins
Definition: TrigEgammaEmulationPrecisionElectronHypoTool.h:44
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::EgammaParameters::f1
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
Definition: EgammaEnums.h:52
Trig::TrigEgammaEmulationBaseHypoTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: TrigEgammaEmulationBaseHypoTool.cxx:17
xAOD::Iso::etcone20
@ etcone20
Calorimeter isolation.
Definition: IsolationType.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:530
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
Trig::TrigEgammaEmulationPrecisionElectronHypoTool::decide
bool decide(const Trig::TrigData &input, const xAOD::Electron *el) const
Definition: TrigEgammaEmulationPrecisionElectronHypoTool.cxx:54
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::EgammaParameters::Rhad1
@ Rhad1
ethad1/et
Definition: EgammaEnums.h:162
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_detacluster
Gaudi::Property< float > m_detacluster
Definition: TrigEgammaEmulationPrecisionElectronHypoTool.h:41
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
TrigRoiDescriptor::roiId
virtual unsigned int roiId() const override final
these quantities probably don't need to be used any more
Definition: TrigRoiDescriptor.h:133
xAOD::Iso::ptcone40
@ ptcone40
Definition: IsolationType.h:42
a
TList * a
Definition: liststreamerinfos.cxx:10
Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_d0
Gaudi::Property< float > m_d0
Definition: TrigEgammaEmulationPrecisionElectronHypoTool.h:46
h
RoiDescriptor::phi
virtual double phi() const override final
Methods to retrieve data members.
Definition: RoiDescriptor.h:100
Trig::TrigEgammaEmulationBaseHypoTool::avgmu
float avgmu() const
Definition: TrigEgammaEmulationBaseHypoTool.cxx:26
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
TauGNNUtils::Variables::absEta
bool absEta(const xAOD::TauJet &tau, double &out)
Definition: TauGNNUtils.cxx:232
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
RoiDescriptor::eta
virtual double eta() const override final
Definition: RoiDescriptor.h:101
Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_eTthr
Gaudi::Property< std::vector< float > > m_eTthr
Definition: TrigEgammaEmulationPrecisionElectronHypoTool.h:45
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
xAOD::EgammaParameters::e277
@ e277
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
Definition: EgammaEnums.h:80
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_dphicluster
Gaudi::Property< float > m_dphicluster
Definition: TrigEgammaEmulationPrecisionElectronHypoTool.h:42
xAOD::EgammaParameters::weta1
@ weta1
shower width using +/-3 strips around the one with the maximal energy deposit: w3 strips = sqrt{sum(E...
Definition: EgammaEnums.h:97
xAOD::EgammaParameters::Eratio
@ Eratio
(emaxs1-e2tsts1)/(emaxs1+e2tsts1)
Definition: EgammaEnums.h:158
xAOD::Iso::topoetcone40
@ topoetcone40
Definition: IsolationType.h:50
Trig::TrigEgammaEmulationPrecisionElectronHypoTool::m_RelPtConeCut
Gaudi::Property< float > m_RelPtConeCut
Definition: TrigEgammaEmulationPrecisionElectronHypoTool.h:43
xAOD::EgammaParameters::Rhad
@ Rhad
ethad/et
Definition: EgammaEnums.h:160
TauGNNUtils::Variables::Track::dEta
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:525
xAOD::EgammaParameters::DeltaE
@ DeltaE
e2tsts1-emins1
Definition: EgammaEnums.h:164
SG::DataProxy
Definition: DataProxy.h:44
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::EgammaParameters::fracs1
@ fracs1
shower shape in the shower core : [E(+/-3)-E(+/-1)]/E(+/-1), where E(+/-n) is the energy in ± n strip...
Definition: EgammaEnums.h:111
fitman.k
k
Definition: fitman.py:528
read_hist_ntuple.f1
f1
Definition: read_hist_ntuple.py:4
xAOD::EgammaParameters::weta2
@ weta2
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...
Definition: EgammaEnums.h:103