]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSReconstructor.cxx
remove cout
[u/mrichter/AliRoot.git] / ITS / AliITSReconstructor.cxx
index 1b706bdcbd6547a2d434b6212033c91fdbb84e1c..9e61af29d029dbc166af4c0985eb2bd5c17e0a45 100644 (file)
@@ -36,6 +36,7 @@
 #include "AliITSVertexerFixed.h"
 #include "AliITSVertexer3D.h"
 #include "AliITSVertexerZ.h"
+#include "AliITSVertexerZD.h"
 #include "AliITSVertexerCosmics.h"
 #include "AliITSInitGeometry.h"
 #include "AliITSTrackleterSPDEff.h"
@@ -97,21 +98,20 @@ void AliITSReconstructor::Reconstruct(TTree *digitsTree, TTree *clustersTree) co
 {
 // reconstruct clusters
 
-  Int_t cluFindOpt = GetRecoParam()->GetClusterFinder();
-
+  TString recopt = GetRecoParam()->GetOptReco();
   fDetTypeRec->SetTreeAddressD(digitsTree);
   fDetTypeRec->MakeBranch(clustersTree,"R");
   fDetTypeRec->SetTreeAddressR(clustersTree);
-  fDetTypeRec->DigitsToRecPoints(digitsTree,clustersTree,0,"All",cluFindOpt);    
+  fDetTypeRec->DigitsToRecPoints(digitsTree,clustersTree,0,recopt.Data(),1);    
 }
 
 //_________________________________________________________________
 void AliITSReconstructor::Reconstruct(AliRawReader* rawReader, TTree *clustersTree) const
 {
   // reconstruct clusters from raw data
-  fDetTypeRec->SetDefaultClusterFindersV2(kTRUE);
-  fDetTypeRec->DigitsToRecPoints(rawReader,clustersTree);
+  TString recopt = GetRecoParam()->GetOptReco();
+  fDetTypeRec->SetDefaultClusterFindersV2(kTRUE,kTRUE);
+  fDetTypeRec->DigitsToRecPoints(rawReader,clustersTree,recopt.Data());
 }
 
 //_____________________________________________________________________________
@@ -186,10 +186,11 @@ AliVertexer* AliITSReconstructor::CreateVertexer() const
 {
 // create a ITS vertexer
 
-  AliITSVertexer *vptr;
+  AliITSVertexer *vptr = NULL;
   Int_t vtxOpt = GetRecoParam()->GetVertexer();
   if(vtxOpt==3){
     AliFatal("Option AliITSVertexerIons is no longer supported");
+    return vptr;
   }
   else if(vtxOpt==4){
     Double_t smear[3]={GetRecoParam()->GetVertexerFastSmearX(),
@@ -200,7 +201,10 @@ AliVertexer* AliITSReconstructor::CreateVertexer() const
   }
   else if(vtxOpt==1){
     AliDebug(1,"AliITSVertexerZ has been selected");
-    vptr =  new AliITSVertexerZ();
+    AliITSVertexerZ* vtxrz =  new AliITSVertexerZ();
+    Int_t pileupAlgo=GetRecoParam()->GetSPDVertexerPileupAlgo();
+    if(pileupAlgo==3) vtxrz->SetSearchForPileup(kFALSE);
+    vptr = vtxrz;
   }
   else if(vtxOpt==2){
     AliDebug(1,"AliITSVertexerCosmics has been selected");
@@ -214,9 +218,16 @@ AliVertexer* AliITSReconstructor::CreateVertexer() const
     AliDebug(1,"Vertex is fixed in the position of the TED\n");
     vptr = new AliITSVertexerFixed("TED");
   }
+  else if(vtxOpt==7){
+    AliDebug(1,"VertexerZD:  reconstruction of the Z coordinate with SDD \n");
+    AliITSVertexerZD*vtxrz = new AliITSVertexerZD();
+    vtxrz->SetSearchForPileup(kFALSE);
+    vptr = vtxrz;
+  }
   else {
   // by default an AliITSVertexer3D object is instatiated
-    AliITSVertexer3D*  vtxr = new AliITSVertexer3D();
+    AliITSVertexer3D*  vtxr = 
+       new AliITSVertexer3D(GetRecoParam()->GetVertexer3DWideFiducialRegionZ());
     Float_t dzw=GetRecoParam()->GetVertexer3DWideFiducialRegionZ();
     Float_t drw=GetRecoParam()->GetVertexer3DWideFiducialRegionR();
     vtxr->SetWideFiducialRegion(dzw,drw);
@@ -230,6 +241,8 @@ AliVertexer* AliITSReconstructor::CreateVertexer() const
     vtxr->SetDCACut(dcacut);
     Int_t pileupAlgo=GetRecoParam()->GetSPDVertexerPileupAlgo();
     vtxr->SetPileupAlgo(pileupAlgo);
+    UChar_t highmultAlgo=GetRecoParam()->GetSPDVertexerHighMultAlgo();
+    vtxr->SetHighMultAlgo(highmultAlgo);
     AliDebug(1,Form("AliITSVertexer3D with pileup algo %d has been selected",pileupAlgo));
     vptr = vtxr;
   }