]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDgtuTrack.cxx
recraw.C removed, using recraw/rec.C instead. Restoring the original test layout
[u/mrichter/AliRoot.git] / TRD / AliTRDgtuTrack.cxx
index dad3d160cb74fa9df4d7f9d46552ec9e3da031f3..0f34c7198754ec9d842d0a0b289b0a99c8cd18c5 100644 (file)
 
 #include "AliLog.h"
 
+//#include "AliTRDReconstructor.h"
+//#include "AliTRDcalibDB.h"
 #include "AliTRDgeometry.h"
-#include "AliTRDcalibDB.h"
 #include "AliTRDltuTracklet.h"
 #include "AliTRDgtuTrack.h"
-#include "Cal/AliTRDCalPIDLQ.h"
+#include "Cal/AliTRDCalPID.h"
 
 ClassImp(AliTRDgtuTrack)
 
@@ -233,8 +234,8 @@ void AliTRDgtuTrack::Track(Float_t xpl, Float_t field)
   fNclusters  = 0;
   fNplanes    = 0;
   fNtracklets = GetNtracklets();
-  Int_t inDetector[kNplan];
-  for (i = 0; i < kNplan; i++) {
+  Int_t inDetector[kNlayer];
+  for (i = 0; i < kNlayer; i++) {
     inDetector[i] = -1;
   }
 
@@ -385,13 +386,20 @@ void AliTRDgtuTrack::MakePID()
 
   Int_t i = 0;
 
-  AliTRDcalibDB *calibration = AliTRDcalibDB::Instance();
-  if (!calibration) {
-    AliError("No instance of AliTRDcalibDB.");
-    return;  
-  }
-  const AliTRDCalPIDLQ *pd = calibration->GetPIDLQObject();
-  
+  // Avoid dependency on libTRDrec.pkg (CBL)
+  //AliTRDcalibDB *calibration = AliTRDcalibDB::Instance();
+  //if (!calibration) {
+  //  AliError("No instance of AliTRDcalibDB.");
+  //  return;  
+  //}
+  //
+  //AliTRDrecoParam *rec = AliTRDReconstructor::RecoParam();
+  //if (!rec) {
+  //  AliError("No TRD reco param.");
+  //  return;
+  //}
+  //const AliTRDCalPID *pd = calibration->GetPIDObject(rec->GetPIDMethod());
+
   AliTRDltuTracklet *trk;
   Int_t   nTracklets = GetNtracklets();
   Int_t   det;
@@ -451,11 +459,12 @@ void AliTRDgtuTrack::MakePID()
                // A.Bercuci on 2nd May 2007
                // Temporary modification to deal with more energy slices. The values
                // attached to charge slices and track length are dummy
-               Double_t dedx[3];
-               dedx[0] = dedx[1] = q*3.; dedx[2] = 0.;
-               Double_t length = 3.7;
-    probEle *= pd->GetProbability(0, TMath::Abs(fPt), dedx, length);
-    probPio *= pd->GetProbability(2, TMath::Abs(fPt), dedx, length);
+                Float_t dedx[3];
+                dedx[0] = dedx[1] = q*3.; dedx[2] = 0.;
+                //Float_t length = 3.7;
+
+    //probEle *= pd->GetProbability(0, TMath::Abs(fPt), dedx, length, 0);
+    //probPio *= pd->GetProbability(2, TMath::Abs(fPt), dedx, length, 0);
 
   }