ATLAS Offline Software
VGammaORTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 VGammaORTool::VGammaORTool(const std::string& name)
9  : asg::AsgTool(name),
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, 42});
19 
20  declareProperty("photon_pT_cuts", m_photon_pT_cuts = {});
21  declareProperty("dR_lepton_photon_cut", m_dR_lepton_photon_cut = 0.1);
22  declareProperty("dR_lepton_photon_cuts", m_dR_lepton_photon_cuts = {0.0, 0.05, 0.075, 0.1, 0.125, 0.15, 0.2});
23 
24  declareProperty("use_gamma_iso", m_use_gamma_iso = false);
25  declareProperty("frixione_dR", m_frixione_dR = 0.1);
26  declareProperty("frixione_exponent", m_frixione_exponent = 2);
27  declareProperty("frixione_epsilon", m_frixione_epsilon = 0.1);
28  declareProperty("abs_pdgids_excluded_from_iso", m_abs_pdgids_excluded_from_iso = {11, 12, 13, 14, 15, 16, 22});
29  declareProperty("min_considered_photon_pT", m_min_considered_photon_pT = 3.e3);
30 
31  declareProperty("truthparticle_collection_name", m_truthparticle_collection_name = "TruthParticles");
32 
33  for (int origin : m_preferred_lepton_origins) {
34  if (std::find(m_lepton_veto_origins.begin(), m_lepton_veto_origins.end(), origin) != m_lepton_veto_origins.end()) {
35  ATH_MSG_ERROR(origin << " in both lepton origin and lepton veto origin, this is not correct.");
36  break;
37  }
38  }
39  // pT cuts are sorted in descending order
40  std::sort(m_photon_pT_cuts.begin(), m_photon_pT_cuts.end(), std::greater<float>());
41 }
42 
44 }
45 
46 
47 //============================================================================
48 // PUBLIC IN OVERLAP FUNCTION
49 // See header for description
51  const std::vector<TLorentzVector>* leptons,
52  const std::vector<TLorentzVector>* photons,
53  const std::vector<int>* lepton_origins,
54  const std::vector<int>* photon_origins) const {
55  std::vector<float> photon_pts;
56  ANA_CHECK(photonPtsOutsideDr(photon_pts,leptons,photons,lepton_origins,photon_origins));
57  result = checkPhotonPts(photon_pts);
58  return StatusCode::SUCCESS;
59 }
60 
61 //============================================================================
62 // PUBLIC PTS OUTSIDE DR FUNCTION
63 // See header for description
65  const std::vector<TLorentzVector>* leptons,
66  const std::vector<TLorentzVector>* photons,
67  const std::vector<int>* lepton_origins,
68  const std::vector<int>* photon_origins) const {
69  std::map<float, std::vector<float> > photon_pt_map;
70  ANA_CHECK(photonPtsOutsideDrs(photon_pt_map,std::vector<float>(1, m_dR_lepton_photon_cut),leptons,photons,lepton_origins,photon_origins));
71  result = photon_pt_map[m_dR_lepton_photon_cut];
72  return StatusCode::SUCCESS;
73 }
74 
75 //============================================================================
76 // PUBLIC PTS OUTSIDE DR*S* FUNCTION
77 // See header for description
78 StatusCode VGammaORTool::photonPtsOutsideDrs(std::map<float, std::vector<float> >& result,
79  const std::vector<TLorentzVector>* leptons,
80  const std::vector<TLorentzVector>* photons,
81  const std::vector<int>* lepton_origins,
82  const std::vector<int>* photon_origins) const {
83  ANA_CHECK(photonPtsOutsideDrs(result,m_dR_lepton_photon_cuts,leptons,photons,lepton_origins,photon_origins));
84  return StatusCode::SUCCESS;
85 }
86 
87 
88 //============================================================================
89 // PRIVATE PTS OUTSIDE DRS FUNCTION
90 // This function exectutes the OR algorithm if one of the public funtions is called
91 StatusCode VGammaORTool::photonPtsOutsideDrs(std::map<float, std::vector<float> >& result,
92  const std::vector<float>& drCuts,
93  const std::vector<TLorentzVector>* leptons,
94  const std::vector<TLorentzVector>* photons,
95  const std::vector<int>* lepton_origins,
96  const std::vector<int>* photon_origins) const {
97 
98  std::vector<TLorentzVector> good_leptons;
99  std::vector<TLorentzVector> good_photons;
100  ANA_CHECK(setInput(good_leptons,good_photons,leptons,photons,lepton_origins,photon_origins));
101 
102  // the actual OR algorithm is here, pts of photon outside dRs are determined first
103  for (const auto& drCut : drCuts) {
104  result[drCut] = std::vector<float>();
105  for (const auto& photon : good_photons) {
106  bool tooCloseToLepton = false;
107  for (uint i_lep = 0; i_lep < good_leptons.size() && (m_n_leptons<0 || int(i_lep) < m_n_leptons); i_lep++) {
108  const float dr = photon.DeltaR(good_leptons[i_lep]);
109  if (dr < drCut) {
110  tooCloseToLepton = true;
111  break;
112  }
113  }
114  if (!tooCloseToLepton) result[drCut].push_back(photon.Pt());
115  }
116  // photon pts are sorted and returned
117  std::sort(result[drCut].begin(), result[drCut].end(), std::greater<float>());
118  }
119 
120  return StatusCode::SUCCESS;
121 }
122 
123 //============================================================================
124 // find the right leptons, get them either from user or the current event
125 StatusCode VGammaORTool::setInput(std::vector<TLorentzVector>& leptons_out,
126  std::vector<TLorentzVector>& photons_out,
127  const std::vector<TLorentzVector>* lepton_p4s,
128  const std::vector<TLorentzVector>* photon_p4s,
129  const std::vector<int>* lepton_origins,
130  const std::vector<int>* photon_origins) const {
131 
132  // truth particles are retrieved from event if not given by user
133 
134  const xAOD::TruthParticleContainer* truthLeptons(nullptr);
135  const xAOD::TruthParticleContainer* truthPhotons(nullptr);
136  if(lepton_p4s==0 || photon_p4s==0){
137  ANA_CHECK(evtStore()->retrieve(truthLeptons, "BornLeptons"));
138  ANA_CHECK(evtStore()->retrieve(truthPhotons, "TruthPhotons"));
139  }
140 
141  // relevant photons and leptons identified
142  if(lepton_p4s==0){
143  leptons_out = getLeptonP4s(*truthLeptons);
144  }
145  else{
146  if(lepton_origins!=0){
147  leptons_out = filterLeptonOrigins(*lepton_p4s,*lepton_origins);
148  }
149  else{
150  leptons_out = *lepton_p4s;
151  }
152  }
153  if(photon_p4s==0){
154  photons_out = getPhotonP4s(*truthPhotons);
155  }
156  else{
157  if(photon_origins!=0){
158  photons_out = filterPhotonOrigins(*photon_p4s,*photon_origins);
159  }
160  else{
161  photons_out = *photon_p4s;
162  }
163  }
164 
165  ATH_MSG_DEBUG("VGammaORTool::setInput" << ": Found " << photons_out.size() << " photons.");
166  ATH_MSG_DEBUG("VGammaORTool::setInput" << ": Found " << leptons_out.size() << " leptons.");
167 
168  if (m_n_leptons >=0 && int(leptons_out.size()) < m_n_leptons) {
170  "VGammaORTool::setInput" << ": Found " << leptons_out.size() << " leptons but expected " << m_n_leptons << ".");
171  }
172 
173  return StatusCode::SUCCESS;
174 }
175 
176 //============================================================================
177 // Functions to filter out particles from wrong origins
178 std::vector<TLorentzVector> VGammaORTool::filterPhotonOrigins(const std::vector<TLorentzVector>& photon_candidates,
179  const std::vector<int>& photon_origins) const {
180  // this should only happen if the user gives the wrong input
181  if (photon_candidates.size() != photon_origins.size()) {
183  "VGammaORTool::filterPhotonOrigins" << ": size of photon candidates (" << photon_candidates.size() << ") different from number of photon origins (" << photon_origins.size() <<
184  ").");
185  }
186  // filter out vetoed photons
187  std::vector<TLorentzVector> photon_p4s;
188  for (uint i = 0; i < photon_candidates.size(); i++) {
189  const TLorentzVector p4 = photon_candidates[i];
190  const int p_origin = photon_origins[i];
191  const bool vetoed =
193  if (!vetoed) {
194  photon_p4s.push_back(p4);
195  }
196  }
197 
198  return photon_p4s;
199 }
200 
201 std::vector<TLorentzVector> VGammaORTool::filterLeptonOrigins(const std::vector<TLorentzVector>& lepton_candidates,
202  const std::vector<int>& lepton_origins) const {
203  // this should only happen if the user gives the wrong input
204  if (lepton_candidates.size() != lepton_origins.size()) {
206  "VGammaORTool::filterLeptonOrigins" << ": size of lepton candidates (" << lepton_candidates.size() << ") different from number of lepton origins (" << lepton_origins.size() <<
207  ").");
208  }
209  std::vector<TLorentzVector> lepton_p4s;
210  std::vector<TLorentzVector> leptons_not_vetoed_p4s;
211  // find both good photons and photons that are just not vetoed (lower quality, used as fall back)
212  for (uint i = 0; i < lepton_candidates.size(); i++) {
213  const TLorentzVector p4 = lepton_candidates[i];
214  const int p_origin = lepton_origins[i];
215  const bool use = std::find(m_preferred_lepton_origins.begin(), m_preferred_lepton_origins.end(), p_origin) != m_preferred_lepton_origins.end();
216  if (use) {
217  lepton_p4s.push_back(p4);
218  if (m_n_leptons>=0 && int(lepton_p4s.size()) >= m_n_leptons) {
219  // as soon as enough leptons are found, return them
220  // this is why the order of lepton candidates matters
221  // if this tool identifies the leptons, taus will be before mu/el and otherwise leptons are ordered by pT
222  // in most cases the origin should unambiguosly identify the lepton anyway
223  return lepton_p4s;
224  }
225  } else {
226  bool vetoed =
228  if (!vetoed) {
229  leptons_not_vetoed_p4s.push_back(p4);
230  }
231  }
232  }
233  // if not enough good leptons were found (or no expected number of leptons was set),
234  // the result is filled with leptons that were merely not vetoed
235  for (const auto& l : leptons_not_vetoed_p4s) {
236  lepton_p4s.push_back(l);
237  if (m_n_leptons>=0 && int(lepton_p4s.size()) >= m_n_leptons) break;
238  }
239  return lepton_p4s;
240 }
241 
242 //============================================================================
243 // Get the right leptons and photons from the event
244 std::vector<TLorentzVector> VGammaORTool::getLeptonP4s(const xAOD::TruthParticleContainer& truthParticles) const {
245  std::vector<const xAOD::TruthParticle*> tau_candidates;
246  std::vector<const xAOD::TruthParticle*> elmu_candidates;
247  for (const auto *p : truthParticles) {
248  // ignore all particles created in Geant4
249  if (HepMC::is_simulation_particle(p)) continue;
250  // ignore all particles with the wrong pdgid
251  if (std::find(m_lepton_pdgIds.begin(), m_lepton_pdgIds.end(), p->pdgId()) == m_lepton_pdgIds.end()) continue;
252  // handle taus: use tau instances before decay into non-tau
253  if (MC::isTau(p)) {
254  bool childIsTau = false;
255  bool hasChildren = false;
256  // make sure tau has no tau children, i.e. is tau before decay
257  for (uint i = 0; i < p->nChildren(); i++) {
258  if (p->child(i) == nullptr) continue;
259  if (HepMC::is_same_particle(p->child(i),p)) continue;
260  hasChildren = true;
261  if (p->child(i)->pdgId() == p->pdgId()) {
262  childIsTau = true;
263  break;
264  }
265  }
266  if (hasChildren && !childIsTau) tau_candidates.push_back(p);
267  }
268  // electron and muons: use all status 1 not from tau
269  else if (MC::isStable(p) && !isFromTau(*p)) {
270  elmu_candidates.push_back(p);
271  }
272  }
273  // sort leptons by pT
274  sort(tau_candidates.begin(), tau_candidates.end(),
275  [](const xAOD::TruthParticle*& p1, const xAOD::TruthParticle*& p2) {
276  return p1->pt() > p2->pt();
277  });
278  sort(elmu_candidates.begin(), elmu_candidates.end(),
279  [](const xAOD::TruthParticle*& p1, const xAOD::TruthParticle*& p2) {
280  return p1->pt() > p2->pt();
281  });
282  // put taus before other leptons in a vector
283  std::vector<const xAOD::TruthParticle*> lepton_candidates(tau_candidates);
284  lepton_candidates.insert(lepton_candidates.end(), elmu_candidates.begin(), elmu_candidates.end());
285  // determine lepton origins
286  std::vector<TLorentzVector> lepton_p4s;
287  std::vector<int> lepton_origins;
288  static const SG::ConstAccessor<unsigned int> classifierParticleOriginAcc("classifierParticleOrigin");
289  for (const auto& p : lepton_candidates) {
290  const unsigned int origin = classifierParticleOriginAcc(*p);
291  lepton_origins.push_back(origin);
292  lepton_p4s.push_back(p->p4());
293  }
294  // filter out bad origins
295  return filterLeptonOrigins(lepton_p4s, lepton_origins);
296 }
297 
298 std::vector<TLorentzVector> VGammaORTool::getPhotonP4s(const xAOD::TruthParticleContainer& truthParticles) const {
299  std::vector<TLorentzVector> photon_p4s;
300  std::vector<int> photon_origins;
301  for (const auto *p : truthParticles) {
302  // consider only final state photons, not from geant, above a lower pt cut
304  // require photons to be isolated if use_gamma_iso is true
306  // determine photon origin
307  static const SG::ConstAccessor<unsigned int> classifierParticleOriginAcc("classifierParticleOrigin");
308  const unsigned int origin = classifierParticleOriginAcc(*p);
309  photon_origins.push_back(origin);
310  photon_p4s.push_back(p->p4());
311  }
312  // filter out bad photons
313  return filterPhotonOrigins(photon_p4s, photon_origins);
314 }
315 
316 bool VGammaORTool::isFromTau(const xAOD::TruthParticle& lepton, int nRecursions) const{
317  // avoid being stuck in some weird particle family tree
318  if(nRecursions>20){
319  return false;
320  }
321  for(uint i=0; i<lepton.nParents(); i++){
322  const xAOD::TruthParticle* parent=lepton.parent(i);
323  if (MC::isTau(parent)) return true;
324  if(parent->pdgId()==lepton.pdgId()){
325  return isFromTau(lepton, nRecursions+1);
326  }
327  }
328  return false;
329 
330 }
331 
332 bool VGammaORTool::checkPhotonPts(const std::vector<float>& photon_pts) const{
333  if(m_photon_pT_cuts.size()==0){
334  ATH_MSG_ERROR("photon_pT_cuts needs to be a non-empty list, when inOverlap is called, set as property or in constructor.");
335  return false;
336  }
337  if(m_photon_pT_cuts.size()>photon_pts.size()){
338  return false;
339  }
340  for(uint i=0; i<m_photon_pT_cuts.size();i++){
341  if(photon_pts[i]<m_photon_pT_cuts[i]){
342  return false;
343  }
344  }
345  return true;
346 }
347 //============================================================================
348 // Functions related to photon isolation
350  const xAOD::TruthParticleContainer& truthParticles, float dR0, float exponent,
351  float epsilon) const {
352  // all photons are isolated if dR is negative
353  if (dR0 <= 0.) {
354  return true;
355  }
356  // create map between hadron-photon dr and hadron pt
357  std::map<float, float> dr_to_pt;
358  for (const auto *p : truthParticles) {
359  if (!MC::isStable(p) || HepMC::is_simulation_particle(p)) continue;
360  // ignore what typically is leptons and photons
362  std::abs(p->pdgId())) != m_abs_pdgids_excluded_from_iso.end()) {
363  continue;
364  }
365  const float dRgamma = photon.p4().DeltaR(p->p4());
366  // consider only photons withon isolation cone dR0
367  if (dRgamma < dR0) {
368  // should two hadrons have the same dr they are added up
369  if (dr_to_pt.count(dRgamma) > 0) {
370  dr_to_pt[dRgamma] += p->pt();
371  }
372  dr_to_pt[dRgamma] = p->pt();
373  }
374  }
375  // use map to determine whether photon is Frixione isolated
376  // map is sorted from low to high dr
377  float sumPt = 0.;
378  for (const auto& pair : dr_to_pt) {
379  sumPt += pair.second;
380  const float dRgamma = pair.first;
381  // if for any dRgamma the sum of pt of hadrons with a distrance of <=dRgamma to photon
382  // does not fulfill the Frixione condition, the photon is not isolated
383  if (sumPt > photon.pt() * frixioneFunc(dRgamma, dR0, exponent, epsilon)) {
384  return false;
385  }
386  }
387  // otherwise the photon is isolated
388  return true;
389 }
390 
391 float VGammaORTool::frixioneFunc(float dR, float dR0, float exponent, float epsilon) const {
392  return epsilon * TMath::Power((1 - TMath::Cos(dR)) / (1 - TMath::Cos(dR0)), exponent);
393 }
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:201
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
VGammaORTool::VGammaORTool
VGammaORTool(const std::string &name)
Definition: VGammaORTool.cxx:8
get_generator_info.result
result
Definition: get_generator_info.py:21
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:332
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
asg
Definition: DataHandleTestTool.h:28
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:78
VGammaORTool::m_frixione_dR
float m_frixione_dR
Definition: VGammaORTool.h:187
HepMC::is_same_particle
bool is_same_particle(const T1 &p1, const T2 &p2)
Method to establish if two particles in the GenEvent actually represent the same particle.
Definition: MagicNumbers.h:354
VGammaORTool::m_dR_lepton_photon_cuts
std::vector< float > m_dR_lepton_photon_cuts
Definition: VGammaORTool.h:182
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
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:298
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
xAOD::TruthParticle_v1::nParents
size_t nParents() const
Number of parents of this particle.
Definition: TruthParticle_v1.cxx:122
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
VGammaORTool::m_frixione_epsilon
float m_frixione_epsilon
Definition: VGammaORTool.h:191
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:342
lumiFormat.i
int i
Definition: lumiFormat.py:85
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:64
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
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:37
VGammaORTool::m_use_gamma_iso
bool m_use_gamma_iso
Definition: VGammaORTool.h:185
test_pyathena.parent
parent
Definition: test_pyathena.py:15
VGammaORTool::isFromTau
bool isFromTau(const xAOD::TruthParticle &lepton, int nRecursions=0) const
Definition: VGammaORTool.cxx:316
VGammaORTool::inOverlap
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).
Definition: VGammaORTool.cxx:50
VGammaORTool::frixioneFunc
float frixioneFunc(float dR, float dR0, float exponent, float epsilon) const
Definition: VGammaORTool.cxx:391
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
isTau
bool isTau(const T &p)
Definition: AtlasPID.h:157
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:244
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:125
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
MagicNumbers.h
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:178
MC::isStable
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
Definition: HepMCHelpers.h:45
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:199
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::EgammaHelpers::isPhoton
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
Definition: EgammaxAODHelpers.cxx:21
VGammaORTool::m_truthparticle_collection_name
std::string m_truthparticle_collection_name
Definition: VGammaORTool.h:199
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:349
VGammaORTool::m_n_leptons
int m_n_leptons
Definition: VGammaORTool.h:158
VGammaORTool.h
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
VGammaORTool::m_dR_lepton_photon_cut
float m_dR_lepton_photon_cut
Definition: VGammaORTool.h:180
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
VGammaORTool::~VGammaORTool
virtual ~VGammaORTool() override
Definition: VGammaORTool.cxx:43
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