KaliVeda
Toolkit for HIC analysis
KVSimReader_MMM.cpp
1 //Created by KVClassFactory on Tue Jul 6 16:48:05 2010
2 //Author: Eric Bonnet
3 
4 #include "KVSimReader_MMM.h"
5 
7 
8 
9 
10 
14 {
15  // Default constructor
16  init();
17 }
18 
19 
20 
22 
24 {
25  init();
27 }
28 
29 
30 
33 
35 {
36  // Destructor
37 }
38 
39 
40 
42 
44 {
45 
46 
47  while (IsOK()) {
48  while (ReadEvent()) {
49  if (nevt % 1000 == 0) Info("ReadFile", "%d evts lus", nevt);
50  if (HasToFill()) FillTree();
51  }
52  }
53 
54 }
55 
56 
57 
58 
60 
62 {
63 
64  evt->Clear();
65  Int_t mult = 0, natt = 0;
66 
67  ReadLine(" ");
68 
69  Int_t res = GetNparRead();
70  switch (res) {
71  case 0:
72  Info("ReadEvent", "case 0 line est vide");
73  return kFALSE;
74  default:
75  idx = 0;
76  mult = GetIntReadPar(idx++);
77  natt = 6 * mult + 4 + 1;
78  if (natt != res) {
79  Info("ReadEvent", "Nombre de parametres (%d) different de celui attendu (%d)", res, natt);
80  return kFALSE;
81  }
86 
87  for (Int_t mm = 0; mm < mult; mm += 1) {
89  ReadNucleus();
90  }
91 
92  evt->SetNumber(nevt);
93  nevt += 1;
94  return kTRUE;
95  }
96 
97 }
98 
99 
100 
102 
104 {
105 
106  Int_t aa = GetIntReadPar(idx++);
107  nuc->SetZ(GetIntReadPar(idx++));
108  nuc->SetA(aa);
109  Double_t exci = GetDoubleReadPar(idx++);
110  Double_t px = GetDoubleReadPar(idx++);
111  Double_t py = GetDoubleReadPar(idx++);
112  Double_t pz = GetDoubleReadPar(idx++);
113 
114  nuc->SetMomentum(px, py, pz);
115  nuc->SetExcitEnergy(exci);
116 
117  return kTRUE;
118 
119 }
120 
121 
int Int_t
bool Bool_t
constexpr Bool_t kFALSE
double Double_t
constexpr Bool_t kTRUE
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
virtual void SetNumber(UInt_t num)
Definition: KVBase.h:216
KVNameValueList * GetParameters() const
Definition: KVEvent.h:179
void Clear(Option_t *opt="")
Definition: KVEvent.h:238
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
void SetValue(const Char_t *name, value_type value)
void SetExcitEnergy(Double_t e)
Definition: KVNucleus.cpp:868
void SetA(Int_t a)
Definition: KVNucleus.cpp:658
void SetZ(Int_t z, Char_t mt=-1)
Definition: KVNucleus.cpp:707
void SetMomentum(const TVector3 *v)
Definition: KVParticle.h:542
Nucleus in a simulated event.
Definition: KVSimNucleus.h:32
Read ascii file for events of the MMM code at Freeze Out.
virtual Bool_t ReadNucleus()
virtual Bool_t ReadEvent()
virtual ~KVSimReader_MMM()
Destructor.
KVSimReader_MMM()
Default constructor.
virtual void ReadFile()
Int_t nevt
Definition: KVSimReader.h:62
KVSimNucleus * nuc
Definition: KVSimReader.h:60
virtual Bool_t HasToFill()
Definition: KVSimReader.h:127
virtual void FillTree()
Definition: KVSimReader.h:123
virtual void ConvertEventsInFile(KVString filename)
Method called by constructors with KVString filename argument.
Definition: KVSimReader.cpp:57
KVSimEvent * evt
Definition: KVSimReader.h:59
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
Particle * AddParticle()
virtual void Info(const char *method, const char *msgfmt,...) const
void init()
ClassImp(TPyArg)