ATLAS Offline Software
Loading...
Searching...
No Matches
GeneratorSelector.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef GeneratorPhysVal_GeneratorSelector_H
6#define GeneratorPhysVal_GeneratorSelector_H
7
8
9#include <vector>
10#include <TLorentzVector.h>
13
15{
16 public:
17
18 GeneratorSelector() = default;
19 ~GeneratorSelector() = default;
20
21 enum class CUT_STATUS {YES,NO};
22 const std::vector< TLorentzVector > GetGeneratorLevel(const xAOD::TruthParticleContainer *cont)
23 {
24 std::vector< TLorentzVector > generic_stable_parton;
25
26 for(const auto vcont: *cont){
27 if (!(MC::isGenStable(vcont))) continue;
28 TLorentzVector tlv (vcont->px(), vcont->py(), vcont->pz(), vcont->e());
29 generic_stable_parton.push_back(tlv);
30 }
31
32 return generic_stable_parton;
33 }
34
35 const std::vector< TLorentzVector > GetSimulationLevel(const xAOD::TruthParticleContainer *cont)
36 {
37 std::vector< TLorentzVector > generic_stable_parton;
38
39 for(const auto vcont: *cont){
40 if (!(MC::isSimStable(vcont))) continue;
41 TLorentzVector tlv (vcont->px(), vcont->py(), vcont->pz(), vcont->e());
42 generic_stable_parton.push_back(tlv);
43
44 }
45
46 return generic_stable_parton;
47 }
48
49};
50
51#endif
ATLAS-specific HepMC functions.
GeneratorSelector()=default
const std::vector< TLorentzVector > GetSimulationLevel(const xAOD::TruthParticleContainer *cont)
~GeneratorSelector()=default
const std::vector< TLorentzVector > GetGeneratorLevel(const xAOD::TruthParticleContainer *cont)
bool isGenStable(const T &p)
Determine if the particle is stable at the generator (not det-sim) level,.
bool isSimStable(const T &p)
Identify if the particle is considered stable at the post-detector-sim stage.
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.