1 #ifndef ALIT0PARAMETERS_H
2 #define ALIT0PARAMETERS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
6 * Alla Maevskaya INR RAS alla@inr.ru
8 * See cxx source for full Copyright notice
11 //____________________________________________________________________
13 // Singleton class to handle various parameters of the
15 // Should get data fromm Conditions DB.
21 #include <TObjArray.h>
25 class AliT0CalibTimeEq;
27 class AliT0Parameters : public TNamed
30 static AliT0Parameters* Instance();
33 virtual ~AliT0Parameters() {};
38 // Set various `Fixed' parameters
39 void SetPh2Mip(Int_t r=300) { fPh2Mip = r; }
40 void SetmV2Mip(Int_t r=50) { fmV2Mip = r; }
41 void SetChannelWidth(Float_t s=24.4) { fChannelWidth = s;}
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;}
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);
49 void SetTimeDelayTVD(Float_t r=150) { fTimeDelayTVD = r; };
50 const Float_t GetTimeDelayTVD() { return fTimeDelayTVD; }
53 // Get `Fixed' various parameters
54 Int_t GetPh2Mip() const { return fPh2Mip; }
55 Int_t GetmV2Mip() const { return fmV2Mip; }
56 Float_t GetChannelWidth() const { return fChannelWidth; }
57 Int_t GetmV2channel() const { return fmV2Channel; }
58 Int_t GetQTmin() const {return fQTmin;}
59 Int_t GetQTmax() const {return fQTmax;}
60 Double_t GetZposition(Int_t i) const {return fT0zPosition[i];}
61 Double_t GetZPosition(const char* symname) ;
62 Double_t GetZPositionShift(const char* symname);
65 TGraph * GetPMTeff(Int_t ipmt) const
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);}
71 TGraph * GetAmpLEDRec(Int_t ipmt) const;
73 TGraph *GetWalk(Int_t ipmt ) const;
74 Float_t GetWalkVal(Int_t ipmt, Float_t mv ) const ;
76 Float_t GetTimeDelayCFD(Int_t ipmt);
77 // Float_t GetTimeV0(Int_t ipmt = 512) {return fTimeV0;}
79 void SetMeanT0(Int_t mean=512) { fMeanT0 = mean; };
80 Int_t GetMeanT0 () {return fMeanT0;};
82 TMap * GetMapLookup();
83 Int_t GetChannel(Int_t trm, Int_t tdc, Int_t chain, Int_t channel);
84 Int_t GetNumberOfTRMs();
85 void SetNumberOfTRMs(Int_t ntrms=2) {fNumberOfTRMs = ntrms;}
88 static AliT0Parameters* fgInstance; // Static singleton instance
90 Bool_t fIsInit; // Whether we've been initialised
91 Float_t fT0zPosition[2] ; // z-position of the two T0s
92 Int_t fPh2Mip; // # photoelectrons per MIP in radiator
93 Int_t fmV2Mip; // # mV per MIP in radiator
94 Float_t fChannelWidth; // channel width in ns
95 Int_t fmV2Channel; // ADC mv 2 channel # (200000ps/(25*25).
96 Int_t fQTmin; //min time for QTC
97 Int_t fQTmax; //max time fro QTC
98 TObjArray fAmpLEDRec; // array of amlitude vs LED-CFD (simulation & reconstruction)
99 TObjArray fPMTeff; //array PMT registration efficiency
100 TObjArray fWalk; //array time-amplitude walk
102 Float_t fTimeDelayCFD; // sum time delay for CFD channel
103 // Float_t fTimeV0; // sum time delay for CFD channel
104 Float_t fTimeDelayTVD; //time delay for TVD (vertex trigger channel)
105 Int_t fMeanT0; //mean of T0distribution with vertex=0;
107 TMap fLookUp; //lookup table
108 Int_t fNumberOfTRMs; // number of TRMs in setup
111 static AliT0CalibTimeEq * fgCalibData; // singleton for Calibration data
112 static AliT0CalibData * fgLookUp; // singleton for Calibration data
113 static AliT0CalibWalk * fgSlewCorr; // singleton for Calibration data
115 AliCDBEntry* fCalibentry ; // pointer to T0 calibration object
116 AliCDBEntry* fLookUpentry ; // pointer to T0 lokkup table
117 AliCDBEntry* fSlewCorr ; // pointer to slewing correction
120 AliT0Parameters(const AliT0Parameters&);
121 AliT0Parameters& operator=(const AliT0Parameters&);
123 ClassDef(AliT0Parameters,4)
128 //____________________________________________________________________