X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TRD%2FAliTRDtrackV1.h;h=2065491c7ad6caa3914a589839fac92e553cc5ca;hb=7dec7414ffb54e96f78bbcb8c5b103f455ebf0a8;hp=c44ac1fb60fa127fe0e704797a9b566245fed6b6;hpb=eb2b4f916a4b2cfa883e49ba0c91ef516534190f;p=u%2Fmrichter%2FAliRoot.git diff --git a/TRD/AliTRDtrackV1.h b/TRD/AliTRDtrackV1.h index c44ac1fb60f..2065491c7ad 100644 --- a/TRD/AliTRDtrackV1.h +++ b/TRD/AliTRDtrackV1.h @@ -15,19 +15,18 @@ #include "AliKalmanTrack.h" #endif -#ifndef ALIESDTRACK_H -#include "AliESDtrack.h" -#endif - #ifndef ALITRDSEEDV1_H #include "AliTRDseedV1.h" #endif -class AliTRDcluster; +template class TVectorT; +typedef class TVectorT TVectorD; class AliESDtrack; +class AliTRDcluster; class AliTRDReconstructor; class AliTRDtrackV1 : public AliKalmanTrack { + friend class AliHLTTRDTrack; // allow HLT special access public: enum ETRDtrackSize { kNdet = AliTRDgeometry::kNdet @@ -35,8 +34,6 @@ public: ,kNplane = AliTRDgeometry::kNlayer ,kNcham = AliTRDgeometry::kNstack ,kNsect = AliTRDgeometry::kNsector - ,kNslice = 3 - ,kNMLPslice = 8 ,kMAXCLUSTERSPERTRACK = 210 }; @@ -45,6 +42,8 @@ public: kOwner = BIT(14) ,kStopped = BIT(15) ,kKink = BIT(16) + ,kPrimary = BIT(17) + ,kSeeder = BIT(18) // if set other than TPC (ITS, TRD) }; // propagation/update error codes (up to 4 bits) @@ -55,6 +54,7 @@ public: ,kSnp ,kTrackletInit ,kUpdate + ,kUnknown = 0xff }; // data/clusters/tracklet error codes (up to 4 bits/layer) @@ -69,47 +69,53 @@ public: }; AliTRDtrackV1(); - AliTRDtrackV1(AliTRDseedV1 *trklts, const Double_t p[5], const Double_t cov[15], Double_t x, Double_t alpha); + AliTRDtrackV1(AliTRDseedV1 * const trklts, const Double_t p[5], const Double_t cov[15], Double_t x, Double_t alpha); AliTRDtrackV1(const AliESDtrack &ref); AliTRDtrackV1(const AliTRDtrackV1 &ref); virtual ~AliTRDtrackV1(); - AliTRDtrackV1 &operator=(const AliTRDtrackV1 &ref) { *(new(this) AliTRDtrackV1(ref)); return *this; } - + AliTRDtrackV1 &operator=(const AliTRDtrackV1 &ref); + virtual void Copy(TObject &ref) const; + virtual TObject* Clone(const char* newname = "") const; Bool_t CookPID(); - Bool_t CookLabel(Float_t wrong); + Double_t CookTruncatedMean(const Bool_t kinvq, const Double_t mag, const Int_t charge, const Int_t kcalib, Int_t &nch, Int_t &ncls, TVectorD *Qs=NULL, TVectorD *Xs=NULL, Int_t timeBin0=-1, Int_t timeBin1=1000, Int_t tstep=1) const; + + Int_t CookLabel(Float_t wrong, Int_t *labs=NULL, Float_t *freq=NULL); AliTRDtrackV1* GetBackupTrack() const {return fBackupTrack;} Double_t GetBudget(Int_t i) const { return fBudget[i];} AliTRDcluster* GetCluster(Int_t id); Int_t GetClusterIndex(Int_t id) const; Float_t GetEdep() const {return fDE;} - inline Float_t GetMomentum(Int_t plane) const; + Int_t GetESDid() const {return fESDid;} + inline Float_t GetMomentum(Int_t plane=-1) const; inline Int_t GetNCross(); inline Int_t GetNumberOfTracklets() const; Double_t GetPIDsignal() const { return 0.;} Double_t GetPID(Int_t is) const { return (is >=0 && is < AliPID::kSPECIES) ? fPID[is] : -1.;} UChar_t GetNumberOfTrackletsPID() const; - Double_t GetPredictedChi2(const AliTRDseedV1 *tracklet) const; + Int_t GetNumberOfPhysicsSlices() const { return fNdEdxSlices; }; + Double_t GetPredictedChi2(const AliTRDseedV1 *tracklet, Double_t *cov) const; Double_t GetPredictedChi2(const AliCluster* /*c*/) const { return 0.0; } - Int_t GetProlongation(Double_t xk, Double_t &y, Double_t &z); + Int_t GetProlongation(Double_t xk, Double_t &y, Double_t &z) const; inline UChar_t GetStatusTRD(Int_t ly=-1) const; Int_t GetSector() const; - AliTRDseedV1* GetTracklet(Int_t plane) const {return plane >=0 && plane =0 && plane =0 && plane=0 && i<3) fBudget[i] = b;} void SetEdep(Double32_t inDE){fDE = inDE;}; + void SetESDid(Int_t id) {fESDid = id;} void SetKink(Bool_t k) { SetBit(kKink, k);} + void SetPrimary(Bool_t k) { SetBit(kPrimary, k);} + void SetNonTPCseeded(Bool_t k){ SetBit(kSeeder, k);} void SetNumberOfClusters(); - UChar_t SetNumberOfTrackletsPID(Bool_t recalc); void SetOwner(); void SetPID(Short_t is, Double_t inPID){if (is >=0 && is < AliPID::kSPECIES) fPID[is]=inPID;}; - void SetPIDquality(UChar_t /*inPIDquality*/){/*fPIDquality = inPIDquality*/;}; - inline void SetStatus(UChar_t stat, Int_t ly=-1); + void SetPIDquality(UChar_t /*inPIDquality*/) const {/*fPIDquality = inPIDquality*/;}; + inline void SetErrStat(UChar_t stat, Int_t ly=-1); void SetStopped(Bool_t stop) {SetBit(kStopped, stop);} - void SetTracklet(AliTRDseedV1 *trklt, Int_t index); - void SetTrackLow(); - void SetTrackHigh(const AliExternalTrackParam *op=0x0); + void SetTracklet(AliTRDseedV1 *const trklt, Int_t index); + void SetTrackIn(); + void SetTrackOut(const AliExternalTrackParam *op=NULL); inline void SetReconstructor(const AliTRDReconstructor *rec); inline Float_t StatusForTOF(); void UnsetTracklet(Int_t plane); - Bool_t Update(AliTRDseedV1 *tracklet, Double_t chi2); - //Bool_t Update(const AliTRDcluster *c, Double_t chi2, Int_t index, Double_t h01){ return AliTRDtrack::Update(c,chi2,index,h01); }; - Bool_t Update(const AliCluster *, Double_t, Int_t) { return kFALSE; }; + Bool_t Update(const AliCluster *, Double_t, Int_t) { return kFALSE; }; + void UpdateChi2(Float_t chi2); void UpdateESDtrack(AliESDtrack *t); private: UInt_t fStatus; // Bit map for the status of propagation - UShort_t fTrackletIndex[kNplane];// Tracklets index in the tracker list + Int_t fTrackletIndex[kNplane];// Tracklets index in the tracker list + Int_t fESDid; // ESD track id Double32_t fPID[AliPID::kSPECIES]; // PID probabilities Double32_t fBudget[3]; // Integrated material budget Double32_t fDE; // Integrated delta energy - const AliTRDReconstructor *fReconstructor;//! reconstructor link + Double32_t fTruncatedMean; // Truncated mean + Int_t fNchamberdEdx; // number of chambers used in calculating truncated mean + Int_t fNclusterdEdx; // number of clusters used in calculating truncated mean + Int_t fNdEdxSlices; // number of "physics slices" fill via AliTRDPIDResponse + + const AliTRDReconstructor *fkReconstructor;//! reconstructor link AliTRDtrackV1 *fBackupTrack; //! Backup track - AliTRDseedV1 *fTracklet[kNplane]; // Tracklets array defining the track + AliTRDseedV1 *fTracklet[kNplane]; // Tracklets array defining the track AliExternalTrackParam *fTrackLow; // parameters of the track which enter TRD from below (TPC) - AliExternalTrackParam *fTrackHigh; // parameters of the track which enter TRD from above (HMPID, PHOS) + AliExternalTrackParam *fTrackHigh; // parameters of the track which enter TRD from above (HMPID, PHOS) - ClassDef(AliTRDtrackV1, 5) // TRD track - tracklet based + ClassDef(AliTRDtrackV1, 8) // TRD track - tracklet based }; //____________________________________________________ inline Float_t AliTRDtrackV1::GetMomentum(Int_t plane) const { - return plane >=0 && plane < kNplane && fTrackletIndex[plane] != 0xff ? fTracklet[plane]->GetMomentum() : -1.; +// Return ESD momentum stored in the tracklet reconstructed in layer = "plane". +// By default returns the ESD momentum in first tracklet attached to track + if(plane==-1){ + for(Int_t i(0); iGetMomentum(); + } + } else if( plane >=0 && plane < kNplane){ + if(fTracklet[plane]) return fTracklet[plane]->GetMomentum(); + } + return -1.; } //____________________________________________________ @@ -182,8 +204,8 @@ inline Int_t AliTRDtrackV1::GetNumberOfTracklets() const //____________________________________________________ inline UChar_t AliTRDtrackV1::GetStatusTRD(Int_t ly) const { - if(ly>((ly+1)*4))&0xf; - return -1; + if(ly>=-1 && ly>((ly+1)*4))&0xf; + return kUnknown; } //____________________________________________________ @@ -206,11 +228,11 @@ inline void AliTRDtrackV1::SetReconstructor(const AliTRDReconstructor *rec) if(!fTracklet[ip]) continue; fTracklet[ip]->SetReconstructor(rec); } - fReconstructor = rec; + fkReconstructor = rec; } //____________________________________________________ -inline void AliTRDtrackV1::SetStatus(UChar_t status, Int_t ly) +inline void AliTRDtrackV1::SetErrStat(UChar_t status, Int_t ly) { if(ly