]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDCalibPadStatus.h
Added macros for production using Geant4. 3 different physics lists can be used:...
[u/mrichter/AliRoot.git] / TRD / AliTRDCalibPadStatus.h
CommitLineData
cf46274d 1#ifndef ALITRDCALIBPADSTATUS_H
170c35f1 2#define ALITRDCALIBPADSTATUS_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8///////////////////////////////////////////////////////////////////////////////
9// //
10// TRD calibration class for online calibration //
11// //
12///////////////////////////////////////////////////////////////////////////////
13
14class TObjArray;
15class TH2F;
f162af62 16
17class AliRawReader;
18
289cc637 19class AliTRDCalDet;
20class AliTRDCalPad;
170c35f1 21class AliTRDCalROC;
22class AliTRDCalPadStatus;
5e64ce0d 23class AliTRDrawStreamBase;
f162af62 24class AliTRDgeometry;
25
1785640c 26class AliTRDrawFastStream;
27class AliTRDdigitsManager;
28class AliTRDSignalIndex;
29
170c35f1 30struct eventHeaderStruct;
31
32class AliTRDCalibPadStatus : public TObject {
33
34public:
35
36 AliTRDCalibPadStatus();
37 AliTRDCalibPadStatus(const AliTRDCalibPadStatus &ped);
38 virtual ~AliTRDCalibPadStatus();
39
40 AliTRDCalibPadStatus& operator = (const AliTRDCalibPadStatus &source);
41
5e64ce0d 42 Int_t ProcessEvent(AliTRDrawStreamBase *rawStream, Bool_t nocheck = kFALSE);
3a0f6479 43 Int_t ProcessEvent(AliRawReader *rawReader, Bool_t nocheck = kFALSE);
6bbdc11a 44 Int_t ProcessEvent(const eventHeaderStruct *event, Bool_t nocheck = kFALSE);
1785640c 45 Int_t ProcessEvent2(AliRawReader *rawReader);
46
8799e123 47 void Destroy();
170c35f1 48 Int_t UpdateHisto(const Int_t idet, const Int_t iRow, const Int_t iCol,
e4db522f 49 const Int_t signal, const Int_t crowMax, const Int_t ccold, const Int_t icMcm);
6ace5fe2 50
1785640c 51 Int_t UpdateHisto2(const Int_t idet, const Int_t iRow, const Int_t iCol,
52 const Int_t signal, const Int_t crowMax, const Int_t ccold, const Int_t icMcm, const Int_t icRob);
53
170c35f1 54 void AnalyseHisto();
55 AliTRDCalPadStatus *CreateCalPadStatus();
289cc637 56 AliTRDCalPad *CreateCalPad();
0bc7827a 57 AliTRDCalDet *CreateCalDet() const;
3a0f6479 58
6ace5fe2 59 void SetCalRocMean(AliTRDCalROC *mean, Int_t det);
60 void SetCalRocRMS(AliTRDCalROC *rms, Int_t det);
61
e4db522f 62 void SetCalRocMeand(AliTRDCalROC *mean, Int_t det);
63 void SetCalRocRMSd(AliTRDCalROC *rms, Int_t det);
64
170c35f1 65 //
170c35f1 66 AliTRDCalROC* GetCalRocMean(Int_t det, Bool_t force=kFALSE); // get calibration object
67 AliTRDCalROC* GetCalRocRMS(Int_t det, Bool_t force=kFALSE); // get calibration object
68
e4db522f 69 AliTRDCalROC* GetCalRocMeand(Int_t det, Bool_t force=kFALSE); // get calibration object
70 AliTRDCalROC* GetCalRocRMSd(Int_t det, Bool_t force=kFALSE); // get calibration object
71
170c35f1 72 TH2F* GetHisto (Int_t det, Bool_t force=kFALSE); // get refernce histogram
73
8368e0ee 74 void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
170c35f1 75 //
76 Int_t GetAdcMin() const { return fAdcMin; }
77 Int_t GetAdcMax() const { return fAdcMax; }
78
79 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range
80
81
d95484e4 82 Bool_t TestEventHisto(Int_t nevent, Int_t sm, Int_t ch); //test the fast approach to fill histograms
170c35f1 83
e4db522f 84 private:
170c35f1 85
f162af62 86 // Geometry
87 AliTRDgeometry *fGeo; //! The TRD geometry
88
170c35f1 89 Int_t fAdcMin; // min adc channel of pedestal value
90 Int_t fAdcMax; // max adc channel of pedestal value
91 Int_t fDetector; // Current detector
cf46274d 92 Int_t fNumberOfTimeBins; // Current number of time bins
170c35f1 93
170c35f1 94 TObjArray fCalRocArrayMean; // Array of AliTRDCalROC class for signal width calibration
95 TObjArray fCalRocArrayRMS; // Array of AliTRDCalROC class for mean width calibration
96
e4db522f 97 TObjArray fCalRocArrayMeand; // Array of AliTRDCalROC class for signal width calibration doubled
98 TObjArray fCalRocArrayRMSd; // Array of AliTRDCalROC class for mean width calibration doubled
99
170c35f1 100 TObjArray fHistoArray; // Array of histos for mean width calibration
101
e4db522f 102
cf46274d 103 AliTRDCalROC* GetCalRoc(Int_t det, TObjArray* arr, Bool_t force);
104
170c35f1 105 TH2F* GetHisto(Int_t det, TObjArray *arr,
106 Int_t nbinsY, Float_t ymin, Float_t ymax,
a6e0ebfe 107 const Char_t *type, Bool_t force);
170c35f1 108
109 // Some basic geometry function
053767a4 110 virtual Int_t GetLayer(Int_t d) const;
111 virtual Int_t GetStack(Int_t d) const;
170c35f1 112 virtual Int_t GetSector(Int_t d) const;
113
3a0f6479 114 ClassDef(AliTRDCalibPadStatus,1)
170c35f1 115
3a0f6479 116};
170c35f1 117#endif
1785640c 118