MyTruthParticleManager Class Reference

#include <MyTruthParticleManager.h>

List of all members.

Public Member Functions

 MyTruthParticleManager (void)
 Default Constructor: create object with no truth particles.
 MyTruthParticleManager (const std::vector< MyParticle * > in_truth_particles)
 Constructor: store the given truth particles.
void set_generator (std::string gen)
 set the generator
std::vector< MyParticle * > getParticles_with_ID (unsigned int pdgId) const
MyTruthParticlegetParticle_with_barcode (unsigned int tmp_barcode) const
 returns a pointer to the truth particle with the given barcode
MyTruthParticleget_mother (MyTruthParticle *truth_particle) const
MyTruthParticleget_primary_mother (MyTruthParticle *truth_particle) const
std::vector< MyTruthParticle * > get_children (MyTruthParticle *truth_particle) const
MyTruthParticleget_last_instance (MyTruthParticle *part_in)
std::vector< MyParticle * > remove_multiples_wo_using_genstat (std::vector< MyParticle * > v_input)
std::vector< MyParticle * > remove_multiples (std::vector< MyParticle * > v_input)
unsigned int get_n_of_decay_chains (void) const
MyTruthParticleget_primary_intpart (int n_decay_chain) const
std::vector< MyTruthParticle * > get_gen1_children_intpart (int n_decay_chain) const
std::vector< std::vector<
MyTruthParticle * > > 
get_gen2_children_intpart (int n_decay_chain) const
int find_decay_chain_of (std::vector< unsigned int > interesting_pdgIds)
bool process_decay_chains (void)

Private Member Functions

bool init (std::vector< MyParticle * > in_truth_particles)

Private Attributes

std::vector< MyTruthParticle * > v_truth_particles
std::string generator
unsigned int genstat_e
unsigned int genstat_mu
unsigned int genstat_tau
int n_of_decay_chains
MyTruthParticleprimary_intpart_0
std::vector< MyTruthParticle * > v_intpart_0_children_gen1
std::vector< std::vector<
MyTruthParticle * > > 
vv_intpart_0_children_gen2
MyTruthParticleprimary_intpart_1
std::vector< MyTruthParticle * > v_intpart_1_children_gen1
std::vector< std::vector<
MyTruthParticle * > > 
vv_intpart_1_children_gen2


Detailed Description

This class stores TruthParticle data and provides some methods to search for special particles, navigate trough decay chains,...

still to do: - improve return values of methods in case of an error

implement more than 2 interesting decay chains

Date:
06.12.2006
Author:
Manfred.Groh

Definition at line 46 of file MyTruthParticleManager.h.


Member Function Documentation

vector< MyParticle * > MyTruthParticleManager::getParticles_with_ID ( unsigned int  pdgId  )  const

returns a vector of pointers to all particles with pdgId and -pdgId e.g. getParticles_with_ID(13) returns all stored muons

Definition at line 111 of file MyTruthParticleManager.cxx.

MyTruthParticle * MyTruthParticleManager::get_mother ( MyTruthParticle truth_particle  )  const

returns a pointer to the truth particle that is stored as the mother particle of the given truth particle

Definition at line 154 of file MyTruthParticleManager.cxx.

MyTruthParticle * MyTruthParticleManager::get_primary_mother ( MyTruthParticle truth_particle  )  const

returns a pointer to the truth particle that is at the beginning of the decay chain of this particle. e.g. in the decay H->tautau->ee the method returns the H if it is called with one of the electrons as input paramter. method goes up the chain until the particle has no mother or more than 1 mother, then returns this particle. returns NULL if the mother particle is not found

Definition at line 182 of file MyTruthParticleManager.cxx.

vector< MyTruthParticle * > MyTruthParticleManager::get_children ( MyTruthParticle truth_particle  )  const

returns a vector of pointers to the direct children of the given particle. If a particle is stored more than once it could return itself, but with another GenStat value. to get the children of the next "real" decay, please feed the truth particle to the method get_last_instance first, and call the method get_children with the returned particle

Definition at line 225 of file MyTruthParticleManager.cxx.

MyTruthParticle * MyTruthParticleManager::get_last_instance ( MyTruthParticle part_in  ) 

If a particle is stored more than once (with different GenStat values), this method returns a pointer to the truth particle which is stored as last one. If the given particle is already the last one, or it is only stored once, the method returns the given particle. Should work independant from the generator

Definition at line 258 of file MyTruthParticleManager.cxx.

std::vector<MyParticle*> MyTruthParticleManager::remove_multiples_wo_using_genstat ( std::vector< MyParticle * >  v_input  ) 

returns a vector without multiples of stored truth particles if e.g. a electron is stored twice (with different pdgId's), only the first one in the input vector is stored in the output vector, the others not.

std::vector<MyParticle*> MyTruthParticleManager::remove_multiples ( std::vector< MyParticle * >  v_input  ) 

returns a vector without multiples of stored truth particles decision is made via generator status variable that is set in set_generator

unsigned int MyTruthParticleManager::get_n_of_decay_chains ( void   )  const

returns the number of interesting decay chains found in the event e.g. if the event contains the decay H->tautau it returns 1 if it sontains ZZ->ee it returns 2

Definition at line 493 of file MyTruthParticleManager.cxx.

MyTruthParticle * MyTruthParticleManager::get_primary_intpart ( int  n_decay_chain  )  const

returns a pointer to the first particle of the found interesting decay chain n_decay_chain eg. event contains ZZ->ee get_primary_intpart(1) returns a Z and get_primary_intpart(2) returns a Z as well

Definition at line 505 of file MyTruthParticleManager.cxx.

vector< MyTruthParticle * > MyTruthParticleManager::get_gen1_children_intpart ( int  n_decay_chain  )  const

returns a vector of pointers to the 1st generation children of the primary interesting particle of decay chain n_decay_chain; e.g. in a event ZZ->tautau get_gen1_children_intpart(1) returns the tau and neutrino that were produced in the decay of the first Z

Definition at line 528 of file MyTruthParticleManager.cxx.

vector< vector< MyTruthParticle * > > MyTruthParticleManager::get_gen2_children_intpart ( int  n_decay_chain  )  const

like get_gen1_children_intpart but returns the 2nd generation children of the primary interesting particle of decay chain n_decay_chain so it returns a vector that contains vectors with the products of each decay of the generation 1 particles e.g. in the event H->tautau->ee get_gen2_children_intpart(1) will return a vector of vectors that contain the two electrons and neutrinos

Definition at line 551 of file MyTruthParticleManager.cxx.

int MyTruthParticleManager::find_decay_chain_of ( std::vector< unsigned int >  interesting_pdgIds  ) 

searches the truth particles for the PDG-Ids given in the interesting_pdgIds vector and that have a barcode<50 (barcode cut needed to avoid that W-bosons later in a decay chain are considered as interesting particles) returns the number of interesting decay chains found and stores the primary particle of each decay chain internally

bool MyTruthParticleManager::process_decay_chains ( void   ) 

fills the first and second generation children vectors for the primary interesting particles found

Definition at line 709 of file MyTruthParticleManager.cxx.


The documentation for this class was generated from the following files:
Generated on Tue Oct 21 11:50:49 2008 for NtupleAnalysis by  doxygen 1.5.1