]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSVertexer.cxx
Add Reaction Plane
[u/mrichter/AliRoot.git] / ITS / AliITSVertexer.cxx
index 949a61127bc8748c5473aaf50b16c3dd82d37841..c90cf4aa06ae26543cfd437160786903627df447 100644 (file)
@@ -5,6 +5,7 @@
 #include "AliITSLoader.h"
 #include "AliITSMultReconstructor.h"
 #include "AliITSRecPointContainer.h"
+#include "AliRunLoader.h"
 
 const Float_t AliITSVertexer::fgkPipeRadius = 3.0;
 
@@ -21,7 +22,7 @@ ClassImp(AliITSVertexer)
 
 //______________________________________________________________________
 AliITSVertexer::AliITSVertexer():AliVertexer(),
-fLadders(), 
+fLadders(NULL), 
 fLadOnLay2(0),
 fComputeMultiplicity(kFALSE),
 fDetTypeRec(NULL),
@@ -139,7 +140,7 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){
   for(Int_t i=0;i<nosingleclus;i++){
     ths[i] = multReco.GetCluster(i)[0];
     phs[i] = multReco.GetCluster(i)[1];
-    labelss[i] = multReco.GetCluster(i)[2];
+    labelss[i] = (Int_t)multReco.GetCluster(i)[2];
   }
   Short_t nfcL1 = multReco.GetNFiredChips(0);
   Short_t nfcL2 = multReco.GetNFiredChips(1);
@@ -167,6 +168,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;
@@ -202,7 +204,6 @@ void AliITSVertexer::SetLaddersOnLayer2(Int_t ladwid){
   }
 }
 
-#include "AliRunLoader.h"
 
 //______________________________________________________________________
 void AliITSVertexer::Init(TString filename){
@@ -210,7 +211,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);