//
return kTRUE;
}
+
+
+Double_t AliExternalTrackParam::GetParameterAtRadius(Double_t r, Double_t bz, Int_t &parType) const
+{
+ //
+ // Get track parameters at the radius of interest.
+ // Given function is aimed to be used to interactivelly (tree->Draw())
+ // access track properties at different radii
+ //
+ // TO BE USED WITH SPECICAL CARE -
+ // it is aimed to be used for rough calculation as constant field and
+ // no correction for material is used
+ //
+ // r - radius of interest
+ // bz - magentic field
+ // retun values dependens on parType:
+ // parType = 0 -gx
+ // parType = 1 -gy
+ // parType = 2 -gz
+ //
+ // parType = 3 -pgx
+ // parType = 4 -pgy
+ // parType = 5 -pgz
+ //
+ // parType = 6 - r
+ // parType = 7 - global position phi
+ // parType = 8 - global direction phi
+ // parType = 9 - direction phi- positionphi
+ if (parType<0) {
+ parType=-1;
+ return 0;
+ }
+ Double_t xyz[3];
+ Double_t pxyz[3];
+ Double_t localX=0;
+ Bool_t res = GetXatLabR(r,localX,bz,1);
+ if (!res) {
+ parType=-1;
+ return 0;
+ }
+ //
+ // position parameters
+ //
+ GetXYZAt(localX,bz,xyz);
+ if (parType<3) {
+ return xyz[parType];
+ }
+ if (parType==6) return TMath::Sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]);
+ if (parType==7) return TMath::ATan2(xyz[1],xyz[0]);
+ //
+ // momenta parameters
+ //
+ GetPxPyPzAt(localX,bz,pxyz);
+ if (parType==8) return TMath::ATan2(pxyz[1],pxyz[0]);
+ if (parType==9) {
+ Double_t diff = TMath::ATan2(pxyz[1],pxyz[0])-TMath::ATan2(xyz[1],xyz[0]);
+ if (diff>TMath::Pi()) diff-=TMath::TwoPi();
+ if (diff<-TMath::Pi()) diff+=TMath::TwoPi();
+ return diff;
+ }
+ if (parType>=3&&parType<6) {
+ return pxyz[parType%3];
+ }
+ return 0;
+}
void Print(Option_t* option = "") const;
Double_t GetSnpAt(Double_t x,Double_t b) const;
Bool_t GetXatLabR(Double_t r,Double_t &x, Double_t bz, Int_t dir=0) const;
-
+ //
+ Double_t GetParameterAtRadius(Double_t r, Double_t bz, Int_t &parType) const;
//Deprecated
Bool_t CorrectForMaterial(Double_t d, Double_t x0, Double_t mass,
Double_t (*f)(Double_t)=AliExternalTrackParam::BetheBlochSolid);
#include "AliTPCdEdxInfo.h"
+#include "TObjArray.h"
+#include "TGraphErrors.h"
//##################################################################
//
//
//##################################################################
-
+TObjArray * AliTPCdEdxInfo::fArraySectorCalibration=0;
ClassImp(AliTPCdEdxInfo)
Double_t result = (sumw>0) ? sum/sumw:0;
return result;
}
+
+
+
+void AliTPCdEdxInfo::RegisterSectorCalibration(TGraphErrors* gainSector, Int_t regionID, Int_t calibID){
+ //
+ // Register sector calibration
+ //
+ // create if arrray does not exist
+ if (!fArraySectorCalibration) fArraySectorCalibration= new TObjArray((calibID+1)*3*10); // boook space for calibration pointer
+ // resize if not enough booked
+ if (fArraySectorCalibration->GetSize()<(calibID+1)*3) fArraySectorCalibration->Expand((calibID+1)*3);
+ //
+ fArraySectorCalibration->AddAt(gainSector, 3*calibID+regionID);
+}
#ifndef AliTPCdEdxInfo_H
#define AliTPCdEdxInfo_H
+class TGraphErrors;
+class TObjArray;
#include <TObject.h>
class AliTPCdEdxInfo : public TObject
Double_t GetTPCsignalMediumPadQmax() const {return fTPCsignalRegionQmax[1];}
Double_t GetTPCsignalLongPadQmax() const {return fTPCsignalRegionQmax[2];}
Double_t GetTPCsignalOROCQmax() const {return fTPCsignalRegionQmax[3];}
-
-private:
+ static void RegisterSectorCalibration(TGraphErrors* gainSector, Int_t regionID, Int_t calibID);
+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)
};