]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDtrackV1.cxx
During simulation: fill STU region w/ non null time sums
[u/mrichter/AliRoot.git] / TRD / AliTRDtrackV1.cxx
index 1fcf5b500432e2c1f065a3adac573cca2e21cdc6..2619b565580bd605d6e44e17d6e23a18612c7ac7 100644 (file)
@@ -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;
@@ -602,6 +603,7 @@ Bool_t AliTRDtrackV1::PropagateTo(Double_t xk, Double_t xx0, Double_t xrho)
  
   // local track position AFTER propagation 
   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;
     if (IsStartedTimeIntegral()) {
@@ -619,7 +621,6 @@ Bool_t AliTRDtrackV1::PropagateTo(Double_t xk, Double_t xx0, Double_t xrho)
       AddTimeStep(l2);
     }
   }
-
   if (!AliExternalTrackParam::CorrectForMeanMaterial(xx0, xrho, GetMass())) return kFALSE;
 
 
@@ -870,19 +871,27 @@ 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;
-    track->SetTRDmomentum(p, ip, &spd);
-    //printf("Total Charge %f\n", fTracklet[ip]->GetdQdl());
+    spd = sp; track->SetTRDmomentum(p, ip, &spd);
+    // 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
+    // 27.10.11 A.Bercuci
+    // add chamber status bit "z" bit
+    // bit map for tracklet quality zxxxxyyyyy
+    // 12.11.11 A.Bercuci
+    // fit tracklet quality into the field fTRDTimeBin [Char_t]
+    // bit map for tracklet quality zxxyyyyy
+    Int_t nCross(fTracklet[ip]->IsRowCross()?fTracklet[ip]->GetTBcross():0);
+    Char_t trackletQ = Char_t(fTracklet[ip]->GetTBoccupancy() | (nCross<<5) | (fTracklet[ip]->IsChmbGood()<<7));
+    track->SetTRDTimBin(trackletQ, ip);
     track->SetTRDslice(fTracklet[ip]->GetdQdl(), ip, 0); // Set Summed dEdx into the first slice
   }
   // store PID probabilities