X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;ds=sidebyside;f=TRD%2FAliTRDtrackV1.h;h=2065491c7ad6caa3914a589839fac92e553cc5ca;hb=c88497a0987ccb6da38c8cd29257d94d5f446aea;hp=49624cd6772c21de0d8fb2b15fa65ed4817329c8;hpb=352cef8fb0271f188b96a653fdb1fc6ebbd3417d;p=u%2Fmrichter%2FAliRoot.git diff --git a/TRD/AliTRDtrackV1.h b/TRD/AliTRDtrackV1.h index 49624cd6772..2065491c7ad 100644 --- a/TRD/AliTRDtrackV1.h +++ b/TRD/AliTRDtrackV1.h @@ -11,20 +11,22 @@ // // /////////////////////////////////////////////////////////////////////////////// -//#ifndef ALIKALMANTRACK_H +#ifndef ALIKALMANTRACK_H #include "AliKalmanTrack.h" -//#endif +#endif -//#ifndef ALITRDSEEDV1_H +#ifndef ALITRDSEEDV1_H #include "AliTRDseedV1.h" -//#endif +#endif -class AliTRDcluster; +template class TVectorT; +typedef class TVectorT TVectorD; class AliESDtrack; +class AliTRDcluster; class AliTRDReconstructor; class AliTRDtrackV1 : public AliKalmanTrack { - friend class AliHLTTRDTrack; + friend class AliHLTTRDTrack; // allow HLT special access public: enum ETRDtrackSize { kNdet = AliTRDgeometry::kNdet @@ -32,8 +34,6 @@ public: ,kNplane = AliTRDgeometry::kNlayer ,kNcham = AliTRDgeometry::kNstack ,kNsect = AliTRDgeometry::kNsector - ,kNslice = 3 - ,kNMLPslice = 8 ,kMAXCLUSTERSPERTRACK = 210 }; @@ -42,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) @@ -71,44 +73,49 @@ public: 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;} Int_t GetESDid() const {return fESDid;} - inline Float_t GetMomentum(Int_t plane) const; + 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; + 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 && is < AliPID::kSPECIES) fPID[is]=inPID;}; void SetPIDquality(UChar_t /*inPIDquality*/) const {/*fPIDquality = inPIDquality*/;}; - inline void SetStatus(UChar_t stat, Int_t ly=-1); + inline void SetErrStat(UChar_t stat, Int_t ly=-1); void SetStopped(Bool_t stop) {SetBit(kStopped, stop);} void SetTracklet(AliTRDseedV1 *const trklt, Int_t index); - void SetTrackLow(); - void SetTrackHigh(const AliExternalTrackParam *op=NULL); + 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(Double_t *p, Double_t *cov, Double_t chi2); Bool_t Update(const AliCluster *, Double_t, Int_t) { return kFALSE; }; + void UpdateChi2(Float_t chi2); void UpdateESDtrack(AliESDtrack *t); private: @@ -142,19 +150,33 @@ private: Double32_t fPID[AliPID::kSPECIES]; // PID probabilities Double32_t fBudget[3]; // Integrated material budget Double32_t fDE; // Integrated delta energy + 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 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) - ClassDef(AliTRDtrackV1, 7) // 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] != -1 ? 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.; } //____________________________________________________ @@ -210,7 +232,7 @@ inline void AliTRDtrackV1::SetReconstructor(const AliTRDReconstructor *rec) } //____________________________________________________ -inline void AliTRDtrackV1::SetStatus(UChar_t status, Int_t ly) +inline void AliTRDtrackV1::SetErrStat(UChar_t status, Int_t ly) { if(ly