X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSVertexer.cxx;h=6ecff35c54fe813a2a63e2ebb5f23b8d8417f4f0;hb=13c9b3a4ac7dbb031cd41bef49a3ad8fcad748ee;hp=4c3ca507b94f048c5800524448c9517bc959abc1;hpb=3b1d8321c3ce2082b24ff228c37768bc4c396cb4;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSVertexer.cxx b/ITS/AliITSVertexer.cxx index 4c3ca507b94..6ecff35c54f 100644 --- a/ITS/AliITSVertexer.cxx +++ b/ITS/AliITSVertexer.cxx @@ -1,10 +1,12 @@ #include "AliLog.h" #include "AliMultiplicity.h" #include "AliITSgeomTGeo.h" +#include "AliITSDetTypeRec.h" #include "AliITSVertexer.h" #include "AliITSLoader.h" #include "AliITSMultReconstructor.h" #include "AliITSRecPointContainer.h" +#include "AliRunLoader.h" const Float_t AliITSVertexer::fgkPipeRadius = 3.0; @@ -13,7 +15,7 @@ ClassImp(AliITSVertexer) ////////////////////////////////////////////////////////////////////// // Base class for primary vertex reconstruction // // AliESDVertexer is a class for full 3D primary vertex finding // -// derived classes: AliITSVertexerIons AliITSvertexer3D // +// derived classes: AliITSvertexer3D, AliITSVertexerZ. // // AliITSVertexerCosmics // ////////////////////////////////////////////////////////////////////// @@ -21,8 +23,9 @@ ClassImp(AliITSVertexer) //______________________________________________________________________ AliITSVertexer::AliITSVertexer():AliVertexer(), -fLadders(), +fLadders(NULL), fLadOnLay2(0), +fComputeMultiplicity(kFALSE), fDetTypeRec(NULL), fMinTrackletsForPilup(0), fIsPileup(0), @@ -42,12 +45,8 @@ fLastEvent(-1) //______________________________________________________________________ AliITSVertexer::~AliITSVertexer() { // Destructor - if(fLadders) delete [] fLadders; - if (fNoVertices > 0){ - delete []fVertArray; - fVertArray = NULL; - fNoVertices = 0; - } + delete [] fLadders; + delete []fVertArray; } //______________________________________________________________________ @@ -68,6 +67,7 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){ // Invokes AliITSMultReconstructor to determine the // charged multiplicity in the pixel layers if(fMult){delete fMult; fMult = 0;} + Bool_t success=kTRUE; Bool_t cosmics=kFALSE; if(!fCurrentVertex)success=kFALSE; @@ -95,7 +95,7 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){ multReco.LoadClusterFiredChips(itsClusterTree); Short_t nfcL1 = multReco.GetNFiredChips(0); Short_t nfcL2 = multReco.GetNFiredChips(1); - fMult = new AliMultiplicity(0,0,0,0,0,0,0,0,0,0,nfcL1,nfcL2,fastOrFiredMap); + fMult = new AliMultiplicity(0,0,0,0,0,0,0,0,0,0,0,nfcL1,nfcL2,fastOrFiredMap); fMult->SetFiredChipMap(firedChipMap); AliITSRecPointContainer* rcont = AliITSRecPointContainer::Instance(); fMult->SetITSClusters(0,rcont->GetNClustersInLayer(1,itsClusterTree)); @@ -133,13 +133,15 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){ Int_t nosingleclus=multReco.GetNSingleClusters(); Float_t *ths = new Float_t [nosingleclus]; Float_t *phs = new Float_t [nosingleclus]; + Int_t *labelss = new Int_t [nosingleclus]; for(Int_t i=0;iSetFiredChipMap(firedChipMap); AliITSRecPointContainer* rcont = AliITSRecPointContainer::Instance(); fMult->SetITSClusters(0,rcont->GetNClustersInLayer(1,itsClusterTree)); @@ -154,6 +156,7 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){ delete [] phs; delete [] labels; delete [] labelsL2; + delete [] labelss; return; } @@ -162,6 +165,7 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){ void AliITSVertexer::SetLaddersOnLayer2(Int_t ladwid){ // Calculates the array of ladders on layer 2 to be used with a // given ladder on layer 1 + if(ladwid == fLadOnLay2 && fLadders)return; fLadOnLay2=ladwid; Int_t ladtot1=AliITSgeomTGeo::GetNLadders(1); if(fLadders) delete [] fLadders; @@ -197,7 +201,6 @@ void AliITSVertexer::SetLaddersOnLayer2(Int_t ladwid){ } } -#include "AliRunLoader.h" //______________________________________________________________________ void AliITSVertexer::Init(TString filename){ @@ -205,7 +208,8 @@ void AliITSVertexer::Init(TString filename){ // analysis of an entire file AliRunLoader *rl = AliRunLoader::Instance(); if(!rl){ - Fatal("AliITSVertexer","Run Loader not found"); + AliFatal("Run Loader not found"); + return; } if (fLastEvent < 0) SetLastEvent(rl->GetNumberOfEvents()-1);