/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-/* $Id$ */
+/* $Id: AliESDtrack.h 64153 2013-09-09 09:33:47Z akalweit $ */
//-------------------------------------------------------------------------
// Class AliESDtrack
#include <TBits.h>
#include "AliExternalTrackParam.h"
#include "AliVTrack.h"
+#include "AliESDTOFCluster.h"
#include "AliPID.h"
#include "AliESDfriendTrack.h"
#include "AliTPCdEdxInfo.h"
class TParticle;
class AliESDVertex;
-class AliESDEvent;
class AliKalmanTrack;
class AliTrackPointArray;
class TPolyMarker3D;
class AliDetectorPID;
+class TTreeSRedirector;
+class AliESDEvent;
class AliESDtrack : public AliExternalTrackParam {
public:
void AddCalibObject(TObject * object); // add calib object to the list
TObject * GetCalibObject(Int_t index); // return calib objct at given position
void MakeMiniESDtrack();
- void SetID(Short_t id) { fID =id;}
+ void SetID(Short_t id);
Int_t GetID() const { return fID;}
void SetVertexID(Char_t id) { fVertexID=id;}
Char_t GetVertexID() const { return fVertexID;}
void GetExternalParameters(Double_t &x, Double_t p[5]) const;
void GetExternalCovariance(Double_t cov[15]) const;
- Double_t GetIntegratedLength() const {return fTrackLength;}
- void GetIntegratedTimes(Double_t *times) const;
+ Double_t GetIntegratedLength() const;
+ Double_t GetIntegratedLengthOld() const {return fTrackLength;}
+ void GetIntegratedTimes(Double_t *times, Int_t nspec=AliPID::kSPECIES) const;
+ Double_t GetIntegratedTimesOld(Int_t i) const {if(fTrackTime) return fTrackTime[i]; else return 0;};
Int_t GetPID(Bool_t tpcOnly=kFALSE) const;
Int_t GetTOFBunchCrossing(Double_t b=0, Bool_t pidTPConly=kTRUE) const;
Double_t GetMass(Bool_t tpcOnly=kFALSE) const {return AliPID::ParticleMass(GetPID(tpcOnly));}
+ Double_t GetMassForTracking() const;
+ void SetPIDForTracking(Int_t pid) {fPIDForTracking = pid;}
+ Int_t GetPIDForTracking() const {return fPIDForTracking;}
Double_t M() const;
Double_t E() const;
Double_t Y() const;
-
+
Bool_t GetConstrainedPxPyPz(Double_t *p) const {
if (!fCp) return kFALSE;
return fCp->GetPxPyPz(p);
Bool_t GetOuterExternalParameters
(Double_t &alpha, Double_t &x, Double_t p[5]) const;
Bool_t GetOuterExternalCovariance(Double_t cov[15]) const;
-
+
Bool_t GetOuterHmpExternalParameters
(Double_t &alpha, Double_t &x, Double_t p[5]) const;
- Bool_t GetOuterHmpExternalCovariance(Double_t cov[15]) const;
-
+ Bool_t GetOuterHmpExternalCovariance(Double_t cov[15]) const;
Int_t GetNcls(Int_t idet) const;
Int_t GetClusters(Int_t idet, Int_t *idx) const;
void SetITSchi2Std(Double_t chi2, Int_t step) { if (step>-1&&step<kNITSchi2Std) fITSchi2Std[step] = chi2;}
Char_t GetITSclusters(Int_t *idx) const;
UChar_t GetITSClusterMap() const {return fITSClusterMap;}
+ void SetITSClusterMap(UChar_t amap) {fITSClusterMap = amap;}
+
+ Char_t GetITSNcls() const { return fITSncls;}
UChar_t GetITSSharedMap() const {return fITSSharedMap;}
void SetITSSharedFlag(int lr) {fITSSharedMap |= 0x1<<lr;}
Bool_t GetITSFakeFlag() const {return (fITSSharedMap&BIT(7))!=0;}
Bool_t GetITSModuleIndexInfo(Int_t ilayer,Int_t &idet,Int_t &status,
Float_t &xloc,Float_t &zloc) const;
Int_t GetITSLabel() const {return fITSLabel;}
+ void SetITSLabel(Int_t label) {fITSLabel = label;}
void SetITStrack(AliKalmanTrack * track){
if (fFriendTrack) fFriendTrack->SetITStrack(track);
}
fTPCsignalTuned = signal;
}
void SetTPCdEdxInfo(AliTPCdEdxInfo * dEdxInfo);
+ Double_t GetdEdxInfo(Int_t regionID, Int_t calibID, Int_t qID,Int_t valueID);
+ Double_t GetdEdxInfoTRD(Int_t method, Double_t p0, Double_t p1, Double_t p2);
AliTPCdEdxInfo * GetTPCdEdxInfo() const {return fTPCdEdxInfo;}
Double_t GetTPCsignal() const {return fTPCsignal;}
Double_t GetTPCsignalSigma() const {return fTPCsignalS;}
UShort_t GetTPCsignalN() const {return fTPCsignalN;}
Double_t GetTPCmomentum() const {return fIp?fIp->GetP():GetP();}
+ Double_t GetTPCTgl() const {return fIp?fIp->GetTgl():GetTgl();}
Double_t GetTPCchi2() const {return fTPCchi2;}
Double_t GetTPCchi2Iter1() const {return fTPCchi2Iter1;}
UShort_t GetTPCclusters(Int_t *idx) const;
return fFriendTrack!=NULL?fFriendTrack->GetTRDtrack():NULL;
}
- void SetTOFsignal(Double_t tof) {fTOFsignal=tof;}
- Double_t GetTOFsignal() const {return fTOFsignal;}
- void SetTOFsignalToT(Double_t ToT) {fTOFsignalToT=ToT;}
- Double_t GetTOFsignalToT() const {return fTOFsignalToT;}
- void SetTOFsignalRaw(Double_t tof) {fTOFsignalRaw=tof;}
- Double_t GetTOFsignalRaw() const {return fTOFsignalRaw;}
- void SetTOFsignalDz(Double_t dz) {fTOFsignalDz=dz;}
- Double_t GetTOFsignalDz() const {return fTOFsignalDz;}
- void SetTOFsignalDx(Double_t dx) {fTOFsignalDx=dx;}
- Double_t GetTOFsignalDx() const {return fTOFsignalDx;}
- void SetTOFDeltaBC(Short_t deltaBC) {fTOFdeltaBC=deltaBC;};
- Short_t GetTOFDeltaBC() const {return fTOFdeltaBC;}
- void SetTOFL0L1(Short_t l0l1) {fTOFl0l1=l0l1;};
- Short_t GetTOFL0L1() const {return fTOFl0l1;}
- Double_t GetTOFchi2() const {return fTOFchi2;}
+ // this are methods for manipulating with TOF clusters/matches
+ void SetTOFclusterArray(Int_t ncluster,Int_t *TOFcluster);
+ Int_t *GetTOFclusterArray() const {return fTOFcluster;}
+ Int_t GetNTOFclusters() const {return fNtofClusters;}
+ void SuppressTOFMatches();
+ void ReplaceTOFTrackID(int oldID, int newID);
+ void ReplaceTOFClusterID(int oldID, int newID);
+ void ReplaceTOFMatchID(int oldID, int newID);
+ void AddTOFcluster(Int_t icl);
+ void SortTOFcluster(); // RS? Not to be used?
+ void ReMapTOFcluster(Int_t ncl,Int_t *mapping); // RS? Not to be used?
+
+ void SetTOFsignal(Double_t tof);
+ Double_t GetTOFsignal() const;
+ void SetTOFsignalToT(Double_t ToT);
+ Double_t GetTOFsignalToT() const;
+ void SetTOFsignalRaw(Double_t tof);
+ Double_t GetTOFsignalRaw() const;
+ void SetTOFsignalDz(Double_t dz);
+ Double_t GetTOFsignalDz() const;
+ void SetTOFsignalDx(Double_t dx);
+ Double_t GetTOFsignalDx() const;
+ void SetTOFDeltaBC(Short_t deltaBC);
+ Short_t GetTOFDeltaBC() const;
+ void SetTOFL0L1(Short_t l0l1);
+ Short_t GetTOFL0L1() const;
+ Double_t GetTOFchi2() const {return fTOFchi2;};
void SetTOFpid(const Double_t *p);
void SetTOFLabel(const Int_t *p);
void GetTOFpid(Double_t *p) const;
void GetTOFLabel(Int_t *p) const;
void GetTOFInfo(Float_t *info) const;
void SetTOFInfo(Float_t *info);
- Int_t GetTOFCalChannel() const {return fTOFCalChannel;}
- Int_t GetTOFcluster() const {return fTOFindex;}
+ Int_t GetTOFCalChannel() const;
+ Int_t GetTOFcluster() const;
void SetTOFcluster(Int_t index) {fTOFindex=index;}
- void SetTOFCalChannel(Int_t index) {fTOFCalChannel=index;}
+ void SetTOFCalChannel(Int_t index);
+ Int_t GetTOFclusterN() const;
+ Bool_t IsTOFHitAlreadyMatched() const;
void SetTOFsignalTunedOnData(Double_t signal){fTOFsignalTuned=signal;}
Double_t GetTOFsignalTunedOnData() const {return fTOFsignalTuned;}
Double_t GetTrackPhiOnEMCal() const {return fTrackPhiOnEMCal;}
Double_t GetTrackEtaOnEMCal() const {return fTrackEtaOnEMCal;}
- void SetTrackPhiEtaOnEMCal(Double_t phi,Double_t eta) {fTrackPhiOnEMCal=phi;fTrackEtaOnEMCal=eta;}
+ Double_t GetTrackPtOnEMCal() const {return fTrackPtOnEMCal;}
+ Double_t GetTrackPOnEMCal() const {return TMath::Abs(fTrackEtaOnEMCal) < 1 ? fTrackPtOnEMCal*TMath::CosH(fTrackEtaOnEMCal) : -999;}
+ void SetTrackPhiEtaPtOnEMCal(Double_t phi,Double_t eta,Double_t pt) {fTrackPhiOnEMCal=phi;fTrackEtaOnEMCal=eta;fTrackPtOnEMCal=pt;}
Int_t GetPHOScluster() const {return fCaloIndex;}
void SetPHOScluster(Int_t index) {fCaloIndex=index;}
Bool_t
RelateToVertexBxByBz(const AliESDVertex *vtx, Double_t b[3], Double_t maxd,
AliExternalTrackParam *cParam=0);
- void GetImpactParameters(Float_t &xy,Float_t &z) const {xy=fD; z=fZ;}
+ virtual void GetImpactParameters(Float_t &xy,Float_t &z) const {xy=fD; z=fZ;}
void GetImpactParameters(Float_t p[2], Float_t cov[3]) const {
p[0]=fD; p[1]=fZ; cov[0]=fCdd; cov[1]=fCdz; cov[2]=fCzz;
}
virtual void Print(Option_t * opt) const ;
const AliESDEvent* GetESDEvent() const {return fESDEvent;}
+ const AliTOFHeader* GetTOFHeader() const;
+ const AliVEvent* GetEvent() const {return (AliVEvent*)fESDEvent;}
void SetESDEvent(const AliESDEvent* evt) {fESDEvent = evt;}
// Trasient PID object, is owned by the track
// - set lengt of bit fields fTPCClusterMap and fTPCSharedMap to 0
static void OnlineMode(bool mode) {fgkOnlineMode=mode;}
static bool OnlineMode() {return fgkOnlineMode;}
+ 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;
+
+ //---------------------------------------------------------------------------
+ //--the calibration interface--
+ //--to be used in online calibration/QA
+ //--should also be implemented in ESD so it works offline as well
+ //-----------
+ virtual Int_t GetTrackParam ( AliExternalTrackParam &p ) const {p=*this; return 0;}
+ virtual Int_t GetTrackParamRefitted ( AliExternalTrackParam & ) const {return 0;}
+ virtual Int_t GetTrackParamITSOut ( AliExternalTrackParam & ) const {return 0;}
+
+ Int_t GetTrackParamIp ( AliExternalTrackParam &p ) const {
+ if(!GetInnerParam()) return -1;
+ p=*GetInnerParam();
+ return 0;}
+
+ Int_t GetTrackParamOp ( AliExternalTrackParam &p ) const {
+ if(!GetOuterParam()) return -1;
+ p=*GetOuterParam();
+ return 0;}
+
+ Int_t GetTrackParamTPCInner ( AliExternalTrackParam &p ) const {
+ if(!GetTPCInnerParam()) return -1;
+ p=*GetTPCInnerParam();
+ return 0;}
+
+ Int_t GetTrackParamCp ( AliExternalTrackParam &p ) const {
+ if(!GetConstrainedParam()) return -1;
+ p=*GetConstrainedParam();
+ return 0;}
+
+
protected:
AliExternalTrackParam *fCp; // Track parameters constrained to the primary vertex
Int_t fITSModule[12]; // modules crossed by the track in the ITS
Int_t fTPCLabel; // label according TPC
Int_t fTRDLabel; // label according TRD
- Int_t fTOFLabel[3]; // TOF label
- Int_t fTOFCalChannel; // Channel Index of the TOF Signal
+ Int_t *fTOFLabel; //! TOF label
+ Int_t fTOFCalChannel; //! Channel Index of the TOF Signal
Int_t fTOFindex; // index of the assigned TOF cluster
Int_t fHMPIDqn; // 1000000*number of photon clusters + QDC
Int_t fHMPIDcluIdx; // 1000000*chamber id + cluster idx of the assigned MIP cluster
Int_t fKinkIndexes[3]; // array of indexes of posible kink candidates
Int_t fV0Indexes[3]; // array of indexes of posible kink candidates
- Double32_t fR[AliPID::kSPECIES]; //[0.,0.,8] combined "detector response probability"
- Double32_t fITSr[AliPID::kSPECIES]; //[0.,0.,8] "detector response probabilities" (for the PID)
- Double32_t fTPCr[AliPID::kSPECIES]; //[0.,0.,8] "detector response probabilities" (for the PID)
- Double32_t fTRDr[AliPID::kSPECIES]; //[0.,0.,8] "detector response probabilities" (for the PID)
- Double32_t fTOFr[AliPID::kSPECIES]; //[0.,0.,8] "detector response probabilities" (for the PID)
- Double32_t fHMPIDr[AliPID::kSPECIES];//[0.,0.,8] "detector response probabilities" (for the PID)
+ Double32_t *fR; //! [0.,0.,8] combined "detector response probability"
+ Double32_t *fITSr; //! [0.,0.,8] "detector response probabilities" (for the PID)
+ Double32_t *fTPCr; //! [0.,0.,8] "detector response probabilities" (for the PID)
+ Double32_t *fTRDr; //! [0.,0.,8] "detector response probabilities" (for the PID)
+ Double32_t *fTOFr; //! [0.,0.,8] "detector response probabilities" (for the PID)
+ Double32_t *fHMPIDr; //! [0.,0.,8] "detector response probabilities" (for the PID)
Double32_t fHMPIDtrkTheta;//[-2*pi,2*pi,16] theta of the track extrapolated to the HMPID, LORS
// how much of this is needed?
Double32_t fHMPIDtrkPhi; //[-2*pi,2*pi,16] phi of the track extrapolated to the HMPID, LORS
Double32_t fHMPIDsignal; // HMPID PID signal (Theta ckov, rad)
- Double32_t fTrackTime[AliPID::kSPECIES]; // TOFs estimated by the tracking
- Double32_t fTrackLength; // Track length
+ Double32_t *fTrackTime; //! TOFs estimated by the tracking
+ Double32_t fTrackLength; //! Track length
Double32_t fdTPC; // TPC-only impact parameter in XY plane
Double32_t fzTPC; // TPC-only impact parameter in Z
Double32_t fTRDQuality; // trd quality factor for TOF
Double32_t fTRDBudget; // trd material budget
- Double32_t fTOFsignal; // detector's PID signal
+ Double32_t fTOFsignal; //! detector's PID signal [ps]
Double32_t fTOFsignalTuned; //! detector's PID signal tuned on data when using MC
- Double32_t fTOFsignalToT; // detector's ToT signal
- Double32_t fTOFsignalRaw; // detector's uncorrected time signal
- Double32_t fTOFsignalDz; // local z of track's impact on the TOF pad
- Double32_t fTOFsignalDx; // local x of track's impact on the TOF pad
+ Double32_t fTOFsignalToT; //! detector's ToT signal [ns]
+ Double32_t fTOFsignalRaw; //! detector's uncorrected time signal [ps]
+ Double32_t fTOFsignalDz; //! local z of track's impact on the TOF pad [cm]
+ Double32_t fTOFsignalDx; //! local x of track's impact on the TOF pad [cm]
Double32_t fTOFInfo[10]; //! TOF informations
- Short_t fTOFdeltaBC; // detector's Delta Bunch Crossing correction
- Short_t fTOFl0l1; // detector's L0L1 latency correction
+ Short_t fTOFdeltaBC; //! detector's Delta Bunch Crossing correction
+ Short_t fTOFl0l1; //! detector's L0L1 latency correction
Double32_t fCaloDx ; // [0.,0.,8] distance to calorimeter cluster in calo plain (phi direction)
Double32_t fCaloDz ; // [0.,0.,8] distance to calorimeter cluster in calo plain (z direction)
Char_t fTRDTimBin[kTRDnPlanes]; // Time bin of Max cluster from all six planes
Char_t fVertexID; // ID of the primary vertex this track belongs to
+ Char_t fPIDForTracking; // mass used for tracking
+
mutable const AliESDEvent* fESDEvent; //!Pointer back to event to which the track belongs
mutable Float_t fCacheNCrossedRows; //! Cache for the number of crossed rows
mutable const AliDetectorPID* fDetectorPID; //! transient object to cache PID information
- Double_t fTrackPhiOnEMCal; // phi of track after being propagated to 430cm
- Double_t fTrackEtaOnEMCal; // eta of track after being propagated to 430cm
+ Double_t fTrackPhiOnEMCal; // phi of track after being propagated to the EMCal surface (default r = 440 cm)
+ Double_t fTrackEtaOnEMCal; // eta of track after being propagated to the EMCal surface (default r = 440 cm)
+ Double_t fTrackPtOnEMCal; // pt of track after being propagated to the EMCal surface (default r = 440 cm)
+
+ // new TOF data structure
+ Int_t fNtofClusters; // number of matchable TOF clusters
+ Int_t *fTOFcluster; //[fNtofClusters]
+ // TOF clusters matchable with the track
+
private:
static bool fgkOnlineMode; //! indicate the online mode to skip some of the functionality
AliESDtrack & operator=(const AliESDtrack & );
- ClassDef(AliESDtrack,67) //ESDtrack
+ ClassDef(AliESDtrack,71) //ESDtrack
};