StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StarDecayManager.cxx
1 #include "StarDecayManager.h"
2 #include "StMessMgr.h"
3 #include <assert.h>
4 #include "TClonesArray.h"
5 
6 #include "StarGenerator/UTIL/StarParticleData.h"
7 
9 
10 StarDecayManager::StarDecayManager( const Char_t *name )
11  : mDecayer(), mCurrentDecayer(0), mDebug(0)
12 {
13 
14 
15 }
16 
17 StarDecayManager::~StarDecayManager()
18 {
19 
20 }
21 
23 {
24 
25 }
26 
27 
28 void StarDecayManager::Decay( Int_t pdgid, TLorentzVector *p )
29 {
30  ClearEvent();
31 
32  mCurrentDecayer = mDecayer[pdgid];
33 
34  if (!mCurrentDecayer) mCurrentDecayer = mDecayer[0];
35  assert(mCurrentDecayer);
36 
37  mCurrentDecayer -> Decay( pdgid, p );
38 
39 }
40 
41 Int_t StarDecayManager::ImportParticles( TClonesArray *array )
42 {
43  Int_t np = 0;
44  if ( mCurrentDecayer ) np = mCurrentDecayer->ImportParticles( array );
45  return np;
46 }
47 
48 void StarDecayManager::SetForceDecay( Int_t type ){ assert(0); }
49 void StarDecayManager::ForceDecay(){
50 
51  LOG_INFO << "Force Decay" << endm;
52 
53 }
54 Float_t StarDecayManager::GetPartialBranchingRatio( Int_t ipdg ){ assert(0); }
55 void StarDecayManager::ReadDecayTable(){ assert(0); }
56 
57 Float_t StarDecayManager::GetLifetime( Int_t pdgid )
58 {
59  // Lifetime evaluated by the decayer which handles the decay
60  return mCurrentDecayer->GetLifetime(pdgid);
61 }
62 
64 {
65 
66 }
Int_t ImportParticles(TClonesArray *array=0)
Returns the decay products in a TClonesArray of TParticle.
void Init()
Initializes the decayer.
Float_t GetLifetime(Int_t pdgid)
Return teh lifetime in seconds for the specified particle.
static StarParticleData & instance()
Returns a reference to the single instance of this class.
Interface to PDG information.
void Decay(Int_t pdg, TLorentzVector *p=0)
Decays the particle specified by PDG id and lorentz vector.
Float_t GetPartialBranchingRatio(Int_t pdgid)
Return the branching ratio for the spdcified PDG ID.
void ClearEvent()
Add a particle with specified PDG ID to the stack.