From 5c5d503aeb880dc107412dd3105750a3ac29ea26 Mon Sep 17 00:00:00 2001 From: abercuci Date: Fri, 30 Sep 2011 06:16:41 +0000 Subject: [PATCH] fixes and extensions: 1. Fix wrong sign of x*rho in track 2. Fix operator= 3. Store "quality" of tracklet for PID in ESDtrack (TBoccupancy and TBcross) 4. modification of tracklet interface for TB occupancy --- TRD/AliTRDseedV1.cxx | 23 +++++++++++++++++------ TRD/AliTRDseedV1.h | 3 ++- TRD/AliTRDtrackV1.cxx | 18 ++++++++++-------- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/TRD/AliTRDseedV1.cxx b/TRD/AliTRDseedV1.cxx index 2eb57897533..b2e3e70c99a 100644 --- a/TRD/AliTRDseedV1.cxx +++ b/TRD/AliTRDseedV1.cxx @@ -644,18 +644,29 @@ Float_t AliTRDseedV1::GetMomentum(Float_t *err) const //____________________________________________________________________ -Float_t AliTRDseedV1::GetOccupancyTB() const +Int_t AliTRDseedV1::GetTBoccupancy() const { -// Returns procentage of TB occupied by clusters +// Returns no. of TB occupied by clusters Int_t n(0); - AliTRDcluster *c(NULL); - for(int ic=0; ic>kNbits)&kMask);} Int_t GetNShared() const { return Int_t(((fN>>kNbits)>>kNbits)&kMask);} - Float_t GetOccupancyTB() const; + Int_t GetTBoccupancy() const; + Int_t GetTBcross() const; Float_t GetQuality(Bool_t kZcorr) const; Float_t GetPadLength() const { return fPad[0];} Float_t GetPadWidth() const { return fPad[1];} diff --git a/TRD/AliTRDtrackV1.cxx b/TRD/AliTRDtrackV1.cxx index 626e9a34687..587886c2718 100644 --- a/TRD/AliTRDtrackV1.cxx +++ b/TRD/AliTRDtrackV1.cxx @@ -239,6 +239,7 @@ AliTRDtrackV1 &AliTRDtrackV1::operator=(const AliTRDtrackV1 &t) // if (this != &t) { + AliKalmanTrack::operator=(t); ((AliTRDtrackV1 &) t).Copy(*this); } @@ -524,7 +525,7 @@ Int_t AliTRDtrackV1::MakeBackupTrack() for(Int_t il(AliTRDgeometry::kNlayer); il--;){ if(!fTracklet[il]) continue; n++; - occupancy+=fTracklet[il]->GetOccupancyTB(); + occupancy+=fTracklet[il]->GetTBoccupancy()/AliTRDseedV1::kNtb; ncls += fTracklet[il]->GetN(); } if(!n) return -1; @@ -604,7 +605,7 @@ Bool_t AliTRDtrackV1::PropagateTo(Double_t xk, Double_t /*xx0*/, Double_t xrho) Double_t xyz1[3] = {GetX(), GetY(), GetZ()}; // printf("x0[%6.2f] -> x1[%6.2f] dx[%6.2f] rho[%f]\n", xyz0[0], xyz1[0], xyz0[0]-xk, xrho/TMath::Abs(xyz0[0]-xk)); if(xyz0[0] < xk) { - //xrho = -xrho; + xrho = -xrho; if (IsStartedTimeIntegral()) { Double_t l2 = TMath::Sqrt((xyz1[0]-xyz0[0])*(xyz1[0]-xyz0[0]) + (xyz1[1]-xyz0[1])*(xyz1[1]-xyz0[1]) @@ -871,19 +872,20 @@ void AliTRDtrackV1::UpdateESDtrack(AliESDtrack *track) for (Int_t ip = 0; ip < kNplane; ip++) { if(fTrackletIndex[ip]<0 || !fTracklet[ip]) continue; if(!fTracklet[ip]->HasPID()) continue; - //printf("Setting slices for tracklet %d\n", ip); fTracklet[ip]->CookdEdx(AliTRDPIDResponse::kNslicesNN); const Float_t *dedx = fTracklet[ip]->GetdEdx(); for (Int_t js = 0; js < AliTRDPIDResponse::kNslicesNN; js++, dedx++){ - //printf("Slice %d, dEdx %f\n", js, *dedx); track->SetTRDslice(*dedx, ip, js+1); } p = fTracklet[ip]->GetMomentum(&sp); - // 04.01.11 A.Bercuci - // store global dQdl per tracklet instead of momentum error - spd = sp; + // store global quality per tracklet instead of momentum error + // 26.09.11 A.Bercuci + // first implementation store no. of time bins filled in tracklet (5bits see "y" bits) and + // no. of double clusters in case of pad row cross (4bits see "x" bits) + // bit map for tracklet quality xxxxyyyyy + Int_t nCross(fTracklet[ip]->IsRowCross()?fTracklet[ip]->GetTBcross():0); + spd = Double_t(fTracklet[ip]->GetTBoccupancy() | (nCross<<5)); track->SetTRDmomentum(p, ip, &spd); - //printf("Total Charge %f\n", fTracklet[ip]->GetdQdl()); track->SetTRDslice(fTracklet[ip]->GetdQdl(), ip, 0); // Set Summed dEdx into the first slice } // store PID probabilities -- 2.43.0