X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSVertexerZ.cxx;h=798b9fb1b3ed5cc65ddd1a4df9ccc430085d26d5;hb=ab5021391b12a712c404515ae9367b5164025eed;hp=ab333bd0cf00933a4ea52e3f88d95dda1fee1e05;hpb=3457dd2dcbca81512e6d14eaecdc9ea898699e6a;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSVertexerZ.cxx b/ITS/AliITSVertexerZ.cxx index ab333bd0cf0..798b9fb1b3e 100644 --- a/ITS/AliITSVertexerZ.cxx +++ b/ITS/AliITSVertexerZ.cxx @@ -32,6 +32,8 @@ // It can be used successfully with Pb-Pb collisions //////////////////////////////////////////////////////////////// +using std::endl; +using std::cout; ClassImp(AliITSVertexerZ) @@ -51,7 +53,9 @@ fHighLim(0.), fStepCoarse(0), fTolerance(0.), fMaxIter(0), -fWindowWidth(0) { +fWindowWidth(0), +fSearchForPileup(kTRUE) +{ // Default constructor SetDiffPhiMax(); SetFirstLayerModules(); @@ -80,7 +84,9 @@ fHighLim(0.), fStepCoarse(0), fTolerance(0.), fMaxIter(0), -fWindowWidth(0) { +fWindowWidth(0), +fSearchForPileup(kTRUE) +{ // Standard Constructor SetDiffPhiMax(); SetFirstLayerModules(); @@ -187,6 +193,7 @@ AliESDVertex* AliITSVertexerZ::FindVertexForCurrentEvent(TTree *itsClusterTree){ //______________________________________________________________________ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){ // Defines the AliESDVertex for the current event + delete fCurrentVertex; fCurrentVertex = 0; Double_t startPos[3]={GetNominalPos()[0],GetNominalPos()[1],GetNominalPos()[2]}; Double_t startCov[6]={GetNominalCov()[0],GetNominalCov()[1],GetNominalCov()[2], @@ -347,7 +354,7 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){ zm=0.; ezm=0.; ncontr=0; - for(Int_t i =0; iGetZ()>lim1 && p->GetZ()GetErrZ(); @@ -370,7 +377,7 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){ fCurrentVertex->SetDispersion(fDiffPhiMax); fNoVertices=1; points.Clear(); - if(ncontr>fMinTrackletsForPilup){ + if(fSearchForPileup && ncontr>fMinTrackletsForPilup){ Float_t secPeakPos; Int_t ncontr2=FindSecondPeak(fZCombc,binmin,binmax,secPeakPos); if(ncontr2>=fMinTrackletsForPilup){ @@ -394,7 +401,9 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){ } //_____________________________________________________________________ -Int_t AliITSVertexerZ::FindSecondPeak(TH1F* h, Int_t binmin,Int_t binmax, Float_t& secPeakPos){ +Int_t AliITSVertexerZ::FindSecondPeak(TH1F* h, Int_t binmin,Int_t binmax, Float_t& secPeakPos){ + // Resets bin contents between binmin and binmax and then search + // for a second peak position for(Int_t i=binmin-1;i<=binmax+1;i++){ h->SetBinContent(i,0.); }