]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MFT/AliMFTReconstructor.cxx
remove debug message
[u/mrichter/AliRoot.git] / MFT / AliMFTReconstructor.cxx
index 8d955df1e1395b87a7e2e53efb2950263da361a7..81054fb27ca988c848e729a1a00be3e9701299f5 100644 (file)
@@ -44,16 +44,36 @@ AliMFTReconstructor::AliMFTReconstructor():
 
 //====================================================================================================================================================
 
-AliMFTReconstructor::~AliMFTReconstructor(){
-
+AliMFTReconstructor::~AliMFTReconstructor() {
+  
   // destructor
-
+  
   if (fDigits) {
+    for (Int_t iPlane=0; iPlane<fNPlanes; iPlane++) {
+      if (fDigits->At(iPlane)) fDigits->At(iPlane)->Delete();
+    }
     fDigits->Delete();
     delete fDigits;
     fDigits=0;
   }
+  
+}
+
+//====================================================================================================================================================
 
+void AliMFTReconstructor::Clear(const Option_t* /*opt*/) {
+       
+  // Clear arrays
+  
+  if (fDigits) {
+    for (Int_t iPlane=0; iPlane<fNPlanes; iPlane++) {
+      if (fDigits->At(iPlane)) ((TClonesArray*)fDigits->At(iPlane))->Delete();
+    }
+    fDigits->Delete();
+    delete fDigits;
+    fDigits = NULL;
+  }
+  
 }
 
 //====================================================================================================================================================
@@ -66,10 +86,13 @@ void AliMFTReconstructor::Init() {
 
   fDigits = new TObjArray(fNPlanes);
   fDigits->SetOwner(kTRUE);
-  for (Int_t iPlane=0; iPlane<fNPlanes; iPlane++) fDigits->AddAt(new TClonesArray("AliMFTDigit"),iPlane);
-
-  AliInfo("    ************* Using the MFT reconstructor! ****** ");
-
+  for (Int_t iPlane=0; iPlane<fNPlanes; iPlane++) {
+    fDigits->AddAt(new TClonesArray("AliMFTDigit"),iPlane);
+    ((TClonesArray*)fDigits->At(iPlane))->SetOwner(kTRUE);
+  }
+  
+  AliInfo(" ************* Using the MFT reconstructor! ************ ");
+  
   return;
 
 }
@@ -105,8 +128,6 @@ void AliMFTReconstructor::Reconstruct(TTree *digitsTree, TTree *clustersTree) co
 
   // Clusterization
 
-  AliDebug(1, Form("nPlanes = %d",fNPlanes));
-
   for (Int_t iPlane=0; iPlane<fNPlanes; iPlane++) {
     AliDebug(1, Form("Setting Address for Branch Plane_%02d", iPlane)); 
     digitsTree->SetBranchAddress(Form("Plane_%02d",iPlane), &(*fDigits)[iPlane]);
@@ -116,23 +137,46 @@ void AliMFTReconstructor::Reconstruct(TTree *digitsTree, TTree *clustersTree) co
 
   AliDebug(1, "Creating clusterFinder");
   AliMFTClusterFinder *clusterFinder = new AliMFTClusterFinder();
+  clusterFinder->ApplyMisalignment(kTRUE);    // only in case of MC !!!
   clusterFinder->Init("AliMFTGeometry.root");
-  AliDebug(1, "clusterFinder->MakeClusterBranch(clustersTree)");
   clusterFinder->MakeClusterBranch(clustersTree);
-  AliDebug(1, "clusterFinder->SetClusterTreeAddress(clustersTree)");
   clusterFinder->SetClusterTreeAddress(clustersTree);
-  AliDebug(1, "clusterFinder->DigitsToClusters(fDigits)");
   clusterFinder->DigitsToClusters(fDigits);
-  AliDebug(1, "clustersTree->Fill()");
   clustersTree->Fill();                         // fill tree for current event
-  AliDebug(1, "delete clusterFinder");
   delete clusterFinder;
 
   for (Int_t iPlane=0; iPlane<fNPlanes; iPlane++) {
     AliDebug(1, Form("fDigits->At(%d)->Clear()",iPlane));
-    fDigits->At(iPlane)->Clear();
+    ((TClonesArray*)fDigits->At(iPlane))->Delete();
   }
 
 }
 
 //====================================================================================================================================================
+
+AliTracker* AliMFTReconstructor::CreateTracker() const {
+
+  // Create a MFT tracker: global MUON+MFT tracks
+
+  AliMFTTrackerMU *tracker = new AliMFTTrackerMU();   // tracker for muon tracks (MFT + MUON) 
+
+  return tracker;
+  
+}
+
+//====================================================================================================================================================
+
+AliTracker* AliMFTReconstructor::CreateTrackleter() const {
+
+  AliInfo("Not implemented");
+
+  // Create a MFT tracker: standalone MFT tracks
+
+  //  AliMFTTrackerSA *tracker = new AliMFTTrackerSA();   // tracker for MFT tracks
+
+  return NULL;
+  
+}
+
+//====================================================================================================================================================
+