X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSReconstructor.cxx;h=1b363e08c2c24681835248411ff20721d22e27fc;hb=54c6a92cc85b5a418b141a2411b2b1d5af1f212f;hp=037c02124555bef1f44c66e1a953226cae1f7c31;hpb=5c47990a8bb39eca2daf2f33033ff12555fa8e1f;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSReconstructor.cxx b/ITS/AliITSReconstructor.cxx index 037c0212455..1b363e08c2c 100644 --- a/ITS/AliITSReconstructor.cxx +++ b/ITS/AliITSReconstructor.cxx @@ -33,6 +33,7 @@ #include "AliITStrackerSA.h" #include "AliITSVertexerIons.h" #include "AliITSVertexerFast.h" +#include "AliITSVertexerFixed.h" #include "AliITSVertexer3D.h" #include "AliITSVertexerZ.h" #include "AliITSVertexerCosmics.h" @@ -41,11 +42,10 @@ #include "AliITSpidESD1.h" #include "AliITSpidESD2.h" #include "AliITSInitGeometry.h" +#include "AliITSTrackleterSPDEff.h" ClassImp(AliITSReconstructor) -AliITSRecoParam *AliITSReconstructor::fgRecoParamDefault = AliITSRecoParam::GetHighFluxParam(); -AliITSRecoParam *AliITSReconstructor::fgRecoParam =0; // reconstruction parameters //___________________________________________________________________________ AliITSReconstructor::AliITSReconstructor() : AliReconstructor(), @@ -53,34 +53,13 @@ fItsPID(0), fDetTypeRec(0) { // Default constructor - if (!fgRecoParam) { - AliWarning("Using default reconstruction parameters"); - fgRecoParam = fgRecoParamDefault; - } } //___________________________________________________________________________ AliITSReconstructor::~AliITSReconstructor(){ // destructor delete fItsPID; - if(!fgRecoParam && (fgRecoParam != fgRecoParamDefault)) delete fgRecoParam; 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() { @@ -100,7 +79,7 @@ void AliITSReconstructor::Init() { fDetTypeRec = new AliITSDetTypeRec(); fDetTypeRec->SetITSgeom(geom); fDetTypeRec->SetDefaults(); - + return; } @@ -109,14 +88,12 @@ void AliITSReconstructor::Reconstruct(TTree *digitsTree, TTree *clustersTree) co { // reconstruct clusters - TString option = GetOption(); - Bool_t clusfinder=kTRUE; // Default: V2 cluster finder - if(option.Contains("OrigCF"))clusfinder=kFALSE; + Int_t cluFindOpt = GetRecoParam()->GetClusterFinder(); fDetTypeRec->SetTreeAddressD(digitsTree); fDetTypeRec->MakeBranch(clustersTree,"R"); fDetTypeRec->SetTreeAddressR(clustersTree); - fDetTypeRec->DigitsToRecPoints(digitsTree,clustersTree,0,"All",clusfinder); + fDetTypeRec->DigitsToRecPoints(digitsTree,clustersTree,0,"All",cluFindOpt); } //_________________________________________________________________ @@ -127,35 +104,65 @@ 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->(GetRecoParam()->GetMinContVtxPlaneEff()); // to be implemented + return trackleter; +} //_____________________________________________________________________________ AliTracker* AliITSReconstructor::CreateTracker() const { // create a ITS tracker - - TString selectedTracker = GetOption(); + Int_t trackerOpt = GetRecoParam()->GetTracker(); AliTracker* tracker; - if (selectedTracker.Contains("MI")) { + if (trackerOpt==1) { tracker = new AliITStrackerMI(0); + AliITStrackerMI *mit=(AliITStrackerMI*)tracker; + mit->SetDetTypeRec(fDetTypeRec); } - else if (selectedTracker.Contains("V2")) { + else if (trackerOpt==2) { tracker = new AliITStrackerV2(0); } else { tracker = new AliITStrackerSA(0); // inherits from AliITStrackerMI AliITStrackerSA *sat=(AliITStrackerSA*)tracker; - if(selectedTracker.Contains("onlyITS"))sat->SetSAFlag(kTRUE); + sat->SetDetTypeRec(fDetTypeRec); + if(GetRecoParam()->GetTrackerSAOnly()) sat->SetSAFlag(kTRUE); if(sat->GetSAFlag())AliDebug(1,"Tracking Performed in ITS only\n"); - if(selectedTracker.Contains("cosmics")||selectedTracker.Contains("COSMICS")) - sat->SetOuterStartLayer(AliITSgeomTGeo::GetNLayers()-2); + if(GetRecoParam()->GetInwardFindingSA()){ + sat->SetInwardFinding(); + sat->SetInnerStartLayer(GetRecoParam()->GetInnerStartLayerSA()); + }else{ + sat->SetOutwardFinding(); + sat->SetOuterStartLayer(GetRecoParam()->GetOuterStartLayerSA()); + } + sat->SetMinNPoints(GetRecoParam()->GetMinNPointsSA()); } - TString selectedPIDmethod = GetOption(); + Int_t pidOpt = GetRecoParam()->GetPID(); + AliITSReconstructor* nc = const_cast(this); - if(selectedPIDmethod.Contains("LandauFitPID")){ + 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"); @@ -172,44 +179,63 @@ AliVertexer* AliITSReconstructor::CreateVertexer() const { // create a ITS vertexer - TString selectedVertexer = GetOption(); - if(selectedVertexer.Contains("ions") || selectedVertexer.Contains("IONS")){ - Info("CreateVertexer","a AliITSVertexerIons object has been selected\n"); - return new AliITSVertexerIons("null"); + AliITSVertexer *vptr; + Int_t vtxOpt = GetRecoParam()->GetVertexer(); + if(vtxOpt==3){ + AliInfo("AliITSVertexerIons has been selected"); + vptr = new AliITSVertexerIons(); + } + else if(vtxOpt==4){ + Double_t smear[3]={GetRecoParam()->GetVertexerFastSmearX(), + GetRecoParam()->GetVertexerFastSmearY(), + GetRecoParam()->GetVertexerFastSmearZ()}; + AliInfo("AliITSVertexerFast has been selected"); + vptr = new AliITSVertexerFast(smear); + } + else if(vtxOpt==1){ + AliInfo("AliITSVertexerZ has been selected"); + vptr = new AliITSVertexerZ(); } - if(selectedVertexer.Contains("smear") || selectedVertexer.Contains("SMEAR")){ - Double_t smear[3]={0.005,0.005,0.01}; - Info("CreateVertexer","a AliITSVertexerFast object has been selected\n"); - return new AliITSVertexerFast(smear); + else if(vtxOpt==2){ + AliInfo("AliITSVertexerCosmics has been selected"); + vptr = new AliITSVertexerCosmics(); } - if(selectedVertexer.Contains("3d") || selectedVertexer.Contains("3D")){ - Info("CreateVertexer","a AliITSVertexer3D object has been selected\n"); - return new AliITSVertexer3D("null"); + else if(vtxOpt==5){ + AliInfo("Vertex is fixed in the position of the TDI\n"); + vptr = new AliITSVertexerFixed("TDI"); } - if(selectedVertexer.Contains("cosmics") || selectedVertexer.Contains("COSMICS")){ - Info("CreateVertexer","a AliITSVertexerCosmics object has been selected\n"); - return new AliITSVertexerCosmics(); + else if(vtxOpt==6){ + AliInfo("Vertex is fixed in the position of the TED\n"); + vptr = new AliITSVertexerFixed("TED"); } - // by default an AliITSVertexerZ object is instatiated - Info("CreateVertexer","a AliITSVertexerZ object has been selected\n"); - return new AliITSVertexerZ("null"); + else { + // by default an AliITSVertexer3D object is instatiated + AliITSVertexer3D* vtxr = new AliITSVertexer3D(); + Float_t dzw=GetRecoParam()->GetVertexer3DWideFiducialRegionZ(); + Float_t drw=GetRecoParam()->GetVertexer3DWideFiducialRegionR(); + vtxr->SetWideFiducialRegion(dzw,drw); + Float_t dzn=GetRecoParam()->GetVertexer3DNarrowFiducialRegionZ(); + Float_t drn=GetRecoParam()->GetVertexer3DNarrowFiducialRegionR(); + vtxr->SetNarrowFiducialRegion(dzn,drn); + Float_t dphil=GetRecoParam()->GetVertexer3DLooseDeltaPhiCut(); + Float_t dphit=GetRecoParam()->GetVertexer3DTightDeltaPhiCut(); + 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); + return vptr; } //_____________________________________________________________________________ -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) { - TString selectedPIDmethod = GetOption(); - if(selectedPIDmethod.Contains("LandauFitPID")){ - fItsPID->MakePID(clustersTree,esd); - } - else{ - fItsPID->MakePID(esd); - } - } - else { - Error("FillESD","!! cannot do the PID !!\n"); - } + if(fItsPID!=0) fItsPID->MakePID(esd); + else AliError("!! cannot do the PID !!"); }