A bulk of changes to calculate statistical values corresponding to
[u/mrichter/AliRoot.git] / TPC / AliTPCcalibDButil.h
892226be 1#ifndef AliTPCcalibDButil_H
2#define AliTPCcalibDButil_H
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
8// //
9// Class providing the calculation of derived quantities (mean,rms,fits,...) //
10// of calibration entries //
11// //
14#include <TObject.h>
16class AliDCSSensorArray;
17class AliTPCcalibDB;
18class AliTPCCalPad;
19class AliTPCmapper;
6e7d7dc4 20class AliTPCCalibRaw;
892226be 21
22class AliTPCcalibDButil : public TObject
25 AliTPCcalibDButil();
26 virtual ~AliTPCcalibDButil();
28 void UpdateFromCalibDB();
29 //data processing functions
7390f655 30 void ProcessCEdata(const char* fitFormula, TVectorD &fitResultsA, TVectorD &fitResultsC,
31 Int_t &noutliersCE, AliTPCCalPad *outCE=0);
892226be 32 void ProcessCEgraphs(TVectorD &vecTEntries, TVectorD &vecTMean, TVectorD &vecTRMS, TVectorD &vecTMedian,
33 TVectorD &vecQEntries, TVectorD &vecQMean, TVectorD &vecQRMS, TVectorD &vecQMedian,
34 Float_t &driftTimeA, Float_t &driftTimeC );
35 void ProcessNoiseData(TVectorD &vNoiseMean, TVectorD &vNoiseMeanSenRegions,
36 TVectorD &vNoiseRMS, TVectorD &vNoiseRMSSenRegions,
37 Int_t &nonMaskedZero);
38 void ProcessPulser(TVectorD &vMeanTime);
39 void ProcessALTROConfig(Int_t &nMasked);
40 void ProcessGoofie(TVectorD & vecEntries, TVectorD & vecMedian, TVectorD &vecMean, TVectorD &vecRMS);
7390f655 41 //processing functions using reference data
42 void ProcessPedestalVariations(TVectorF &pedestalDeviations);
43 void ProcessNoiseVariations(TVectorF &noiseDeviations);
44 void ProcessPulserVariations(TVectorF &pulserQdeviations, Float_t &varQMean, Int_t &npadsOutOneTB, Int_t &npadsOffAdd);
892226be 45 //getter preprocess information
46 Int_t GetNPulserOutliers() const {return fNpulserOutliers;}
47 Float_t GetMeanAltro(const AliTPCCalROC *roc, const Int_t row, const Int_t pad, AliTPCCalROC *rocOut=0x0);
48 AliTPCCalPad *GetPulserOutlierMap() const {return fPulserOutlier;}
49 //setters for pad by pad information
50 void SetPulserData(AliTPCCalPad *tmean, AliTPCCalPad *trms=0x0, AliTPCCalPad *qmean=0x0)
51 {fPulserTmean=tmean; fPulserTrms=trms; fPulserQmean=qmean;}
52 void SetCEData(AliTPCCalPad *tmean, AliTPCCalPad *trms=0x0, AliTPCCalPad *qmean=0x0)
53 {fCETmean=tmean; fCETrms=trms; fCEQmean=qmean;}
54 void SetNoisePedestal(AliTPCCalPad *noise, AliTPCCalPad *pedestal=0x0)
55 {fPadNoise=noise; fPedestals=pedestal;}
56 void SetALTROData(AliTPCCalPad *masked)
57 {fALTROMasked=masked;}
58 void SetGoofieArray(AliDCSSensorArray *arr) {fGoofieArray=arr;}
7390f655 59 //setters for pad by pad information
60 void SetRefFile(const char* filename);
61 void SetRefPulserData(AliTPCCalPad *tmean, AliTPCCalPad *trms=0x0, AliTPCCalPad *qmean=0x0)
62 {fRefPulserTmean=tmean; fRefPulserTrms=trms; fRefPulserQmean=qmean;}
63 void SetRefCEData(AliTPCCalPad *tmean, AliTPCCalPad *trms=0x0, AliTPCCalPad *qmean=0x0)
64 {fRefCETmean=tmean; fRefCETrms=trms; fRefCEQmean=qmean;}
65 void SetRefNoisePedestal(AliTPCCalPad *noise, AliTPCCalPad *pedestal=0x0)
66 {fRefPadNoise=noise; fRefPedestals=pedestal;}
67 void SetRefALTROData(AliTPCCalPad *masked)
68 {fRefALTROMasked=masked;}
892226be 70 //creation of derived pad by pad calibration data
71 AliTPCCalPad *CreatePadTime0(Int_t model=0);
72 //
73 void UpdatePulserOutlierMap();
7390f655 74 void UpdateRefPulserOutlierMap();
75 void PulserOutlierMap(AliTPCCalPad *pulOut, const AliTPCCalPad *pulT, const AliTPCCalPad *pulQ);
892226be 76private:
77 AliTPCcalibDB *fCalibDB; //pointer to calibDB object
78 AliTPCCalPad *fPadNoise; //noise information
79 AliTPCCalPad *fPedestals; //pedestal information
80 AliTPCCalPad *fPulserTmean; //pulser mean time information
81 AliTPCCalPad *fPulserTrms; //pulser rms time information
82 AliTPCCalPad *fPulserQmean; //pulser mean q information
83 AliTPCCalPad *fPulserOutlier; //pulser outlier map
84 AliTPCCalPad *fCETmean; //central electrode mean time information
85 AliTPCCalPad *fCETrms; //central electrode rms time information
86 AliTPCCalPad *fCEQmean; //central electrode mean q information
87 AliTPCCalPad *fALTROMasked; //ALTRO masked channels information
88 //
6e7d7dc4 89 AliTPCCalibRaw *fCalibRaw; //raw calibration object
7390f655 90 //reference data
91 AliTPCCalPad *fRefPadNoise; //Reference noise information
92 AliTPCCalPad *fRefPedestals; //Reference pedestal information
93 AliTPCCalPad *fRefPulserTmean; //Reference pulser mean time information
94 AliTPCCalPad *fRefPulserTrms; //Reference pulser rms time information
95 AliTPCCalPad *fRefPulserQmean; //Reference pulser mean q information
96 AliTPCCalPad *fRefPulserOutlier; //Reference pulser outlier map
97 AliTPCCalPad *fRefCETmean; //Reference central electrode mean time information
98 AliTPCCalPad *fRefCETrms; //Reference central electrode rms time information
99 AliTPCCalPad *fRefCEQmean; //Reference central electrode mean q information
100 AliTPCCalPad *fRefALTROMasked; //Reference ALTRO masked channels information
101 //
102 AliTPCCalibRaw *fRefCalibRaw; //Reference raw calibration object
6e7d7dc4 104 //
892226be 105 AliDCSSensorArray* fGoofieArray; //Goofie Data
106 //
107 AliTPCmapper *fMapper; //TPC mapping handler
108 Int_t fNpulserOutliers; //number of outliers from Pulser calibration
110 Float_t fIrocTimeOffset; //timing offset between IROC and OROC in timebins
111 Float_t fCETmaxLimitAbs; //maximum variation in CE data before pads will be treated as outliers
112 Float_t fPulTmaxLimitAbs; //maximum variation of Pulser Signals (time) before pads will be treated as outliers
113 Float_t fPulQmaxLimitAbs; //maximum variation of Pulser Signals (charge) before pads will be treated as outliers
114 Float_t fPulQminLimit; //minimum charge value for Pulser Signals before pads will be treated as outliers
116 AliTPCcalibDButil (const AliTPCcalibDButil& );
117 AliTPCcalibDButil& operator= (const AliTPCcalibDButil& );
120 ClassDef(AliTPCcalibDButil,0)