Updated for MC running and fixes to memory leaks
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 31 May 2010 05:54:53 +0000 (05:54 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 31 May 2010 05:54:53 +0000 (05:54 +0000)
PWG4/JetTasks/AliPWG4HighPtQATPConly.cxx
PWG4/JetTasks/AliPWG4HighPtSpectra.cxx
PWG4/JetTasks/AliPWG4HighPtSpectra.h

index 0bcbc054f57e85d7465696934f648c571f499c31..7bdcb98331312fe3e9784805ed34ae9e4cbebb0f 100644 (file)
@@ -354,7 +354,6 @@ void AliPWG4HighPtQATPConly::CreateOutputObjects() {
   OpenFile(3);
   fHistListCosmics = new TList();
 
-
   Int_t fgkNPhiBins=18;
   Float_t kMinPhi = 0.;
   Float_t kMaxPhi = 2.*TMath::Pi();
@@ -906,6 +905,21 @@ void AliPWG4HighPtQATPConly::CreateOutputObjects() {
 
   TH1::AddDirectory(oldStatus);   
 
+  if(binsPhi) delete [] binsPhi;
+  if(binsChi2PerClus) delete [] binsChi2PerClus;
+  if(binsPt) delete [] binsPt;
+  if(binsResPt) delete [] binsResPt;
+  if(binsNPointTPC) delete [] binsNPointTPC;
+  if(binsNPointTPCS) delete [] binsNPointTPCS;
+  if(binsDCAR) delete [] binsDCAR;
+  if(binsDCAZ) delete [] binsDCAZ;
+  if(binsNPointITS) delete [] binsNPointITS;
+  if(binsNSigmaToVertex) delete [] binsNSigmaToVertex;
+  if(binsChi2C) delete [] binsChi2C;
+  if(binsEta) delete [] binsEta;
+  if(binsRel1PtUncertainty) delete [] binsRel1PtUncertainty;
+
+
 }
 //________________________________________________________________________
 void AliPWG4HighPtQATPConly::Exec(Option_t *) {  
index 4f078b8ef984e61ee43ac8dc2fc20e40c4d2f361..ce3063fba465ebddaa603b25c2ab3e893ca6899b 100644 (file)
@@ -362,10 +362,12 @@ void AliPWG4HighPtSpectra::Exec(Option_t *)
        int counter;
        Float_t trackLengthTPC = 0.;
        if(mcPart->Charge()>0. && fCFManagerPos->CheckParticleCuts(3,mcPart)) {
+         fCFManagerPos->GetParticleContainer()->Fill(containerInputMC,kStepMCAcceptance) ;
          trackLengthTPC = mcPart->GetTPCTrackLength(fESD->GetMagneticField(),0.1,counter,3.0);
          if(trackLengthTPC > (float)fTrackCuts->GetMinNClusterTPC()) fCFManagerPos->GetParticleContainer()->Fill(containerInputMC,kStepMCtrackable) ;
        }
        if(mcPart->Charge()<0. && fCFManagerNeg->CheckParticleCuts(3,mcPart)) {
+         fCFManagerNeg->GetParticleContainer()->Fill(containerInputMC,kStepMCAcceptance) ;
          trackLengthTPC = mcPart->GetTPCTrackLength(fESD->GetMagneticField(),0.1,counter,3.0);
          if(trackLengthTPC > (float)fTrackCuts->GetMinNClusterTPC()) fCFManagerNeg->GetParticleContainer()->Fill(containerInputMC,kStepMCtrackable) ;
        }
index 36cd12ff1e75c91768817f1daf278cfa58bee3bd..2d7f8e317198da16c7bac359f0753d95a1d5df5a 100644 (file)
@@ -39,7 +39,8 @@ class AliPWG4HighPtSpectra : public AliAnalysisTask {
     kStepReconstructedTPCOnly = 1,
     kStepSecondaries          = 2,
     kStepMCtrackable          = 3,
-    kStepReconstructedMC      = 4
+    kStepReconstructedMC      = 4,
+    kStepMCAcceptance         = 5
   };
 
   AliPWG4HighPtSpectra();