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

This tool can be used to identify the overlap of a V+jets and V+gamma sample or in fact between most V^n+gamma^m and V^n+gamma^(m-1) samples (e.g. More...

#include <VGammaORTool.h>

Inheritance diagram for VGammaORTool:
Collaboration diagram for VGammaORTool:

Public Member Functions

 VGammaORTool (const std::string &name)
 
virtual ~VGammaORTool () override
 
virtual StatusCode inOverlap (bool &result, const std::vector< TLorentzVector > *leptons=0, const std::vector< TLorentzVector > *photons=0, const std::vector< int > *lepton_origins=0, const std::vector< int > *photon_origins=0) const override
 Determine whether current event is in overlap region (set via reference). More...
 
virtual StatusCode photonPtsOutsideDr (std::vector< float > &result, const std::vector< TLorentzVector > *leptons=0, const std::vector< TLorentzVector > *photons=0, const std::vector< int > *lepton_origins=0, const std::vector< int > *photon_origins=0) const override
 Determine the pTs of photons outside the dR cut that is configured in tool initialization (dR_lepton_photon_cut). More...
 
virtual StatusCode photonPtsOutsideDrs (std::map< float, std::vector< float > > &result, const std::vector< TLorentzVector > *leptons=0, const std::vector< TLorentzVector > *photons=0, const std::vector< int > *lepton_origins=0, const std::vector< int > *photon_origins=0) const override
 Determine the pTs of photons outside of several dR cuts that are configured in tool initialization (dR_lepton_photon_cuts). More...
 
virtual bool frixioneIsolated (const xAOD::TruthParticle &photon, const xAOD::TruthParticleContainer &truthParticles, float dR0, float exponent, float epsilon) const override
 Function determining whether a photon is frixione isolated from truthParticles Parameters as defined in https://arxiv.org/pdf/hep-ph/9801442. More...
 
std::vector< TLorentzVector > getPhotonP4s (const xAOD::TruthParticleContainer &truthParticleContainer) const
 Get final state photons from truthParticleContainer A minimum pT cut and isolation is applied according to tool configuration Filter function is applied, only photons from relevant origins are kept. More...
 
std::vector< TLorentzVector > getLeptonP4s (const xAOD::TruthParticleContainer &truthParticleContainer) const
 Get final state leptons from truthParticleContainer Filter function is applied, only leptons from relevant origins are kept. More...
 
virtual StatusCode initialize ()
 Dummy implementation of the initialisation function. More...
 
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

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...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode photonPtsOutsideDrs (std::map< float, std::vector< float > > &result, const std::vector< float > &drCuts, const std::vector< TLorentzVector > *leptons=0, const std::vector< TLorentzVector > *photons=0, const std::vector< int > *lepton_origins=0, const std::vector< int > *photon_origins=0) const
 
StatusCode setInput (std::vector< TLorentzVector > &leptons_out, std::vector< TLorentzVector > &photons_out, const std::vector< TLorentzVector > *lepton_p4s, const std::vector< TLorentzVector > *photon_p4s, const std::vector< int > *lepton_origins, const std::vector< int > *photon_origins) const
 
std::vector< TLorentzVector > filterPhotonOrigins (const std::vector< TLorentzVector > &, const std::vector< int > &) const
 
std::vector< TLorentzVector > filterLeptonOrigins (const std::vector< TLorentzVector > &, const std::vector< int > &) const
 
bool isFromTau (const xAOD::TruthParticle &lepton, int nRecursions=0) const
 
bool checkPhotonPts (const std::vector< float > &photon_pts) const
 
float frixioneFunc (float dR, float dR0, float exponent, float epsilon) 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

asg::AnaToolHandle< MCTruthClassifierm_truthClassifier
 
int m_n_leptons
 
std::vector< int > m_lepton_pdgIds
 
std::vector< int > m_preferred_lepton_origins
 
std::vector< int > m_lepton_veto_origins
 
std::vector< int > m_veto_photon_origins
 
std::vector< float > m_photon_pT_cuts
 
float m_dR_lepton_photon_cut
 
std::vector< float > m_dR_lepton_photon_cuts
 
bool m_use_gamma_iso
 
float m_frixione_dR
 
float m_frixione_exponent
 
float m_frixione_epsilon
 
std::vector< int > m_abs_pdgids_excluded_from_iso
 
float m_min_considered_photon_pT
 
std::string m_truthparticle_collection_name
 
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

This tool can be used to identify the overlap of a V+jets and V+gamma sample or in fact between most V^n+gamma^m and V^n+gamma^(m-1) samples (e.g.

V+gammagamma vs V+gamma or VV+gamma vs VV). It can either decide whether an event is in the overlap region for fixed cuts on photons and lepton or be used to extract relevant information from the event so that the overlap removal (OR) can be performed at a later stage with a simple 'if' statement.

The OR functions (inOverlap(result), photonPtsOutsideDr(result), or photonPtsOutsideDrs(result)), set the result via reference and return a status code. Usually the tool will take leptons and photons from the current event but this behavior can be overwritten by explicitly setting leptons and photons as additional arguments to the functions.

Further documented at https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/VGammaORTool

Definition at line 37 of file VGammaORTool.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

◆ VGammaORTool()

VGammaORTool::VGammaORTool ( const std::string &  name)

Definition at line 8 of file VGammaORTool.cxx.

10  m_truthClassifier("MCTruthClassifier",this) {
11 
12  declareProperty("n_leptons", m_n_leptons = -2);
13  declareProperty("lepton_pdgIds", m_lepton_pdgIds = {11, -11, 13, -13, 15, -15});
14  declareProperty("veto_lepton_origins", m_lepton_veto_origins = {3, 5, 6, 7, 8, 9, 23, 24, 25, 26, 27, 28, 29, 30, 31,
15  32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42});
16  declareProperty("preferred_lepton_origins", m_preferred_lepton_origins = {1, 2, 4, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21});
17 
18  declareProperty("veto_photon_origins", m_veto_photon_origins = {9, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
19  42});
20 
21  declareProperty("photon_pT_cuts", m_photon_pT_cuts = {});
22  declareProperty("dR_lepton_photon_cut", m_dR_lepton_photon_cut = 0.1);
23  declareProperty("dR_lepton_photon_cuts", m_dR_lepton_photon_cuts = {0.0, 0.05, 0.075, 0.1, 0.125, 0.15, 0.2});
24 
25  declareProperty("use_gamma_iso", m_use_gamma_iso = false);
26  declareProperty("frixione_dR", m_frixione_dR = 0.1);
27  declareProperty("frixione_exponent", m_frixione_exponent = 2);
28  declareProperty("frixione_epsilon", m_frixione_epsilon = 0.1);
29  declareProperty("abs_pdgids_excluded_from_iso", m_abs_pdgids_excluded_from_iso = {11, 12, 13, 14, 15, 16, 22});
30  declareProperty("min_considered_photon_pT", m_min_considered_photon_pT = 3.e3);
31 
32  declareProperty("truthparticle_collection_name", m_truthparticle_collection_name = "TruthParticles");
33 
34  for (int origin : m_preferred_lepton_origins) {
35  if (std::find(m_lepton_veto_origins.begin(), m_lepton_veto_origins.end(), origin) != m_lepton_veto_origins.end()) {
36  ATH_MSG_ERROR(origin << " in both lepton origin and lepton veto origin, this is not correct.");
37  break;
38  }
39  }
40  // pT cuts are sorted in descending order
41  std::sort(m_photon_pT_cuts.begin(), m_photon_pT_cuts.end(), std::greater<float>());
42 }

◆ ~VGammaORTool()

VGammaORTool::~VGammaORTool ( )
overridevirtual

Definition at line 44 of file VGammaORTool.cxx.

44  {
45 }

Member Function Documentation

◆ checkPhotonPts()

bool VGammaORTool::checkPhotonPts ( const std::vector< float > &  photon_pts) const
private

Definition at line 350 of file VGammaORTool.cxx.

350  {
351  if(m_photon_pT_cuts.size()==0){
352  ATH_MSG_ERROR("photon_pT_cuts needs to be a non-empty list, when inOverlap is called, set as property or in constructor.");
353  return false;
354  }
355  if(m_photon_pT_cuts.size()>photon_pts.size()){
356  return false;
357  }
358  for(uint i=0; i<m_photon_pT_cuts.size();i++){
359  if(photon_pts[i]<m_photon_pT_cuts[i]){
360  return false;
361  }
362  }
363  return true;
364 }

◆ 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; }

◆ 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

◆ filterLeptonOrigins()

std::vector< TLorentzVector > VGammaORTool::filterLeptonOrigins ( const std::vector< TLorentzVector > &  lepton_candidates,
const std::vector< int > &  lepton_origins 
) const
private

Definition at line 204 of file VGammaORTool.cxx.

205  {
206  // this should only happen if the user gives the wrong input
207  if (lepton_candidates.size() != lepton_origins.size()) {
209  "VGammaORTool::filterLeptonOrigins" << ": size of lepton candidates (" << lepton_candidates.size() << ") different from number of lepton origins (" << lepton_origins.size() <<
210  ").");
211  }
212  std::vector<TLorentzVector> lepton_p4s;
213  std::vector<TLorentzVector> leptons_not_vetoed_p4s;
214  // find both good photons and photons that are just not vetoed (lower quality, used as fall back)
215  for (uint i = 0; i < lepton_candidates.size(); i++) {
216  const TLorentzVector p4 = lepton_candidates[i];
217  const int p_origin = lepton_origins[i];
218  const bool use = std::find(m_preferred_lepton_origins.begin(), m_preferred_lepton_origins.end(), p_origin) != m_preferred_lepton_origins.end();
219  if (use) {
220  lepton_p4s.push_back(p4);
221  if (m_n_leptons>=0 && int(lepton_p4s.size()) >= m_n_leptons) {
222  // as soon as enough leptons are found, return them
223  // this is why the order of lepton candidates matters
224  // if this tool identifies the leptons, taus will be before mu/el and otherwise leptons are ordered by pT
225  // in most cases the origin should unambiguosly identify the lepton anyway
226  return lepton_p4s;
227  }
228  } else {
229  bool vetoed =
231  if (!vetoed) {
232  leptons_not_vetoed_p4s.push_back(p4);
233  }
234  }
235  }
236  // if not enough good leptons were found (or no expected number of leptons was set),
237  // the result is filled with leptons that were merely not vetoed
238  for (const auto& l : leptons_not_vetoed_p4s) {
239  lepton_p4s.push_back(l);
240  if (m_n_leptons>=0 && int(lepton_p4s.size()) >= m_n_leptons) {
241  return lepton_p4s;
242  }
243  }
244  return lepton_p4s;
245 }

◆ filterPhotonOrigins()

std::vector< TLorentzVector > VGammaORTool::filterPhotonOrigins ( const std::vector< TLorentzVector > &  photon_candidates,
const std::vector< int > &  photon_origins 
) const
private

Definition at line 181 of file VGammaORTool.cxx.

182  {
183  // this should only happen if the user gives the wrong input
184  if (photon_candidates.size() != photon_origins.size()) {
186  "VGammaORTool::filterPhotonOrigins" << ": size of photon candidates (" << photon_candidates.size() << ") different from number of photon origins (" << photon_origins.size() <<
187  ").");
188  }
189  // filter out vetoed photons
190  std::vector<TLorentzVector> photon_p4s;
191  for (uint i = 0; i < photon_candidates.size(); i++) {
192  const TLorentzVector p4 = photon_candidates[i];
193  const int p_origin = photon_origins[i];
194  const bool vetoed =
196  if (!vetoed) {
197  photon_p4s.push_back(p4);
198  }
199  }
200 
201  return photon_p4s;
202 }

◆ frixioneFunc()

float VGammaORTool::frixioneFunc ( float  dR,
float  dR0,
float  exponent,
float  epsilon 
) const
private

Definition at line 412 of file VGammaORTool.cxx.

412  {
413  return epsilon * TMath::Power((1 - TMath::Cos(dR)) / (1 - TMath::Cos(dR0)), exponent);
414 }

◆ frixioneIsolated()

bool VGammaORTool::frixioneIsolated ( const xAOD::TruthParticle photon,
const xAOD::TruthParticleContainer truthParticles,
float  dR0,
float  exponent,
float  epsilon 
) const
overridevirtual

Function determining whether a photon is frixione isolated from truthParticles Parameters as defined in https://arxiv.org/pdf/hep-ph/9801442.

Implements IVGammaORTool.

Definition at line 367 of file VGammaORTool.cxx.

369  {
370  // all photons are isolated if dR is negative
371  if (dR0 <= 0.) {
372  return true;
373  }
374  // create map between hadron-photon dr and hadron pt
375  std::map<float, float> dr_to_pt;
376  for (const auto *p : truthParticles) {
377  // consider status 1 not from geant
379  continue;
380  }
381  // ignore what typically is leptons and photons
383  std::abs(p->pdgId())) != m_abs_pdgids_excluded_from_iso.end()) {
384  continue;
385  }
386  const float dRgamma = photon.p4().DeltaR(p->p4());
387  // consider only photons withon isolation cone dR0
388  if (dRgamma < dR0) {
389  // should two hadrons have the same dr they are added up
390  if (dr_to_pt.count(dRgamma) > 0) {
391  dr_to_pt[dRgamma] += p->pt();
392  }
393  dr_to_pt[dRgamma] = p->pt();
394  }
395  }
396  // use map to determine whether photon is Frixione isolated
397  // map is sorted from low to high dr
398  float sumPt = 0.;
399  for (const auto& pair : dr_to_pt) {
400  sumPt += pair.second;
401  const float dRgamma = pair.first;
402  // if for any dRgamma the sum of pt of hadrons with a distrance of <=dRgamma to photon
403  // does not fulfill the Frixione condition, the photon is not isolated
404  if (sumPt > photon.pt() * frixioneFunc(dRgamma, dR0, exponent, epsilon)) {
405  return false;
406  }
407  }
408  // otherwise the photon is isolated
409  return true;
410 }

◆ 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  }

◆ getLeptonP4s()

std::vector< TLorentzVector > VGammaORTool::getLeptonP4s ( const xAOD::TruthParticleContainer truthParticleContainer) const

Get final state leptons from truthParticleContainer Filter function is applied, only leptons from relevant origins are kept.

Definition at line 249 of file VGammaORTool.cxx.

249  {
250  std::vector<const xAOD::TruthParticle*> tau_candidates;
251  std::vector<const xAOD::TruthParticle*> elmu_candidates;
252  for (const auto *p : truthParticles) {
253  // ignore all particles created in Geant4
255  continue;
256  }
257  // ignore all particles with the wrong pdgid
258  if (std::find(m_lepton_pdgIds.begin(), m_lepton_pdgIds.end(), p->pdgId()) == m_lepton_pdgIds.end()) {
259  continue;
260  }
261  // handle taus: use tau instances before decay into non-tau
262  if (std::abs(p->pdgId()) == 15) {
263  bool childIsTau = false;
264  bool hasChildren = false;
265  // make sure tau has no tau children, i.e. is tau before decay
266  for (uint i = 0; i < p->nChildren(); i++) {
267  if (p->child(i) == nullptr) continue;
268  if (HepMC::uniqueID(p->child(i)) == HepMC::uniqueID(p)) continue;
269  hasChildren = true;
270  if (p->child(i)->pdgId() == p->pdgId()) {
271  childIsTau = true;
272  break;
273  }
274  }
275  if (hasChildren && !childIsTau) {
276  tau_candidates.push_back(p);
277  }
278  }
279  // electron and muons: use all status 1 not from tau
280  else if (MC::isStable(p) && !isFromTau(*p)) {
281  elmu_candidates.push_back(p);
282  }
283  }
284  // sort leptons by pT
285  sort(tau_candidates.begin(), tau_candidates.end(),
286  [](const xAOD::TruthParticle*& p1, const xAOD::TruthParticle*& p2) {
287  return p1->pt() > p2->pt();
288  });
289  sort(elmu_candidates.begin(), elmu_candidates.end(),
290  [](const xAOD::TruthParticle*& p1, const xAOD::TruthParticle*& p2) {
291  return p1->pt() > p2->pt();
292  });
293  // put taus before other leptons in a vector
294  std::vector<const xAOD::TruthParticle*> lepton_candidates(tau_candidates);
295  lepton_candidates.insert(lepton_candidates.end(), elmu_candidates.begin(), elmu_candidates.end());
296  // determine lepton origins
297  std::vector<TLorentzVector> lepton_p4s;
298  std::vector<int> lepton_origins;
299  static const SG::ConstAccessor<unsigned int> classifierParticleOriginAcc("classifierParticleOrigin");
300  for (const auto& p : lepton_candidates) {
301  const unsigned int origin = classifierParticleOriginAcc(*p);
302  lepton_origins.push_back(origin);
303  lepton_p4s.push_back(p->p4());
304  }
305  // filter out bad origins
306  return filterLeptonOrigins(lepton_p4s, lepton_origins);
307 }

◆ 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  }

◆ getPhotonP4s()

std::vector< TLorentzVector > VGammaORTool::getPhotonP4s ( const xAOD::TruthParticleContainer truthParticleContainer) const

Get final state photons from truthParticleContainer A minimum pT cut and isolation is applied according to tool configuration Filter function is applied, only photons from relevant origins are kept.

Definition at line 309 of file VGammaORTool.cxx.

309  {
310  std::vector<TLorentzVector> photon_p4s;
311  std::vector<int> photon_origins;
312  for (const auto *p : truthParticles) {
313  // consider only final state photons, not from geant, above a lower pt cut
314  if (!MC::isStable(p) || HepMC::is_simulation_particle(p) || p->pdgId() != 22 || p->pt() < m_min_considered_photon_pT) {
315  continue;
316  }
317  // require photons to be isolated if use_gamma_iso is true
318  if (m_use_gamma_iso &&
320  continue;
321  }
322  // determine photon origin
323  static const SG::ConstAccessor<unsigned int> classifierParticleOriginAcc("classifierParticleOrigin");
324  const unsigned int origin = classifierParticleOriginAcc(*p);
325  photon_origins.push_back(origin);
326  photon_p4s.push_back(p->p4());
327  }
328  // filter out bad photons
329  return filterPhotonOrigins(photon_p4s, photon_origins);
330 }

◆ getProperty()

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

Get one of the tool's properties.

◆ initialize()

virtual StatusCode asg::AsgTool::initialize ( )
inlinevirtualinherited

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented in SimpleMuonTriggerScaleFactors, Trig::TrigMuonMatching, CP::MuonTriggerScaleFactors, Trig::TrigTauMatchingTool, IHIEventShapeMapTool, ST::SUSYObjDef_xAOD, InDetSecVtxTruthMatchTool, JetGrooming::RecSoftDrop, met::METMaker, AsgForwardElectronIsEMSelector, JetGrooming::JetTrimming, ORUtils::BaseOverlapTool, PMGTools::PMGSherpa22VJetsWeightTool, AsgElectronEfficiencyCorrectionTool, CP::ElectronChargeEfficiencyCorrectionTool, AsgForwardElectronLikelihoodTool, CorrectPFOTool, CP::IsolationCorrectionTool, TauAnalysisTools::TauTruthMatchingTool, EGammaAmbiguityTool, InDetVertexTruthMatchTool, AthOnnx::OnnxRuntimeSessionToolCPU, AthOnnx::OnnxRuntimeSessionToolCUDA, PuppiWeightTool, JetIsolationTool, JetBalancePFlowJvtTool, CP::FFJetSmearingTool, JetForwardPFlowJvtTool, MCTruthClassifier, InDet::InDetHardScatterSelectionTool, dRMatchingTool, xAOD::BPhysBlindingTool, CP::EgammaCalibrationAndSmearingTool, JetVertexTaggerTool, tauRecTools::TrackRNN, LVL1::L1CaloOfflineTriggerTowerTools, TauAnalysisTools::TauSelectionTool, JetRecTool, met::METAssociationTool, CP::TrackVertexAssociationTool, met::METRebuilder, met::METAssociator, xAOD::TrackIsolationTool, InDet::InDetTrackSelectionTool, egammaMVACalibTool, TrigConf::xAODConfigTool, JetCleaningTool, met::METCaloRegionsTool, ZDC::ZdcLEDAnalysisTool, CP::MuonCalibTool, LVL1::L1CaloCells2TriggerTowers, JetVertexFractionTool, LVL1BS::PpmByteStreamReadV1V2Tool, JetClusterer, JetForwardJvtToolBDT, CP::AsgFlagSelectionTool, TauTrackFinder, TauAnalysisTools::DiTauSelectionTool, JetClustererByVertex, JetBadChanCorrTool, xAOD::BPhysTrackVertexMapTool, JetModifiedMassDrop, xAOD::CaloIsolationTool, EnhancedBiasWeighter, BookkeeperTool, ZDC::RpdSubtractCentroidTool, InDet::InDetUsedInFitTrackDecoratorTool, CP::AsgPtEtaSelectionTool, TauAnalysisTools::BuildTruthTaus, top::EventSaverFlatNtuple, tauRecTools::TauTrackRNNClassifier, InDet::InDetSecVtxTrackSelectionTool, JetForwardJvtTool, JetPileupTag::JetVertexNNTagger, CP::EgammaIsGoodOQSelectionTool, CP::IsolationCloseByCorrectionTool, CP::MuonCalibIntScaleSmearTool, DiTauRecTools::DiTauIDVarCalculator, JetFinder, AsgElectronIsEMSelector, CP::MuonCalibIntHighpTSmearTool, CP::MuonCalibIntSagittaTool, DiTauRecTools::DiTauDiscriminantTool, met::METBuilderTool, CP::AsgMaskSelectionTool, ElectronPhotonVariableCorrectionBase, ECUtils::EventCleaningTool, TauAnalysisTools::TauTruthTrackMatchingTool, met::METSoftTermsTool, LVL1::L1CaloLArTowerEnergy, HiggsTruthCategoryTool, IDTPM::TrackRoiSelectionTool, TauAnalysisTools::CommonDiTauEfficiencyTool, HIJetConstituentSubtractionTool, JetTrackSumMomentsTool, JetGrooming::SoftDrop, JetQGTaggerVariableTool, JetTrackMomentsTool, met::METTruthTool, CP::BaseLinearFakeBkgTool, PMGTools::PMGSherpaVjetsSysTool, ClusterMatching::CaloClusterMatchingTool, AsgPhotonEfficiencyCorrectionTool, InDet::JetTrackFilterTool, asg::DataHandleTestTool, xAODMaker::FileMetaDataTool, CP::BaseFakeBkgTool, InDet::InclusiveTrackFilterTool, InDet::InDetTrackTruthFilterTool, HIJetClusterSubtractorTool, CP::MVATrackVertexAssociationTool, IDTPM::RoiSelectionTool, ElectronPhotonVariableCorrectionTool, JetCalibrationTool, JetCaloQualityTool, JetOriginCorrectionTool, InDet::InDetTrackBiasingTool, HIJetClusterIndexAssociationTool, TauWPDecorator, TrigGlobalEfficiencyCorrectionTool, ZdcRecChannelToolV2, IDTPM::TrackObjectSelectionTool, CP::LhoodMM_tools, FlavorTagDiscriminants::GNNTool, FlavorTagDiscriminants::MultifoldGNNTool, CP::MuonSelectionTool, TauAnalysisTools::CommonDiTauSmearingTool, JSSTaggerBase, ZDC::ZdcAnalysisTool, IDTPM::TrackQualitySelectionTool, AsgElectronLikelihoodTool, CP::JetQGTagger, CP::JetJvtEfficiency, LVL1::L1CaloFcal23Cells2RxMappingTool, ORUtils::OverlapRemovalTool, Analysis::JetQuarkLabel, Ringer::AsgRingerSelectorTool, InDet::InDetTrackSmearingTool, JetCopier, JetGrooming::JetGroomer, met::METPhotonAssociator, JetECPSFractionTool, JetPtAssociationTool, met::METElectronAssociator, met::METTauAssociator, PMGTools::PMGDecayProductsSelectionTool, WeightToolBase, HIJetDRAssociationTool, JetClusterMomentsTool, met::METJetAssocTool, TauVertexFinder, IDTPM::JsonPlotsDefReadTool, TauAnalysisTools::DiTauSmearingTool, JetDRTrackAssocTool, JetReclusterer, TauDecayModeNNClassifier, BDTVertexWeightCalculator, asg::UnitTestTool1, IDTPM::DeltaRMatchingToolBase< T, R >, AsgElectronSelectorTool, JetReclusteringTool, met::METMuonAssociator, TauPi0CreateROI, TauShotFinder, IDTPM::DeltaRMatchingToolBase< xAOD::TrackParticle, xAOD::TruthParticle >, IDTPM::DeltaRMatchingToolBase< xAOD::TruthParticle, xAOD::TrackParticle >, IDTPM::DeltaRMatchingToolBase< xAOD::TrackParticle >, ZdcRecChannelToolLucrod, PMGTools::PMGTruthWeightTool, JetVoronoiMomentsTool, Trig::MatchFromCompositeTool, asg::UnitTestTool3, IDTPM::TruthTrackMatchingTool, CP::ApplyFakeFactor, AsgElectronChargeIDSelectorTool, HIJetMaxOverMeanTool, PanTau::Tool_FeatureExtractor, TauElectronVetoVariables, CP::IsolationSelectionTool, WeightsAgregator, EL::UnitTestTool, FlavorTagDiscriminants::TrackClassifier, JetLArHVTool, ZDC::ZdcTrigValidTool, IDTPM::TrackTruthMatchingTool, HI::HIPileupTool, InDet::InDetTrackTruthOriginTool, JetHelper::VarTool, FlavorTagDiscriminants::DL2Tool, BTaggingSelectionTool, EnergyCorrelatorGeneralizedRatiosTool, EnergyCorrelatorGeneralizedTool, EnergyCorrelatorRatiosTool, EnergyCorrelatorTool, TauEleOverlapChecker, TauJetRNNEvaluator, asg::UnitTestTool2, JetTruthLabelingTool, ZDC::ZdcRecTool, HIJetConstituentModifierTool, TauCalibrateLC, TauGNNEvaluator, TauPi0ScoreCalculator, TauRecToolBase, Trig::TrigEgammaEmulationPrecisionElectronHypoTool, asg::UnitTestTool1A, PDFWeight, HIEventShapeJetIteration, HIJetSignificanceTool, CP::JetQGTaggerBDT, JetWidthTool, TauVertexVariables, Trig::TrigEgammaEmulationPrecisionPhotonHypoTool, Trig::TrigEgammaMatchingTool, Trig::R3IParticleRetrievalTool, IDTPM::TruthTrackQualitySelectionTool, JetPileupLabelingTool, JetFromPseudojet, JetTruthParticleSelectorTool, Trig::TrigEgammaEmulationBaseHypoTool, CP::ApplyE2YFakeRate, ParticleScaleFactorTool, InDet::InDetTrackSystematicsTool, JetCaloQualityToolFE, Trig::MatchingTool, Trig::R3MatchingTool, IDTPM::OfflineTrackQualitySelectionTool, JetParticleAssociation, Trig::TrigEgammaEmulationChain, Trig::TrigEgammaEmulationFastCaloHypoTool, AthOnnx::OnnxRuntimeInferenceTool, xAODtoHepMCTool, HIEventShapeMapTool, HI::HIVertexSelectionTool, JetHelper::HistoInput2D, TauVertexedClusterDecorator, Trig::IParticleRetrievalTool, CP::AsymptMatrixTool, HI::HIEventSelectionTool, FlavorTagDiscriminants::HbbTagTool, JetConstituentFrac, JetGroomMRatio, JetHelper::HistoInput1D, JetHelper::TextInputMCJES, ExtendTrackToLayerTool, Trig::TypedScoringTool, TrackTruthSelectionTool, HIUEModulatorTool, JSSWTopTaggerANN, CP::JvtEfficiencyToolBase, JetEMScaleMomTool, MvaTESVariableDecorator, TauAODLeptonRemovalTool, TauCombinedTES, ParticleJetDeltaRLabelTool, HIEventShapeSummaryTool, FlavorTagDiscriminants::BTagAugmenterTool, FlavorTagDiscriminants::VRJetOverlapDecoratorTool, JetCaloEnergies, ParticleJetGhostLabelTool, FlavorTagDiscriminants::BTagMuonAugmenterTool, MBTSTimeFilterTool, JSSWTopTaggerDNN, SmoothedTopTagger, MvaTESEvaluator, CP::IsolationLowPtPLVTool, Trig::DRScoringTool, Trig::EgammaDRScoringTool, SmoothedWZTagger, CP::FJvtEfficiencyTool, CP::JvtSelectionToolBase, CP::NNJvtSelectionTool, AthAsgExUnittestTool, CP::JvtSelectionTool, BTaggingSelectionJsonTool, CP::FJvtSelectionTool, CP::JvtEfficiencyTool, CP::NNJvtEfficiencyTool, BookkeeperDumperTool, TrigFastCalibWithRings, top::ScaleFactorRetriever, BTaggingEfficiencyTool, BTaggingTruthTaggingTool, MissingCellListTool, JetVoronoiDiagramHelpers::Diagram, FastJetInterfaceTool, met::METSystematicsTool, Trig::TrigEgammaEmulationToolMT, JetAttributeRatioSelector, top::GhostTrackSystematicsMaker, top::TopObjectSelection, BTaggingEigenVectorRecompositionTool, LVL1::TrigT1CaloLWHistogramToolV1, LVL1::TrigT1CaloLWHistogramTool, Trig::TrigDecisionTool, CP::PhotonPointingTool, met::METRecoTool, CP::PhotonVertexSelectionTool, top::KLFitterTool, ZdcByteStreamReadV1V2Tool, CP::PileupReweightingTool, top::JetObjectCollectionMaker, LVL1::L1CaloxAODOfflineTriggerTowerTools, RCJet, LVL1::TrigT1CaloMonErrorToolV1, met::METTrackFilterTool, LVL1::TrigT1CaloMonErrorTool, SoftKillerWeightTool, EventDensityTool, met::METSignificance, ParticleLevelRCJetObjectLoader, JetUncertaintiesTool, top::TopToolStore, CP::JetTileCorrectionTool, xAODMaker::TriggerMenuMetaDataTool, D3PD::D3PDMCTruthClassifier, top::ElectronInJetSubtractionCollectionMaker, top::MuonObjectCollectionMaker, JetConstituentModSequence, top::EgammaObjectCollectionMaker, HistoGroupBase, AsgPhotonIsEMSelector, JetAttributeSelector, top::ObjectCollectionMaker, TrackVertexAssociationTool, met::METRefinerTool, TauAnalysisTools::CommonSmearingTool, top::GlobalLeptonTriggerCalculator, top::ScaleFactorCalculator, top::TrackSystematicsMaker, top::ElectronScaleFactorCalculator, top::JetScaleFactorCalculator, top::MuonScaleFactorCalculator, PanTau::Tool_DetailsArranger, LVL1::L1CaloMonitoringCaloTool, top::EventSaverxAOD, LVL1::L1CaloTTIdTools, top::SoftMuonObjectCollectionMaker, top::TauObjectCollectionMaker, JetInputElRemovalTool, TauAnalysisTools::CommonEfficiencyTool, top::BTagScaleFactorCalculator, top::MissingETObjectCollectionMaker, PanTau::PanTauProcessor, xAODMaker::TruthMetaDataTool, top::PDFScaleFactorCalculator, top::PhotonScaleFactorCalculator, top::PseudoTopReco, EventShapeCopier, met::METJetTool, GoodRunsListSelectionTool, top::EventSaverxAODNext, top::FwdElectronScaleFactorCalculator, FSR::FsrPhotonTool, Trig::StaticBunchCrossingTool, ZMassConstraint::ConstraintFit, TauAnalysisTools::TauEfficiencyCorrectionsTool, PanTau::Tool_DecayModeDeterminator, PanTau::Tool_ModeDiscriminator, CP::ElectronLRTOverlapRemovalTool, HIClusterSubtraction, JetAttributeHisto, JetPseudojetCopier, met::METEgammaAssociator, Trig::xAODBunchCrossingTool, TauAnalysisTools::DiTauEfficiencyCorrectionsTool, TauAnalysisTools::DiTauTruthMatchingTool, TauAnalysisTools::TauSmearingTool, top::JetMETCPTools, met::METTruthAssociator, PanTau::Tool_InformationStore, HistoDefinitionTool, PanTau::Tool_InputConverter, JetBottomUpSoftDrop, JetRecursiveSoftDrop, PMGTools::PMGCrossSectionTool, JetSoftDrop, TrigEgammaMatchingToolMT, DiTauMassTools::MissingMassToolV2, top::TauScaleFactorCalculator, top::TriggerCPTools, JetConstituentsRetriever, VoronoiWeightTool, top::GhostTrackCPTools, JetCaloCellQualityTool, JetContainerHistoFiller, ChargedHadronSubtractionTool, JetTrackSelectionTool, met::METRegionsTool, met::METSoftAssociator, PanTau::Tool_TauConstituentGetter, top::EventCleaningSelection, ConstituentSubtractorTool, top::EgammaCPTools, top::OtherCPTools, top::TopEventMaker, JetHistoBase, JetSelectorAttributeRunII, JetSplitter, CaloClusterConstituentsOrigin, JetTrackSelectionTool2, SimpleJetTrackSelectionTool, CP::MuonLRTOverlapRemovalTool, top::FlavorTaggingCPTools, top::TauCPTools, HistosForJetSelection, JetPruner, JetToolRunner, JetUsedInFitTrackDecoratorTool, top::TrackCPTools, JetTrimmer, NSubjettinessRatiosTool, CP::MuonEfficiencyScaleFactors, top::PileupScaleFactorCalculator, top::MuonCPTools, JetConstitFourMomTool, NSubjettinessTool, ZdcDataAccessV2, JetPseudojetRetriever, LVL1BS::TrigT1CaloDataAccessV2, PanTau::Tool_TauConstituentSelector, CopyTruthParticles, top::IsolationCPTools, top::OverlapRemovalCPTools, ClusterAtEMScaleTool, CP::IsolationHelper, top::BoostedTaggingCPTools, AsgDeadHVCellRemovalTool, ConstitTimeCutTool, Analysis::JetConeLabeling, JetSelectorAttribute, HIJetUEMonitoring, HIEfficiencyResponseHistos, JetSubStructureMomentToolsBase, AsgHelloTool, CopyTruthJetParticles, LeadingJetsRelations, EfficiencyResponseHistos, and JetEventSelector.

Definition at line 133 of file AsgTool.h.

133 { return StatusCode::SUCCESS; }

◆ inOverlap()

StatusCode VGammaORTool::inOverlap ( bool &  result,
const std::vector< TLorentzVector > *  leptons = 0,
const std::vector< TLorentzVector > *  photons = 0,
const std::vector< int > *  lepton_origins = 0,
const std::vector< int > *  photon_origins = 0 
) const
overridevirtual

Determine whether current event is in overlap region (set via reference).

The overlap region is defined by dR_lepton_photon_cut, photon_pT_cut and many more configurable parameters. Note that the function returns a status code. The first agument is the result, the remaining arguments are optional:

  • If null pointers are given for leptons or photons, they will be taken from the event
  • One can override this behaviour by manually specifying vectors of lepton/photon
  • If lepton or photon origins are given in addition to the lepton four vectors, particles from irrelevant origins (e.g. decays) are filtered out This can be useful when working with derivations which store the origin but not the full truth record

Implements IVGammaORTool.

Definition at line 51 of file VGammaORTool.cxx.

55  {
56  std::vector<float> photon_pts;
57  ANA_CHECK(photonPtsOutsideDr(photon_pts,leptons,photons,lepton_origins,photon_origins));
58  result = checkPhotonPts(photon_pts);
59  return StatusCode::SUCCESS;
60 }

◆ 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.

◆ isFromTau()

bool VGammaORTool::isFromTau ( const xAOD::TruthParticle lepton,
int  nRecursions = 0 
) const
private

Definition at line 332 of file VGammaORTool.cxx.

332  {
333  // avoid being stuck in some weird particle family tree
334  if(nRecursions>20){
335  return false;
336  }
337  for(uint i=0; i<lepton.nParents(); i++){
338  const xAOD::TruthParticle* parent=lepton.parent(i);
339  if(abs(parent->pdgId())==15){
340  return true;
341  }
342  if(parent->pdgId()==lepton.pdgId()){
343  return isFromTau(lepton, nRecursions+1);
344  }
345  }
346  return false;
347 
348 }

◆ 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.

◆ photonPtsOutsideDr()

StatusCode VGammaORTool::photonPtsOutsideDr ( std::vector< float > &  result,
const std::vector< TLorentzVector > *  leptons = 0,
const std::vector< TLorentzVector > *  photons = 0,
const std::vector< int > *  lepton_origins = 0,
const std::vector< int > *  photon_origins = 0 
) const
overridevirtual

Determine the pTs of photons outside the dR cut that is configured in tool initialization (dR_lepton_photon_cut).

Calculates a vector of photon pts, ordered by descending pt. Once these values are calculated they can be stored and used to easily perform OR with arbitrary pT. Note that the function returns a status code. The first agument is the result, the remaining arguments are optional

  • If null pointers are given for leptons or photons, they will be taken from the event
  • One can override this behaviour by manually specifying vectors of lepton/photon
  • If lepton or photon origins are given in addition to the lepton four vectors, particles from irrelevant origins (e.g. decays) are filtered out This can be useful when working with derivations which store the origin but not the full truth record

Implements IVGammaORTool.

Definition at line 65 of file VGammaORTool.cxx.

69  {
70  std::map<float, std::vector<float> > photon_pt_map;
71  ANA_CHECK(photonPtsOutsideDrs(photon_pt_map,std::vector<float>(1, m_dR_lepton_photon_cut),leptons,photons,lepton_origins,photon_origins));
72  result = photon_pt_map[m_dR_lepton_photon_cut];
73  return StatusCode::SUCCESS;
74 }

◆ photonPtsOutsideDrs() [1/2]

StatusCode VGammaORTool::photonPtsOutsideDrs ( std::map< float, std::vector< float > > &  result,
const std::vector< float > &  drCuts,
const std::vector< TLorentzVector > *  leptons = 0,
const std::vector< TLorentzVector > *  photons = 0,
const std::vector< int > *  lepton_origins = 0,
const std::vector< int > *  photon_origins = 0 
) const
private

Definition at line 92 of file VGammaORTool.cxx.

97  {
98 
99  std::vector<TLorentzVector> good_leptons;
100  std::vector<TLorentzVector> good_photons;
101  ANA_CHECK(setInput(good_leptons,good_photons,leptons,photons,lepton_origins,photon_origins));
102 
103  // the actual OR algorithm is here, pts of photon outside dRs are determined first
104  for (const auto& drCut : drCuts) {
105  result[drCut] = std::vector<float>();
106  for (const auto& photon : good_photons) {
107  bool tooCloseToLepton = false;
108  for (uint i_lep = 0; i_lep < good_leptons.size() && (m_n_leptons<0 || int(i_lep) < m_n_leptons); i_lep++) {
109  const float dr = photon.DeltaR(good_leptons[i_lep]);
110  if (dr < drCut) {
111  tooCloseToLepton = true;
112  break;
113  }
114  }
115  if (!tooCloseToLepton) {
116  result[drCut].push_back(photon.Pt());
117  }
118  }
119  // photon pts are sorted and returned
120  sort(result[drCut].begin(), result[drCut].end(), std::greater<float>());
121  }
122 
123  return StatusCode::SUCCESS;
124 }

◆ photonPtsOutsideDrs() [2/2]

StatusCode VGammaORTool::photonPtsOutsideDrs ( std::map< float, std::vector< float > > &  result,
const std::vector< TLorentzVector > *  leptons = 0,
const std::vector< TLorentzVector > *  photons = 0,
const std::vector< int > *  lepton_origins = 0,
const std::vector< int > *  photon_origins = 0 
) const
overridevirtual

Determine the pTs of photons outside of several dR cuts that are configured in tool initialization (dR_lepton_photon_cuts).

Calculates a mapping between dRs and vector of photon pts (ordered by descending pt). Once these values are calculated they can be stored and used to easily perform OR with arbitrary pT and multiple dR cuts. Note that the function returns a status code. The first agument is the result, the remaining arguments are optional

  • If null pointers are given for leptons or photons, they will be taken from the event
  • One can override this behaviour by manually specifying vectors of lepton/photon
  • If lepton or photon origins are given in addition to the lepton four vectors, particles from irrelevant origins (e.g. decays) are filtered out This can be useful when working with derivations which store the origin but not the full truth record

Implements IVGammaORTool.

Definition at line 79 of file VGammaORTool.cxx.

83  {
84  ANA_CHECK(photonPtsOutsideDrs(result,m_dR_lepton_photon_cuts,leptons,photons,lepton_origins,photon_origins));
85  return StatusCode::SUCCESS;
86 }

◆ 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  }

◆ setInput()

StatusCode VGammaORTool::setInput ( std::vector< TLorentzVector > &  leptons_out,
std::vector< TLorentzVector > &  photons_out,
const std::vector< TLorentzVector > *  lepton_p4s,
const std::vector< TLorentzVector > *  photon_p4s,
const std::vector< int > *  lepton_origins,
const std::vector< int > *  photon_origins 
) const
private

Definition at line 128 of file VGammaORTool.cxx.

133  {
134 
135  // truth particles are retrieved from event if not given by user
136 
137  const xAOD::TruthParticleContainer* truthLeptons(nullptr);
138  const xAOD::TruthParticleContainer* truthPhotons(nullptr);
139  if(lepton_p4s==0 || photon_p4s==0){
140  ANA_CHECK(evtStore()->retrieve(truthLeptons, "BornLeptons"));
141  ANA_CHECK(evtStore()->retrieve(truthPhotons, "TruthPhotons"));
142  }
143 
144  // relevant photons and leptons identified
145  if(lepton_p4s==0){
146  leptons_out = getLeptonP4s(*truthLeptons);
147  }
148  else{
149  if(lepton_origins!=0){
150  leptons_out = filterLeptonOrigins(*lepton_p4s,*lepton_origins);
151  }
152  else{
153  leptons_out = *lepton_p4s;
154  }
155  }
156  if(photon_p4s==0){
157  photons_out = getPhotonP4s(*truthPhotons);
158  }
159  else{
160  if(photon_origins!=0){
161  photons_out = filterPhotonOrigins(*photon_p4s,*photon_origins);
162  }
163  else{
164  photons_out = *photon_p4s;
165  }
166  }
167 
168  ATH_MSG_DEBUG("VGammaORTool::setInput" << ": Found " << photons_out.size() << " photons.");
169  ATH_MSG_DEBUG("VGammaORTool::setInput" << ": Found " << leptons_out.size() << " leptons.");
170 
171  if (m_n_leptons >=0 && int(leptons_out.size()) < m_n_leptons) {
173  "VGammaORTool::setInput" << ": Found " << leptons_out.size() << " leptons but expected " << m_n_leptons << ".");
174  }
175 
176  return StatusCode::SUCCESS;
177 }

◆ 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_abs_pdgids_excluded_from_iso

std::vector<int> VGammaORTool::m_abs_pdgids_excluded_from_iso
private

Definition at line 193 of file VGammaORTool.h.

◆ 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_dR_lepton_photon_cut

float VGammaORTool::m_dR_lepton_photon_cut
private

Definition at line 180 of file VGammaORTool.h.

◆ m_dR_lepton_photon_cuts

std::vector<float> VGammaORTool::m_dR_lepton_photon_cuts
private

Definition at line 182 of file VGammaORTool.h.

◆ 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_frixione_dR

float VGammaORTool::m_frixione_dR
private

Definition at line 187 of file VGammaORTool.h.

◆ m_frixione_epsilon

float VGammaORTool::m_frixione_epsilon
private

Definition at line 191 of file VGammaORTool.h.

◆ m_frixione_exponent

float VGammaORTool::m_frixione_exponent
private

Definition at line 189 of file VGammaORTool.h.

◆ m_lepton_pdgIds

std::vector<int> VGammaORTool::m_lepton_pdgIds
private

Definition at line 161 of file VGammaORTool.h.

◆ m_lepton_veto_origins

std::vector<int> VGammaORTool::m_lepton_veto_origins
private

Definition at line 169 of file VGammaORTool.h.

◆ m_min_considered_photon_pT

float VGammaORTool::m_min_considered_photon_pT
private

Definition at line 196 of file VGammaORTool.h.

◆ m_n_leptons

int VGammaORTool::m_n_leptons
private

Definition at line 158 of file VGammaORTool.h.

◆ m_photon_pT_cuts

std::vector<float> VGammaORTool::m_photon_pT_cuts
private

Definition at line 178 of file VGammaORTool.h.

◆ m_preferred_lepton_origins

std::vector<int> VGammaORTool::m_preferred_lepton_origins
private

Definition at line 166 of file VGammaORTool.h.

◆ m_truthClassifier

asg::AnaToolHandle<MCTruthClassifier> VGammaORTool::m_truthClassifier
private

Definition at line 150 of file VGammaORTool.h.

◆ m_truthparticle_collection_name

std::string VGammaORTool::m_truthparticle_collection_name
private

Definition at line 199 of file VGammaORTool.h.

◆ m_use_gamma_iso

bool VGammaORTool::m_use_gamma_iso
private

Definition at line 185 of file VGammaORTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_veto_photon_origins

std::vector<int> VGammaORTool::m_veto_photon_origins
private

Definition at line 175 of file VGammaORTool.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:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
VGammaORTool::filterLeptonOrigins
std::vector< TLorentzVector > filterLeptonOrigins(const std::vector< TLorentzVector > &, const std::vector< int > &) const
Definition: VGammaORTool.cxx:204
xAOD::TruthParticle_v1::parent
const TruthParticle_v1 * parent(size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
Definition: TruthParticle_v1.cxx:131
VGammaORTool::m_photon_pT_cuts
std::vector< float > m_photon_pT_cuts
Definition: VGammaORTool.h:178
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
get_generator_info.result
result
Definition: get_generator_info.py:21
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
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
VGammaORTool::checkPhotonPts
bool checkPhotonPts(const std::vector< float > &photon_pts) const
Definition: VGammaORTool.cxx:350
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
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
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
SG::ConstAccessor< unsigned int >
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
VGammaORTool::photonPtsOutsideDrs
virtual StatusCode photonPtsOutsideDrs(std::map< float, std::vector< float > > &result, const std::vector< TLorentzVector > *leptons=0, const std::vector< TLorentzVector > *photons=0, const std::vector< int > *lepton_origins=0, const std::vector< int > *photon_origins=0) const override
Determine the pTs of photons outside of several dR cuts that are configured in tool initialization (d...
Definition: VGammaORTool.cxx:79
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
VGammaORTool::m_frixione_dR
float m_frixione_dR
Definition: VGammaORTool.h:187
VGammaORTool::m_dR_lepton_photon_cuts
std::vector< float > m_dR_lepton_photon_cuts
Definition: VGammaORTool.h:182
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:554
VGammaORTool::m_veto_photon_origins
std::vector< int > m_veto_photon_origins
Definition: VGammaORTool.h:175
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
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
VGammaORTool::getPhotonP4s
std::vector< TLorentzVector > getPhotonP4s(const xAOD::TruthParticleContainer &truthParticleContainer) const
Get final state photons from truthParticleContainer A minimum pT cut and isolation is applied accordi...
Definition: VGammaORTool.cxx:309
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
xAOD::TruthParticle_v1::nParents
size_t nParents() const
Number of parents of this particle.
Definition: TruthParticle_v1.cxx:122
VGammaORTool::m_frixione_epsilon
float m_frixione_epsilon
Definition: VGammaORTool.h:191
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
VGammaORTool::m_lepton_veto_origins
std::vector< int > m_lepton_veto_origins
Definition: VGammaORTool.h:169
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
HepMC::is_simulation_particle
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
Definition: MagicNumbers.h:299
lumiFormat.i
int i
Definition: lumiFormat.py:92
VGammaORTool::photonPtsOutsideDr
virtual StatusCode photonPtsOutsideDr(std::vector< float > &result, const std::vector< TLorentzVector > *leptons=0, const std::vector< TLorentzVector > *photons=0, const std::vector< int > *lepton_origins=0, const std::vector< int > *photon_origins=0) const override
Determine the pTs of photons outside the dR cut that is configured in tool initialization (dR_lepton_...
Definition: VGammaORTool.cxx:65
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
VGammaORTool::m_use_gamma_iso
bool m_use_gamma_iso
Definition: VGammaORTool.h:185
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:113
test_pyathena.parent
parent
Definition: test_pyathena.py:15
python.xAODType.dummy
dummy
Definition: xAODType.py:4
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
VGammaORTool::m_truthClassifier
asg::AnaToolHandle< MCTruthClassifier > m_truthClassifier
Definition: VGammaORTool.h:150
VGammaORTool::isFromTau
bool isFromTau(const xAOD::TruthParticle &lepton, int nRecursions=0) const
Definition: VGammaORTool.cxx:332
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
VGammaORTool::frixioneFunc
float frixioneFunc(float dR, float dR0, float exponent, float epsilon) const
Definition: VGammaORTool.cxx:412
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
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
VGammaORTool::getLeptonP4s
std::vector< TLorentzVector > getLeptonP4s(const xAOD::TruthParticleContainer &truthParticleContainer) const
Get final state leptons from truthParticleContainer Filter function is applied, only leptons from rel...
Definition: VGammaORTool.cxx:249
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
VGammaORTool::setInput
StatusCode setInput(std::vector< TLorentzVector > &leptons_out, std::vector< TLorentzVector > &photons_out, const std::vector< TLorentzVector > *lepton_p4s, const std::vector< TLorentzVector > *photon_p4s, const std::vector< int > *lepton_origins, const std::vector< int > *photon_origins) const
Definition: VGammaORTool.cxx:128
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
VGammaORTool::m_abs_pdgids_excluded_from_iso
std::vector< int > m_abs_pdgids_excluded_from_iso
Definition: VGammaORTool.h:193
VGammaORTool::filterPhotonOrigins
std::vector< TLorentzVector > filterPhotonOrigins(const std::vector< TLorentzVector > &, const std::vector< int > &) const
Definition: VGammaORTool.cxx:181
MC::isStable
bool isStable(const T &p)
Definition: HepMCHelpers.h:30
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:199
a
TList * a
Definition: liststreamerinfos.cxx:10
h
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
VGammaORTool::m_truthparticle_collection_name
std::string m_truthparticle_collection_name
Definition: VGammaORTool.h:199
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
VGammaORTool::frixioneIsolated
virtual bool frixioneIsolated(const xAOD::TruthParticle &photon, const xAOD::TruthParticleContainer &truthParticles, float dR0, float exponent, float epsilon) const override
Function determining whether a photon is frixione isolated from truthParticles Parameters as defined ...
Definition: VGammaORTool.cxx:367
VGammaORTool::m_n_leptons
int m_n_leptons
Definition: VGammaORTool.h:158
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
SG::DataProxy
Definition: DataProxy.h:44
VGammaORTool::m_dR_lepton_photon_cut
float m_dR_lepton_photon_cut
Definition: VGammaORTool.h:180
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
VGammaORTool::m_lepton_pdgIds
std::vector< int > m_lepton_pdgIds
Definition: VGammaORTool.h:161
VGammaORTool::m_frixione_exponent
float m_frixione_exponent
Definition: VGammaORTool.h:189
fitman.k
k
Definition: fitman.py:528
VGammaORTool::m_min_considered_photon_pT
float m_min_considered_photon_pT
Definition: VGammaORTool.h:196
VGammaORTool::m_preferred_lepton_origins
std::vector< int > m_preferred_lepton_origins
Definition: VGammaORTool.h:166