KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVSimReader_HIPSE_asym.cpp
1//Created by KVClassFactory on Fri Jul 2 15:16:15 2010
2//Author: bonnet
3
4#include "KVSimReader_HIPSE_asym.h"
5#include "KV2Body.h"
6
8
9
10
11
12
14
16{
17 // Default constructor
18 init();
19}
20
21
22
24
30
31
32
35
40
41
42
44
46{
47
48 evt->Clear();
49 Int_t mult = 0, mtotal = 0;
50 auto res = ReadLineAndCheck(2, " ");
51 switch (res) {
53 Info("ReadEvent", "case 0 line est vide");
54 return kFALSE;
57 mult = GetIntReadPar(0);
58 mtotal = GetIntReadPar(1);
59 evt->GetParameters()->SetValue("mult", mtotal);
60
61 break;
62 default:
63
64 return kFALSE;
65 }
66
67 /*---------------------------------------------
68 Esa = excitation per nucleon
69 vcm = center of mass energy
70 Bparstore = impact parameter
71 PhiPlan = angle of the reaction plane
72 //---------------------------------------------
73 */
74
75 fPhiPlan = gRandom->Rndm() * 2.*TMath::Pi();
77
78 res = ReadLineAndCheck(3, " ");
79 switch (res) {
81 return kFALSE;
85 evt->GetParameters()->SetValue("Bparstore", GetDoubleReadPar(2));
86 evt->GetParameters()->SetValue("PhiPlan", fPhiPlan);
87 break;
88 default:
89
90 return kFALSE;
91 }
92
93
94 res = ReadLineAndCheck(3, " ");
95 switch (res) {
97 return kFALSE;
99
100 break;
101 default:
102
103 return kFALSE;
104 }
105
107 for (Int_t mm = 0; mm < mult; mm += 1) {
109 if (!ReadNucleus()) return kFALSE;
110 }
111
112 nevt += 1;
113 return kTRUE;
114
115}
116
117
118
120
122{
123
124 auto res = ReadLineAndCheck(3, " ");
125 switch (res) {
127 Info("ReadNucleus", "case 0 line est vide");
128 return kFALSE;
129
131 /*
132 proven = 0 -> fusion of the QP and QT
133 proven = 1 -> QP
134 proven = 2 -> QT
135 proven > 2 -> other
136 */
137
140 nuc->GetParameters()->SetValue("proven", GetDoubleReadPar(2));
141
142 break;
143
144 default:
145
146
147 return kFALSE;
148 }
149
150 res = ReadLineAndCheck(3, " ");
151 switch (res) {
153 Info("ReadNucleus", "case 0 line est vide");
154 return kFALSE;
155
157 //Axe "faisceau dans HIPSE x -> on effectue une rotation X,Y,Z -> Y,Z,X"
159 {
161 vv *= rr;
163 return kTRUE;
164 }
165 default:
166
167
168 return kFALSE;
169 }
170
171
172}
173
174
175
179
181{
182 // ROOT file called: HIPSE_[PROJ]_[TARG]_[EBEAM]AMeV_ASYM.root
183 // Call after reading file header
184
185 SetROOTFileName(Form("HIPSE_%s_%s_%.1fAMeV_ASYM.root",
187}
188
189
190
191
193
195{
196 if (!OpenFileToRead(filename)) return;
197 if (!ReadHeader()) return;
199 tree_title.Form("HIPSE secondary events %s + %s %.1f MeV/nuc.",
201 Run();
202 CloseFile();
203}
204
205
int Int_t
bool Bool_t
constexpr Bool_t kFALSE
constexpr Bool_t kTRUE
winID h TVirtualViewer3D vv
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
R__EXTERN TRandom * gRandom
char * Form(const char *fmt,...)
virtual void SetNumber(UInt_t num)
Definition KVBase.h:216
void Clear(Option_t *opt="")
Definition KVEvent.h:238
KVNameValueList * GetParameters() const
Definition KVEvent.h:179
@ EmptyLine
last line read was empty (only whitespace)
@ OK
successful read and import of parameters from line
ReadStatus ReadLineAndCheck(Int_t nexpect, const KVString &pattern)
Double_t GetDoubleReadPar(Int_t pos) const
Int_t GetIntReadPar(Int_t pos) const
Bool_t OpenFileToRead(const KVString &filename)
void SetValue(const Char_t *name, value_type value)
const Char_t * GetSymbol(Option_t *opt="") const
Definition KVNucleus.cpp:81
void SetA(Int_t a)
void SetZ(Int_t z, Char_t mt=-1)
void SetVelocity(const TVector3 &)
Set velocity of particle (in cm/ns units)
void SetMomentum(const TVector3 *v)
Definition KVParticle.h:542
KVNameValueList * GetParameters() const
Definition KVParticle.h:815
TVector3 GetVelocity() const
returns velocity vector in cm/ns units
Nucleus in a simulated event.
Read ascii file for asymptotic events of the HIPSE code after SIMON deexcitation.
virtual ~KVSimReader_HIPSE_asym()
Destructor.
KVSimReader_HIPSE_asym()
Default constructor.
void ConvertEventsInFile(KVString filename)
Read ascii file for events of the HIPSE code after clusterization.
KVString tree_title
Definition KVSimReader.h:63
void Run(Option_t *option="recreate")
void SetROOTFileName(const Char_t *n)
KVSimNucleus * nuc
Definition KVSimReader.h:60
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
Double_t Rndm() override
TRotation & SetXEulerAngles(Double_t phi, Double_t theta, Double_t psi)
void Form(const char *fmt,...)
void init()
constexpr Double_t Pi()
ClassImp(TPyArg)