]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
include RICH in tracking
authortkuhr <tkuhr@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 15 Sep 2004 10:21:15 +0000 (10:21 +0000)
committertkuhr <tkuhr@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 15 Sep 2004 10:21:15 +0000 (10:21 +0000)
STEER/AliReconstruction.cxx
STEER/AliReconstruction.h

index 5ce2a4681cceb850dafd491f521d9ac52f9ab62d..be686a76ce6299860dc62f27203933dc46be4477 100644 (file)
@@ -138,6 +138,8 @@ AliReconstruction::AliReconstruction(const char* gAliceFilename,
   fTRDTracker(NULL),
   fTOFLoader(NULL),
   fTOFTracker(NULL),
+  fRICHLoader(NULL),
+  fRICHTracker(NULL),
 
   fReconstructors(),
   fOptions()
@@ -170,6 +172,8 @@ AliReconstruction::AliReconstruction(const AliReconstruction& rec) :
   fTRDTracker(NULL),
   fTOFLoader(NULL),
   fTOFTracker(NULL),
+  fRICHLoader(NULL),
+  fRICHTracker(NULL),
 
   fReconstructors(),
   fOptions()
@@ -592,6 +596,27 @@ Bool_t AliReconstruction::RunTracking(AliESD*& esd)
        if (fCheckPointLevel > 1) WriteESD(esd, "TOF.back");
        fTOFTracker->UnloadClusters();
        fTOFLoader->UnloadDigits();
+
+       if (!fRICHTracker) {
+         AliWarning("no RICH tracker");
+       } else {
+         // RICH back propagation
+         AliDebug(1, "RICH back propagation");
+         fRICHLoader->LoadRecPoints("read");
+         TTree* richTree = fRICHLoader->TreeR();
+         if (!richTree) {
+           AliError("Can't get the RICH cluster tree");
+           return kFALSE;
+         }
+         fRICHTracker->LoadClusters(richTree);
+         if (fRICHTracker->PropagateBack(esd) != 0) {
+           AliError("RICH backward propagation failed");
+           return kFALSE;
+         }
+         if (fCheckPointLevel > 1) WriteESD(esd, "RICH.back");
+         fRICHTracker->UnloadClusters();
+         fRICHLoader->UnloadRecPoints();
+       }
       }
 
       // TRD inward refit
@@ -809,6 +834,22 @@ Bool_t AliReconstruction::CreateTrackers()
     }
   }
 
+  fRICHTracker = NULL;
+  fRICHLoader = fRunLoader->GetLoader("RICHLoader");
+  if (!fRICHLoader) {
+    AliWarning("no RICH loader found");
+    if (fStopOnError) return kFALSE;
+  } else {
+    AliReconstructor* tofReconstructor = GetReconstructor("RICH");
+    if (tofReconstructor) {
+      fRICHTracker = tofReconstructor->CreateTracker(fRunLoader);
+    }
+    if (!fRICHTracker) {
+      AliWarning("couldn't create a tracker for RICH");
+      if (fStopOnError) return kFALSE;
+    }
+  }
+
   return kTRUE;
 }
 
@@ -829,6 +870,8 @@ void AliReconstruction::CleanUp(TFile* file)
   fTRDTracker = NULL;
   delete fTOFTracker;
   fTOFTracker = NULL;
+  delete fRICHTracker;
+  fRICHTracker = NULL;
 
   delete fRunLoader;
   fRunLoader = NULL;
index 6850d7436d17cc20031166c666b3a2c2f6e3c6e7..520625c0111b27bb4fcb13d653bff56c80fe80a2 100644 (file)
@@ -118,6 +118,8 @@ private:
   AliTracker*    fTRDTracker;         //! tracker for TRD
   AliLoader*     fTOFLoader;          //! loader for TOF
   AliTracker*    fTOFTracker;         //! tracker for TOF
+  AliLoader*     fRICHLoader;         //! loader for RICH
+  AliTracker*    fRICHTracker;        //! tracker for RICH
 
   static const Int_t fgkNDetectors = 15;   //! number of detectors
   static const char* fgkDetectorName[fgkNDetectors]; //! names of detectors