KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVSimReader_MMM_asym.cpp
Go to the documentation of this file.
1 //Created by KVClassFactory on Tue Jul 6 17:30:28 2010
2 //Author: Eric Bonnet
3 
4 #include "KVSimReader_MMM_asym.h"
5 
7 
8 
9 
10 
14 {
15  // Default constructor
16  init();
17 }
18 
19 
20 
22 
24 {
25  init();
26  ConvertEventsInFile(filename);
27 }
28 
29 
30 
31 
33 
35 {
37  fBoostQP = vQP;
38  fBoostQC = vQC;
39 }
40 
41 
42 
45 
47 {
48  // Destructor
49 }
50 
51 
52 
53 
55 
57 {
58 
59  while (IsOK()) {
60  while (ReadEvent()) {
61  if (nevt % 1000 == 0) Info("ReadFile", "%d evts lus", nevt);
62  if (HasToFill()) FillTree();
63  }
64  }
65 
66 }
67 
68 
69 
70 
72 
74 {
75 
76  evt->Clear();
77  Int_t mult = 0, natt = 0;
78 
79  ReadLine(" ");
80 
81  Int_t res = GetNparRead();
82  switch (res) {
83  case 0:
84  return kFALSE;
85  default:
86  //nlus = toks->GetEntries();
87  idx = 0;
88  mult = GetIntReadPar(idx++);
89  natt = 5 * mult + 1;
90  if (natt != res) {
91  Info("ReadEvent", "Nombre de parametres (%d) different de celui attendu (%d)", res, natt);
92  return kFALSE;
93  }
94  for (Int_t mm = 0; mm < mult; mm += 1) {
96  ReadNucleus();
97  }
98 
99  evt->SetNumber(nevt);
100  nevt += 1;
101  return kTRUE;
102  }
103 
104 }
105 
106 
107 
109 
111 {
112 
113  Int_t aa = GetIntReadPar(idx++);
114  Int_t zz = GetIntReadPar(idx++);
115 
116  nuc->SetZ(zz);
117  nuc->SetA(aa);
118 
119  Double_t px = GetDoubleReadPar(idx++);
120  Double_t py = GetDoubleReadPar(idx++);
121  Double_t pz = GetDoubleReadPar(idx++);
122 
123  nuc->SetMomentum(px, py, pz);
124 
125  if (fApplyBoost) {
126  // add particle twice to the event
127  // the first one (labelled "Prov=QP") with the particle's momentum
128  // in the QP Frame
129  // the second one (labelled "Prov=QC") with the particle's momentum
130  // in the QC Frame
132  nuc->GetParameters()->SetValue("Prov", "QP");
133 
135  nuc->SetZandA(zz, aa);
136  nuc->SetMomentum(px, py, pz);
138  nuc->GetParameters()->SetValue("Prov", "QC");
139  }
140 
141  return kTRUE;
142 
143 }
144 
145 
146 
int Int_t
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
const Bool_t kFALSE
bool Bool_t
double Double_t
const Bool_t kTRUE
virtual void SetNumber(UInt_t num)
Definition: KVBase.h:215
void Clear(Option_t *opt="")
Clear object properties : name, type/title, number, label.
Definition: KVEvent.h:262
ReadStatus ReadLine(const KVString &pattern="")
Definition: KVFileReader.h:242
Double_t GetDoubleReadPar(Int_t pos) const
Definition: KVFileReader.h:333
Int_t GetIntReadPar(Int_t pos) const
Definition: KVFileReader.h:337
Int_t GetNparRead() const
Definition: KVFileReader.h:324
Bool_t IsOK()
Definition: KVFileReader.h:230
Utility class for kinematical transformations of KVParticle class.
void SetValue(const Char_t *name, value_type value)
void SetA(Int_t a)
Definition: KVNucleus.cpp:655
void SetZ(Int_t z, Char_t mt=-1)
Definition: KVNucleus.cpp:704
void SetZandA(Int_t z, Int_t a)
Set atomic number and mass number.
Definition: KVNucleus.cpp:721
KVNameValueList * GetParameters() const
Definition: KVParticle.h:816
void SetMomentum(const TVector3 &v)
Definition: KVParticle.h:576
void ChangeFrame(const KVFrameTransform &, const KVString &="")
Definition: KVParticle.cpp:601
Nucleus in a simulated event.
Definition: KVSimNucleus.h:31
Read ascii file for asymptotic events of the MMM code after deexcitation.
void SetBoost(TVector3 &vQP, TVector3 &vQC)
KVSimReader_MMM_asym()
Default constructor.
virtual ~KVSimReader_MMM_asym()
Destructor.
Int_t nevt
Definition: KVSimReader.h:68
KVSimNucleus * nuc
Definition: KVSimReader.h:66
virtual Bool_t HasToFill()
Definition: KVSimReader.h:133
virtual void FillTree()
Definition: KVSimReader.h:129
virtual void ConvertEventsInFile(KVString filename)
Method called by constructors with KVString filename argument.
Definition: KVSimReader.cpp:56
KVSimEvent * evt
Definition: KVSimReader.h:65
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:72
Particle * AddParticle()
virtual void Info(const char *method, const char *msgfmt,...) const
const long double mm
Definition: KVUnits.h:69