KaliVeda
Toolkit for HIC analysis
KVSimReader_MMM_asym.cpp
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();
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
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
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
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:658
void SetZ(Int_t z, Char_t mt=-1)
Definition: KVNucleus.cpp:707
void SetZandA(Int_t z, Int_t a)
Set atomic number and mass number.
Definition: KVNucleus.cpp:724
KVNameValueList * GetParameters() const
Definition: KVParticle.h:815
void SetMomentum(const TVector3 *v)
Definition: KVParticle.h:542
void ChangeFrame(const KVFrameTransform &, const KVString &="")
Definition: KVParticle.cpp:601
Nucleus in a simulated event.
Definition: KVSimNucleus.h:32
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: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)