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,
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 }
43 
45 }
46 
47 
48 //============================================================================
49 // PUBLIC IN OVERLAP FUNCTION
50 // See header for description
52  const std::vector<TLorentzVector>* leptons,
53  const std::vector<TLorentzVector>* photons,
54  const std::vector<int>* lepton_origins,
55  const std::vector<int>* photon_origins) const {
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 }
61 
62 //============================================================================
63 // PUBLIC PTS OUTSIDE DR FUNCTION
64 // See header for description
66  const std::vector<TLorentzVector>* leptons,
67  const std::vector<TLorentzVector>* photons,
68  const std::vector<int>* lepton_origins,
69  const std::vector<int>* photon_origins) const {
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 }
75 
76 //============================================================================
77 // PUBLIC PTS OUTSIDE DR*S* FUNCTION
78 // See header for description
79 StatusCode VGammaORTool::photonPtsOutsideDrs(std::map<float, std::vector<float> >& result,
80  const std::vector<TLorentzVector>* leptons,
81  const std::vector<TLorentzVector>* photons,
82  const std::vector<int>* lepton_origins,
83  const std::vector<int>* photon_origins) const {
84  ANA_CHECK(photonPtsOutsideDrs(result,m_dR_lepton_photon_cuts,leptons,photons,lepton_origins,photon_origins));
85  return StatusCode::SUCCESS;
86 }
87 
88 
89 //============================================================================
90 // PRIVATE PTS OUTSIDE DRS FUNCTION
91 // This function exectutes the OR algorithm if one of the public funtions is called
92 StatusCode VGammaORTool::photonPtsOutsideDrs(std::map<float, std::vector<float> >& result,
93  const std::vector<float>& drCuts,
94  const std::vector<TLorentzVector>* leptons,
95  const std::vector<TLorentzVector>* photons,
96  const std::vector<int>* lepton_origins,
97  const std::vector<int>* photon_origins) const {
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 }
125 
126 //============================================================================
127 // find the right leptons, get them either from user or the current event
128 StatusCode VGammaORTool::setInput(std::vector<TLorentzVector>& leptons_out,
129  std::vector<TLorentzVector>& photons_out,
130  const std::vector<TLorentzVector>* lepton_p4s,
131  const std::vector<TLorentzVector>* photon_p4s,
132  const std::vector<int>* lepton_origins,
133  const std::vector<int>* photon_origins) const {
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 }
178 
179 //============================================================================
180 // Functions to filter out particles from wrong origins
181 std::vector<TLorentzVector> VGammaORTool::filterPhotonOrigins(const std::vector<TLorentzVector>& photon_candidates,
182  const std::vector<int>& photon_origins) const {
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 }
203 
204 std::vector<TLorentzVector> VGammaORTool::filterLeptonOrigins(const std::vector<TLorentzVector>& lepton_candidates,
205  const std::vector<int>& lepton_origins) const {
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 }
246 
247 //============================================================================
248 // Get the right leptons and photons from the event
249 std::vector<TLorentzVector> VGammaORTool::getLeptonP4s(const xAOD::TruthParticleContainer& truthParticles) const {
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 }
308 
309 std::vector<TLorentzVector> VGammaORTool::getPhotonP4s(const xAOD::TruthParticleContainer& truthParticles) const {
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 }
331 
332 bool VGammaORTool::isFromTau(const xAOD::TruthParticle& lepton, int nRecursions) const{
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 }
349 
350 bool VGammaORTool::checkPhotonPts(const std::vector<float>& photon_pts) const{
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 }
365 //============================================================================
366 // Functions related to photon isolation
368  const xAOD::TruthParticleContainer& truthParticles, float dR0, float exponent,
369  float epsilon) const {
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 }
411 
412 float VGammaORTool::frixioneFunc(float dR, float dR0, float exponent, float epsilon) const {
413  return epsilon * TMath::Power((1 - TMath::Cos(dR)) / (1 - TMath::Cos(dR0)), exponent);
414 }
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
VGammaORTool::VGammaORTool
VGammaORTool(const std::string &name)
Definition: VGammaORTool.cxx:8
get_generator_info.result
result
Definition: get_generator_info.py:21
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
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
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:79
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
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: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
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
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: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
VGammaORTool::isFromTau
bool isFromTau(const xAOD::TruthParticle &lepton, int nRecursions=0) const
Definition: VGammaORTool.cxx:332
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:51
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
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
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
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:181
MC::isStable
bool isStable(const T &p)
Definition: HepMCHelpers.h:30
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:199
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
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:367
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:44
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