]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDtrackingChamber.cxx
2D Centrality files
[u/mrichter/AliRoot.git] / TRD / AliTRDtrackingChamber.cxx
index 4ce8f81db18d02d5a9f1e6db3d5700d9e4694aad..c7951d19ab6ae32d4ffc13d5f31e2fd9a7da28c1 100644 (file)
@@ -48,12 +48,12 @@ AliTRDtrackingChamber::AliTRDtrackingChamber()
   :TObject()
   ,fDetector(-1)
   ,fX0(0.)
-  ,fExB(0.)
-  ,fVD(0.)
-  ,fT0(0.)
-  ,fS2PRF(0.)
-  ,fDiffL(0.)
-  ,fDiffT(0.)
+  // ,fExB(0.)
+  // ,fVD(0.)
+  // ,fT0(0.)
+  // ,fS2PRF(0.)
+  // ,fDiffL(0.)
+  // ,fDiffT(0.)
 {}  
 
 //_______________________________________________________
@@ -63,23 +63,7 @@ void AliTRDtrackingChamber::Clear(const Option_t *opt)
 }
 
 //_______________________________________________________
-void AliTRDtrackingChamber::InsertCluster(AliTRDcluster *c, Int_t index, Bool_t hlt)
-{
-// Add cluster to TB container and recalculate error parameterization (for HLT)
-
-  fTB[c->GetPadTime()].InsertCluster(c, index);
-  if(!hlt) return;
-
-  // Define approximate error parameterization for HLT clusters
-  // if needed the fix values of 
-  //  - drift length of 1.5 can be replaced with c->GetXloc()
-  //  - pad length can be cached from geometry in Init()
-  c->SetSigmaY2(fS2PRF, fDiffT, fExB, 1.5);
-  c->SetSigmaZ2(6.75);
-}
-
-//_______________________________________________________
-Bool_t AliTRDtrackingChamber::Build(AliTRDgeometry *const geo)
+Bool_t AliTRDtrackingChamber::Build(AliTRDgeometry *const geo, Bool_t hlt)
 {
 // Init chamber and all time bins (AliTRDchamberTimeBin)
 // Calculates radial position of the chamber based on 
@@ -106,32 +90,27 @@ Bool_t AliTRDtrackingChamber::Build(AliTRDgeometry *const geo)
     index[jtb++] = itb;
   }    
   if(jtb<2) return kFALSE;
-  
+
+  AliTRDcalibDB *calib = AliTRDcalibDB::Instance();
+  Float_t t0;
+  if(!hlt){
+    t0    = calib->GetT0Average(fDetector);
+  }else{
+    t0    = calib->GetT0Det()->GetValue(fDetector);
+  }
+  // fVD    = calib->GetVdriftAverage(fDetector);
+  // fS2PRF = calib->GetPRFROC(fDetector)->GetMean(); fS2PRF *= fS2PRF;
+  // fExB   = AliTRDCommonParam::Instance()->GetOmegaTau(fVD);
+  // AliTRDCommonParam::Instance()->GetDiffCoeff(fDiffL, fDiffT, fVD);  
+
   // ESTIMATE POSITION OF PAD PLANE FOR THIS CHAMBER
-  Int_t t0 = Int_t(fT0);
-  fTB[t0].SetT0();
+  fTB[Int_t(t0)].SetT0();
   Double_t x0 = fTB[index[0]].GetX();
   Double_t x1 = fTB[index[1]].GetX();
   Double_t dx = (x0 - x1)/(index[1] - index[0]); 
   fX0 = x0 + dx*(index[0] - t0);       
   return kTRUE;
 }
-  
-
-//_______________________________________________________
-void AliTRDtrackingChamber::Init(Int_t det)
-{
-// Init detector number and Cache calibration parameters
-
-  fDetector = det;
-  AliTRDcalibDB *calib = AliTRDcalibDB::Instance();
-  fT0    = calib->GetT0Average(fDetector);
-  fVD    = calib->GetVdriftAverage(fDetector);
-  fS2PRF = calib->GetPRFROC(fDetector)->GetMean(); fS2PRF *= fS2PRF;
-  fExB   = AliTRDCommonParam::Instance()->GetOmegaTau(fVD);
-  AliTRDCommonParam::Instance()->GetDiffCoeff(fDiffL,
-  fDiffT, fVD);
-}
 
 //_______________________________________________________      
 Int_t AliTRDtrackingChamber::GetNClusters() const
@@ -283,8 +262,8 @@ Bool_t AliTRDtrackingChamber::GetSeedingLayer(AliTRDchamberTimeBin *&fakeLayer,
   Float_t *cogz[kMaxRows];
   
   // Lookup-Table storing coordinates according to the bins
-  Float_t yLengths[kMaxCols];
-  Float_t zLengths[kMaxRows];
+  Float_t yLengths[kMaxCols]; memset(yLengths, 0, kMaxCols*sizeof(Float_t));
+  Float_t zLengths[kMaxRows]; memset(zLengths, 0, kMaxRows*sizeof(Float_t));
   for(Int_t icnt = 0; icnt < nCols; icnt++){
     yLengths[icnt] = pp->GetColPos(nCols - 1 - icnt) + binlength/2;
   }
@@ -326,7 +305,7 @@ Bool_t AliTRDtrackingChamber::GetSeedingLayer(AliTRDchamberTimeBin *&fakeLayer,
   Int_t col, row, lower, lower1, upper, upper1;
   for(Int_t ib = 0; ib < nCont; ib++){
     if(nCandidates >= AliTRDtrackerV1::kMaxTracksStack){
-      AliWarning(Form("Number of seed candidates %d exceeded maximum allowed per stack %d", nCandidates, AliTRDtrackerV1::kMaxTracksStack));
+      AliDebug(1, Form("Number of seed candidates %d exceeded maximum allowed per stack %d", nCandidates, AliTRDtrackerV1::kMaxTracksStack));
       break;
     }
     // Positions