]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSReconstructor.cxx
Changes requested in report #61429: PID: Separating response functions from ESD ...
[u/mrichter/AliRoot.git] / ITS / AliITSReconstructor.cxx
index 7e5ca3758d02cb58be08327cef01d6b5ab037efd..63fb7284dc8dd8e0bd24a9406c13a955c57e48ec 100644 (file)
 #include "AliITSVertexerZ.h"
 #include "AliITSVertexerCosmics.h"
 #include "AliESDEvent.h"
-#include "AliITSpidESD.h"
-#include "AliITSpidESD1.h"
-#include "AliITSpidESD2.h"
 #include "AliITSInitGeometry.h"
+#include "AliITSTrackleterSPDEff.h"
 
 
 ClassImp(AliITSReconstructor)
 
 //___________________________________________________________________________
 AliITSReconstructor::AliITSReconstructor() : AliReconstructor(),
-fItsPID(0),
 fDetTypeRec(0)
 {
   // Default constructor
@@ -56,25 +53,8 @@ fDetTypeRec(0)
  //___________________________________________________________________________
 AliITSReconstructor::~AliITSReconstructor(){
 // destructor
-  delete fItsPID;
   if(fDetTypeRec) delete fDetTypeRec;
 } 
-//______________________________________________________________________
-AliITSReconstructor::AliITSReconstructor(const AliITSReconstructor &ob) :AliReconstructor(ob),
-fItsPID(ob.fItsPID),
-fDetTypeRec(ob.fDetTypeRec)
-
-{
-  // Copy constructor
-}
-
-//______________________________________________________________________
-AliITSReconstructor& AliITSReconstructor::operator=(const AliITSReconstructor&  ob ){
-  // Assignment operator
-  this->~AliITSReconstructor();
-  new(this) AliITSReconstructor(ob);
-  return *this;
-}
 
 //______________________________________________________________________
 void AliITSReconstructor::Init() {
@@ -119,6 +99,27 @@ void AliITSReconstructor::Reconstruct(AliRawReader* rawReader, TTree *clustersTr
   fDetTypeRec->SetDefaultClusterFindersV2(kTRUE);
   fDetTypeRec->DigitsToRecPoints(rawReader,clustersTree);
 }
+//_____________________________________________________________________________
+AliTracker* AliITSReconstructor::CreateTrackleter() const
+{
+// create the SPD trackeleter (for SPD PlaneEfficiency evaluation)
+  if(!GetRecoParam()->GetComputePlaneEff() || !GetRecoParam()->GetUseTrackletsPlaneEff()) return NULL;
+  //Int_t trackerOpt = GetRecoParam()->GetTracker();
+  AliTracker* trackleter;
+  trackleter = new AliITSTrackleterSPDEff();
+  AliITSTrackleterSPDEff *spdtrackleter=(AliITSTrackleterSPDEff*)trackleter;
+  // here set cuts (from RecoParam)
+  if(GetRecoParam()->GetBkgTrackletsPlaneEff()) spdtrackleter->SetReflectClusterAroundZAxisForLayer(1,kTRUE);
+  if(GetRecoParam()->GetMCTrackletsPlaneEff()) spdtrackleter->SetMC();
+  spdtrackleter->SetHistOn();
+  spdtrackleter->SetPhiWindowL2(GetRecoParam()->GetTrackleterPhiWindowL2());
+  spdtrackleter->SetZetaWindowL2(GetRecoParam()->GetTrackleterZetaWindowL2());
+  spdtrackleter->SetPhiWindowL1(GetRecoParam()->GetTrackleterPhiWindowL1());
+  spdtrackleter->SetZetaWindowL1(GetRecoParam()->GetTrackleterZetaWindowL1());
+  if(GetRecoParam()->GetUpdateOncePerEventPlaneEff()) spdtrackleter->SetUpdateOncePerEventPlaneEff();
+  spdtrackleter->SetMinContVtx(GetRecoParam()->GetMinContVtxPlaneEff());
+  return trackleter;
+}
 
 //_____________________________________________________________________________
 AliTracker* AliITSReconstructor::CreateTracker() const
@@ -141,22 +142,30 @@ AliTracker* AliITSReconstructor::CreateTracker() const
     sat->SetDetTypeRec(fDetTypeRec);
     if(GetRecoParam()->GetTrackerSAOnly()) sat->SetSAFlag(kTRUE);
     if(sat->GetSAFlag())AliDebug(1,"Tracking Performed in ITS only\n");
-    sat->SetOuterStartLayer(GetRecoParam()->GetOuterStartLayerSA());
+       if(GetRecoParam()->GetInwardFindingSA()){
+       sat->SetInwardFinding();
+       sat->SetInnerStartLayer(GetRecoParam()->GetInnerStartLayerSA());
+       }else{
+      sat->SetOutwardFinding();
+      sat->SetOuterStartLayer(GetRecoParam()->GetOuterStartLayerSA());
+       }
+    sat->SetMinNPoints(GetRecoParam()->GetMinNPointsSA());
   }
 
   Int_t pidOpt = GetRecoParam()->GetPID();
 
   AliITSReconstructor* nc = const_cast<AliITSReconstructor*>(this);
+  /*
   if(pidOpt==1){
     Info("FillESD","ITS LandauFitPID option has been selected\n");
-    nc->fItsPID = new AliITSpidESD2((AliITStrackerMI*)tracker);
+    nc->fItsPID = new AliITSpidESD2();
   }
   else{
     Info("FillESD","ITS default PID\n");
     Double_t parITS[] = {79.,0.13, 5.}; //IB: this is  "pp tuning"
     nc->fItsPID = new AliITSpidESD1(parITS);
   }
+  */ 
   return tracker;
   
 }
@@ -169,33 +178,34 @@ AliVertexer* AliITSReconstructor::CreateVertexer() const
   AliITSVertexer *vptr;
   Int_t vtxOpt = GetRecoParam()->GetVertexer();
   if(vtxOpt==3){
-    Info("CreateVertexer","a AliITSVertexerIons object has been selected\n");
+    AliInfo("AliITSVertexerIons has been selected");
     vptr =  new AliITSVertexerIons();
   }
   else if(vtxOpt==4){
-    Double_t smear[3]={0.005,0.005,0.01};
-    Info("CreateVertexer","a AliITSVertexerFast object has been selected\n"); 
+    Double_t smear[3]={GetRecoParam()->GetVertexerFastSmearX(),
+                      GetRecoParam()->GetVertexerFastSmearY(),
+                      GetRecoParam()->GetVertexerFastSmearZ()};
+    AliInfo("AliITSVertexerFast has been selected"); 
     vptr = new AliITSVertexerFast(smear);
   }
   else if(vtxOpt==1){
-    Info("CreateVertexer","a AliITSVertexerZ object has been selected\n");
+    AliInfo("AliITSVertexerZ has been selected");
     vptr =  new AliITSVertexerZ();
   }
   else if(vtxOpt==2){
-    Info("CreateVertexer","a AliITSVertexerCosmics object has been selected\n");
+    AliInfo("AliITSVertexerCosmics has been selected");
     vptr = new AliITSVertexerCosmics();
   }
   else if(vtxOpt==5){ 
-    Info("CreateVertexer","vertex is fixed in the position of the TDI\n");
+    AliInfo("Vertex is fixed in the position of the TDI\n");
     vptr = new AliITSVertexerFixed("TDI");
   }
   else if(vtxOpt==6){ 
-    Info("CreateVertexer","vertex is fixed in the position of the TED\n");
+    AliInfo("Vertex is fixed in the position of the TED\n");
     vptr = new AliITSVertexerFixed("TED");
   }
   else {
   // by default an AliITSVertexer3D object is instatiated
-    Info("CreateVertexer","a AliITSVertexer3D object has been selected\n");
     AliITSVertexer3D*  vtxr = new AliITSVertexer3D();
     Float_t dzw=GetRecoParam()->GetVertexer3DWideFiducialRegionZ();
     Float_t drw=GetRecoParam()->GetVertexer3DWideFiducialRegionR();
@@ -208,6 +218,9 @@ AliVertexer* AliITSReconstructor::CreateVertexer() const
     vtxr->SetDeltaPhiCuts(dphil,dphit);
     Float_t dcacut=GetRecoParam()->GetVertexer3DDCACut();
     vtxr->SetDCACut(dcacut);
+    Int_t pileupAlgo=GetRecoParam()->GetSPDVertexerPileupAlgo();
+    vtxr->SetPileupAlgo(pileupAlgo);
+    AliInfo(Form("AliITSVertexer3D with pileup algo %d has been selected",pileupAlgo));
     vptr = vtxr;
   }
   vptr->SetDetTypeRec(fDetTypeRec);
@@ -215,19 +228,12 @@ AliVertexer* AliITSReconstructor::CreateVertexer() const
 }
 
 //_____________________________________________________________________________
-void AliITSReconstructor::FillESD(TTree * /*digitsTree*/, TTree *clustersTree
+void AliITSReconstructor::FillESD(TTree * /*digitsTree*/, TTree * /*clustersTree*/
                                  AliESDEvent* esd) const
 {
 // make PID, find V0s and cascade
-  if(fItsPID!=0) {
-    Int_t pidOpt = GetRecoParam()->GetPID();
-    if(pidOpt==1){
-      fItsPID->MakePID(clustersTree,esd);
-    }else{
-      fItsPID->MakePID(esd);
-    }
-  }
-  else {
-    Error("FillESD","!! cannot do the PID !!\n");
-  }
+/* Now done in AliESDpid
+  if(fItsPID!=0) fItsPID->MakePID(esd);
+  else AliError("!! cannot do the PID !!");
+*/
 }