1 #ifndef _TIMBER_GENMATCHING 2 #define _TIMBER_GENMATCHING 9 #include <Math/Vector4D.h> 10 #include <Math/VectorUtil.h> 13 using LVector = ROOT::Math::PtEtaPhiMVector;
23 bool BitChecker(
const int &bit,
int &number);
27 extern std::map <int, std::string> PDGIds;
31 extern std::map <std::string, int> GenParticleStatusFlags;
62 vect(LVector(p.pt, p.eta, p.phi, p.mass)), index(i), genPartIdxMother(p.genPartIdxMother),
63 pdgId(p.pdgId), status(p.status) {
64 SetStatusFlags(p.statusFlags);
71 void AddParent(
int idx);
77 void AddChild(
int idx);
89 std::vector<int> GetChild();
96 float DeltaR(LVector input_vector);
101 void SetStatusFlags(
int flags);
106 int GetStatusFlag(std::string flagName);
114 std::map< std::string, bool> CompareToVector(LVector vect);
126 std::vector<Particle> _nodes;
127 std::vector<Particle*> _heads;
130 bool _matchParticleToString(
Particle* particle, std::string
string);
131 std::vector<Particle*> _runChain(
Particle* node, std::vector<std::string> chain);
159 return AddParticle(particle);
167 std::vector<Particle*> out;
168 for (
int inode = 0; inode<_nodes.size(); inode++) {
169 out.push_back(&_nodes[inode]);
179 std::vector<Particle*> GetChildren(
Particle* particle);
193 std::vector<std::vector<Particle*>> FindChain(std::string chainstring);
std::vector< Particle * > GetParticles()
Get the list of particle objects.
Definition: GenMatching.h:166
int index
Definition: GenMatching.h:41
Particle(int i, T p)
Construct a new Particle object with TIMBER collection struct as input.
Definition: GenMatching.h:61
C++ class. Stores identifying features of a particle in the GenPart collection.
Definition: GenMatching.h:38
C++ class. Constructs tree by adding particles. Establish relationships between particles (parent...
Definition: GenMatching.h:123
int pdgId
Definition: GenMatching.h:47
LVector vect
Definition: GenMatching.h:45
int parentIndex
Definition: GenMatching.h:43
std::vector< int > childIndex
Definition: GenMatching.h:44
int status
Definition: GenMatching.h:48
std::map< std::string, int > statusFlags
Definition: GenMatching.h:42
Particle * AddParticle(int index, T p)
Add particle to tree.
Definition: GenMatching.h:157
int genPartIdxMother
Definition: GenMatching.h:46
Definition: GenMatching.h:15