KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVINDRADBRun.cpp
Go to the documentation of this file.
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 "KVINDRADB.h"
10 
12 
13 //____________________________________________________________________________
14 
15 
18 
20 {
21  //default ctor
22 }
23 
24 
25 
28 
29 KVINDRADBRun::KVINDRADBRun(Int_t number, const Char_t* title): KVDBRun(number,
30  title)
31 {
32  //ctor for a given run number
33 }
34 
35 
36 
39 
40 KVINDRADBRun::~KVINDRADBRun()
41 {
42  //dtor
43 }
44 
45 
46 
47 
53 
55  Double_t Coul_par_top) const
56 {
57  //Calculation of cross-section (in millibarn) per event of this run from the measured integrated beam current and correcting for dead time.
58  //Based on sect_effic.f by M.F. Rivet
59  //
60  //For meaning of arguments, see GetNIncidentIons()
61 
62  KVTarget* target = GetTarget();
63  if (!target)
64  return 0; //can't calculate X-section without knowing target characteristics
65 
66  //calculate number of atoms/cm**2 in target
67  Double_t atom_cib = target->GetAtomsPerCM2();
68 
69  //number of projectile nuclei during run
70  Double_t n_proj = GetNIncidentIons(Q_apres_cible, Coul_par_top);
71 
72  Double_t temps_mort = GetTempsMort();
73  if (temps_mort >= 1)
74  return 0.;
75 
76  //X-section [mb] per event = 1e27 / (no. atoms in target * no. of projectile nuclei * (1 - temps mort))
77  Double_t sect_effic = 1.e27 / (atom_cib * n_proj * (1 - temps_mort));
78  return sect_effic;
79 }
80 
81 
82 
86 
88  Double_t Coul_par_top) const
89 {
90  //Calculate total cross-section (in millibarn) measured for this run from the calculated cross-section per event
91  //(see GetEventCrossSection()) and the total number of measured events
92  return GetEventCrossSection(Q_apres_cible, Coul_par_top) * GetEvents();
93 }
94 
95 
96 
103 
105 {
106  //Calculate temps mort for run from values of Gene dir, Gene MRQ and Gene TM, according to:
107  // T.M. = Gene TM / (Gene dir - Gene MRQ)
108  //If Gene dir = Gene MRQ, temps mort = 0.
109  //This can be compared to the value of GetTMpercent() (if present) which is the percentage value filled in the runsheet
110  //during the experimental run.
111  if (GetScaler("Gene DIRECT") == GetScaler("Gene MARQ")) {
112  //if Gene MRQ == Gene Dir, temps mort 0
113  return 0;
114  }
115  return (GetScaler("Gene TM") * 1.0 / (GetScaler("Gene DIRECT") - GetScaler("Gene MARQ")));
116 }
117 
118 
119 
129 
131  Double_t Coul_par_top) const
132 {
133  //Calculate total number of incident beam particles during run, based on measured integrated beam current
134  //Arguments:
135  // Q_apres_cible = (average) charge state of projectile ions AFTER passage through target
136  // Coul_par_top = calibration of Faraday current integrator (default: 1.e-10 Coul/top)
137  // Note (from sect_effic.f):
138  //**** Etalonnage de l'integrateur en 1993: voir cahier 4 page 87.
139  //*** Si l'oscillateur interne du trigger est a 169 Hz, on a 10**(-10) Cb/top.
140  //*** si c'est 160 Hz, on a 1.0610*(10**(-10)).
141 
142  return GetScaler("Faraday 1") * Coul_par_top / (TMath::Qe() * Q_apres_cible);
143 }
144 
145 
146 
147 
152 
154 {
155  //If this run has previously been associated with a system in the database,
156  //this will remove the association. The run will also be removed from the system's
157  //list of associated runs.
158 
160  SetTitle("INDRA run");
161 }
162 
163 
164 
166 
168 {
169  if (GetKey("Tapes")) {
170  return (KVDBTape*) GetKey("Tapes")->GetLinks()->First();
171  }
172  return 0;
173 }
174 
175 
176 
178 
180 {
181  if (GetTape())
182  return GetTape()->GetNumber();
183  else
184  return 0;
185 }
186 
187 
188 
189 
200 
202 {
203  // Return mean value of pulser/laser for this run.
204  //
205  // For detectors, param should be name of an acquisition parameter
206  // e.g. CI_0201_PG, CSI_1301_L, etc.
207  // For pin laser diodes, param should be name of associated acquisition parameter
208  // with either '_laser' or '_gene' appended
209  // e.g. PILA_05_PG_laser, SI_PIN1_PG_gene
210  //
211  // Returns -1.0 if no data available for this parameter/run.
212 
213  if (gIndraDB && gIndraDB->GetPulserData())
214  return gIndraDB->GetPulserData()->GetMean(param, GetNumber());
215  return -1.0;
216 }
217 
218 
int Int_t
KVINDRADB * gIndraDB
Definition: KVINDRADB.cpp:38
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
char Char_t
double Double_t
float Float_t
virtual KVRList * GetLinks() const
return the list of cross-referenced objects
Definition: KVDBKey.h:64
virtual KVDBKey * GetKey(const Char_t *key) const
Definition: KVDBRecord.cpp:290
virtual Int_t GetNumber() const
Definition: KVDBRecord.h:72
Description of an experimental run in database ,.
Definition: KVDBRun.h:35
ULong64_t GetEvents() const
Definition: KVDBRun.h:133
KVTarget * GetTarget() const
Return target used for this run (actually target of KVDBSystem associated to run)
Definition: KVDBRun.h:164
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:214
Database entry describing a data storage tape used to store raw data.
Definition: KVDBTape.h:24
Database entry for each run of an INDRA experiment.
Definition: KVINDRADBRun.h:29
Double_t GetNIncidentIons(Double_t Q_apres_cible, Double_t Coul_par_top=1.e-10) const
KVDBTape * GetTape() const
Float_t GetMeanPulser(const Char_t *)
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()
KVINDRAPulserDataTree * GetPulserData()
Definition: KVINDRADB.h:168
Float_t GetMean(const Char_t *, Int_t)
Calculation/correction of energy losses of particles through an experimental target.
Definition: KVTarget.h:126
Double_t GetAtomsPerCM2() const
virtual UInt_t GetUnits() const;
Definition: KVTarget.cpp:932
virtual void SetTitle(const char *title="")
TObject * First() const
constexpr Double_t Qe()