KaliVeda
Toolkit for HIC analysis
KVINDRADB.h
1 /***************************************************************************
2  kvINDRADB.h - description
3  -------------------
4  begin : 9/12 2003
5  copyright : (C) 2003 by J.D. Frankland
6  email : frankland@ganil.fr
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef KV_INDRADB_H
19 #define KV_INDRADB_H
20 
21 #include "KVExpDB.h"
22 #include "KVDataSet.h"
23 #include "KVINDRADBRun.h"
24 #include "KVDBSystem.h"
25 #include "KVDBTape.h"
26 #include "KVDetector.h"
27 #include "Riostream.h"
28 #include "TEnv.h"
29 #include "KVINDRARunListReader.h"
30 #include "KVINDRAPulserDataTree.h"
31 #include "KVNumberList.h"
32 
34 #define MAX_NUM_RUN_RANGES 100
35 
36 class KVNumberList;
37 
59 class KVINDRADB: public KVExpDB, public KVINDRARunListReader {
60 
61 private:
62 
63  std::ifstream __ifpeaks;
64 
65 protected:
66 
68 
81 
83 
84  virtual void ReadGainList();
85  virtual void ReadChIoPressures();
86  virtual void ReadCsITotalLightGainCorrections();
87  virtual void ReadChannelVolt();
88  virtual void ReadVoltEnergyChIoSi();
89  virtual void ReadLightEnergyCsI(const Char_t*, KVDBTable*);
90  virtual void ReadCalibCsI();
91  virtual void ReadPedestalList();
92 
93  virtual void ReadAbsentDetectors();
94  virtual void ReadOoODetectors();
95  virtual void ReadOoOACQParams();
96 
97 
101  std::ifstream& GetPeakFileStream()
102  {
103  return __ifpeaks;
104  };
105 
106  mutable TF1* fMeanGDir;
107  void _init_MeanGDir_func() const;
108 
109  void init();
110 
111 public:
112  KVINDRADB();
113  KVINDRADB(const Char_t* name);
114  virtual ~ KVINDRADB();
115 
116  virtual void Build();
117  virtual void cd();
118 
119  void AddTape(KVDBTape* r)
120  {
121  fTapes->AddRecord(r);
122  }
123  virtual KVDBTape* GetTape(Int_t tape) const
124  {
125  return (KVDBTape*) fTapes->GetRecord(tape);
126  }
127  virtual KVSeqCollection* GetTapes() const
128  {
129  return fTapes->GetRecords();
130  }
131 
132  virtual void GoodRunLine();
134  {
135  return (KVINDRADBRun*) GetDBRun(run);
136  }
137  void ReadNewRunList();
138 
139  KVList* GetCalibrationPeaks(Int_t run, KVDetector* detector = 0,
140  Int_t peak_type = -1, Int_t signal_type = 0,
141  Double_t peak_energy = -1.0);
142 
143  Double_t GetEventCrossSection(Int_t run, Double_t Q_apres_cible,
144  Double_t Coul_par_top = 1.e-10) const;
145  Double_t GetTotalCrossSection(Int_t run, Double_t Q_apres_cible,
146  Double_t Coul_par_top = 1.e-10) const;
148  Double_t Q_apres_cible,
149  Double_t Coul_par_top = 1.e-10) const;
151  Double_t Q_apres_cible,
152  Double_t Coul_par_top = 1.e-10) const;
154  Double_t Q_apres_cible,
155  Double_t Coul_par_top = 1.e-10) const;
157  Double_t Q_apres_cible,
158  Double_t Coul_par_top = 1.e-10) const;
159  Double_t GetEventCrossSection(const Char_t* system, Int_t Mult_trigger,
160  Double_t Q_apres_cible,
161  Double_t Coul_par_top = 1.e-10) const;
162  Double_t GetTotalCrossSection(const Char_t* system, Int_t Mult_trigger,
163  Double_t Q_apres_cible,
164  Double_t Coul_par_top = 1.e-10) const;
165  Double_t GetTotalCrossSection(TH1* events_histo, Double_t Q_apres_cible, Double_t Coul_par_top = 1.e-10);
166 
167  Double_t GetMeanGDirFreq(Int_t run) const;
168 
170  {
171  return fPulserData;
172  }
173  virtual void WriteObjects(TFile*);
174  virtual void ReadObjects(TFile*);
175 
176  virtual Double_t GetRunLengthFromGeneDirect(int run) const;
177  Float_t GetMeanPulser(const Char_t*, int);
178 
179  ClassDef(KVINDRADB, 5) //DataBase of parameters for an INDRA campaign
180 };
181 
183 R__EXTERN KVINDRADB* gIndraDB;
184 
185 #endif
int Int_t
#define R__EXTERN
ROOT::R::TRInterface & r
bool Bool_t
char Char_t
float Float_t
double Double_t
#define ClassDef(name, id)
Table in a database.
Definition: KVDBTable.h:34
virtual Bool_t AddRecord(KVDBRecord *add)
Definition: KVDBTable.cpp:74
virtual KVDBRecord * GetRecord(const Char_t *rec_name) const
Definition: KVDBTable.h:58
virtual KVSeqCollection * GetRecords() const
Definition: KVDBTable.h:63
Database entry describing a data storage tape used to store raw data.
Definition: KVDBTape.h:25
Base class for detector geometry description.
Definition: KVDetector.h:160
Base class to describe database of an experiment ,,.
Definition: KVExpDB.h:20
KVDBRun * GetDBRun(Int_t number) const
Definition: KVExpDB.h:76
Database entry for each run of an INDRA experiment.
Definition: KVINDRADBRun.h:30
DataBase of parameters for an INDRA campaign.
Definition: KVINDRADB.h:59
KVDBTable * fOoODet
(optional) Liste les detecteurs hors service
Definition: KVINDRADB.h:79
void CloseCalibrationPeakFile()
Close file containing database of calibration peaks.
Definition: KVINDRADB.cpp:406
virtual void cd()
Definition: KVINDRADB.cpp:105
virtual KVSeqCollection * GetTapes() const
Definition: KVINDRADB.h:127
virtual void ReadObjects(TFile *)
Read associated objects (i.e. KVINDRAPulserDataTree's TTree) from file.
Definition: KVINDRADB.cpp:1160
void AddTape(KVDBTape *r)
Definition: KVINDRADB.h:119
KVDBTable * fChanVolt
ChIo/Si channel-volt calibration parameters.
Definition: KVINDRADB.h:74
Double_t GetEventCrossSection(Int_t run, Double_t Q_apres_cible, Double_t Coul_par_top=1.e-10) const
Definition: KVINDRADB.cpp:658
std::ifstream __ifpeaks
ifstream for calibration peaks file
Definition: KVINDRADB.h:63
virtual void GoodRunLine()
Definition: KVINDRADB.cpp:989
KVDBTable * fLitEnerCsI
CsI light-energy calibration for Z>1.
Definition: KVINDRADB.h:76
virtual void ReadOoOACQParams()
Definition: KVINDRADB.cpp:1947
Double_t GetTotalCrossSection(Int_t run, Double_t Q_apres_cible, Double_t Coul_par_top=1.e-10) const
Definition: KVINDRADB.cpp:675
void _init_MeanGDir_func() const
Definition: KVINDRADB.cpp:419
virtual void ReadChannelVolt()
Definition: KVINDRADB.cpp:1343
KVINDRAPulserDataTree * GetPulserData()
Definition: KVINDRADB.h:169
KVDBTable * fAbsentDet
(optional) Liste les detecteurs absents
Definition: KVINDRADB.h:78
void ReadNewRunList()
Read new-style runlist (written using KVDBRun v.10 or later)
Definition: KVINDRADB.cpp:947
std::ifstream & GetPeakFileStream()
Definition: KVINDRADB.h:101
Float_t GetMeanPulser(const Char_t *, int)
Definition: KVINDRADB.cpp:2003
Bool_t OpenCalibrationPeakFile()
calibration peaks database
Definition: KVINDRADB.cpp:384
virtual void ReadPedestalList()
Definition: KVINDRADB.cpp:1615
virtual void ReadGainList()
Read the file listing any detectors whose gain value changes during exeriment.
Definition: KVINDRADB.cpp:437
KVDBTable * fCsILumCorr
table of CsI gain corrections for total light output
Definition: KVINDRADB.h:72
virtual void WriteObjects(TFile *)
Write associated objects (i.e. KVINDRAPulserDataTree's TTree) in file.
Definition: KVINDRADB.cpp:1148
KVDBTable * fOoOACQPar
(optional) Liste des parametres d acquisition ne marchant pas
Definition: KVINDRADB.h:80
KVINDRAPulserDataTree * fPulserData
mean values of pulsers for all detectors & runs
Definition: KVINDRADB.h:82
virtual void ReadVoltEnergyChIoSi()
Definition: KVINDRADB.cpp:1526
virtual void ReadOoODetectors()
Definition: KVINDRADB.cpp:1899
KVList * GetCalibrationPeaks(Int_t run, KVDetector *detector=0, Int_t peak_type=-1, Int_t signal_type=0, Double_t peak_energy=-1.0)
Definition: KVINDRADB.cpp:151
virtual KVDBTape * GetTape(Int_t tape) const
Definition: KVINDRADB.h:123
TF1 * fMeanGDir
mean frequency of GENE_DIRECT vs. run number
Definition: KVINDRADB.h:104
void init()
Definition: KVINDRADB.cpp:49
virtual void ReadCsITotalLightGainCorrections()
Definition: KVINDRADB.cpp:1231
KVDBTable * fPedestals
table of pedestal files
Definition: KVINDRADB.h:73
KVDBTable * fVoltMeVChIoSi
ChIo/Si volt-energy calibration.
Definition: KVINDRADB.h:75
KVDBTable * fGains
(optional) table of detector gains, in case they change from run to run
Definition: KVINDRADB.h:70
virtual void ReadLightEnergyCsI(const Char_t *, KVDBTable *)
Definition: KVINDRADB.cpp:1704
virtual void ReadAbsentDetectors()
Definition: KVINDRADB.cpp:1852
virtual void ReadChIoPressures()
Definition: KVINDRADB.cpp:538
virtual Double_t GetRunLengthFromGeneDirect(int run) const
Definition: KVINDRADB.cpp:1174
Double_t GetMeanGDirFreq(Int_t run) const
Definition: KVINDRADB.cpp:874
KVINDRADBRun * GetRun(Int_t run) const
Definition: KVINDRADB.h:133
virtual void ReadCalibCsI()
Definition: KVINDRADB.cpp:1686
KVDBTable * fTapes
table of data tapes
Definition: KVINDRADB.h:71
KVDBTable * fChIoPressures
General information.
Definition: KVINDRADB.h:69
KVDBTable * fLitEnerCsIZ1
CsI light-energy calibration for Z=1.
Definition: KVINDRADB.h:77
virtual ~ KVINDRADB()
virtual void Build()
Definition: KVINDRADB.cpp:893
Handles TTree with mean pulser data for every run.
Utitlity base class for reading INDRA runlist files.
Extended TList class which owns its objects by default.
Definition: KVList.h:28
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:85
KaliVeda extensions to ROOT collection classes.