class TH2F;
class TH2;
class TLinearFitter;
+class TTreeSRedirector;
class AliLog;
+class AliRawReader;
+
class AliTRDCalibraMode;
class AliTRDCalibraVector;
-
-class AliRawReader;
-class AliTRDRawStream;
+class AliTRDCalibraVdriftLinearFit;
+class AliTRDRawStreamV2;
class AliTRDcluster;
class AliTRDtrack;
class AliTRDmcmTracklet;
-class TTreeSRedirector;
+class AliTRDgeometry;
+class AliTRDCalDet;
+class AliTRDCalROC;
+
struct eventHeaderStruct;
// Functions for initialising the AliTRDCalibraFillHisto in the code
Bool_t Init2Dhistos();
+ Bool_t Init2Dhistostrack();
// Functions for filling the histos in the code
Bool_t ResetTrack();
+ Bool_t UpdateHistograms(AliTRDtrack *t);
Bool_t UpdateHistograms(AliTRDcluster *cl, AliTRDtrack *t);
Bool_t UpdateHistogramcm(AliTRDmcmTracklet *trk);
- // Process events DAQ
- Bool_t ProcessEventDAQ(AliTRDRawStream *rawStream);
- Bool_t ProcessEventDAQ(AliRawReader *rawReader);
- Bool_t ProcessEventDAQ(eventHeaderStruct *event);
+ // Process events DAQ
+ Int_t ProcessEventDAQ(AliTRDRawStreamV2 *rawStream, Bool_t nocheck = kFALSE);
+ Int_t ProcessEventDAQ(AliRawReader *rawReader, Bool_t nocheck = kFALSE);
+ Int_t ProcessEventDAQ(eventHeaderStruct *event, Bool_t nocheck = kFALSE);
Bool_t UpdateDAQ(Int_t det, Int_t /*row*/, Int_t /*col*/, Int_t timebin, Int_t signal, Int_t nbtimebins);
-
// Is Pad on
Bool_t IsPadOn(Int_t detector, Int_t col, Int_t row) const;
- // Functions for plotting the 2D
- void Plot2d();
-
// Functions for write
void Write2d(const Char_t *filename = "TRD.calibration.root", Bool_t append = kFALSE);
- // Reset the linearfitter objects
- void ResetLinearFitter();
- void ResetCHHisto() { if(fCH2d) fCH2d->Reset(); }
- void ResetPHHisto() { if(fPH2d) fPH2d->Reset(); }
- void ResetPRFHisto() { if(fPRF2d) fPRF2d->Reset();}
-
//For the statistics
Double_t *StatH(TH2 *ch, Int_t i);
Double_t *GetMeanMedianRMSNumberCH();
//
// Choice to fill or not the 2D
- void SetMITracking(Bool_t mitracking = kTRUE) { fMITracking = mitracking; }
- void SetMcmTracking(Bool_t mcmtracking = kTRUE) { fMcmTracking = mcmtracking; }
- void SetMcmCorrectAngle() { fMcmCorrectAngle = kTRUE; }
- void SetPH2dOn() { fPH2dOn = kTRUE; }
- void SetCH2dOn() { fCH2dOn = kTRUE; }
- void SetPRF2dOn() { fPRF2dOn = kTRUE; }
- void SetHisto2d() { fHisto2d = kTRUE; }
- void SetVector2d() { fVector2d = kTRUE; }
- void SetLinearFitterOn() { fLinearFitterOn = kTRUE; }
- void SetLinearFitterDebugOn() { fLinearFitterDebugOn = kTRUE; }
-
+ void SetMITracking(Bool_t mitracking = kTRUE) { fMITracking = mitracking; }
+ void SetMcmTracking(Bool_t mcmtracking = kTRUE) { fMcmTracking = mcmtracking; }
+ void SetMcmCorrectAngle(Bool_t mcmcorrectangle = kTRUE) { fMcmCorrectAngle = mcmcorrectangle; }
+ void SetPH2dOn(Bool_t ph2don = kTRUE) { fPH2dOn = ph2don; }
+ void SetCH2dOn(Bool_t ch2don = kTRUE) { fCH2dOn = ch2don; }
+ void SetPRF2dOn(Bool_t prf2don = kTRUE) { fPRF2dOn = prf2don; }
+ void SetHisto2d(Bool_t histo2d = kTRUE) { fHisto2d = histo2d; }
+ void SetVector2d(Bool_t vector2d = kTRUE) { fVector2d = vector2d; }
+ void SetLinearFitterOn(Bool_t linearfitteron = kTRUE) { fLinearFitterOn = linearfitteron;}
+ void SetLinearFitterDebugOn(Bool_t debug = kTRUE) { fLinearFitterDebugOn = debug; }
+
Bool_t GetMITracking() const { return fMITracking; }
Bool_t GetMcmTracking() const { return fMcmTracking; }
Bool_t GetPRF2dOn() const { return fPRF2dOn; }
Bool_t GetHisto2d() const { return fHisto2d; }
Bool_t GetVector2d() const { return fVector2d; }
+ Bool_t GetLinearFitterOn() const { return fLinearFitterOn; }
+ Bool_t GetLinearFitterDebugOn() const { return fLinearFitterDebugOn; }
+
TH2I *GetCH2d() const { return fCH2d; }
- TProfile2D *GetPH2d(Int_t nbtimebin=24, Float_t samplefrequency= 10.0, Bool_t force=kFALSE);
+ TProfile2D *GetPH2d(Int_t nbtimebin=24, Float_t samplefrequency= 10.0);
TProfile2D *GetPRF2d() const { return fPRF2d; }
TObjArray GetLinearFitterArray() const { return fLinearFitterArray; }
TLinearFitter *GetLinearFitter(Int_t detector, Bool_t force=kFALSE);
- TH2F *GetLinearFitterHisto(Int_t detector, Bool_t force=kFALSE);
+ AliTRDCalibraVdriftLinearFit *GetVdriftLinearFit() const { return fLinearVdriftFit; }
+
// How to fill the 2D
void SetRelativeScale(Float_t relativeScale);
Short_t GetNumberBinPRF() const { return fNumberBinPRF; }
Short_t GetNumberGroupsPRF() const { return fNgroupprf; }
Int_t *GetEntriesLinearFitter() const { return fEntriesLinearFitter; }
- // Calibration mode
-AliTRDCalibraMode *GetCalibraMode() const { return fCalibraMode; }
// Debug
void SetDebugLevel(Short_t level) { fDebugLevel = level; }
protected:
+ // Geometry
+ AliTRDgeometry *fGeo; //! The TRD geometry
+
// Choice to fill or not the 2D
Bool_t fMITracking; // Chose to fill the 2D histos or vectors during the offline MI tracking
Bool_t fMcmTracking; // Chose to fill the 2D histos or vectors during the tracking with tracklets
//
// Vector method
//
-
-
+
AliTRDCalibraVector *fCalibraVector; // The vector object
// Histograms to store the info from the digits, from the tracklets or from the tracks
- TProfile2D *fPH2d; // 2D average pulse height
- TProfile2D *fPRF2d; // 2D PRF
- TH2I *fCH2d; // 2D deposited charge
- TObjArray fLinearFitterArray; // TObjArray of Linear Fitters for the detectors
- TObjArray fLinearFitterHistoArray; // TObjArray of histo2D for debugging Linear Fitters
-
+ TProfile2D *fPH2d; // 2D average pulse height
+ TProfile2D *fPRF2d; // 2D PRF
+ TH2I *fCH2d; // 2D deposited charge
+ TObjArray fLinearFitterArray; // TObjArray of Linear Fitters for the detectors
+ AliTRDCalibraVdriftLinearFit *fLinearVdriftFit; // Info Linear Fit
+
+ // Current calib object: to correct for the database used
+ AliTRDCalDet *fCalDetGain; // Current calib object gain
+ AliTRDCalROC *fCalROCGain; // Current calib object gain
+ AliTRDCalDet *fCalDetT0; // Current calib object T0
+ AliTRDCalROC *fCalROCT0; // Current calib object T0
+
+
//
// A lot of internal functions......
//
// Create the 2D histo to be filled Online
void CreateCH2d(Int_t nn);
void CreatePH2d(Int_t nn);
- void CreatePRF2d(Int_t nn);
+ void CreatePRF2d(Int_t nn);
// Fill the 2D
void FillTheInfoOfTheTrackPH();
void FillTheInfoOfTheTrackCH();
void FillCH2d(Int_t x, Float_t y);
- void FillCHSm(Int_t supermodule, Float_t y);
Bool_t FindP1TrackPH();
+ Bool_t FindP1TrackPHtrack(AliTRDtrack *t, Int_t index0, Int_t index1);
void ResetfVariables();
+ void ResetfVariablestrack();
Bool_t LocalisationDetectorXbins(Int_t detector);
Int_t *CalculateRowCol(AliTRDcluster *cl) const;
void CheckGoodTracklet(Int_t detector, Int_t *rowcol);
Int_t CalculateCalibrationGroup(Int_t i, Int_t *rowcol) const;
Int_t CalculateTotalNumberOfBins(Int_t i);
- void StoreInfoCHPH(AliTRDcluster *cl, AliTRDtrack *t, Int_t *group);
+ void StoreInfoCHPH(AliTRDcluster *cl, AliTRDtrack *t, Int_t *group, Int_t *rowcol);
+ void StoreInfoCHPHtrack(AliTRDcluster *cl, AliTRDtrack *t, Int_t index, Int_t *group, Int_t *rowcol);
Bool_t HandlePRF();
+ Bool_t HandlePRFtrack(AliTRDtrack *t, Int_t index0, Int_t index1);
+
+ // LinearFitter
+ void AnalyseLinearFitter();
// Clear
void ClearHistos();
virtual Int_t GetPlane(Int_t d) const;
virtual Int_t GetChamber(Int_t d) const;
virtual Int_t GetSector(Int_t d) const;
+
+ Int_t Arrondi(Double_t x)const;
// Instance of this class and so on
static Bool_t fgTerminated; // If terminated
- ClassDef(AliTRDCalibraFillHisto,2) // TRD Calibration class
+ ClassDef(AliTRDCalibraFillHisto,3) // TRD Calibration class
};