2 Copyright : The FASTMC and SPHMC Collaboration
3 Author : Ionut Cristian Arsene
4 Affiliation : Oslo University, Norway & Institute for Space Sciences, Bucharest, Romania
5 e-mail : i.c.arsene@fys.uio.no
8 This class is using the particle and decay lists provided by the
9 THERMINATOR (Computer Physics Communications 174 669 (2006)) and
10 SHARE (Computer Physics Communications 167 229 (2005)) collaborations.
14 #include "ParticlePDG.h"
21 ParticlePDG::ParticlePDG() :
28 fLightQuarkNumber(0.0),
29 fAntiLightQuarkNumber(0.0),
30 fStrangeQuarkNumber(0.0),
31 fAntiStrangeQuarkNumber(0.0),
32 fCharmQuarkNumber(0.0),
33 fAntiCharmQuarkNumber(0.0),
37 for(Int_t i=0; i<kMaxDecayChannels; i++)
38 fDecayChannels[i] = new DecayChannel();
41 ParticlePDG::ParticlePDG(Char_t *name, Int_t pdg, Double_t mass, Double_t width) :
48 fLightQuarkNumber(0.0),
49 fAntiLightQuarkNumber(0.0),
50 fStrangeQuarkNumber(0.0),
51 fAntiStrangeQuarkNumber(0.0),
52 fCharmQuarkNumber(0.0),
53 fAntiCharmQuarkNumber(0.0),
57 for(Int_t i=0; i<9; i++)
58 if(*(name+i) != '\0') fName[i] = *(name+i);
60 for(Int_t i=0; i<kMaxDecayChannels; i++)
61 fDecayChannels[i] = new DecayChannel();
64 ParticlePDG::~ParticlePDG() {
65 for(Int_t i=0; i<kMaxDecayChannels; i++)
66 delete fDecayChannels[i];
69 Double_t ParticlePDG::GetFullBranching() {
70 Double_t fullBranching = 0.0;
71 for(Int_t i=0; i<fNDecayChannels; i++)
72 fullBranching += fDecayChannels[i]->GetBranching();
76 void ParticlePDG::AddChannel(DecayChannel* channel) {
77 if(channel->GetMotherPDG() != fPDG) {
78 cout << "ERROR in ParticlePDG::AddChannel() : You try to add a channel which has a different mother PDG" << endl;
81 fDecayChannels[fNDecayChannels]->SetMotherPDG(channel->GetMotherPDG());
82 fDecayChannels[fNDecayChannels]->SetBranching(channel->GetBranching());
83 fDecayChannels[fNDecayChannels]->SetDaughters(channel->GetDaughters(), channel->GetNDaughters());