KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
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
36class KVNumberList;
37
59class KVINDRADB: public KVExpDB, public KVINDRARunListReader {
60
61private:
62
63 std::ifstream __ifpeaks;
64
65protected:
66
68
81
83
84 virtual void ReadGainList();
85 virtual void ReadChIoPressures();
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
111public:
112 KVINDRADB();
113 KVINDRADB(const Char_t* name);
114 virtual ~ KVINDRADB();
115
116 virtual void Build();
117 virtual void cd();
118
120 {
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
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
183R__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 KVSeqCollection * GetRecords() const
Definition KVDBTable.h:63
virtual Bool_t AddRecord(KVDBRecord *add)
Definition KVDBTable.cpp:74
virtual KVDBRecord * GetRecord(const Char_t *rec_name) const
Definition KVDBTable.h:58
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.
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.
virtual void cd()
virtual void ReadObjects(TFile *)
Read associated objects (i.e. KVINDRAPulserDataTree's TTree) from file.
void AddTape(KVDBTape *r)
Definition KVINDRADB.h:119
virtual KVSeqCollection * GetTapes() const
Definition KVINDRADB.h:127
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
std::ifstream __ifpeaks
ifstream for calibration peaks file
Definition KVINDRADB.h:63
virtual void GoodRunLine()
KVDBTable * fLitEnerCsI
CsI light-energy calibration for Z>1.
Definition KVINDRADB.h:76
virtual void ReadOoOACQParams()
Double_t GetTotalCrossSection(Int_t run, Double_t Q_apres_cible, Double_t Coul_par_top=1.e-10) const
void _init_MeanGDir_func() const
virtual void ReadChannelVolt()
KVDBTable * fAbsentDet
(optional) Liste les detecteurs absents
Definition KVINDRADB.h:78
void ReadNewRunList()
Read new-style runlist (written using KVDBRun v.10 or later)
Float_t GetMeanPulser(const Char_t *, int)
Bool_t OpenCalibrationPeakFile()
calibration peaks database
virtual void ReadPedestalList()
KVINDRAPulserDataTree * GetPulserData()
Definition KVINDRADB.h:169
virtual void ReadGainList()
Read the file listing any detectors whose gain value changes during exeriment.
virtual KVDBTape * GetTape(Int_t tape) const
Definition KVINDRADB.h:123
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.
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()
virtual void ReadOoODetectors()
KVList * GetCalibrationPeaks(Int_t run, KVDetector *detector=0, Int_t peak_type=-1, Int_t signal_type=0, Double_t peak_energy=-1.0)
KVINDRADBRun * GetRun(Int_t run) const
Definition KVINDRADB.h:133
TF1 * fMeanGDir
mean frequency of GENE_DIRECT vs. run number
Definition KVINDRADB.h:106
void init()
Definition KVINDRADB.cpp:49
virtual void ReadCsITotalLightGainCorrections()
KVDBTable * fPedestals
table of pedestal files
Definition KVINDRADB.h:73
KVDBTable * fVoltMeVChIoSi
ChIo/Si volt-energy calibration.
Definition KVINDRADB.h:75
std::ifstream & GetPeakFileStream()
Definition KVINDRADB.h:101
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 *)
virtual void ReadAbsentDetectors()
virtual void ReadChIoPressures()
virtual Double_t GetRunLengthFromGeneDirect(int run) const
Double_t GetMeanGDirFreq(Int_t run) const
virtual void ReadCalibCsI()
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 void Build()
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.
KaliVeda extensions to ROOT collection classes.