]>
Commit | Line | Data |
---|---|---|
b1c2e580 | 1 | /* |
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 | |
4 | Date : 2007/05/30 | |
5 | */ | |
6 | ||
7 | #include "TVector3.h" | |
8 | #ifndef INITIAL_STATE | |
9 | #include "InitialState.h" | |
10 | #endif | |
11 | #ifndef HADRONDECAYER_INCLUDED | |
12 | #include "HadronDecayer.h" | |
13 | #endif | |
14 | #include <iostream> | |
15 | #include <fstream> | |
7b7936e9 | 16 | using namespace std; |
3fa37a65 | 17 | |
b1c2e580 | 18 | // aic(2008/08/08): define the fLastIndex static variable |
3fa37a65 | 19 | //Int_t Particle::fLastIndex; |
20 | ||
21 | void InitialState::Evolve(List_t &secondaries, ParticleAllocator &allocator, Double_t weakDecayLimit) { | |
22 | // Particle indexes are set for primaries already from InitialStateHydjet::Initialize() | |
b1c2e580 | 23 | |
3fa37a65 | 24 | // particle list iterators |
b1c2e580 | 25 | LPIT_t it; |
26 | LPIT_t e; | |
27 | ||
3fa37a65 | 28 | // Particle indexes are set for primaries already from InitialStateHydjet::Initialize() |
b1c2e580 | 29 | |
3fa37a65 | 30 | // Decay loop |
31 | // Note that the decay products are always added at the end of list so the unstable products are | |
32 | // decayed when the iterator reaches them (used for cascade decays) | |
b1c2e580 | 33 | |
3fa37a65 | 34 | it = secondaries.begin(); |
b1c2e580 | 35 | |
3fa37a65 | 36 | for(it = secondaries.begin(), e = secondaries.end(); it != e; it++) { |
37 | // if the decay procedure was applied already skip ... (e.g. particles from pythia history information) | |
38 | if(it->GetDecayed()) { | |
b1c2e580 | 39 | continue; |
40 | } | |
3fa37a65 | 41 | |
42 | // generate the decay time; if particle is stable or set to stable decayTime=0 | |
b1c2e580 | 43 | Double_t decayTime = GetDecayTime(*it, weakDecayLimit); |
44 | it->SetLastInterTime(it->T() + decayTime); | |
45 | TVector3 shift(it->Mom().BoostVector()); | |
46 | shift *= decayTime; | |
3fa37a65 | 47 | it->SetDecayed(); |
48 | ||
49 | // if decayTime>0 then apply the decay procedure (only 2 or 3 body decays) | |
b1c2e580 | 50 | if(decayTime > 0.) { |
51 | it->Pos(it->Pos() += TLorentzVector(shift, 0.)); | |
52 | it->T(it->T() + decayTime); | |
b1c2e580 | 53 | Decay(secondaries, *it, allocator, fDatabase); |
7b7936e9 | 54 | } |
3fa37a65 | 55 | // if particle is stable just continue |
56 | } | |
57 | ||
58 | it = secondaries.begin(); | |
59 | Int_t npart = it->GetLastIndex(); | |
60 | cout << "particles generated = " << npart << endl; | |
61 | for(Int_t count=0; count<npart; count++, it++) { | |
62 | // cout << "=====================================================" << endl; | |
63 | // cout << "InitialState::Evolve() particle count = " << count << endl; | |
64 | // cout << "InitialState::Evolve() particle pdg = " << it->Encoding() << endl; | |
65 | // cout << "InitialState::Evolve() index = " << it->GetIndex() << endl; | |
66 | // cout << "InitialState::Evolve() mother index = " << it->GetMother() << endl; | |
67 | // cout << "InitialState::Evolve() mother pdg = " << it->GetLastMotherPdg() << endl; | |
68 | // cout << "InitialState::Evolve() n daughters = " << it->GetNDaughters() << endl; | |
69 | // cout << "InitialState::Evolve() d (first, last) = " << it->GetFirstDaughterIndex() << ", " | |
70 | // << it->GetLastDaughterIndex() << endl; | |
b1c2e580 | 71 | } |
72 | } |