2 Ludmila Malinina malinina@lav01.sinp.msu.ru, SINP MSU/Moscow and JINR/Dubna
3 Ionut Arsene i.c.arsene@fys.uio.no, Oslo University and ISS-Bucharest
9 #include "InitialState.h"
11 #ifndef HADRONDECAYER_INCLUDED
12 #include "HadronDecayer.h"
17 // aic(2008/08/08): define the fLastIndex static variable
18 Int_t Particle::fLastIndex;
20 void InitialState::Evolve(List_t &source, List_t &secondaries, ParticleAllocator &allocator, Double_t weakDecayLimit) {
24 // Initialize the fLastIndex to -1
28 // Loop over source list (primary particles)
29 for(it = source.begin(), e = source.end(); it != e; ++it) {
30 // calculate the decay time of the particle
31 Double_t decayTime = GetDecayTime(*it, weakDecayLimit);
32 TVector3 shift(it->Mom().BoostVector());
34 it->SetLastInterTime(it->T() + decayTime);
36 // if the particle is unstable run the decayer
38 it->Pos(it->Pos() += TLorentzVector(shift, 0.));
39 it->T(it->T() + decayTime);
40 // perform the decay procedure
41 // the primaries are added to the list of secondaries inside Decay()
42 Decay(secondaries, *it, allocator, fDatabase);
44 // else just add the primary to the list of particles
47 allocator.AddParticle(*it, secondaries);
51 // Loop over the secondaries list and decay the cascades
52 for(it = secondaries.begin(), e = secondaries.end(); it != e;) {
53 // the primaries are already decayed, so just ignore it
54 if(it->GetMother()==-1) {
58 Double_t decayTime = GetDecayTime(*it, weakDecayLimit);
59 it->SetLastInterTime(it->T() + decayTime);
60 TVector3 shift(it->Mom().BoostVector());
63 // if the particle is unstable run the decays
65 it->Pos(it->Pos() += TLorentzVector(shift, 0.));
66 it->T(it->T() + decayTime);
67 // The decay products are added to the list inside the Decay() function
68 // The mother particle is not removed from list but can be distinguished
69 // since the daughter indexes will be initialized
70 Decay(secondaries, *it, allocator, fDatabase);