//
// copy constructor
//
- for(Int_t i=0; i<fNDaughters; i++)
+ for(Int_t i=0; i<kMaxDaughters; i++)
fDaughtersPDG[i] = copy.fDaughtersPDG[i];
}
//
// constructor
//
- for(Int_t i=0; i<nDaughters; i++) {
+ for(Int_t i=0; i<kMaxDaughters; i++) {
if(i >= kMaxDaughters) {
cout << "ERROR in DecayChannel explicit constructor: " << endl;
cout << "Number of daughters bigger than the maximum allowed one (" << kMaxDaughters << ") !!" << endl;
}
- fDaughtersPDG[fNDaughters++] = *(daughters+i);
+ if(i<nDaughters)
+ fDaughtersPDG[fNDaughters++] = *(daughters+i);
+ else
+ fDaughtersPDG[i] = kNonsensePDG;
}
}