ATLAS Offline Software
EtaPtFilterTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // EtaPtFilterTool.cxx
7 // Implementation file for class EtaPtFilterTool
8 // Author: S.Binet<binet@cern.ch>
10 
13 
14 // STL includes
15 #include <cmath>
16 
17 // CLHEP includes
18 #include "CLHEP/Units/SystemOfUnits.h"
19 
20 // McParticleKernel includes
22 
23 // McParticleTools includes
24 #include "EtaPtFilterTool.h"
25 #include "copyBeamParticles.h"
26 
27 #include "AtlasHepMC/Flow.h"
29 
30 using CLHEP::GeV;
31 
35  const std::string& name,
36  const IInterface* parent ) :
38 {
39  //
40  // Property declaration
41  //
42  //declareProperty( "Property", m_nProperty );
43 
44  declareProperty( "InnerEtaRegionCuts",
46  "Vector of cuts parameters for the inner region.\n"
47  "Two first elements are minimum and maximum |eta| values "
48  "for this inner region.\n"
49  "Third element is the minimum pT for the stable particles "
50  "to be accepted." );
51  // defaults
52  std::vector<double> innerEtaRegionCuts;
53  innerEtaRegionCuts.push_back( 0.0 ); // minimum |eta|
54  innerEtaRegionCuts.push_back( 3.5 ); // maximum |eta|
55  innerEtaRegionCuts.push_back( 0.3*GeV ); // minimum pT of particles
56  m_innerEtaRegionCuts.set( innerEtaRegionCuts );
57 
59  this );
60 
61  declareProperty( "OuterEtaRegionCuts",
63  "Vector of cuts parameters for the outer region.\n"
64  "Two first elements are minimum and maximum |eta| values "
65  "for this outer region.\n"
66  "Third element is the minimum pT for the stable particles "
67  "to be accepted." );
68  // defaults
69  std::vector<double> outerEtaRegionCuts;
70  outerEtaRegionCuts.push_back( 3.5 ); // minimum |eta|
71  outerEtaRegionCuts.push_back( 5.5 ); // maximum |eta|
72  outerEtaRegionCuts.push_back( 1.0*GeV ); // minimum pT of particles
73  m_outerEtaRegionCuts.set( outerEtaRegionCuts );
74 
76  this );
77 
78  // switches
79  declareProperty( "OnlyGenerator",
80  m_onlyGenerator = false,
81  "Switch to only include particles from generation and "
82  "reject particles from detector simulation (Geant4)" );
83 
84 
85  declareProperty( "ButKeepAllGeneratorStable",
87  "Switch to keep all generated stable particles (they sum to "
88  "14 TeV) regardless of the eta and pt cuts defined for the "
89  "remaining particles" );
90 
91 
92  declareProperty( "KeepDocumentaries",
93  m_keepDocumentaries = true,
94  "Switch to keep *all* generator particles which are "
95  "documentaries (statuscode == 3)" );
96 
97  declareProperty( "KeepAllLeptons",
98  m_keepAllLeptons = true,
99  "Switch to keep *all* leptons - i.e. do not apply kinematic cuts on them");
100 
101 }
102 
106 {
107  ATH_MSG_DEBUG("Calling destructor");
108 }
109 
110 
112 {
113  if ( !in || !out ) {
114  ATH_MSG_ERROR("Invalid pointer to McEventCollection !" << endmsg
115  << " in: " << in << endmsg
116  << " out: " << out);
117  return StatusCode::FAILURE;
118  }
119 
120  for ( unsigned int iEvt = 0; iEvt != in->size(); ++iEvt ) {
121  const HepMC::GenEvent * inEvt = (*in)[iEvt];
122  if ( 0 == inEvt ) {
124  ("Could not launch filtering procedure for GenEvent number ["
125  << iEvt << "] from McEventCollection ["
126  << m_mcEventsReadHandleKey.key() << " !!"
127  << endmsg
128  << " inEvt: " << inEvt);
129  continue;
130  }
131  HepMC::GenEvent* outEvt = HepMC::copyemptyGenEvent( inEvt);
132 
133  if ( buildGenEvent( inEvt, outEvt ).isFailure() ) {
134  ATH_MSG_ERROR("Could filter GenEvent number [" << iEvt
135  << "] from McEventCollection [" << m_mcEventsReadHandleKey.key()
136  << "] !!");
137  delete outEvt;
138  outEvt = 0;
139  continue;
140  }
141 
142  TruthHelper::copyBeamParticles (*inEvt, *outEvt);
143 
144  out->push_back( outEvt );
145  }
146 
147  return StatusCode::SUCCESS;
148 }
149 
150 
154 
155 StatusCode EtaPtFilterTool::buildGenEvent( const HepMC::GenEvent* in, HepMC::GenEvent* out )
156 {
157  if ( nullptr == in || nullptr == out ) {
158  ATH_MSG_ERROR("Invalid pointer to GenEvent !!" << endmsg
159  << " in: " << in << endmsg
160  << " out: " << out);
161  return StatusCode::FAILURE;
162  }
163 
164  // loop over vertices
165  VertexMap_t vmap;
166  ParticleMap_t pmap;
167  auto spv = HepMC::signal_process_vertex(in); //AV To be removed in the future
168 #ifdef HEPMC3
169  for ( auto vtx: in->vertices() ) {
170 #else
171  for ( HepMC::GenEvent::vertex_const_iterator vtxit = in->vertices_begin(); vtxit != in->vertices_end(); ++vtxit ) {
172  auto vtx=*vtxit;
173 #endif
174  bool isSignalVertex = (vtx == spv);
175  if ( !isAccepted(vtx) && !isSignalVertex ) {
176  // no in-going nor out-going particles at this vertex matches
177  // the requirements nor it is a signal process vertex : ==> Skip it
178  continue;
179  }
180 
181  if ( addVertex( vtx, out, vmap, pmap, isSignalVertex ).isFailure() )
182  {
183  ATH_MSG_WARNING("Could not add vertex " << vtx );
184  }
185 
186  } //> end loop over vertices
187 
188  return StatusCode::SUCCESS;
189 }
190 
192 {
193  if ( ! mc ) {
194  return false;
195  }
196 
197  if ( m_butKeepAllGeneratorStable.value() ) {
198  // static IsGenStable isStable;
199  if ( MC::isStable(mc) ) {
200  return true;
201  }
202  }
203 
204  if ( m_onlyGenerator.value() ) {
205  // helper class to know if a GenParticle has been produced at Generator
206  // level. ie: not at simulation level (Geant4)
207 
209  return false;
210  }
211  }
212 
213  if ( m_keepDocumentaries.value() ) {
214  if ( !MC::isPhysical(mc) ) {
215  return true;
216  }
217  }
218 
219  // Skip kinematic cuts for leptons
220  if ( m_keepAllLeptons.value() ) {
221  if ( MC::isLepton(mc) ) {
222  return true;
223  }
224  }
225 
226  const HepMC::FourVector hlv = mc->momentum();
227  const double pt = hlv.perp();
228  const double eta = hlv.pseudoRapidity();
229  if ( ( std::abs( eta ) >= m_innerEtaRegionCuts.value()[0] &&
230  std::abs( eta ) < m_innerEtaRegionCuts.value()[1] &&
231  pt > m_innerEtaRegionCuts.value()[2] )
232 
233  ||
234 
235  ( std::abs( eta ) >= m_outerEtaRegionCuts.value()[0] &&
236  std::abs( eta ) < m_outerEtaRegionCuts.value()[1] &&
237  pt > m_outerEtaRegionCuts.value()[2] ) ) {
238  return true;
239  } else {
240  return false;
241  }
242 }
243 
245 {
246  if ( !vtx ) {
247  return false;
248  }
249 
250  // check if this vertex looks like a vertex from the hard-scattering
251  if ( isFromHardScattering(vtx) ) {
252  return true;
253  }
254 
255  // check if this vertex matches some decay pattern given
256  // to the McVtxFilterTool
257  if ( m_mcVtxFilterTool->isAccepted(vtx) ) {
258  return true;
259  }
260 
261  // ///////////////////////////////////////////////////////////////////////
262  // Now we check if at least one in- or out-going particle can be accepted.
263  // If yes, then we accept the entire vertex
264  //
265 #ifdef HEPMC3
266  // check the parent branch
267  for ( const auto& p: vtx->particles_in() ) {
268  if ( isAccepted(p) ) {
269  return true;
270  }
271  }//> end loop over parents
272 #else
273  // check the parent branch
274  for ( HepMC::GenVertex::particles_in_const_iterator
275  p = vtx->particles_in_const_begin(),
276  pEnd = vtx->particles_in_const_end();
277  p != pEnd;
278  ++p ) {
279  if ( isAccepted(*p) ) {
280  return true;
281  }
282  }//> end loop over parents
283 #endif
284 
285  // check the child branch
286  for ( auto p : *vtx) {
287  if ( isAccepted(p) ) {
288  return true;
289  }
290  }//> end loop over children
291 
292  return false;
293 }
294 
296  VertexMap_t& vmap,
297  ParticleMap_t& pmap,
298  bool isSignalVertex) const
299 {
300  if ( 0 == srcVtx || 0 == evt ) {
301  ATH_MSG_ERROR("In addVertex(vtx,evt) : INVALID pointer given !!" << endmsg << " vtx: " << srcVtx << endmsg << " evt: " << evt);
302  return StatusCode::FAILURE;
303  }
304 #ifdef HEPMC3
305  HepMC::GenVertexPtr& vtx = vmap[srcVtx.get()];
306  if ( !vtx ) {
307  vtx = HepMC::newGenVertexPtr();
308  evt->add_vertex(vtx);
309  vtx->set_position( srcVtx->position() );
310  vtx->set_status( srcVtx->status() );
312  vtx->add_attribute("weights",srcVtx->attribute<HepMC3::VectorDoubleAttribute> ("weights"));
313  if (isSignalVertex) HepMC::set_signal_process_vertex(evt,vtx);
314  }
317  for ( auto parent: srcVtx->particles_in()) {
318  HepMC::GenParticlePtr& p = pmap[parent.get()];
319  if ( !p ) {
321  vtx->add_particle_in( p );
322  p->set_momentum( parent->momentum() );
323  p->set_generated_mass( parent->generated_mass() );
324  p->set_pdg_id( parent->pdg_id() );
325  p->set_status( parent->status() );
326  HepMC::set_flow(p, HepMC::flow(parent) );
329  }
330  // set the mother's decay to our (new) vertex
331  vtx->add_particle_in( p );
332 
333  }//> loop over ingoing particles
334 
337  for (auto child: srcVtx->particles_out()) {
338  HepMC::GenParticlePtr& p = pmap[child.get()];
339  if ( !p ) {
341  vtx->add_particle_out( p );
342  p->set_momentum( child->momentum() );
343  p->set_generated_mass( child->generated_mass() );
344  p->set_pdg_id( child->pdg_id() );
345  if ( m_butKeepAllGeneratorStable && !isAccepted(child) && MC::isDecayed(child) )
346  p->set_status( HepMC::SPECIALSTATUS ) ;
347  else
348  p->set_status( child->status() );
349  HepMC::set_flow(p, HepMC::flow(child) );
352  }
353  // set the daughter's production vertex to our new vertex
354  vtx->add_particle_out( p );
355  }//> loop over outgoing particles
356 #else
357 
358  HepMC::GenVertexPtr& vtx = vmap[srcVtx];
359  if ( !vtx ) {
360  vtx = new HepMC::GenVertex();
361  vtx->set_position( srcVtx->position() );
362  vtx->set_id( srcVtx->id() );
363  vtx->suggest_barcode( srcVtx->barcode() );
364  vtx->weights() = srcVtx->weights();
365  evt->add_vertex(vtx);
366  if (isSignalVertex) evt->set_signal_process_vertex(vtx);
367  }
368 
371  for ( HepMC::GenVertex::particles_in_const_iterator
372  parent = srcVtx->particles_in_const_begin(),
373  parentEnd = srcVtx->particles_in_const_end();
374  parent != parentEnd;
375  ++parent ) {
376  HepMC::GenParticlePtr& p = pmap[*parent];
377  if ( !p ) {
378  p = new HepMC::GenParticle;
379  p->set_momentum( (*parent)->momentum() );
380  p->set_generated_mass( (*parent)->generated_mass() );
381  p->set_pdg_id( (*parent)->pdg_id() );
382  p->set_status( (*parent)->status() );
383  p->set_flow( (*parent)->flow() );
384  p->set_polarization( (*parent)->polarization() );
385  p->suggest_barcode( (*parent)->barcode() );
386  }
387  // set the mother's decay to our (new) vertex
388  vtx->add_particle_in( p );
389 
390  }//> loop over ingoing particles
391 
394  for ( HepMC::GenVertex::particles_out_const_iterator
395  child = srcVtx->particles_out_const_begin(),
396  childEnd = srcVtx->particles_out_const_end();
397  child != childEnd;
398  ++child ) {
399  HepMC::GenParticlePtr& p = pmap[*child];
400  if ( !p ) {
401  p = new HepMC::GenParticle;
402  p->set_momentum( (*child)->momentum() );
403  p->set_generated_mass( (*child)->generated_mass() );
404  p->set_pdg_id( (*child)->pdg_id() );
405  if ( m_butKeepAllGeneratorStable && !isAccepted(*child) && MC::isDecayed(*child) )
406  p->set_status( HepMC::SPECIALSTATUS );
407  else
408  p->set_status( (*child)->status() );
409  p->set_flow( (*child)->flow() );
410  p->set_polarization( (*child)->polarization() );
411  p->suggest_barcode( (*child)->barcode() );
412  }
413 
414  // set the daughter's production vertex to our new vertex
415  vtx->add_particle_out( p );
416 
417  }//> loop over outgoing particles
418 #endif
419 
420  return StatusCode::SUCCESS;
421 }
422 
424 {
425  if (!vtx) return false;
426 #ifdef HEPMC3
427  for (auto& p: vtx->particles_in()) {
428  if (MC::isHadron(p)&&!MC::isBeam(p)) return false;
429  auto pv = p->production_vertex();
430  if (pv && !isPartonVertex(pv)) return false;
431  }
432  for (auto& p: vtx->particles_out()) {
433  if (MC::isHadron(p)&&!MC::isBeam(p)) return false;
434  }
435 #else
436  for ( auto p = vtx->particles_in_const_begin(), parentEnd = vtx->particles_in_const_end(); p != parentEnd; ++p ) {
437  if (MC::isHadron(*p)&&!MC::isBeam(*p)) return false;
438  auto pv = (*p)->production_vertex();
439  if (pv && !isPartonVertex(pv)) return false;
440 }
441 for ( auto p = vtx->particles_out_const_begin(), parentEnd = vtx->particles_out_const_end(); p != parentEnd; ++p ) {
442  if (MC::isHadron(*p)&&!MC::isBeam(*p)) return false;
443  }
444 #endif
445  return true;
446 }
448 {
449  int partonsin = 0;
450  int showerout = 0;
451 #ifdef HEPMC3
452  for (auto& p: vtx->particles_in()) if (MC::isQuark(p) || MC::isGluon(p)) partonsin++;
453 #else
454  for (auto p = vtx->particles_in_const_begin();p!=vtx->particles_in_const_end();++p ) if (MC::isQuark(*p) || MC::isGluon(*p)) partonsin++;
455 #endif
456  for (auto& p: *vtx) if (p->pdg_id() == 91||p->pdg_id() == 92||p->pdg_id() == 94) showerout++;
457 
458  return isPartonVertex(vtx) && (partonsin >= 2) && (showerout == 0);
459 }
460 
464 
466 {
467  ATH_MSG_INFO("Initializing " << name() << "...");
468 
469  // make sure the properties are synchronised
472 
473  if ( m_innerEtaRegionCuts.value().size() != 3 ||
474  m_outerEtaRegionCuts.value().size() != 3 ) {
476  ("Wrong size for eta regions cut :" << endmsg
477  << "\tinner region: " << m_innerEtaRegionCuts.value().size()
478  << endmsg
479  << "\touter region: " << m_outerEtaRegionCuts.value().size()
480  << endmsg
481  << "You have to provide a list of cuts of the form : " << endmsg
482  << " |etaMin| |etaMax| ptMin");
483  return StatusCode::FAILURE;
484  }
485 
487  ("Inner Eta region cuts : nCuts = "
488  << m_innerEtaRegionCuts.value().size()
489  << endmsg
490  << "\tetaMin = " << m_innerEtaRegionCuts.value()[0] << endmsg
491  << "\tetaMax = " << m_innerEtaRegionCuts.value()[1] << endmsg
492  << "\tPtMin = " << m_innerEtaRegionCuts.value()[2] << endmsg
493  << "Outer Eta region cuts : nCuts = "
494  << m_outerEtaRegionCuts.value().size()
495  << endmsg
496  << "\tetaMin = " << m_outerEtaRegionCuts.value()[0] << endmsg
497  << "\tetaMax = " << m_outerEtaRegionCuts.value()[1] << endmsg
498  << "\tPtMin = " << m_outerEtaRegionCuts.value()[2]);
499 
500  return StatusCode::SUCCESS;
501 }
502 
503 void EtaPtFilterTool::setupInnerEtaRegionCuts( Gaudi::Details::PropertyBase& /*innerRegion*/ )
504 {
505  return;
506 }
507 
508 void EtaPtFilterTool::setupOuterEtaRegionCuts( Gaudi::Details::PropertyBase& /*outerRegion*/ )
509 {
510  return;
511 }
HepMC::GenVertexPtr
HepMC::GenVertex * GenVertexPtr
Definition: GenVertex.h:59
Flow.h
EtaPtFilterTool::isPartonVertex
bool isPartonVertex(const HepMC::ConstGenVertexPtr &vtx) const
Definition: EtaPtFilterTool.cxx:423
HepMC::suggest_barcode
bool suggest_barcode(T &p, int i)
Definition: GenEvent.h:548
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
HepMC::polarization
Polarization polarization(const T &a)
Definition: Polarization.h:47
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
EtaPtFilterTool::isFromHardScattering
bool isFromHardScattering(const HepMC::ConstGenVertexPtr &vtx) const
Definition: EtaPtFilterTool.cxx:447
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
EtaPtFilterTool::setupInnerEtaRegionCuts
void setupInnerEtaRegionCuts(Gaudi::Details::PropertyBase &innerEtaRegionCuts)
Callback function to setup the "InnerEtaRegionCuts" property.
Definition: EtaPtFilterTool.cxx:503
test_pyathena.pt
pt
Definition: test_pyathena.py:11
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
EtaPtFilterTool::addVertex
StatusCode addVertex(const HepMC::ConstGenVertexPtr &srcVtx, HepMC::GenEvent *evt, VertexMap_t &vmap, ParticleMap_t &pmap, bool isSignalVertex=false) const
Helper method to copy a given vertex and add it to a GenEvent.
Definition: EtaPtFilterTool.cxx:295
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
EtaPtFilterTool::VertexMap_t
std::unordered_map< const HepMC::GenVertex *, HepMC::GenVertexPtr > VertexMap_t
Definition: EtaPtFilterTool.h:56
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
EtaPtFilterTool::~EtaPtFilterTool
virtual ~EtaPtFilterTool()
Destructor:
Definition: EtaPtFilterTool.cxx:105
EtaPtFilterTool::EtaPtFilterTool
EtaPtFilterTool()
Default constructor:
isGluon
bool isGluon(const T &p)
Definition: AtlasPID.h:158
TruthHelper::copyBeamParticles
void copyBeamParticles(const HepMC::GenEvent &inEvt[[maybe_unused]], HepMC::GenEvent &outEvt[[maybe_unused]])
Definition: copyBeamParticles.cxx:21
MC::isPhysical
bool isPhysical(const T &p)
Definition: HepMCHelpers.h:32
isQuark
bool isQuark(const T &p)
PDG rule 2: Quarks and leptons are numbered consecutively starting from 1 and 11 respectively; to dot...
Definition: AtlasPID.h:113
mc
Definition: mc.PG_single_nu_valid.py:1
HepMC::set_signal_process_vertex
void set_signal_process_vertex(GenEvent *e, T v)
Definition: GenEvent.h:528
HepMC::SPECIALSTATUS
constexpr int SPECIALSTATUS
Constant that the meaning of which is currently lost, to be recovered...
Definition: MagicNumbers.h:41
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
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
HepMC::flow
int flow(const T &a, int i)
Definition: Flow.h:51
EtaPtFilterTool::m_innerEtaRegionCuts
DoubleArrayProperty m_innerEtaRegionCuts
vector of cuts parameters for the inner region delimited in |eta| 0-th element is the minimum |eta| o...
Definition: EtaPtFilterTool.h:119
HepMC::newGenVertexPtr
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
Definition: GenVertex.h:64
EtaPtFilterTool::initializeTool
StatusCode initializeTool()
Method to initialize the tool: we need to check the validity of the parameters given for the inner an...
Definition: EtaPtFilterTool.cxx:465
TruthParticleFilterBaseTool::m_mcEventsReadHandleKey
SG::ReadHandleKey< McEventCollection > m_mcEventsReadHandleKey
ReadHandleKey for the input McEventCollection one wants to filter.
Definition: TruthParticleFilterBaseTool.h:100
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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
EtaPtFilterTool::m_outerEtaRegionCuts
DoubleArrayProperty m_outerEtaRegionCuts
vector of cuts parameters for the outer region delimited in |eta| 0-th element is the minimum |eta| o...
Definition: EtaPtFilterTool.h:126
TruthParticleFilterBaseTool::m_mcVtxFilterTool
McVtxFilterTool_t m_mcVtxFilterTool
Pointer to the McVtxFilterTool to be able to select additional vertices on some decay pattern criteri...
Definition: TruthParticleFilterBaseTool.h:78
EtaPtFilterTool.h
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
test_pyathena.parent
parent
Definition: test_pyathena.py:15
HepMC::set_polarization
void set_polarization(T &a, Polarization b)
Definition: Polarization.h:44
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
EtaPtFilterTool::m_onlyGenerator
BooleanProperty m_onlyGenerator
Switch to only include particles from generation and reject particles from detector simulation (Geant...
Definition: EtaPtFilterTool.h:131
EtaPtFilterTool::m_keepDocumentaries
BooleanProperty m_keepDocumentaries
Switch to keep all generator particles which are documentaries (statuscode == 3)
Definition: EtaPtFilterTool.h:141
TruthParticleFilterBaseTool
Definition: TruthParticleFilterBaseTool.h:33
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
EtaPtFilterTool::isAccepted
bool isAccepted(const HepMC::ConstGenParticlePtr &mcPart) const
Check if a given particle is within the acceptance (pt+eta)
Definition: EtaPtFilterTool.cxx:191
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MagicNumbers.h
EtaPtFilterTool::buildMcAod
StatusCode buildMcAod(const McEventCollection *in, McEventCollection *out)
This method will check the validity of the input McEventCollection and build a filtered one from the ...
Definition: EtaPtFilterTool.cxx:111
isHadron
bool isHadron(const T &p)
Definition: AtlasPID.h:207
EtaPtFilterTool::buildGenEvent
StatusCode buildGenEvent(const HepMC::GenEvent *in, HepMC::GenEvent *out)
This method will check the validity of the input HepMC::GenEvent and build a filtered one from the st...
Definition: EtaPtFilterTool.cxx:155
MC::isStable
bool isStable(const T &p)
Definition: HepMCHelpers.h:30
HepMC::newGenParticlePtr
GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), int pid=0, int status=0)
Definition: GenParticle.h:39
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
EtaPtFilterTool::ParticleMap_t
std::unordered_map< const HepMC::GenParticle *, HepMC::GenParticlePtr > ParticleMap_t
Definition: EtaPtFilterTool.h:54
MC::isDecayed
bool isDecayed(const T &p)
Definition: HepMCHelpers.h:29
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MC::isBeam
bool isBeam(const T &p)
Definition: HepMCHelpers.h:28
isLepton
bool isLepton(const T &p)
APID: the fourth generation leptons are leptons.
Definition: AtlasPID.h:130
python.changerun.pv
pv
Definition: changerun.py:81
IMcVtxFilterTool.h
HepMC::ConstGenVertexPtr
const HepMC::GenVertex * ConstGenVertexPtr
Definition: GenVertex.h:60
HepMC::copyemptyGenEvent
GenEvent * copyemptyGenEvent(const GenEvent *inEvt)
Definition: GenEvent.h:531
EtaPtFilterTool::m_keepAllLeptons
BooleanProperty m_keepAllLeptons
Switch to keep all leptons - i.e.
Definition: EtaPtFilterTool.h:145
EtaPtFilterTool::setupOuterEtaRegionCuts
void setupOuterEtaRegionCuts(Gaudi::Details::PropertyBase &outerEtaRegionCuts)
Callback function to setup the "OuterEtaRegionCuts" property.
Definition: EtaPtFilterTool.cxx:508
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
HepMCHelpers.h
GenParticle
@ GenParticle
Definition: TruthClasses.h:30
copyBeamParticles.h
Helper to copy beam particle information.
EtaPtFilterTool::m_butKeepAllGeneratorStable
BooleanProperty m_butKeepAllGeneratorStable
Switch to keep all stable generator particles (IsGenStable) regardless what eta or pt cuts are define...
Definition: EtaPtFilterTool.h:136
HepMC::signal_process_vertex
GenVertex * signal_process_vertex(const GenEvent *e)
Definition: GenEvent.h:503