KaliVeda  1.13/01
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  tree_title.Form("ELIE secondary events %s + %s %.1f MeV/nuc.",
22  proj.GetSymbol(), targ.GetSymbol(), ebeam);
23 }
24 
25 
26 
29 
32 {
33  // Default constructor
34 }
35 
36 
37 
38 
41 
44 {
45  // Read file and convert to ROOT TTree
46  ConvertEventsInFile(filename);
47  SaveTree();
48 }
49 
50 
51 
59 
61 {
62  // numero_particule,z, a, teta, phi, energie, origine de la particule, energie d'ecitation finale
63  // 0 27 57 3.27897003986 230.52425244 1109.37002505 0 0
64  // 1 80 198 176.726338776 129.481056376 319.364098122 1 0
65  //
66  // The origin of secondary decay particles is stored in a parameter named "ORIGIN"
67  // As particles in a KVEvent are numbered 1,2,... we add 1 to the value read in
68 
69  auto res = ReadLineAndCheck(8, " ");
70  switch (res) {
72  Info("ReadNucleus", "case 0 line est vide");
73  return kFALSE;
74 
76  nuc->SetZ(GetIntReadPar(1));
77  nuc->SetA(GetIntReadPar(2));
82  nuc->SetParameter("ORIGIN", GetIntReadPar(6) + 1);
83  return kTRUE;
84  break;
85 
86  default:
87  return kFALSE;
88  }
89 
90  return kFALSE;
91 
92 }
93 
94 
95 //____________________________________________________________________________//
96 
97 
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
const Bool_t kFALSE
bool Bool_t
const Bool_t kTRUE
char * Form(const char *fmt,...)
@ 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)
Definition: KVFileReader.h:278
Double_t GetDoubleReadPar(Int_t pos) const
Definition: KVFileReader.h:333
Int_t GetIntReadPar(Int_t pos) const
Definition: KVFileReader.h:337
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:695
void SetPhi(Double_t phi)
Definition: KVParticle.h:699
void SetParameter(const Char_t *name, ValType value) const
Definition: KVParticle.h:820
void SetEnergy(Double_t e)
Definition: KVParticle.h:601
Read ELIE events after secondary decay.
KVSimReader_ELIE_asym()
Default constructor.
Read ascii files containing events generated by Elie.
void ConvertEventsInFile(KVString filename)
Method called by constructors with KVString filename argument.
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