]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSVertexer.cxx
Added OADB as external library dependency to ANALYSISalice. OADB will get automatical...
[u/mrichter/AliRoot.git] / ITS / AliITSVertexer.cxx
index 4c3ca507b94f048c5800524448c9517bc959abc1..f14a0c722a679383941826a6f82124201b2dd69f 100644 (file)
@@ -13,7 +13,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                           //
 //////////////////////////////////////////////////////////////////////
 
@@ -23,6 +23,7 @@ ClassImp(AliITSVertexer)
 AliITSVertexer::AliITSVertexer():AliVertexer(),
 fLadders(), 
 fLadOnLay2(0),
+fComputeMultiplicity(kFALSE),
 fDetTypeRec(NULL),
 fMinTrackletsForPilup(0),
 fIsPileup(0),
@@ -68,6 +69,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 +97,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 +135,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;i<nosingleclus;i++){
     ths[i] = multReco.GetCluster(i)[0];
     phs[i] = multReco.GetCluster(i)[1];
+    labelss[i] = (Int_t)multReco.GetCluster(i)[2];
   }
   Short_t nfcL1 = multReco.GetNFiredChips(0);
   Short_t nfcL2 = multReco.GetNFiredChips(1);
-  fMult = new AliMultiplicity(notracks,tht,phi,dtht,dphi,labels,labelsL2,nosingleclus,ths,phs,nfcL1,nfcL2,fastOrFiredMap);
+  fMult = new AliMultiplicity(notracks,tht,phi,dtht,dphi,labels,labelsL2,nosingleclus,ths,phs,labelss,nfcL1,nfcL2,fastOrFiredMap);
   fMult->SetFiredChipMap(firedChipMap);
   AliITSRecPointContainer* rcont = AliITSRecPointContainer::Instance();
   fMult->SetITSClusters(0,rcont->GetNClustersInLayer(1,itsClusterTree));
@@ -154,6 +158,7 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){
   delete [] phs;
   delete [] labels;
   delete [] labelsL2;
+  delete [] labelss;
 
   return;
 }
@@ -205,7 +210,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);