Fixes for cmake
[u/mrichter/AliRoot.git] / T0 / AliT0Parameters.h
CommitLineData
dc7ca31d 1#ifndef ALIT0PARAMETERS_H
2#define ALIT0PARAMETERS_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4 * reserved.
5 *
f16935f7 6 * Alla Maevskaya INR RAS alla@inr.ru
dc7ca31d 7 *
8 * See cxx source for full Copyright notice
9 */
10
11//____________________________________________________________________
12//
13// Singleton class to handle various parameters of the
14// T0 - T0
15// Should get data fromm Conditions DB.
16//
17# include <TNamed.h>
18# include <TF1.h>
e0bba6cc 19# include <TMap.h>
dc7ca31d 20# include <TGraph.h>
21#include <TObjArray.h>
22class AliT0CalibData;
23class AliCDBEntry;
82ee3b37 24class AliT0CalibWalk;
25class AliT0CalibTimeEq;
dc7ca31d 26
27class AliT0Parameters : public TNamed
28{
29public:
30 static AliT0Parameters* Instance();
66a6ab38 31
32 AliT0Parameters();
33 virtual ~AliT0Parameters() {};
66a6ab38 34
dc7ca31d 35 void Init();
f8bea420 36 void InitIfOnline();
37
dc7ca31d 38 // Set various `Fixed' parameters
39 void SetPh2Mip(Int_t r=300) { fPh2Mip = r; }
40 void SetmV2Mip(Int_t r=50) { fmV2Mip = r; }
8955c6b4 41 void SetChannelWidth(Float_t s=24.4) { fChannelWidth = s;}
dc7ca31d 42 void SetmV2channel(Int_t size=320) { fmV2Channel = size; }
43 void SetQTmin(Int_t qt=13) {fQTmin = qt;}
44 void SetQTmax(Int_t qt=125) {fQTmax = qt;}
dc7ca31d 45 void SetZposition( Float_t valueC=69.7, Float_t valueA=373) {
46 fT0zPosition[0]=valueC, fT0zPosition[1]=valueA;}
47 void SetPMTeff(Int_t ipmt);
48
49 void SetTimeDelayTVD(Float_t r=150) { fTimeDelayTVD = r; };
e2b5c18d 50 Float_t GetTimeDelayTVD() const { return fTimeDelayTVD; }
dc7ca31d 51
dc7ca31d 52
dc7ca31d 53 // Get `Fixed' various parameters
54 Int_t GetPh2Mip() const { return fPh2Mip; }
55 Int_t GetmV2Mip() const { return fmV2Mip; }
8955c6b4 56 Float_t GetChannelWidth() const { return fChannelWidth; }
dc7ca31d 57 Int_t GetmV2channel() const { return fmV2Channel; }
58 Int_t GetQTmin() const {return fQTmin;}
59 Int_t GetQTmax() const {return fQTmax;}
5325480c 60 Double_t GetZposition(Int_t i) const {return fT0zPosition[i];}
61 Double_t GetZPosition(const char* symname) ;
29d3e0eb 62 Double_t GetZPositionShift(const char* symname);
63
64
74adb36a 65 TGraph * GetPMTeff(Int_t ipmt) const
dc7ca31d 66 {return (TGraph*)fPMTeff.At(ipmt);}
67 Float_t GetpmtEFF(Int_t ipmt, Float_t lambda) const
68 {return((TGraph*)fPMTeff.At(ipmt))->Eval(lambda);}
69
dc7ca31d 70
74adb36a 71 TGraph * GetAmpLEDRec(Int_t ipmt) const;
74adb36a 72 TGraph *GetWalk(Int_t ipmt ) const;
c883fdf2 73 TGraph *GetQTC(Int_t ipmt) const;
74 TGraph *GetAmpLED(Int_t ipmt) const;
c41ceaac 75
dc7ca31d 76 Float_t GetTimeDelayCFD(Int_t ipmt);
82ee3b37 77// Float_t GetTimeV0(Int_t ipmt = 512) {return fTimeV0;}
94c27e4f 78
b95e8d87 79 void SetMeanT0(Float_t mean=512) { fMeanT0 = mean; };
80 Float_t GetMeanT0 () {return fMeanT0;};
81 void SetMeanVertex(Float_t mean=0) { fMeanVertex = mean; };
82 Float_t GetMeanVertex ();
dc7ca31d 83
82ee3b37 84 TMap * GetMapLookup();
e0bba6cc 85 Int_t GetChannel(Int_t trm, Int_t tdc, Int_t chain, Int_t channel);
5325480c 86 Int_t GetNumberOfTRMs();
87 void SetNumberOfTRMs(Int_t ntrms=2) {fNumberOfTRMs = ntrms;}
82ee3b37 88
74adb36a 89 protected:
dc7ca31d 90 static AliT0Parameters* fgInstance; // Static singleton instance
91
29d3e0eb 92 Bool_t fIsInit; // Whether we've been initialised
93 Float_t fT0zPosition[2] ; // z-position of the two T0s
94 Int_t fPh2Mip; // # photoelectrons per MIP in radiator
95 Int_t fmV2Mip; // # mV per MIP in radiator
8955c6b4 96 Float_t fChannelWidth; // channel width in ns
29d3e0eb 97 Int_t fmV2Channel; // ADC mv 2 channel # (200000ps/(25*25).
98 Int_t fQTmin; //min time for QTC
99 Int_t fQTmax; //max time fro QTC
100 TObjArray fAmpLEDRec; // array of amlitude vs LED-CFD (simulation & reconstruction)
dc7ca31d 101 TObjArray fPMTeff; //array PMT registration efficiency
29d3e0eb 102 TObjArray fWalk; //array time-amplitude walk
c883fdf2 103 TObjArray fQTC; //array of TGraphs for QTC vs number of MIPs
104 TObjArray fAmpLED; //array of TGraphs for LED-CFD vs number of MIPs
105
dc7ca31d 106
29d3e0eb 107 Float_t fTimeDelayCFD; // sum time delay for CFD channel
82ee3b37 108 // Float_t fTimeV0; // sum time delay for CFD channel
29d3e0eb 109 Float_t fTimeDelayTVD; //time delay for TVD (vertex trigger channel)
b95e8d87 110 Float_t fMeanT0; //mean of T0distribution with vertex=0;
111 Float_t fMeanVertex; // mean of vertex distribution;
74adb36a 112
29d3e0eb 113 TMap fLookUp; //lookup table
114 Int_t fNumberOfTRMs; // number of TRMs in setup
f8bea420 115
5325480c 116
82ee3b37 117 static AliT0CalibTimeEq * fgCalibData; // singleton for Calibration data
e0bba6cc 118 static AliT0CalibData * fgLookUp; // singleton for Calibration data
82ee3b37 119 static AliT0CalibWalk * fgSlewCorr; // singleton for Calibration data
e0bba6cc 120
dc7ca31d 121 AliCDBEntry* fCalibentry ; // pointer to T0 calibration object
e0bba6cc 122 AliCDBEntry* fLookUpentry ; // pointer to T0 lokkup table
c41ceaac 123 AliCDBEntry* fSlewCorr ; // pointer to slewing correction
beb87b2c 124
125 private:
126 AliT0Parameters(const AliT0Parameters&);
127 AliT0Parameters& operator=(const AliT0Parameters&);
e0bba6cc 128
b95e8d87 129 ClassDef(AliT0Parameters,5)
66a6ab38 130
dc7ca31d 131};
132
dc7ca31d 133#endif
134//____________________________________________________________________
135