]> git.uio.no Git - u/mrichter/AliRoot.git/blame - T0/AliT0CalibData.h
correct Hash in TMap, reading channel names
[u/mrichter/AliRoot.git] / T0 / AliT0CalibData.h
CommitLineData
dc7ca31d 1#ifndef AliT0CalibData_H
2#define AliT0CalibData_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7////////////////////////////////////////////////
8// class for T0 calibration //
9////////////////////////////////////////////////
10
11#include "TNamed.h"
12#include "TF1.h"
13#include "AliT0CalibData.h"
14#include "TMap.h"
15#include "TGraph.h"
16#include "TString.h"
17#include "TObjArray.h"
18#include "AliT0.h"
e0bba6cc 19#include "AliT0LookUpValue.h"
dc7ca31d 20
21class AliT0CalibData: public TNamed {
22
23 public:
24 AliT0CalibData();
25 AliT0CalibData(const char* name);
26 AliT0CalibData(const AliT0CalibData &calibda);
27 AliT0CalibData& operator= (const AliT0CalibData &calibda);
28 virtual ~AliT0CalibData();
29 void Reset();
30
31 virtual void Print(Option_t* option= "") const;
32 Float_t GetTimeDelayCFD(Int_t channel) const {return fTimeDelayCFD[channel];}
33 Float_t* GetTimeDelayCFD() const {return(float*) fTimeDelayCFD;}
94c27e4f 34 Float_t GetTimeDelayDA(Int_t channel) const {return fTimeDelayDA[channel];}
35 Float_t* GetTimeDelayDA() const {return(float*) fTimeDelayDA;}
dc7ca31d 36
dc7ca31d 37
c41ceaac 38 TGraph *GetWalk(Int_t ipmt ) const {return ((TGraph*)fWalk.At(ipmt));}
39 Float_t GetWalkVal(Int_t ipmt, Float_t mv ) const {return ((TGraph*)fWalk.At(ipmt))->Eval(mv);}
ca7c0417 40 void SetWalk(Int_t ipmt) ;
dc7ca31d 41
29d3e0eb 42 // TGraph * GetAmpLED(Int_t ipmt) const {return (TGraph*)fAmpLED.At(ipmt);}
43 // Float_t GetAmpLEDVal(Int_t ipmt, Float_t mv) const
44 // {return((TGraph*)fAmpLED.At(ipmt))->Eval(mv);}
74adb36a 45 TGraph * GetAmpLEDRec(Int_t ipmt) const {return (TGraph*)fAmpLEDRec.At(ipmt);}
46 Float_t GetAmpLEDRecVal(Int_t ipmt, Float_t mv) const
47 {return((TGraph*)fAmpLEDRec.At(ipmt))->Eval(mv);}
dc7ca31d 48
29d3e0eb 49 // void SetAmpLED(Int_t ipmt) ;
50 void SetAmpLEDRec(Int_t ipmt) ;
dc7ca31d 51
52 void SetTimeDelayCFD(Float_t val, Int_t channel) {fTimeDelayCFD[channel]=val;}
53 void SetTimeDelayCFD(Float_t* TimeDelay);
94c27e4f 54 void SetTimeDelayDA(Float_t val, Int_t channel) {fTimeDelayDA[channel]=val;}
55 void SetTimeDelayDA(Float_t* TimeDelay);
dc7ca31d 56
29d3e0eb 57 void SetTimeDelayTVD(Int_t r=150) { fTimeDelayTVD = r; };
58 Float_t GetTimeDelayTVD() { return fTimeDelayTVD; }
dc7ca31d 59
29d3e0eb 60 void ReadAsciiLookup(const Char_t *filename);
61 Int_t GetChannel(Int_t trm, Int_t tdc, Int_t chain, Int_t channel);
62 void PrintLookup(Option_t* option= "", Int_t iTRM=0, Int_t iTDC=0, Int_t iChannel=0) const;
63 TMap *GetMapLookup(void) {return &fLookup;}
64 Int_t GetNumberOfTRMs() const {return fNumberOfTRMs;}
65 void SetNumberOfTRMs(Int_t ntrms=2) {fNumberOfTRMs = ntrms;}
d3541055 66
29d3e0eb 67 void SetMeanT0(Int_t mean=500) { fMeanT0 = mean; };
68 Int_t GetMeanT0 () {return fMeanT0;};
e0bba6cc 69
dc7ca31d 70 protected:
71
29d3e0eb 72 Float_t fTimeDelayCFD[24]; // Coeff. for time delay (24 different cables & CFD )
73 Float_t fTimeDelayDA[24]; // number of channel with mean time+delay if vertex=0 )
74 Float_t fTimeDelayTVD; //time delay for TVD (vertex trigger channel)
75 Int_t fMeanT0; //mean of T0distribution with vertex=0;
76 TObjArray fWalk; //time - amp. walk
74adb36a 77 TObjArray fAmpLEDRec; //time - amp. LED-CFD for reconstruction
e0bba6cc 78 TMap fLookup; //lookup table
5325480c 79 Int_t fNumberOfTRMs; // number of TRMs in setup
e0bba6cc 80
dc7ca31d 81 //
29d3e0eb 82 ClassDef(AliT0CalibData,7) // T0 Sensor Calibration data
dc7ca31d 83};
84
85typedef AliT0CalibData AliSTARTCalibData; // for backward compatibility
86
87#endif
88