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 
11 
12 //____________________________________________________________________________
13 
14 
17 
19 {
20  //default ctor
21 }
22 
23 
24 
27 
28 KVINDRADBRun::KVINDRADBRun(Int_t number, const Char_t* title): KVDBRun(number,
29  title)
30 {
31  //ctor for a given run number
32 }
33 
34 
35 
38 
39 KVINDRADBRun::~KVINDRADBRun()
40 {
41  //dtor
42 }
43 
44 
45 
46 
52 
54  Double_t Coul_par_top) const
55 {
56  //Calculation of cross-section (in millibarn) per event of this run from the measured integrated beam current and correcting for dead time.
57  //Based on sect_effic.f by M.F. Rivet
58  //
59  //For meaning of arguments, see GetNIncidentIons()
60 
62  if (!target)
63  return 0; //can't calculate X-section without knowing target characteristics
64 
65  //calculate number of atoms/cm**2 in target
66  Double_t atom_cib = target->GetAtomsPerCM2();
67 
68  //number of projectile nuclei during run
69  Double_t n_proj = GetNIncidentIons(Q_apres_cible, Coul_par_top);
70 
71  Double_t temps_mort = GetTempsMort();
72  if (temps_mort >= 1)
73  return 0.;
74 
75  //X-section [mb] per event = 1e27 / (no. atoms in target * no. of projectile nuclei * (1 - temps mort))
76  Double_t sect_effic = 1.e27 / (atom_cib * n_proj * (1 - temps_mort));
77  return sect_effic;
78 }
79 
80 
81 
85 
87  Double_t Coul_par_top) const
88 {
89  //Calculate total cross-section (in millibarn) measured for this run from the calculated cross-section per event
90  //(see GetEventCrossSection()) and the total number of measured events
91  return GetEventCrossSection(Q_apres_cible, Coul_par_top) * GetEvents();
92 }
93 
94 
95 
102 
104 {
105  //Calculate temps mort for run from values of Gene dir, Gene MRQ and Gene TM, according to:
106  // T.M. = Gene TM / (Gene dir - Gene MRQ)
107  //If Gene dir = Gene MRQ, temps mort = 0.
108  //This can be compared to the value of GetTMpercent() (if present) which is the percentage value filled in the runsheet
109  //during the experimental run.
110  if (GetScaler("Gene DIRECT") == GetScaler("Gene MARQ")) {
111  //if Gene MRQ == Gene Dir, temps mort 0
112  return 0;
113  }
114  return (GetScaler("Gene TM") * 1.0 / (GetScaler("Gene DIRECT") - GetScaler("Gene MARQ")));
115 }
116 
117 
118 
128 
130  Double_t Coul_par_top) const
131 {
132  //Calculate total number of incident beam particles during run, based on measured integrated beam current
133  //Arguments:
134  // Q_apres_cible = (average) charge state of projectile ions AFTER passage through target
135  // Coul_par_top = calibration of Faraday current integrator (default: 1.e-10 Coul/top)
136  // Note (from sect_effic.f):
137  //**** Etalonnage de l'integrateur en 1993: voir cahier 4 page 87.
138  //*** Si l'oscillateur interne du trigger est a 169 Hz, on a 10**(-10) Cb/top.
139  //*** si c'est 160 Hz, on a 1.0610*(10**(-10)).
140 
141  return GetScaler("Faraday 1") * Coul_par_top / (TMath::Qe() * Q_apres_cible);
142 }
143 
144 
145 
146 
151 
153 {
154  //If this run has previously been associated with a system in the database,
155  //this will remove the association. The run will also be removed from the system's
156  //list of associated runs.
157 
159  SetTitle("INDRA run");
160 }
161 
162 
163 
165 
167 {
168  if (GetKey("Tapes")) {
169  return (KVDBTape*) GetKey("Tapes")->GetLinks()->First();
170  }
171  return 0;
172 }
173 
174 
175 
177 
179 {
180  if (GetTape())
181  return GetTape()->GetNumber();
182  else
183  return 0;
184 }
185 
186 
187 
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
Description of an experimental run in database ,,.
Definition: KVDBRun.h:36
ULong64_t GetEvents() const
Definition: KVDBRun.h:134
KVTarget * GetTarget() const
Return target used for this run (actually target of KVDBSystem associated to run)
Definition: KVDBRun.h:165
virtual void UnsetSystem()
Definition: KVDBRun.cpp:225
virtual Int_t GetScaler(const Char_t *name) const
Get value of scaler with the given name for this run.
Definition: KVDBRun.h:215
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
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
virtual void UnsetSystem()
Calculation/correction of energy losses of particles through an experimental target.
Definition: KVTarget.h:127
virtual void SetTitle(const char *title="")
TObject * First() const override
constexpr Double_t Qe()
ClassImp(TPyArg)