]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFcalib.h
removal of effective c++ warnings (C.Zampolli)
[u/mrichter/AliRoot.git] / TOF / AliTOFcalib.h
CommitLineData
6dc9348d 1#ifndef ALITOFCALIB_H
2#define ALITOFCALIB_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 TOF calibration:: simulation of uncalibrated data //
9//////////////////////////////////////////////////////////////////
10
11#include "TTask.h"
0e46b9ae 12
13class TArrayF;
14class TF1;
15class TH1F;
16class TObjArray;
17
18class AliESD;
19
20class AliTOFCal;
21class AliTOFGeometry;
6dc9348d 22
23class AliTOFcalib:public TTask{
24public:
25 AliTOFcalib(); // ctor
d4ad0d6b 26 AliTOFcalib(AliTOFGeometry *geom);
7aeeaf38 27 AliTOFcalib(const AliTOFcalib & calib); // copy constructor
28 AliTOFcalib& operator=(const AliTOFcalib & calib); // assignment operator
6dc9348d 29 virtual ~AliTOFcalib() ; // dtor
30 Int_t NSector()const {return fNSector;}
31 Int_t NPlate()const {return fNPlate;}
32 Int_t NStripA()const {return fNStripA;}
33 Int_t NStripB()const {return fNStripB;}
34 Int_t NStripC()const {return fNStripC;}
35 Int_t NpadZ()const {return fNpadZ;}
36 Int_t NpadX()const {return fNpadX;}
d4ad0d6b 37 AliTOFCal * GetTOFCalArray() const {return fTOFCal;}
38 AliTOFCal * GetTOFCalSimArray() const {return fTOFSimCal;}
39 TH1F * GetTOFSimToT() const {return fTOFSimToT;}
40 void SelectESD(AliESD *event);
6dc9348d 41 void CombESDId();
42 void CalibrateESD();
43 TH1F* Profile(Int_t i);
d4ad0d6b 44 Int_t NChannels()const{return fNChannels;}
6dc9348d 45 TF1* SetFitFunctions(TH1F* histo);
d4ad0d6b 46 void CorrectESDTime();// useless method, kept to make Chiara happy
47 void CorrectESDTime(AliESD *event);
48 // Methods to retrieve/write parameters from/on CDB
49 void WriteSimParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun);
50 void WriteSimParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun, AliTOFCal *cal, TH1F *histo);
51 void ReadSimParFromCDB(Char_t *sel, Int_t nrun);
52 void WriteParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun, AliTOFCal *cal);
53 void WriteParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun);
54 void ReadParFromCDB(Char_t *sel, Int_t nrun);
55 Int_t GetIndex(Int_t *detId); // Get channel index for Calibration
6dc9348d 56
57 public:
58 class AliTOFArray : public TObject {
59 public:
60 AliTOFArray(): TObject(),fSize(0),fArray(0x0){}
655e379f 61 AliTOFArray(Int_t size):
6dc9348d 62 TObject(),
63 fSize(size),
64 fArray(new TArrayF*[size]) {
65 }
7aeeaf38 66 AliTOFArray(const AliTOFArray & source):
655e379f 67 TObject(),fSize(0),fArray(0x0){ // copy constructor
7aeeaf38 68 this->fSize= source.fSize;
69 this->fArray= source.fArray;
70 };
71
72 AliTOFArray& operator=(const AliTOFArray & source) { // assignment operator
73 this->fSize= source.fSize;
74 this->fArray= source.fArray;
75 return *this;
76 }
77
6dc9348d 78 Int_t GetSize() const {return fSize;}
79 void AddArray(Int_t pos, TArrayF * parr) {
340693af 80 if (pos>-1 && pos < fSize)fArray[pos] = parr;}
81 TArrayF * GetArray(Int_t pos) const {
82 TArrayF * parr = 0x0;
83 if (pos>-1 && pos < fSize)parr = fArray[pos];
6dc9348d 84 return parr;
85 }
86 virtual ~AliTOFArray() {
87 delete [] fArray;
88 }
89
90 private:
91
92 Int_t fSize; // Size of the array of TArrayFs
93 TArrayF ** fArray; //[fSize]};
94
95 };
96
97
98private:
99 static const Int_t fgkchannel; // max number of entries per channel
d4ad0d6b 100 Int_t fNChannels; // number of TOF channels
6dc9348d 101 Int_t fNSector; // number of TOF sectors
102 Int_t fNPlate; // number of TOF plates
103 Int_t fNStripA; // number of TOF strips A
104 Int_t fNStripB; // number of TOF strips B
105 Int_t fNStripC; // number of TOF strips C
106 Int_t fNpadZ; // number of TOF pads Z
107 Int_t fNpadX; // number of TOF pads X
d4ad0d6b 108 Int_t fNevents; // number of events
6dc9348d 109 TObjArray * fESDsel; // selected ESD tracks for calibration
6dc9348d 110 AliTOFArray *fArrayToT; // array for ToT values
111 AliTOFArray *fArrayTime; // array for Time values
6dc9348d 112 AliTOFCal *fTOFCal; // array of AliTOFChannels storing calib parameters
d4ad0d6b 113 AliTOFCal *fTOFSimCal; // array of AliTOFChannels storing calib parameters
114 TH1F *fTOFSimToT; // histo with realistic ToT signal from TB Data
6dc9348d 115 ClassDef(AliTOFcalib,1);
116};
117
118#endif // AliTOFcalib_H
119