]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALReconstructor.cxx
Fix for copy/paste error
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALReconstructor.cxx
index 82be53b17aae1299bc26feb9c069a1f50cf509c2..412ebf458c8c9a26f8c4a48bdb8f2be87556b3ef 100644 (file)
@@ -28,6 +28,7 @@
 // --- AliRoot header files ---
 #include "AliEMCALReconstructor.h"
 
+#include "AliCodeTimer.h"
 #include "AliESDEvent.h"
 #include "AliESDCaloCluster.h"
 #include "AliESDCaloCells.h"
@@ -71,6 +72,8 @@ AliEMCALReconstructor::AliEMCALReconstructor(const AliEMCALReconstructor & rec)
 AliEMCALReconstructor::~AliEMCALReconstructor()
 {
   // dtor
+
+  AliCodeTimer::Instance()->Print();
 } 
 
 //____________________________________________________________________________
@@ -100,6 +103,8 @@ void AliEMCALReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree)
   // the global tracking.
   // Works on the current event.
 
+  AliCodeTimerAuto("")
+
   InitRecParam();
   AliEMCALClusterizerv1 clu;
   clu.SetInput(digitsTree);
@@ -119,6 +124,9 @@ void AliEMCALReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digits
   // EMCAL digits.
   // Works on a single-event basis
 
+
+  AliCodeTimerAuto("")
+
   rawReader->Reset() ; 
 
   TClonesArray *digitsArr = new TClonesArray("AliEMCALDigit",100);
@@ -157,7 +165,8 @@ void AliEMCALReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
   //######################################################
   //#########Calculate trigger and set trigger info###########
   //######################################################
+
+  AliCodeTimerStart(Form("JLK trigger info"));
   AliEMCALTrigger tr ;
   //   tr.SetPatchSize(1);//create 4x4 patches
   tr.Trigger();
@@ -208,11 +217,15 @@ void AliEMCALReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
 
   esd->AddEMCALTriggerPosition(triggerPosition);
   esd->AddEMCALTriggerAmplitudes(triggerAmplitudes);
-  
+
+  AliCodeTimerStop(Form("JLK trigger info"));
+
   //########################################
   //##############Fill CaloCells###############
   //########################################
-  
+
+  AliCodeTimerStart(Form("JLK fill calocells"));
+
   TClonesArray *digits = new TClonesArray("AliEMCALDigit",1000);
   TBranch *branchdig = digitsTree->GetBranch("EMCAL");
   if (!branchdig) { 
@@ -237,6 +250,8 @@ void AliEMCALReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
   emcCells.SetNumberOfCells(idignew);
   emcCells.Sort();
 
+  AliCodeTimerStop(Form("JLK fill calocells"));
+
   //------------------------------------------------------------
   //-----------------CLUSTERS-----------------------------
   //------------------------------------------------------------
@@ -254,6 +269,8 @@ void AliEMCALReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
   //######################################################
   //Fill list of integers, each one is index of track to which the cluster belongs.
 
+  AliCodeTimerStart(Form("JLK track matching"));
+
   // step 1 - initialize array of matched track indexes
   Int_t *matchedTrack = new Int_t[nClusters];
   for (Int_t iclus = 0; iclus < nClusters; iclus++)
@@ -268,10 +285,14 @@ void AliEMCALReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
     if(iemcalMatch >= 0) matchedTrack[iemcalMatch] = itrack;
   } 
 
+  AliCodeTimerStop(Form("JLK track matching"));
+
   //########################################
   //##############Fill CaloClusters############
   //########################################
 
+  AliCodeTimerStart(Form("JLK fill caloclusters"));
+
   esd->SetNumberOfEMCALClusters(nClusters);
   for (Int_t iClust = 0 ; iClust < nClusters ; iClust++) {
     const AliEMCALRecPoint * clust = (const AliEMCALRecPoint*)clusters->At(iClust);
@@ -367,6 +388,8 @@ void AliEMCALReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
    pid->SetReconstructor(kTRUE);
    pid->RunPID(esd);
    delete pid;
+
+  AliCodeTimerStop(Form("JLK fill caloclusters"));
   
 }