This class defines a sequential 2-body decay tree and generates events using the ROOT class TGenPhaseSpace.
More...
#include <TwoBodyDecayGen.hxx>
List of all members.
Public Member Functions |
| | TwoBodyDecayGen (double mommass, double dau1mass, double dau2mass, TwoBodyDecayGen *dau1=NULL, TwoBodyDecayGen *dau2=NULL) |
| | Constructor 1.
|
| | TwoBodyDecayGen (double mommass, double *daumasses, TwoBodyDecayGen *dau1=NULL, TwoBodyDecayGen *dau2=NULL) |
| | Constructor 2.
|
| | TwoBodyDecayGen (double *masses, unsigned nparts) |
| | Constructor that takes an array with particle masses for the entire decay tree.
|
| bool | add_decay_channel (double *masses, unsigned nparts, double brfr) |
| | Add a new decay channel.
|
| TwoBodyDecayGen * | get_daughter (unsigned chid, unsigned dauid) |
| | Return requested daughter decay node.
|
| double | get_brfr (unsigned chid) |
| | Return BF for decay channel.
|
| int | find_leaf_nodes (std::vector< std::deque< chBFpair > > &brfrVec, std::deque< chBFpair > &brfrQ) |
| | Find leaf branches or decay nodes.
|
| double | generate (TLorentzVector &momp, std::vector< TLorentzVector > &particle_lvs, std::deque< chBFpair > chQ) |
| | Generate one event at a time.
|
| TTree * | get_event_tree (unsigned nevents, TH1 *hmomp) |
| | Generate arbitrary number of events.
|
| void | print (unsigned indent=0) |
| | Print decay tree.
|
Private Member Functions |
| void | _printQ (std::string prefix, std::deque< chBFpair > queue) |
| | Print queue for debugging.
|
| void | _printQ (std::string prefix, std::vector< std::deque< chBFpair > > queue) |
| | Print vector of queues for debugging.
|
Private Attributes |
|
TGenPhaseSpace | _generator |
| | Generator for the current decay vertex.
|
|
double | _mommass |
| | Mother particle mass for the current decay vertex.
|
|
double | _daumasses [NDAUS] |
| | Array of the two daughter masses.
|
|
DauNodeVec | _dauchannels |
| | Decay channels with BF (stored as pointers)
|
Static Private Attributes |
|
static unsigned long long | _count |
| | Debug message counter.
|
Detailed Description
This class defines a sequential 2-body decay tree and generates events using the ROOT class TGenPhaseSpace.
Note that this is a very simple phase space event generator and is not aware of any resonances. The decay tree is stored as an array with particle masses and pointers to TwoBodyDecayGen instances for subsequent decay vertices. These pointers are NULL for leaf nodes in the decay tree. There are several constructors to instantiate a TwoBodyDecayGen object; use of the constructor which takes an array with particle masses and length of the decay tree (also the length of the particle mass array) is recommended for simplicity of use. Look at the constructor documentation for more details on the format.
- Author:
- Suvayu Ali Suvay.nosp@m.u.Al.nosp@m.i@cer.nosp@m.nNOS.nosp@m.PAM.c.nosp@m.h
- Date:
- 2012-11-05 Mon
Member Typedef Documentation
Constructor & Destructor Documentation
Constructor 1.
- Parameters:
-
| mommass | Mass of the mother in GeV/c² |
| dau1mass | Mass of the first daughter in GeV/c² |
| dau2mass | Mass of the second daughter in GeV/c² |
| dau1 | Pointer to TwoBodyDecayGen object for first daughter |
| dau2 | Pointer to TwoBodyDecayGen object for second daughter |
Constructor 2.
- Parameters:
-
| mommass | Mass of the mother in GeV/c² |
| daumasses | Array of doubles with mass of the two daughters in GeV/c² |
| dau1 | Pointer to TwoBodyDecayGen object for first daughter |
| dau2 | Pointer to TwoBodyDecayGen object for second daughter |
| TwoBodyDecayGen::TwoBodyDecayGen |
( |
double * |
masses, |
|
|
unsigned |
nparts |
|
) |
| |
Constructor that takes an array with particle masses for the entire decay tree.
No need to create the different decay vertices in the right order any more. Instead, pass an array with all the particle masses and the number of particles (length of the array). The array should look something like these:
- Bs → Ds*(Dsγ)ρ(ππ) double masses[7] = {Bs, Ds*, ρ, Ds, γ, π, π};
- Bs → Ds*(Dsγ)π double masses[5] = {Bs, Ds*, π, Ds, γ};
- Bs → Ds*(Dsπ)π double masses[5] = {Bs, Ds*, π, Ds, π};
NB: Only one level of decay vertices have been tested at the moment.
- Parameters:
-
| masses | Array of doubles with mass of all the particles in GeV/c² |
| nparts | Number of particles in the decay tree (length of the array) |
Member Function Documentation
| void TwoBodyDecayGen::_printQ |
( |
std::string |
prefix, |
|
|
std::deque< chBFpair > |
queue |
|
) |
| |
|
private |
Print queue for debugging.
- Parameters:
-
| prefix | String prefix in output |
| queue | Queue to print |
| void TwoBodyDecayGen::_printQ |
( |
std::string |
prefix, |
|
|
std::vector< std::deque< chBFpair > > |
queue |
|
) |
| |
|
private |
Print vector of queues for debugging.
- Parameters:
-
| prefix | String prefix in output |
| queue | Vector of queues to print |
| bool TwoBodyDecayGen::add_decay_channel |
( |
double * |
masses, |
|
|
unsigned |
nparts, |
|
|
double |
brfr |
|
) |
| |
Add a new decay channel.
- Parameters:
-
| masses | Array of doubles with mass of all the particles in GeV/c² |
| nparts | Number of particles in the decay tree (length of the array) |
| brfr | Branching fraction for the channel |
- Returns:
- Status
| int TwoBodyDecayGen::find_leaf_nodes |
( |
std::vector< std::deque< chBFpair > > & |
brfrVec, |
|
|
std::deque< chBFpair > & |
brfrQ |
|
) |
| |
Find leaf branches or decay nodes.
This method traverses the decay tree and extracts the branching fraction and the channel id from each node into a double-ended queue. It stops the queue everytime a leaf node is encountered. The queue is then saved into a vector.
Implementation: Follow each daughter node, until a leaf node is found. Return the depth of the recursive call, so in the current function scope 0, increment it by 1 as we go up the tree. Once a leaf node is found, branch off the search to the other daughters one level above (recursion level = 1).
(recursion depth)
L3 - - - mother
/ \
/ \
L2 - - - d1 d2 (leaf node)
/ \ / \
/ \ / \
L1 - - - (leaf node) d1 d2 d3 d4
/ \
/ \
L0 - - - d1 d2
NB: end points (d{2..4} @ L1 or d{1,2} @ L0) are stored as NULL pointers
- Parameters:
-
| brfrVec | Vector with deque for each leaf branch / decay node |
| brfrQ | Pointer to deque for each leaf branch / decay node |
- Returns:
- Depth where leaf node was found (-ve numbers are invalid)
| double TwoBodyDecayGen::generate |
( |
TLorentzVector & |
momp, |
|
|
std::vector< TLorentzVector > & |
particle_lvs, |
|
|
std::deque< chBFpair > |
chQ |
|
) |
| |
Generate one event at a time.
- Parameters:
-
| momp | Mother 4-momentum |
| particle_lvs | std::vector used to return generated 4-momenta |
| chQ | Queue with channels to generate |
- Returns:
- Event weight
| double TwoBodyDecayGen::get_brfr |
( |
unsigned |
chid | ) |
|
Return BF for decay channel.
- Parameters:
-
- Returns:
- Branching fraction for decay channel
| TwoBodyDecayGen * TwoBodyDecayGen::get_daughter |
( |
unsigned |
chid, |
|
|
unsigned |
dauid |
|
) |
| |
Return requested daughter decay node.
- Parameters:
-
| chid | Decay channel id |
| dauid | Daughter number (0 or 1) |
- Returns:
- Pointer to the daughter decay node
| TTree * TwoBodyDecayGen::get_event_tree |
( |
unsigned |
nevents, |
|
|
TH1 * |
hmomp |
|
) |
| |
Generate arbitrary number of events.
- Parameters:
-
| nevents | Number of events to generate |
| hmomp | Histogram template for 3-momentum of the mother mother particle |
- Returns:
- Generated event tree
| void TwoBodyDecayGen::print |
( |
unsigned |
indent = 0 | ) |
|
Print decay tree.
- Parameters:
-
| indent | Spaces to indent (to denote decay level) |
The documentation for this class was generated from the following files: