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 0bcbc05..7bdcb98 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 4f078b8..ce3063f 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 36cd12f..2d7f8e3 100644 (file)
@@ -39,7 +39,8 @@ class AliPWG4HighPtSpectra : public AliAnalysisTask {
     kStepReconstructedTPCOnly = 1,
     kStepSecondaries          = 2,
     kStepMCtrackable          = 3,
-    kStepReconstructedMC      = 4
+    kStepReconstructedMC      = 4,
+    kStepMCAcceptance         = 5
   };
 
   AliPWG4HighPtSpectra();