From: hristov Date: Thu, 23 Sep 2010 15:00:23 +0000 (+0000) Subject: Change the X and Y values stored by the VertexerZ from (0.,0.) which are the X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=5279841d1d3c3012aae07fd6c2276eb064a805c3;hp=6ad010c1dd6d114a3163209acaa3695f66eebcbf Change the X and Y values stored by the VertexerZ from (0.,0.) which are the values actually used, to the values stored in the MeanVertexSPD object. Andrea, Francesco, Massimo --- diff --git a/ITS/AliITSVertexerZ.cxx b/ITS/AliITSVertexerZ.cxx index 432fae2df4c..21c86d1a86e 100644 --- a/ITS/AliITSVertexerZ.cxx +++ b/ITS/AliITSVertexerZ.cxx @@ -188,6 +188,9 @@ AliESDVertex* AliITSVertexerZ::FindVertexForCurrentEvent(TTree *itsClusterTree){ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){ // Defines the AliESDVertex for the current event fCurrentVertex = 0; + Double_t startPos[3]={GetNominalPos()[0],GetNominalPos()[1],GetNominalPos()[2]}; + Double_t startCov[6]={GetNominalCov()[0],GetNominalCov()[1],GetNominalCov()[2], + GetNominalCov()[3],GetNominalCov()[4],GetNominalCov()[5]}; ResetVertex(); TClonesArray *itsRec = 0; // lc1 and gc1 are local and global coordinates for layer 1 @@ -199,7 +202,7 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){ if(!rpcont->IsSPDActive()){ AliWarning("Null pointer for RecPoints branch, vertex not calculated"); ResetHistograms(); - fCurrentVertex = new AliESDVertex(0.,5.3,-2); + fCurrentVertex = new AliESDVertex(startPos,startCov,99999.,-2); return; } @@ -211,7 +214,7 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){ if(nrpL1 == 0 || nrpL2 == 0){ AliDebug(1,Form("No RecPoints in at least one SPD layer (%d %d)",nrpL1,nrpL2)); ResetHistograms(); - fCurrentVertex = new AliESDVertex(0.,5.3,-2); + fCurrentVertex = new AliESDVertex(startPos,startCov,99999.,-2); return; } // Force a coarse bin size of 200 microns if the number of clusters on layer 2 @@ -308,7 +311,7 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){ if(contents<1.){ // Warning("FindVertexForCurrentEvent","Insufficient number of rec. points\n"); ResetHistograms(); - fCurrentVertex = new AliESDVertex(0.,5.3,-1); + fCurrentVertex = new AliESDVertex(startPos,startCov,99999.,-1); points.Clear(); return; } @@ -359,7 +362,9 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){ niter++; } while(niter<10 && TMath::Abs((zm-lim1)-(lim2-zm))>fTolerance); if(nPeaks==2) ezm=widthSR; - fCurrentVertex = new AliESDVertex(zm,ezm,ncontr); + Double_t position[3]={GetNominalPos()[0],GetNominalPos()[1],zm}; + Double_t covmatrix[6]={GetNominalCov()[0],0.,GetNominalCov()[2],0.,0.,ezm}; + fCurrentVertex = new AliESDVertex(position,covmatrix,99999.,ncontr); fCurrentVertex->SetTitle("vertexer: Z"); fCurrentVertex->SetDispersion(fDiffPhiMax); fNoVertices=1; diff --git a/STEER/AliVertexer.h b/STEER/AliVertexer.h index 4883c307c06..48c7749e4d9 100644 --- a/STEER/AliVertexer.h +++ b/STEER/AliVertexer.h @@ -40,6 +40,7 @@ class AliVertexer : public TObject { // with size=novertices virtual AliESDVertex* GetAllVertices(Int_t &novertices) const {novertices = 0; return NULL;} const Double_t* GetNominalPos() const {return fNominalPos;} + const Double_t* GetNominalCov() const {return fNominalCov;} protected: AliESDVertex *fCurrentVertex; //! pointer to the current vertex