]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSReconstructor.cxx
Possibility to create arbitrary number of PHOS modules added
[u/mrichter/AliRoot.git] / PHOS / AliPHOSReconstructor.cxx
index 778365aa291cf858e3f49a44e5db05339a2e50b4..f4a428e0aaad16cd61f8029a6cbaf14f35f20e27 100644 (file)
@@ -60,7 +60,7 @@ AliPHOSRecoParam* AliPHOSReconstructor::fgkRecoParamCpv =0;  // CPV rec. paramet
 
 //____________________________________________________________________________
 AliPHOSReconstructor::AliPHOSReconstructor() :
-  fGeom(NULL)
+  fGeom(NULL),fClusterizer(NULL)
 {
   // ctor
 
@@ -74,7 +74,8 @@ AliPHOSReconstructor::AliPHOSReconstructor() :
     fgkRecoParamCpv = AliPHOSRecoParamCpv::GetCpvDefaultParameters();
   }
 
-  fGeom = AliPHOSGeometry::GetInstance("IHEP","");
+  fGeom        = AliPHOSGeometry::GetInstance("IHEP","");
+  fClusterizer = new AliPHOSClusterizerv1(fGeom);
 }
 
 //____________________________________________________________________________
@@ -82,6 +83,7 @@ AliPHOSReconstructor::AliPHOSReconstructor() :
 {
   // dtor
   delete fGeom;
+  delete fClusterizer;
 } 
 
 //____________________________________________________________________________
@@ -92,13 +94,12 @@ void AliPHOSReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) c
   // segment maker needs access to the AliESDEvent object to retrieve the tracks reconstructed by 
   // the global tracking.
 
-  AliPHOSClusterizerv1 clu(fGeom);
-  clu.SetInput(digitsTree);
-  clu.SetOutput(clustersTree);
+  fClusterizer->SetInput(digitsTree);
+  fClusterizer->SetOutput(clustersTree);
   if ( Debug() ) 
-    clu.Digits2Clusters("deb all") ; 
+    fClusterizer->Digits2Clusters("deb all") ; 
   else 
-    clu.Digits2Clusters("") ;
+    fClusterizer->Digits2Clusters("") ;
 }
 
 //____________________________________________________________________________