]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSVertexer.cxx
Eff C++ warning removal (Marian)
[u/mrichter/AliRoot.git] / ITS / AliITSVertexer.cxx
index 5f1d5b75972faf99a82d83cc55cfcad657777674..724e1a45432aeb916e457e6367924d39473d6feb 100644 (file)
@@ -1,5 +1,5 @@
 #include <AliESDVertex.h>
-#include "AliITSgeom.h"
+#include "AliITSgeomTGeo.h"
 #include "AliITSVertexer.h"
 #include "AliRunLoader.h"
 #include "AliITSLoader.h"
@@ -46,7 +46,7 @@ fLadOnLay2(0)
   AliITSLoader* itsLoader =  (AliITSLoader*) rl->GetLoader("ITSLoader");
   if(!filename.Contains("default"))itsLoader->SetVerticesFileName(filename);
   if(!filename.Contains("null"))itsLoader->LoadVertices("recreate");
-  itsLoader->LoadRecPoints();
+
   //  Int_t lst;
   SetLastEvent(rl->GetNumberOfEvents()-1);
   /*
@@ -59,7 +59,10 @@ fLadOnLay2(0)
 }
 
 //______________________________________________________________________
-AliITSVertexer::AliITSVertexer(const AliITSVertexer &vtxr) : AliVertexer(vtxr) {
+AliITSVertexer::AliITSVertexer(const AliITSVertexer &vtxr) : AliVertexer(vtxr),
+fLadders(), 
+fLadOnLay2(0) 
+{
   // Copy constructor
   // Copies are not allowed. The method is protected to avoid misuse.
   Error("AliITSVertexer","Copy constructor not allowed\n");
@@ -94,7 +97,6 @@ void AliITSVertexer::FindMultiplicity(Int_t evnumber){
   AliITSMultReconstructor* multReco = new AliITSMultReconstructor();
   AliRunLoader *rl =AliRunLoader::GetRunLoader();
   AliITSLoader* itsLoader = (AliITSLoader*)rl->GetLoader("ITSLoader");
-  multReco->SetGeometry(itsLoader->GetITSgeom());
   itsLoader->LoadRecPoints();
   rl->GetEvent(evnumber);
   TTree* itsClusterTree = itsLoader->TreeR();
@@ -132,6 +134,7 @@ void AliITSVertexer::FindMultiplicity(Int_t evnumber){
   delete [] dphi;
   delete [] ths;
   delete [] phs;
+  delete [] labels;
   itsLoader->UnloadRecPoints();
   delete multReco;
   return;
@@ -142,29 +145,29 @@ void AliITSVertexer::SetLaddersOnLayer2(Int_t ladwid){
   // Calculates the array of ladders on layer 2 to be used with a 
   // given ladder on layer 1
   fLadOnLay2=ladwid;
-  AliRunLoader *rl =AliRunLoader::GetRunLoader();
-  AliITSLoader* itsLoader = (AliITSLoader*)rl->GetLoader("ITSLoader");
-  AliITSgeom* geom = itsLoader->GetITSgeom();
-  Int_t ladtot1=geom->GetNladders(1);
+  //  AliRunLoader *rl =AliRunLoader::GetRunLoader();
+  //  AliITSLoader* itsLoader = (AliITSLoader*)rl->GetLoader("ITSLoader");
+  //  AliITSgeom* geom = itsLoader->GetITSgeom();
+  Int_t ladtot1=AliITSgeomTGeo::GetNLadders(1);
   if(fLadders) delete [] fLadders;
   fLadders=new UShort_t[ladtot1];
 
 
   Double_t pos1[3],pos2[3];
-  Int_t mod1=geom->GetModuleIndex(2,1,1);
-  geom->GetTrans(mod1,pos1);  // position of the module in the MRS 
+  Int_t mod1=AliITSgeomTGeo::GetModuleIndex(2,1,1);
+  AliITSgeomTGeo::GetTranslation(mod1,pos1);  // position of the module in the MRS 
   Double_t phi0=TMath::ATan2(pos1[1],pos1[0]);
   if(phi0<0) phi0+=2*TMath::Pi();
-  Int_t mod2=geom->GetModuleIndex(2,2,1);
-  geom->GetTrans(mod2,pos2);
+  Int_t mod2=AliITSgeomTGeo::GetModuleIndex(2,2,1);
+  AliITSgeomTGeo::GetTranslation(mod2,pos2);
   Double_t phi2=TMath::ATan2(pos2[1],pos2[0]); 
   if(phi2<0) phi2+=2*TMath::Pi();
   Double_t deltaPhi= phi0-phi2; // phi width of a layer2 module
 
   for(Int_t i= 0; i<ladtot1;i++){
-    Int_t modlad= geom->GetModuleIndex(1,i+1,1);
+    Int_t modlad= AliITSgeomTGeo::GetModuleIndex(1,i+1,1);
     Double_t posmod[3];
-    geom->GetTrans(modlad,posmod);
+    AliITSgeomTGeo::GetTranslation(modlad,posmod);
     Double_t phimod=TMath::ATan2(posmod[1],posmod[0]); 
     if(phimod<0) phimod+=2*TMath::Pi();
     Double_t phi1= phimod+deltaPhi*double(fLadOnLay2);