KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVSimReader_ELIE_asym.cpp
Go to the documentation of this file.
1 //Created by KVClassFactory on Wed Jan 11 10:29:05 2017
2 //Author: John Frankland,,,
3 
5 
7 
8 
9 
10 
11 
15 void KVSimReader_ELIE_asym::define_output_filename()
16 {
17  // ROOT file called: ELIE_[PROJ]_[TARG]_[EBEAM]AMeV_ASYM.root
18  // Call after reading file header
19  SetROOTFileName(Form("ELIE_%s_%s_%.1fAMeV_ASYM.root",
20  proj.GetSymbol(), targ.GetSymbol(), ebeam));
21 }
22 
23 
24 
27 
30 {
31  // Default constructor
32 }
33 
34 
35 
36 
39 
42 {
43  // Read file and convert to ROOT TTree
44  ConvertEventsInFile(filename);
45  SaveTree();
46 }
47 
48 
49 
50 
53 
55 {
56  // Destructor
57 }
58 
59 
60 
62 
64 {
65  if (!OpenFileToRead(filename)) return;
66  if (!ReadHeader()) return;
68  tree_title.Form("ELIE secondary events %s + %s %.1f MeV/nuc.",
70  Run();
71  CloseFile();
72 }
73 
74 
75 
76 
84 
86 {
87  // numero_particule,z, a, teta, phi, energie, origine de la particule, energie d'ecitation finale
88  // 0 27 57 3.27897003986 230.52425244 1109.37002505 0 0
89  // 1 80 198 176.726338776 129.481056376 319.364098122 1 0
90  //
91  // The origin of secondary decay particles is stored in a parameter named "ORIGIN"
92  // As particles in a KVEvent are numbered 1,2,... we add 1 to the value read in
93 
94  Int_t res = ReadLineAndCheck(8, " ");
95  switch (res) {
96  case 0:
97  Info("ReadNucleus", "case 0 line est vide");
98  return kFALSE;
99 
100  case 1:
101  nuc->SetZ(GetIntReadPar(1));
102  nuc->SetA(GetIntReadPar(2));
107  nuc->SetParameter("ORIGIN", GetIntReadPar(6) + 1);
108  return kTRUE;
109  break;
110 
111  default:
112  return kFALSE;
113  }
114 
115  return kFALSE;
116 
117 }
118 
119 
120 //____________________________________________________________________________//
121 
122 
int Int_t
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
const Bool_t kFALSE
bool Bool_t
const Bool_t kTRUE
char * Form(const char *fmt,...)
Int_t ReadLineAndCheck(Int_t nexpect, const Char_t *pattern)
Definition: KVFileReader.h:100
void CloseFile()
Definition: KVFileReader.h:79
Bool_t OpenFileToRead(KVString filename)
Definition: KVFileReader.h:59
Double_t GetDoubleReadPar(Int_t pos)
Definition: KVFileReader.h:159
Int_t GetIntReadPar(Int_t pos)
Definition: KVFileReader.h:163
const Char_t * GetSymbol(Option_t *opt="") const
Definition: KVNucleus.cpp:81
void SetExcitEnergy(Double_t e)
Definition: KVNucleus.cpp:865
void SetA(Int_t a)
Definition: KVNucleus.cpp:655
void SetZ(Int_t z, Char_t mt=-1)
Definition: KVNucleus.cpp:704
void SetTheta(Double_t theta)
Definition: KVParticle.h:654
void SetPhi(Double_t phi)
Definition: KVParticle.h:658
void SetParameter(const Char_t *name, ValType value) const
Definition: KVParticle.h:739
void SetEnergy(Double_t e)
Definition: KVParticle.h:560
Read ELIE events after secondary decay.
virtual ~KVSimReader_ELIE_asym()
Destructor.
void ConvertEventsInFile(KVString filename)
Method called by constructors with KVString filename argument.
KVSimReader_ELIE_asym()
Default constructor.
Read ascii files containing events generated by Elie.
KVString tree_title
Definition: KVSimReader.h:69
void Run(Option_t *option="recreate")
KVSimNucleus * nuc
Definition: KVSimReader.h:66
virtual void SaveTree()
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:72
virtual void Info(const char *method, const char *msgfmt,...) const
void Form(const char *fmt,...)