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);
53 TObjArray *GetPArray() { return &fLinearFitterPArray; };
54 TObjArray *GetEArray() { return &fLinearFitterEArray; };
55 TObjArray GetHistoArray() const { return fLinearFitterHistoArray; };
56 void SetRobustFit(Bool_t robustFit) { fRobustFit = robustFit; };
59 void SetDebugLevel(Short_t level) { fDebugLevel = level; };
60 void SetSeeDetector(Int_t seeDetector) { fSeeDetector = seeDetector; };
63 TGraphErrors *DrawMS(const TH2 *const h2, Int_t &nEntries);
65 Int_t fVersion; // Version of the object
66 TString fNameCalibUsed; // Info of the version, subversion, firstrun of the calib used
68 TObjArray fLinearFitterHistoArray; // TObjArray of histo2D for debugging Linear Fitters
69 TObjArray fLinearFitterPArray; // Array of result parameters from linear fitters for the detectors
70 TObjArray fLinearFitterEArray; // Array of result errors from linear fitters for the detectors
71 Bool_t fRobustFit; // Robust fit or not
74 TTreeSRedirector *fDebugStreamer; //!Debug streamer
75 Short_t fDebugLevel; // Flag for debugging
76 Int_t fSeeDetector; // Detector to see
78 ClassDef(AliTRDCalibraVdriftLinearFit,3) // Online Vdrift calibration