KaliVeda
Toolkit for HIC analysis
KVINDRADBRun.cpp
1 /***************************************************************************
2 $Id: KVINDRADBRun.cpp,v 1.11 2009/01/22 13:58:33 franklan Exp $
3 $Revision: 1.11 $
4 $Date: 2009/01/22 13:58:33 $
5 $Author: franklan $
6  ***************************************************************************/
7 #include "KVINDRADBRun.h"
8 #include "Riostream.h"
9 #include "run_index.h"
10 
12 
13 //____________________________________________________________________________
14 
15 
18 
20 {
21  //default ctor
22 }
23 
24 
25 
29 
30 KVINDRADBRun::KVINDRADBRun(Int_t number, const Char_t* title): KVDBRun(number,
31  title)
32 {
33  // Historical INDRA data had 1 single file per run. Therefore we add
34  // a single dummy KVDBRunFile for backwards compatibility.
35  AddRunFile(new KVDBRunFile("dummy", run_index_t{number, std::nullopt}));
36 }
37 
38 
39 
40 
46 
48  Double_t Coul_par_top) const
49 {
50  //Calculation of cross-section (in millibarn) per event of this run from the measured integrated beam current and correcting for dead time.
51  //Based on sect_effic.f by M.F. Rivet
52  //
53  //For meaning of arguments, see GetNIncidentIons()
54 
56  if (!target)
57  return 0; //can't calculate X-section without knowing target characteristics
58 
59  //calculate number of atoms/cm**2 in target
60  Double_t atom_cib = target->GetAtomsPerCM2();
61 
62  //number of projectile nuclei during run
63  Double_t n_proj = GetNIncidentIons(Q_apres_cible, Coul_par_top);
64 
65  Double_t temps_mort = GetTempsMort();
66  if (temps_mort >= 1)
67  return 0.;
68 
69  //X-section [mb] per event = 1e27 / (no. atoms in target * no. of projectile nuclei * (1 - temps mort))
70  Double_t sect_effic = 1.e27 / (atom_cib * n_proj * (1 - temps_mort));
71  return sect_effic;
72 }
73 
74 
75 
79 
81  Double_t Coul_par_top) const
82 {
83  //Calculate total cross-section (in millibarn) measured for this run from the calculated cross-section per event
84  //(see GetEventCrossSection()) and the total number of measured events
85  return GetEventCrossSection(Q_apres_cible, Coul_par_top) * GetEvents();
86 }
87 
88 
89 
96 
98 {
99  //Calculate temps mort for run from values of Gene dir, Gene MRQ and Gene TM, according to:
100  // T.M. = Gene TM / (Gene dir - Gene MRQ)
101  //If Gene dir = Gene MRQ, temps mort = 0.
102  //This can be compared to the value of GetTMpercent() (if present) which is the percentage value filled in the runsheet
103  //during the experimental run.
104  if (GetScaler("Gene DIRECT") == GetScaler("Gene MARQ")) {
105  //if Gene MRQ == Gene Dir, temps mort 0
106  return 0;
107  }
108  return (GetScaler("Gene TM") * 1.0 / (GetScaler("Gene DIRECT") - GetScaler("Gene MARQ")));
109 }
110 
111 
112 
122 
124  Double_t Coul_par_top) const
125 {
126  //Calculate total number of incident beam particles during run, based on measured integrated beam current
127  //Arguments:
128  // Q_apres_cible = (average) charge state of projectile ions AFTER passage through target
129  // Coul_par_top = calibration of Faraday current integrator (default: 1.e-10 Coul/top)
130  // Note (from sect_effic.f):
131  //**** Etalonnage de l'integrateur en 1993: voir cahier 4 page 87.
132  //*** Si l'oscillateur interne du trigger est a 169 Hz, on a 10**(-10) Cb/top.
133  //*** si c'est 160 Hz, on a 1.0610*(10**(-10)).
134 
135  return GetScaler("Faraday 1") * Coul_par_top / (TMath::Qe() * Q_apres_cible);
136 }
137 
138 
139 
140 
145 
147 {
148  //If this run has previously been associated with a system in the database,
149  //this will remove the association. The run will also be removed from the system's
150  //list of associated runs.
151 
153  SetTitle("INDRA run");
154 }
155 
156 
157 
159 
161 {
162  if (GetKey("Tapes")) {
163  return (KVDBTape*) GetKey("Tapes")->GetLinks()->First();
164  }
165  return 0;
166 }
167 
168 
169 
171 
173 {
174  if (GetTape())
175  return GetTape()->GetNumber();
176  else
177  return 0;
178 }
179 
180 
181 
int Int_t
char Char_t
double Double_t
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 Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
virtual KVRList * GetLinks() const
return the list of cross-referenced objects
Definition: KVDBKey.h:65
virtual KVDBKey * GetKey(const Char_t *key) const
Definition: KVDBRecord.cpp:290
virtual Int_t GetNumber() const
Definition: KVDBRecord.h:73
A single raw data file associated with an experimental run ,,.
Definition: KVDBRunFile.h:36
Description of an experimental run in database ,,.
Definition: KVDBRun.h:40
ULong64_t GetEvents() const
Definition: KVDBRun.h:155
KVTarget * GetTarget() const
Return target used for this run (actually target of KVDBSystem associated to run)
Definition: KVDBRun.h:226
void AddRunFile(KVDBRunFile *rf)
Definition: KVDBRun.h:80
virtual void UnsetSystem()
Definition: KVDBRun.cpp:220
virtual Int_t GetScaler(const Char_t *name) const
Get value of scaler with the given name for this run.
Definition: KVDBRun.h:251
Database entry describing a data storage tape used to store raw data.
Definition: KVDBTape.h:25
Database entry for each run of an INDRA experiment.
Definition: KVINDRADBRun.h:30
Double_t GetNIncidentIons(Double_t Q_apres_cible, Double_t Coul_par_top=1.e-10) const
KVDBTape * GetTape() const
void UnsetSystem() override
Double_t GetTempsMort() const
Double_t GetEventCrossSection(Double_t Q_apres_cible, Double_t Coul_par_top=1.e-10) const
KVINDRADBRun()
default ctor
Int_t GetTapeNumber() const
Double_t GetTotalCrossSection(Double_t Q_apres_cible, Double_t Coul_par_top=1.e-10) const
Calculation/correction of energy losses of particles through an experimental target.
Definition: KVTarget.h:128
virtual void SetTitle(const char *title="")
TObject * First() const override
Specifies a runfile according to run number and file index ,.
Definition: run_index.h:33
constexpr Double_t Qe()
ClassImp(TPyArg)