FairRoot/PandaRoot
PndChiGen.cxx
Go to the documentation of this file.
1 /*
2  * @author Alexey Luchinsky
3  * @author Stanislav Poslavsky (stvlpos (at) mail.ru)
4  */
5 
6 #include "PndChiGen.h"
7 
9 }
10 
13  chi_gen = new chigen::ChiGen(model);
14 }
15 
17 }
18 
20  chigen::ChiGen* oldPointer = chi_gen;
21  chi_gen = p;
22  return oldPointer;
23 }
24 
26  Pythia8::Event* event = chi_gen->next();
27  if (event == NULL)
28  return kFALSE;
29 
30  Pythia8::Particle* particle = 0;
31  for (int i = event->size() - 1; i >= 0; --i) {
32  particle = &event->at(i);
33 
34  if (particle->status() < 0)
35  continue; // adding only final particles
36 
37  primGen->AddTrack(particle->id(),
38  particle->px(), particle->py(), particle->pz(),
39  particle->xProd(), particle->yProd(), particle->zProd(),
40  -1, true, particle->e());
41 
42  };
43 
44  return kTRUE;
45 }
46 
Double_t p
Definition: anasim.C:58
void ensure_chigen_is_initialized()
Int_t i
Definition: run_full.C:25
virtual ~PndChiGen()
Definition: PndChiGen.cxx:16
FairPrimaryGenerator * primGen
Definition: sim_emc_apd.C:81
const int particle
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
Definition: PndChiGen.cxx:25
ChiGen * setChiGen(ChiGen *chigen)
Definition: PndChiGen.cxx:19
ClassImp(PndAnaContFact)