//////////////////////////////////////////////////////////////////////////////////////////////// // Copyright : The FASTMC and SPHMC Collaboration // // Author : Ionut Cristian Arsene // // Affiliation : Oslo University, Norway & Institute for Space Sciences, Bucharest, Romania // // e-mail : i.c.arsene@fys.uio.no // // Date : 2007/05/30 // // // // This class is using the particle and decays lists provided by the // // THERMINATOR (Computer Physics Communications 174 669 (2006)) and // // SHARE (Computer Physics Communications 167 229 (2005)) collaborations. // //////////////////////////////////////////////////////////////////////////////////////////////// #include using std::cout; using std::endl; #include "DecayChannel.h" //_______________________________________________________________________________ DecayChannel::DecayChannel() : fMotherPDG(kNonsensePDG), fBranchingRatio(0.0), fNDaughters(0) { // // default constructor // for(Int_t i=0; i= kMaxDaughters) { cout << "ERROR in DecayChannel::SetDaughters() :" << endl; cout << "Number of daughters bigger than the maximum allowed one (" << kMaxDaughters << ") !!" << endl; } fDaughtersPDG[fNDaughters++] = *(daughters+i); } } //_______________________________________________________________________________ void DecayChannel::AddDaughter(Int_t pdg) { // // add a daughter to this channel // if(fNDaughters >= kMaxDaughters) { cout << "ERROR in DecayChannel::AddDaughter() :" << endl; cout << "Number of daughters is already >= than the maximum allowed one (" << kMaxDaughters << ") !!" << endl; } fDaughtersPDG[fNDaughters++] = pdg; } //_______________________________________________________________________________ Int_t DecayChannel::GetDaughterPDG(Int_t i) { // // get the PDG of the i'th daughter // if((i >= fNDaughters) || (i<0)) { cout << "ERROR in DecayChannel::GetDaughterPDG() :" << endl; cout << "Daughter index required is too big or less than zero!! There are only " << fNDaughters << " secondaries in this channel !!" << endl; return kNonsensePDG; } return fDaughtersPDG[i]; }