]> git.uio.no Git - u/mrichter/AliRoot.git/blame - T0/AliT0Parameters.h
coding violation fixes
[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 *
6 * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
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;
24
25class AliT0Parameters : public TNamed
26{
27public:
28 static AliT0Parameters* Instance();
66a6ab38 29
30 AliT0Parameters();
31 virtual ~AliT0Parameters() {};
66a6ab38 32
dc7ca31d 33 void Init();
f8bea420 34 void InitIfOnline();
35
dc7ca31d 36 // Set various `Fixed' parameters
37 void SetPh2Mip(Int_t r=300) { fPh2Mip = r; }
38 void SetmV2Mip(Int_t r=50) { fmV2Mip = r; }
39 void SetChannelWidth(Int_t s=25) { fChannelWidth = s;}
40 void SetmV2channel(Int_t size=320) { fmV2Channel = size; }
41 void SetQTmin(Int_t qt=13) {fQTmin = qt;}
42 void SetQTmax(Int_t qt=125) {fQTmax = qt;}
dc7ca31d 43 void SetZposition( Float_t valueC=69.7, Float_t valueA=373) {
44 fT0zPosition[0]=valueC, fT0zPosition[1]=valueA;}
45 void SetPMTeff(Int_t ipmt);
46
47 void SetTimeDelayTVD(Float_t r=150) { fTimeDelayTVD = r; };
48 Float_t GetTimeDelayTVD() { return fTimeDelayTVD; }
49
dc7ca31d 50
dc7ca31d 51 // Get `Fixed' various parameters
52 Int_t GetPh2Mip() const { return fPh2Mip; }
53 Int_t GetmV2Mip() const { return fmV2Mip; }
54 Int_t GetChannelWidth() const { return fChannelWidth; }
55 Int_t GetmV2channel() const { return fmV2Channel; }
56 Int_t GetQTmin() const {return fQTmin;}
57 Int_t GetQTmax() const {return fQTmax;}
5325480c 58 Double_t GetZposition(Int_t i) const {return fT0zPosition[i];}
59 Double_t GetZPosition(const char* symname) ;
29d3e0eb 60 Double_t GetZPositionShift(const char* symname);
61
62
74adb36a 63 TGraph * GetPMTeff(Int_t ipmt) const
dc7ca31d 64 {return (TGraph*)fPMTeff.At(ipmt);}
65 Float_t GetpmtEFF(Int_t ipmt, Float_t lambda) const
66 {return((TGraph*)fPMTeff.At(ipmt))->Eval(lambda);}
67
dc7ca31d 68
74adb36a 69 TGraph * GetAmpLEDRec(Int_t ipmt) const;
29d3e0eb 70
74adb36a 71 TGraph *GetWalk(Int_t ipmt ) const;
72 Float_t GetWalkVal(Int_t ipmt, Float_t mv ) const ;
c41ceaac 73
dc7ca31d 74 Float_t GetTimeDelayCFD(Int_t ipmt);
94c27e4f 75 Float_t GetTimeDelayDA(Int_t ipmt);
76
74adb36a 77 // void SetMeanT0(Int_t mean=500) { fMeanT0 = mean; };
94c27e4f 78 Int_t GetMeanT0 (); //{return fMeanT0;};
dc7ca31d 79
256d4943 80 TMap * GetMapLookup();
e0bba6cc 81 Int_t GetChannel(Int_t trm, Int_t tdc, Int_t chain, Int_t channel);
5325480c 82 Int_t GetNumberOfTRMs();
83 void SetNumberOfTRMs(Int_t ntrms=2) {fNumberOfTRMs = ntrms;}
e0bba6cc 84
74adb36a 85 protected:
dc7ca31d 86 static AliT0Parameters* fgInstance; // Static singleton instance
87
29d3e0eb 88 Bool_t fIsInit; // Whether we've been initialised
89 Float_t fT0zPosition[2] ; // z-position of the two T0s
90 Int_t fPh2Mip; // # photoelectrons per MIP in radiator
91 Int_t fmV2Mip; // # mV per MIP in radiator
92 Int_t fChannelWidth; // channel width in ns
93 Int_t fmV2Channel; // ADC mv 2 channel # (200000ps/(25*25).
94 Int_t fQTmin; //min time for QTC
95 Int_t fQTmax; //max time fro QTC
96 TObjArray fAmpLEDRec; // array of amlitude vs LED-CFD (simulation & reconstruction)
dc7ca31d 97 TObjArray fPMTeff; //array PMT registration efficiency
29d3e0eb 98 TObjArray fWalk; //array time-amplitude walk
dc7ca31d 99
29d3e0eb 100 Float_t fTimeDelayDA; // sum time delay for LED channel
101 Float_t fTimeDelayCFD; // sum time delay for CFD channel
102 Float_t fTimeDelayTVD; //time delay for TVD (vertex trigger channel)
103 Int_t fMeanT0; //mean of T0distribution with vertex=0;
74adb36a 104
29d3e0eb 105 TMap fLookUp; //lookup table
106 Int_t fNumberOfTRMs; // number of TRMs in setup
f8bea420 107
5325480c 108
dc7ca31d 109 static AliT0CalibData * fgCalibData; // singleton for Calibration data
e0bba6cc 110 static AliT0CalibData * fgLookUp; // singleton for Calibration data
c41ceaac 111 static AliT0CalibData * fgSlewCorr; // singleton for Calibration data
e0bba6cc 112
dc7ca31d 113 AliCDBEntry* fCalibentry ; // pointer to T0 calibration object
e0bba6cc 114 AliCDBEntry* fLookUpentry ; // pointer to T0 lokkup table
c41ceaac 115 AliCDBEntry* fSlewCorr ; // pointer to slewing correction
beb87b2c 116
117 private:
118 AliT0Parameters(const AliT0Parameters&);
119 AliT0Parameters& operator=(const AliT0Parameters&);
e0bba6cc 120
29d3e0eb 121 ClassDef(AliT0Parameters,4)
66a6ab38 122
dc7ca31d 123};
124
dc7ca31d 125#endif
126//____________________________________________________________________
127