ROOT logo
#ifndef AliTPCdEdxInfo_H
#define AliTPCdEdxInfo_H

class TGraphErrors;
class TObjArray;
class AliExternalTrackParam;
#include <TObject.h>

class AliTPCdEdxInfo : public TObject 
{
public:
  AliTPCdEdxInfo();
  AliTPCdEdxInfo(const AliTPCdEdxInfo& source);
  AliTPCdEdxInfo& operator=(const AliTPCdEdxInfo& source);
  Double_t GetWeightedMean(Int_t qType, Int_t wType, Double_t w0, Double_t w1, Double_t w2); 
  Double_t GetFractionOfClusters(Int_t iregion){ return fTPCsignalNRowRegion[iregion]>0 ? Double_t(fTPCsignalNRegion[iregion])/Double_t(fTPCsignalNRowRegion[iregion]):0;}
  //
  // qTot info
  void     GetTPCSignalRegionInfo(Double_t signal[4], Char_t ncl[3], Char_t nrows[3]) const;
  void     GetTPCSignals(Double_t signal[4]) const;

  void     SetTPCSignalRegionInfo(Double_t signal[4], Char_t ncl[3], Char_t nrows[3]);
  void     SetTPCSignals(Double_t signal[4]);
  
  
  // qMax info
  void     GetTPCSignalRegionInfoQmax(Double_t signal[4], Char_t ncl[3], Char_t nrows[3]) const;
  void     GetTPCSignalsQmax(Double_t signal[4]) const;

  void     SetTPCSignalRegionInfoQmax(Double_t signal[4], Char_t ncl[3], Char_t nrows[3]);
  void     SetTPCSignalsQmax(Double_t signal[4]);
  
  Double_t GetSignalTot(Int_t index){ return fTPCsignalRegion[index];}
  Double_t GetSignalMax(Int_t index){ return fTPCsignalRegionQmax[index];}
  Double_t GetNumberOfClusters(Int_t index) {return fTPCsignalNRegion[index%3];}
  Double_t GetNumberOfCrossedRows(Int_t index) {return fTPCsignalNRowRegion[index%3];}
  //
  Double_t GetTPCsignalShortPad()      const {return fTPCsignalRegion[0];}
  Double_t GetTPCsignalMediumPad()     const {return fTPCsignalRegion[1];}
  Double_t GetTPCsignalLongPad()       const {return fTPCsignalRegion[2];}
  Double_t GetTPCsignalOROC()          const {return fTPCsignalRegion[3];}
  
  Double_t GetTPCsignalShortPadQmax()  const {return fTPCsignalRegionQmax[0];}
  Double_t GetTPCsignalMediumPadQmax() const {return fTPCsignalRegionQmax[1];}
  Double_t GetTPCsignalLongPadQmax()   const {return fTPCsignalRegionQmax[2];}
  Double_t GetTPCsignalOROCQmax()      const {return fTPCsignalRegionQmax[3];}
  static void     RegisterSectorCalibration(TGraphErrors* gainSector, Int_t regionID, Int_t calibID);
  Double_t  GetdEdxInfo(AliExternalTrackParam *param, Int_t regionID, Int_t calibID, Int_t qID, Int_t valueID);
private: 

  Double32_t  fTPCsignalRegion[4]; //[0.,0.,10] TPC dEdx signal in 4 different regions - 0 - IROC, 1- OROC medium, 2 - OROC long, 3- OROC all, (default truncation used)  - for qTot
  Double32_t  fTPCsignalRegionQmax[4]; //[0.,0.,10] TPC dEdx signal in 4 different regions - 0 - IROC, 1- OROC medium, 2 - OROC long, 3- OROC all, (default truncation used) - for qMax
  Char_t      fTPCsignalNRegion[3]; // number of clusters above threshold used in the dEdx calculation
  Char_t      fTPCsignalNRowRegion[3]; // number of crosed rows used in the dEdx calculation - signal below threshold included
  //
  static TObjArray *fArraySectorCalibration;
  
  ClassDef(AliTPCdEdxInfo,3)
};

#endif
 AliTPCdEdxInfo.h:1
 AliTPCdEdxInfo.h:2
 AliTPCdEdxInfo.h:3
 AliTPCdEdxInfo.h:4
 AliTPCdEdxInfo.h:5
 AliTPCdEdxInfo.h:6
 AliTPCdEdxInfo.h:7
 AliTPCdEdxInfo.h:8
 AliTPCdEdxInfo.h:9
 AliTPCdEdxInfo.h:10
 AliTPCdEdxInfo.h:11
 AliTPCdEdxInfo.h:12
 AliTPCdEdxInfo.h:13
 AliTPCdEdxInfo.h:14
 AliTPCdEdxInfo.h:15
 AliTPCdEdxInfo.h:16
 AliTPCdEdxInfo.h:17
 AliTPCdEdxInfo.h:18
 AliTPCdEdxInfo.h:19
 AliTPCdEdxInfo.h:20
 AliTPCdEdxInfo.h:21
 AliTPCdEdxInfo.h:22
 AliTPCdEdxInfo.h:23
 AliTPCdEdxInfo.h:24
 AliTPCdEdxInfo.h:25
 AliTPCdEdxInfo.h:26
 AliTPCdEdxInfo.h:27
 AliTPCdEdxInfo.h:28
 AliTPCdEdxInfo.h:29
 AliTPCdEdxInfo.h:30
 AliTPCdEdxInfo.h:31
 AliTPCdEdxInfo.h:32
 AliTPCdEdxInfo.h:33
 AliTPCdEdxInfo.h:34
 AliTPCdEdxInfo.h:35
 AliTPCdEdxInfo.h:36
 AliTPCdEdxInfo.h:37
 AliTPCdEdxInfo.h:38
 AliTPCdEdxInfo.h:39
 AliTPCdEdxInfo.h:40
 AliTPCdEdxInfo.h:41
 AliTPCdEdxInfo.h:42
 AliTPCdEdxInfo.h:43
 AliTPCdEdxInfo.h:44
 AliTPCdEdxInfo.h:45
 AliTPCdEdxInfo.h:46
 AliTPCdEdxInfo.h:47
 AliTPCdEdxInfo.h:48
 AliTPCdEdxInfo.h:49
 AliTPCdEdxInfo.h:50
 AliTPCdEdxInfo.h:51
 AliTPCdEdxInfo.h:52
 AliTPCdEdxInfo.h:53
 AliTPCdEdxInfo.h:54
 AliTPCdEdxInfo.h:55
 AliTPCdEdxInfo.h:56
 AliTPCdEdxInfo.h:57
 AliTPCdEdxInfo.h:58
 AliTPCdEdxInfo.h:59
 AliTPCdEdxInfo.h:60
 AliTPCdEdxInfo.h:61