]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSAnalyze.cxx
Removed global's to comply with Coding Conventions
[u/mrichter/AliRoot.git] / PHOS / AliPHOSAnalyze.cxx
index a43bc68de921d6a78d25c2df37bebca214b2a9f3..f3e5e7ca7d88bb470fb0a93445ee8294a8a6e9ed 100644 (file)
@@ -81,6 +81,21 @@ AliPHOSAnalyze::AliPHOSAnalyze(Text_t * name)
   }
 }
 
+//____________________________________________________________________________
+AliPHOSAnalyze::AliPHOSAnalyze(const AliPHOSAnalyze & ana)
+{
+  // copy ctor
+  ( (AliPHOSAnalyze &)ana ).Copy(*this) ;
+}
+
+//____________________________________________________________________________
+void AliPHOSAnalyze::Copy(TObject & obj)
+{
+  // copy an analysis into an other one
+  TObject::Copy(obj) ;
+  // I do nothing more because the copy is silly but the Code checkers requires one
+}
+
 //____________________________________________________________________________
 AliPHOSAnalyze::~AliPHOSAnalyze()
 {
@@ -132,9 +147,14 @@ void AliPHOSAnalyze::AnalyzeOneEvent(Int_t evt)
     
     // =========== End of reconstruction
 
+    // Deleting fClu, fTrs, fPID et fRec
+    fClu->Delete();
+    fTrs->Delete();
+    fPID->Delete();
+    fRec->Delete();
+
     // =========== Write the root file
 
-    fRootFile->Close() ; 
   
     // =========== Finish
 
@@ -254,37 +274,37 @@ void AliPHOSAnalyze::AnalyzeOneEvent(Int_t evt)
                    cout << "    primary # " << index << " =  " << listofprimaries[index] << endl ;  
                  switch(recparticle->GetType())
                    {
-                   case kGAMMA:
+                   case AliPHOSFastRecParticle::kGAMMA:
                      fhPhotonEnergy->Fill(recparticle->Energy() ) ; 
                      //fhPhotonPositionX->Fill(recpart. ) ;
                      //fhPhotonPositionY->Fill(recpart. ) ;                 
                      cout << "PHOTON" << endl;
                      break;
-                   case kELECTRON:
+                   case  AliPHOSFastRecParticle::kELECTRON:
                      fhElectronEnergy->Fill(recparticle->Energy() ) ; 
                      //fhElectronPositionX->Fill(recpart. ) ;
                      //fhElectronPositionY->Fill(recpart. ) ; 
                      cout << "ELECTRON" << endl;
                      break;
-                   case kNEUTRAL_HA:
+                   case  AliPHOSFastRecParticle::kNEUTRALHA:
                      fhNeutralHadronEnergy->Fill(recparticle->Energy() ) ; 
                      //fhNeutralHadronPositionX->Fill(recpart. ) ;
                      //fhNeutralHadronPositionY->Fill(recpart. ) ; 
                      cout << "NEUTRAl HADRON" << endl;
                      break ;
-                   case kNEUTRAL_EM:
+                   case  AliPHOSFastRecParticle::kNEUTRALEM:
                      fhNeutralEMEnergy->Fill(recparticle->Energy() ) ; 
                      //fhNeutralEMPositionX->Fill(recpart. ) ;
                      //fhNeutralEMPositionY->Fill(recpart. ) ; 
                      //cout << "NEUTRAL EM" << endl;
                      break ;
-                   case kCHARGED_HA:
+                   case  AliPHOSFastRecParticle::kCHARGEDHA:
                      fhChargedHadronEnergy->Fill(recparticle->Energy() ) ; 
                      //fhChargedHadronPositionX->Fill(recpart. ) ;
                      //fhChargedHadronPositionY->Fill(recpart. ) ; 
                      cout << "CHARGED HADRON" << endl;
                      break ;
-                   case kGAMMA_HA:
+                   case  AliPHOSFastRecParticle::kGAMMAHA:
                      fhPhotonHadronEnergy->Fill(recparticle->Energy() ) ; 
                      //fhPhotonHadronPositionX->Fill(recpart. ) ;
                      //fhPhotonHadronPositionY->Fill(recpart. ) ; 
@@ -420,7 +440,7 @@ Bool_t AliPHOSAnalyze::Init(Int_t evt)
     //========== Creates the Reconstructioner  
     
     fRec = new AliPHOSReconstructioner(fClu, fTrs, fPID) ;
-    fRec -> SetDebugReconstruction(kTRUE);     
+    fRec -> SetDebugReconstruction(kFALSE);     
     
     //=========== Connect the various Tree's for evt
     
@@ -468,10 +488,10 @@ void AliPHOSAnalyze::DisplayKineEvent(Int_t evt)
   sprintf(histoname,"Event %d: Incident particles in module %d", evt, module) ; 
 
   Double_t tm, tM, pm, pM ; // min and Max theta and phi covered by module   
-  fGeom->EmcModuleCoverage(module, tm, tM, pm, pM, kDegre) ;
+  fGeom->EmcModuleCoverage(module, tm, tM, pm, pM, AliPHOSGeometry::kDegre) ;
 
   Double_t theta, phi ; 
-  fGeom->EmcXtalCoverage(theta, phi, kDegre) ;
+  fGeom->EmcXtalCoverage(theta, phi, AliPHOSGeometry::kDegre) ;
 
   Int_t tdim = (Int_t)( (tM - tm) / theta ) ; 
   Int_t pdim = (Int_t)( (pM - pm) / phi ) ; 
@@ -557,9 +577,9 @@ void AliPHOSAnalyze::DisplayRecParticles()
       Text_t histoname[80] ; 
       sprintf(histoname,"Event %d: Reconstructed particles in module %d", fEvt, module) ; 
       Double_t tm, tM, pm, pM ; // min and Max theta and phi covered by module   
-      fGeom->EmcModuleCoverage(module, tm, tM, pm, pM, kDegre) ;
+      fGeom->EmcModuleCoverage(module, tm, tM, pm, pM, AliPHOSGeometry::kDegre) ;
       Double_t theta, phi ; 
-      fGeom->EmcXtalCoverage(theta, phi, kDegre) ;
+      fGeom->EmcXtalCoverage(theta, phi, AliPHOSGeometry::kDegre) ;
       Int_t tdim = (Int_t)( (tM - tm) / theta ) ; 
       Int_t pdim = (Int_t)( (pM - pm) / phi ) ; 
       tm -= theta ; 
@@ -571,7 +591,7 @@ void AliPHOSAnalyze::DisplayRecParticles()
       Text_t canvasname[80] ; 
       sprintf(canvasname, "Reconstructed particles in PHOSmodule # %d", module) ;
       TCanvas * rparticlecanvas = new TCanvas("RparticleCanvas", canvasname, 650, 500) ; 
-      RecParticlesList * rpl = fPHOS->RecParticles() ; 
+      AliPHOSRecParticle::RecParticlesList * rpl = fPHOS->RecParticles() ; 
       Int_t nRecParticles = rpl->GetEntries() ; 
       Int_t nRecParticlesInModule = 0 ; 
       TIter nextRecPart(rpl) ; 
@@ -821,7 +841,7 @@ void AliPHOSAnalyze::DisplayTrackSegments()
       TCanvas * trackcanvas = new TCanvas("TrackSegmentCanvas", canvasname, 650, 500) ; 
       histotrack->Draw() ; 
 
-      TrackSegmentsList * trsegl = fPHOS->TrackSegments() ;
+      AliPHOSTrackSegment::TrackSegmentsList * trsegl = fPHOS->TrackSegments() ;
       AliPHOSTrackSegment * trseg ;
  
       Int_t nTrackSegments = trsegl->GetEntries() ;