From d3929eb341afc43e19f3b78885a36efb6c5f2dfd Mon Sep 17 00:00:00 2001 From: mivanov Date: Wed, 12 Feb 2014 14:58:04 +0100 Subject: [PATCH] STEER/ESD/AliESDtrack.h - make function GetLengthInActiveZone static STEER/ESD/AliESDtrack.cxx - Function to accses the AliTPCdEdxInfo getters (for TTree::Draw) STEER/STEERBase/AliTPCdEdxInfo.cxx - adding getters + first version of usage of calibration STEER/STEERBase/AliTPCdEdxInfo.h - STEER/STEERBase/AliExternalTrackParam.h - getter to acces information also in TTree::Draw --- STEER/ESD/AliESDtrack.cxx | 14 +++++++++- STEER/ESD/AliESDtrack.h | 3 ++- STEER/STEERBase/AliTPCdEdxInfo.cxx | 43 +++++++++++++++++++++++++++--- STEER/STEERBase/AliTPCdEdxInfo.h | 5 ++++ 4 files changed, 59 insertions(+), 6 deletions(-) diff --git a/STEER/ESD/AliESDtrack.cxx b/STEER/ESD/AliESDtrack.cxx index 53b0dffa40b..6e9ddd22a11 100644 --- a/STEER/ESD/AliESDtrack.cxx +++ b/STEER/ESD/AliESDtrack.cxx @@ -2889,7 +2889,7 @@ Double_t AliESDtrack::GetLengthInActiveZone( Int_t mode, Double_t deltaY, Double return 0; } -Double_t AliESDtrack::GetLengthInActiveZone(const AliExternalTrackParam *paramT, Double_t deltaY, Double_t deltaZ, Double_t bz, Double_t exbPhi , TTreeSRedirector * pcstream) const { +Double_t AliESDtrack::GetLengthInActiveZone(const AliExternalTrackParam *paramT, Double_t deltaY, Double_t deltaZ, Double_t bz, Double_t exbPhi , TTreeSRedirector * pcstream) { // // Numerical code to calculate the length of the track in active region of the TPC // ( can be speed up if somebody wants to invest time - analysical version shoult be possible) @@ -3202,3 +3202,15 @@ void AliESDtrack::SortTOFcluster(){ const AliTOFHeader* AliESDtrack::GetTOFHeader() const { return fESDEvent->GetTOFHeader(); } + + +Double_t AliESDtrack::GetdEdxInfo(Int_t regionID, Int_t calibID, Int_t qID, Int_t valueID){ + // + // Interface to get the calibrated dEdx information + // For details of arguments and return values see + // AliTPCdEdxInfo::GetdEdxInfo(Int_t regionID, Int_t calibID, Int_t valueID) + // + if (!fTPCdEdxInfo) return 0; + if (!fIp) return 0; + return fTPCdEdxInfo->GetdEdxInfo(fIp, regionID, calibID, qID, valueID); +} diff --git a/STEER/ESD/AliESDtrack.h b/STEER/ESD/AliESDtrack.h index 3eb3474820a..543623c55db 100644 --- a/STEER/ESD/AliESDtrack.h +++ b/STEER/ESD/AliESDtrack.h @@ -230,6 +230,7 @@ public: fTPCsignalTuned = signal; } void SetTPCdEdxInfo(AliTPCdEdxInfo * dEdxInfo); + Double_t GetdEdxInfo(Int_t regionID, Int_t calibID, Int_t qID,Int_t valueID); AliTPCdEdxInfo * GetTPCdEdxInfo() const {return fTPCdEdxInfo;} Double_t GetTPCsignal() const {return fTPCsignal;} @@ -440,7 +441,7 @@ public: // - set lengt of bit fields fTPCClusterMap and fTPCSharedMap to 0 static void OnlineMode(bool mode) {fgkOnlineMode=mode;} static bool OnlineMode() {return fgkOnlineMode;} - Double_t GetLengthInActiveZone(const AliExternalTrackParam *paramT, Double_t deltaY, Double_t deltaZ, Double_t bz, Double_t exbPhi =0 , TTreeSRedirector * pcstream =0 ) const; + static Double_t GetLengthInActiveZone(const AliExternalTrackParam *paramT, Double_t deltaY, Double_t deltaZ, Double_t bz, Double_t exbPhi =0 , TTreeSRedirector * pcstream =0 ); Double_t GetLengthInActiveZone( Int_t mode, Double_t deltaY, Double_t deltaZ, Double_t bz, Double_t exbPhi =0 , TTreeSRedirector * pcstream =0 ) const; protected: diff --git a/STEER/STEERBase/AliTPCdEdxInfo.cxx b/STEER/STEERBase/AliTPCdEdxInfo.cxx index 964a07f711a..0ccf551f6b7 100644 --- a/STEER/STEERBase/AliTPCdEdxInfo.cxx +++ b/STEER/STEERBase/AliTPCdEdxInfo.cxx @@ -1,6 +1,3 @@ -#include "AliTPCdEdxInfo.h" -#include "TObjArray.h" -#include "TGraphErrors.h" //################################################################## // @@ -10,6 +7,12 @@ // //################################################################## +#include "AliTPCdEdxInfo.h" +#include "TObjArray.h" +#include "TGraphErrors.h" +#include "AliExternalTrackParam.h" + + TObjArray * AliTPCdEdxInfo::fArraySectorCalibration=0; ClassImp(AliTPCdEdxInfo) @@ -216,7 +219,9 @@ Double_t AliTPCdEdxInfo::GetWeightedMean(Int_t qType, Int_t wType, Double_t w0, return result; } - +// +// Apply second order calibration of the dEdx +// void AliTPCdEdxInfo::RegisterSectorCalibration(TGraphErrors* gainSector, Int_t regionID, Int_t calibID){ // @@ -229,3 +234,33 @@ void AliTPCdEdxInfo::RegisterSectorCalibration(TGraphErrors* gainSector, Int_t // fArraySectorCalibration->AddAt(gainSector, 3*calibID+regionID); } + +// Double_t AliTPCdEdxInfo::GetNormalizeddEdx(AliExternalTrackParam *param, Double_t bz, Int_t regionID, Int_t calibID, Int_t qID){ +// // +// // +// // +// static AliTPCParamSR paramSR; +// static Double_t radius[3] ={0.5*(paramSR.GetInnerRadiusLow()+paramSR.GetInnerRadiusUp()), +// 0.5*(paramSR.GetPadRowRadii(36,0)+paramSR.GetPadRowRadii(36,paramSR.GetNRowUp1()-1)), +// 0.5*(paramSR.GetPadRowRadii(36,0)+paramSR.GetPadRowRadii(36,paramSR.GetNRowUp()-1))}; +// Double_t phi= param->GetParameterAtRadius(radius[regionID],bz,7); + +// TGraphErrors * graphSectorCorection = fArraySectorCalibration->At(regionID+3*calibID); +// Double_t dEdx = 0; +// if (qID==0) dEdx = fTPCsignalRegion[regionID]; +// if (qID==1) dEdx = fTPCsignalRegionQmax[regionID]; +// if (graphSectorCorection) dEdx /=graphSectorCorection->EvalAt(sector); +// return dEdx; +// } + + + +Double_t AliTPCdEdxInfo::GetdEdxInfo(AliExternalTrackParam *param, Int_t regionID, Int_t calibID, Int_t qID, Int_t valueID){ + // + // + // + + return param->GetParameter()[regionID]; +} + + diff --git a/STEER/STEERBase/AliTPCdEdxInfo.h b/STEER/STEERBase/AliTPCdEdxInfo.h index f204bdb0021..7e9d5146c38 100644 --- a/STEER/STEERBase/AliTPCdEdxInfo.h +++ b/STEER/STEERBase/AliTPCdEdxInfo.h @@ -3,6 +3,7 @@ class TGraphErrors; class TObjArray; +class AliExternalTrackParam; #include class AliTPCdEdxInfo : public TObject @@ -12,6 +13,7 @@ public: 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; @@ -30,6 +32,8 @@ public: 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];} @@ -41,6 +45,7 @@ public: 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 -- 2.39.3