1 #ifndef ALITRDCALIBRAVDRIFTLINEARFIT_H
2 #define ALITRDCALIBRAVDRIFTLINEARFIT_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 ///////////////////////////////////////////////////////////////////////////////
11 // TRD calibration class for online calibration //
13 ///////////////////////////////////////////////////////////////////////////////
15 //#include "TObjArray.h"
22 class TTreeSRedirector;
26 class TTreeSRedirector;
28 class AliTRDCalibraVdriftLinearFit : public TObject {
32 AliTRDCalibraVdriftLinearFit();
33 AliTRDCalibraVdriftLinearFit(const AliTRDCalibraVdriftLinearFit &ped);
34 AliTRDCalibraVdriftLinearFit(const TObjArray &obja);
35 virtual ~AliTRDCalibraVdriftLinearFit();
36 virtual Long64_t Merge(const TCollection* list);
37 virtual void Copy(TObject &c) const;
39 AliTRDCalibraVdriftLinearFit& operator = (const AliTRDCalibraVdriftLinearFit &source);
41 void Update(Int_t detector, Float_t tnp, Float_t pars1);
44 void SetNameCalibUsed(const char*name) { fNameCalibUsed = name;};
45 const char* GetNameCalibUsed() const { return fNameCalibUsed;};
46 void Add(const AliTRDCalibraVdriftLinearFit *ped);
47 TH2S *GetLinearFitterHisto(Int_t detector, Bool_t force=kFALSE);
48 TH2S *GetLinearFitterHistoForce(Int_t detector);
49 TH2S *GetLinearFitterHistoNoForce(Int_t detector) const { return (TH2S*)fLinearFitterHistoArray.UncheckedAt(detector);};
50 Bool_t GetParam(Int_t detector, TVectorD *param);
51 Bool_t GetError(Int_t detector, TVectorD *error);
52 Int_t GetMinNumberOfPointsForFit() const { return fMinNpointsFit;};
54 TGraphErrors *DrawMS(const TH2 *const h2, Int_t &nEntries);
56 TObjArray *GetPArray() { return &fLinearFitterPArray; };
57 TObjArray *GetEArray() { return &fLinearFitterEArray; };
58 TObjArray GetHistoArray() const { return fLinearFitterHistoArray; };
59 void SetRobustFit(Bool_t robustFit) { fRobustFit = robustFit; };
60 void SetMinNumberOfPointsForFit(Int_t minNpointsFit) { fMinNpointsFit = minNpointsFit;};
62 void SetNbBindx(Short_t nbBindx) { fNbBindx = nbBindx; };
63 void SetNbBindy(Short_t nbBindy) { fNbBindy = nbBindy; }
64 void SetRangedx(Double_t rangedx) { fRangedx = rangedx; };
65 void SetRangedy(Double_t rangedy) { fRangedy = rangedy; };
68 void SetDebugLevel(Short_t level) { fDebugLevel = level; };
69 void SetSeeDetector(Int_t seeDetector) { fSeeDetector = seeDetector; };
74 Int_t fVersion; // Version of the object
75 TString fNameCalibUsed; // Info of the version, subversion, firstrun of the calib used
77 TObjArray fLinearFitterHistoArray; // TObjArray of histo2D for debugging Linear Fitters
78 TObjArray fLinearFitterPArray; // Array of result parameters from linear fitters for the detectors
79 TObjArray fLinearFitterEArray; // Array of result errors from linear fitters for the detectors
80 Bool_t fRobustFit; // Robust fit or not
81 Int_t fMinNpointsFit; // Min number of points for the fit
83 Short_t fNbBindx; // Nb of bin in x
84 Short_t fNbBindy; // Nb of bin in y
85 Double_t fRangedx; // Range in x
86 Double_t fRangedy; // Range in y
90 TTreeSRedirector *fDebugStreamer; //!Debug streamer
91 Short_t fDebugLevel; // Flag for debugging
92 Int_t fSeeDetector; // Detector to see
94 ClassDef(AliTRDCalibraVdriftLinearFit,5) // Online Vdrift calibration