TIMBER  beta
Tree Interface for Making Binned Events with RDataFrame
Public Member Functions | Public Attributes | List of all members
Particle Class Reference

C++ class. Stores identifying features of a particle in the GenPart collection. More...

Public Member Functions

void AddChild (int idx)
 Add child index to track. More...
 
void AddParent (int idx)
 Add parent index to track. More...
 
std::map< std::string, bool > CompareToVector (LVector vect)
 Compares particle to a provided vector. More...
 
float DeltaR (LVector input_vector)
 Calculate \(\Delta R\) between current particle and input vector. More...
 
std::vector< int > GetChild ()
 Get vector of indices of the children. More...
 
int GetParent ()
 Return the index of the parent. More...
 
int GetStatusFlag (std::string flagName)
 Returns the bool for the flag name provided. More...
 
 Particle ()
 Construct a new Particle object.
 
template<class T >
 Particle (int i, T p)
 Construct a new Particle object with TIMBER collection struct as input. More...
 
void SetStatusFlags (int flags)
 Set the internal status flags map. More...
 

Public Attributes

std::vector< int > childIndex
 
bool flag = true
 
int genPartIdxMother
 
int index
 
int parentIndex
 
int pdgId
 
int status
 
std::map< std::string, int > statusFlags
 
LVector vect
 

Detailed Description

C++ class. Stores identifying features of a particle in the GenPart collection.

Constructor & Destructor Documentation

◆ Particle()

Particle ( int  i,
p 
)

Construct a new Particle object with TIMBER collection struct as input.

Template Parameters
T
Parameters
iindex
pstruct

Member Function Documentation

◆ AddChild()

void AddChild ( int  idx)

Add child index to track.

Parameters
idxChild index

◆ AddParent()

void AddParent ( int  idx)

Add parent index to track.

Parameters
idxParent index

◆ CompareToVector()

std::map< std::string, bool > CompareToVector ( LVector  vect)

Compares particle to a provided vector.

Parameters
vectThe vector to compare against the current particle.
Returns
std::map< std::string, bool> Map with keys "sameHemisphere" (phi<pi/2), "deltaR" (deltaR < 0.8), "deltaM" (|delta m|/m_gen < 0.05) which all return bools.

◆ DeltaR()

float DeltaR ( LVector  input_vector)

Calculate \(\Delta R\) between current particle and input vector.

Parameters
input_vectorThe vector to compare against the current particle.
Returns
float \(\Delta R\) value

◆ GetChild()

std::vector< int > GetChild ( )

Get vector of indices of the children.

Returns
std::vector<int>

◆ GetParent()

int GetParent ( )

Return the index of the parent.

Returns
int

◆ GetStatusFlag()

int GetStatusFlag ( std::string  flagName)

Returns the bool for the flag name provided.

Parameters
flagName
Returns
int Status flag.

◆ SetStatusFlags()

void SetStatusFlags ( int  flags)

Set the internal status flags map.

Parameters
flagsInteger from NanoAOD

Member Data Documentation

◆ childIndex

std::vector<int> childIndex

Children indices in GenParticleTree

◆ flag

bool flag = true

Should always be true unless we need to return a None-like particle

◆ genPartIdxMother

int genPartIdxMother

Index of the mother particle in NanoAOD

◆ index

int index

Index in collection

◆ parentIndex

int parentIndex

Parent index in GenParticleTree

◆ pdgId

int pdgId

PDG id

◆ status

int status

Particle status

◆ statusFlags

std::map<std::string, int> statusFlags

Map of status flags for set gen particle

◆ vect

LVector vect

Lorentz vector


The documentation for this class was generated from the following files: