class TH1F;
class TObjArray;
-class AliTRDarrayF;
-class AliTRDarrayI;
+class AliTRDPhInfo;
+class AliTRDEntriesInfo;
+class AliTRDPrfInfo;
class AliTRDCalibraVector : public TObject {
AliTRDCalibraVector& operator = (const AliTRDCalibraVector &source);
+ // Init
+ void TestInit(Int_t i, Int_t detmax);
+
// Fill
- Int_t SearchBin(Float_t value, Int_t i) const;
Bool_t UpdateVectorCH(Int_t det, Int_t group, Float_t value);
Bool_t UpdateVectorPRF(Int_t det, Int_t group, Float_t x, Float_t y);
Bool_t UpdateVectorPH(Int_t det, Int_t group, Int_t time, Float_t value);
+
+ Bool_t FillVectorCH(Int_t det, Int_t group, Int_t bin, Int_t entries);
+ Bool_t FillVectorPRF(Int_t det, Int_t group, Int_t bin, Int_t entries, Float_t mean, Float_t square);
+ Bool_t FillVectorPH(Int_t det, Int_t group, Int_t bin, Int_t entries, Float_t mean, Float_t square);
+
+
// Add
Bool_t Add(AliTRDCalibraVector *calvector);
+
+ AliTRDCalibraVector *AddStatsPerDetectorCH();
+ AliTRDCalibraVector *AddStatsPerDetectorPH();
+ AliTRDCalibraVector *AddStatsPerDetectorPRF();
+
// Fit
TGraphErrors *ConvertVectorPHTGraphErrors(Int_t det, Int_t group, const Char_t *name);
TGraphErrors *ConvertVectorPRFTGraphErrors(Int_t det, Int_t group, const Char_t *name);
+ TH1F *CorrectTheError(const TGraphErrors *hist, Int_t &nbEntries);
TH1F *ConvertVectorCHHisto(Int_t det, Int_t group, const Char_t *name);
+ // Find
+ Int_t SearchBin(Float_t value, Int_t i) const;
+ Bool_t FindTheMaxEntries(Int_t i, Int_t &detectormax, Int_t &groupmax);
+
//
// Set and Get methods
//
void SetPRFRange(Float_t prfrange) { fPRFRange = prfrange; }
void SetDetCha0(Int_t i, Short_t total) { fDetCha0[i] = total; }
void SetDetCha2(Int_t i, Short_t total) { fDetCha2[i] = total; }
- void SetNamePH(const char* name) { fVectorPHEntries.SetName(name); }
- void SetNamePRF(const char* name) { fVectorPRFEntries.SetName(name); }
- void SetNameCH(const char* name) { fVectorCHEntries.SetName(name); }
+ void SetNzNrphi(Int_t i, Int_t nz, Int_t nrphi);
+ void SetNbGroupPRF(Int_t nbGroup) { fNbGroupPRF = (UChar_t) nbGroup; }
Short_t GetNumberBinCharge()const { return fNumberBinCharge; }
Short_t GetNumberBinPRF()const { return fNumberBinPRF; }
Int_t GetTimeMax()const { return fTimeMax; }
Float_t GetPRFRange()const { return fPRFRange; }
- Short_t GetDetCha0(Int_t i) { return fDetCha0[i]; }
- Short_t GetDetCha2(Int_t i) { return fDetCha2[i]; }
- const char* GetNamePH() { return fVectorPHEntries.GetName(); }
- const char* GetNamePRF() { return fVectorPRFEntries.GetName(); }
- const char* GetNameCH() { return fVectorCHEntries.GetName(); }
-
- AliTRDarrayI *GetPHEntries(Int_t det,Bool_t force = kFALSE);
- AliTRDarrayF *GetPHMean(Int_t det,Bool_t force = kFALSE);
- AliTRDarrayF *GetPHSquares(Int_t det,Bool_t force = kFALSE);
-
- AliTRDarrayI *GetPRFEntries(Int_t det,Bool_t force = kFALSE);
- AliTRDarrayF *GetPRFMean(Int_t det,Bool_t force = kFALSE);
- AliTRDarrayF *GetPRFSquares(Int_t det,Bool_t force = kFALSE);
-
- AliTRDarrayI *GetCHEntries(Int_t det,Bool_t force = kFALSE);
+ Short_t GetDetCha0(Int_t i) const { return fDetCha0[i]; }
+ Short_t GetDetCha2(Int_t i) const { return fDetCha2[i]; }
+ TString GetNamePH() const;
+ TString GetNamePRF() const;
+ TString GetNameCH() const;
+ Int_t GetNz(Int_t i) const;
+ Int_t GetNrphi(Int_t i) const;
+ Int_t GetNbGroupPRF() const { return (Int_t)fNbGroupPRF; }
+
+ Int_t GetTotalNumberOfBinsInDetector(Int_t det, Int_t i, Int_t nbBin) const;
+
+ TObject *GetPHEntries(Int_t det,Bool_t force = kFALSE);
+ TObject *GetPHMean(Int_t det,Bool_t force = kFALSE);
+ TObject *GetPHSquares(Int_t det,Bool_t force = kFALSE);
+
+ TObject *GetPRFEntries(Int_t det,Bool_t force = kFALSE);
+ TObject *GetPRFMean(Int_t det,Bool_t force = kFALSE);
+ TObject *GetPRFSquares(Int_t det,Bool_t force = kFALSE);
+
+ TObject *GetCHEntries(Int_t det,Bool_t force = kFALSE);
+
+
protected:
-
+
// Current data
-
- AliTRDarrayI *fPHEntries; // Current AliTRDArrayI PH entries
- AliTRDarrayF *fPHMean; // Current AliTRDArrayF PH Mean
- AliTRDarrayF *fPHSquares; // Current AliTRDArrayF PH Squares
-
- AliTRDarrayI *fPRFEntries; // Current AliTRDArrayI PH entries
- AliTRDarrayF *fPRFMean; // Current AliTRDArrayF PH Mean
- AliTRDarrayF *fPRFSquares; // Current AliTRDArrayF PH Squares
-
- AliTRDarrayI *fCHEntries; // Current AliTRDArrayI PH entries
-
- Int_t fDetectorPH; // Current detector
- Int_t fDetectorCH; // Current detector
- Int_t fDetectorPRF; // Current detector
-
- // Arrays of these objects
-
- TObjArray fVectorPHMean; // array of AliTRDarrayF of mean
- TObjArray fVectorPHSquares; // array of AliTRDarrayF of squares
- TObjArray fVectorPHEntries; // array of AliTRDarrayI of entries
- TObjArray fVectorCHEntries; // array of AliTRDarrayI of entries
- TObjArray fVectorPRFMean; // array of AliTRDarrayF of mean
- TObjArray fVectorPRFSquares; // array of AliTRDarrayF of squares
- TObjArray fVectorPRFEntries; // array of AliTRDarrayI of entries
-
+
+ AliTRDEntriesInfo *fPHEntries[540]; // PH entries
+ AliTRDPhInfo *fPHMean[540]; // PH Mean
+ AliTRDPhInfo *fPHSquares[540]; // PH Squares
+
+ AliTRDEntriesInfo *fPRFEntries[540]; // PRF entries
+ AliTRDPrfInfo *fPRFMean[540]; // PRF Mean
+ AliTRDPrfInfo *fPRFSquares[540]; // PRF Squares
+
+ AliTRDEntriesInfo *fCHEntries[540]; // CH entries
+
+ UChar_t fModeCH; // Calibration mode
+ UChar_t fModePH; // Calibration mode
+ UChar_t fModePRF; // Calibration mode
+ UChar_t fNbGroupPRF; // Nb of group PRD
+
+
+ Int_t fDetectorPH; //! Current detector
+ Int_t fDetectorCH; //! Current detector
+ Int_t fDetectorPRF; //! Current detector
+ Bool_t fStopFillCH; //! To know if we stop to fill
+ TH1F *fHisto; //! Histo to be fitted
+ TGraphErrors *fGraph; //! TGraphError
+ AliTRDCalibraVector *fCalVector; //! AliTRDCalibraVector
+
// Size of the infos
-
- Short_t fNumberBinCharge; // Number of bins for the gain factor
- Short_t fNumberBinPRF; // Number of bin for the PRF
- Int_t fTimeMax; // Number of time bins
- Float_t fPRFRange; // Range PRF
- Short_t fDetCha0[3]; // Number of XBins for chamber != 2
- Short_t fDetCha2[3]; // Number of Xbins for chamber 2
-
+
+ Short_t fNumberBinCharge; // Number of bins for the gain factor
+ Short_t fNumberBinPRF; // Number of bin for the PRF
+ Int_t fTimeMax; // Number of time bins
+ Float_t fPRFRange; // Range PRF
+ Short_t fDetCha0[3]; // Number of XBins for chamber != 2
+ Short_t fDetCha2[3]; // Number of Xbins for chamber 2
+
// Some functions
-
-
- AliTRDarrayI *GetEntriesPH(Int_t det, TObjArray *array, Bool_t force);
- AliTRDarrayF *GetMeanSquaresPH(Int_t det, TObjArray *array, Bool_t force);
-
- AliTRDarrayI *GetEntriesPRF(Int_t det, TObjArray *array, Bool_t force);
- AliTRDarrayF *GetMeanSquaresPRF(Int_t det, TObjArray *array, Bool_t force);
-
- AliTRDarrayI *GetEntriesCH(Int_t det, TObjArray *array, Bool_t force);
-
- // Some basic geometry function
- virtual Int_t GetChamber(Int_t d) const;
- ClassDef(AliTRDCalibraVector,1) // TRD Calibration class
-
-};
+ AliTRDEntriesInfo *GetEntriesPH(Int_t det, AliTRDEntriesInfo** array, Bool_t force);
+ AliTRDPhInfo *GetMeanSquaresPH(Int_t det, AliTRDPhInfo** array, Bool_t force);
-#endif
+ AliTRDEntriesInfo *GetEntriesPRF(Int_t det, AliTRDEntriesInfo** array, Bool_t force);
+ AliTRDPrfInfo *GetMeanSquaresPRF(Int_t det, AliTRDPrfInfo** array, Bool_t force);
+
+ AliTRDEntriesInfo *GetEntriesCH(Int_t det, AliTRDEntriesInfo** array, Bool_t force);
+ ClassDef(AliTRDCalibraVector,1) // TRD Calibration class
+
+ };
+
+#endif