size of mixed event buffer as parameter
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Nov 2011 11:30:35 +0000 (11:30 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Nov 2011 11:30:35 +0000 (11:30 +0000)
PWG4/JetTasks/AliAnalysisTaskPhiCorrelations.cxx
PWG4/JetTasks/AliAnalysisTaskPhiCorrelations.h
PWG4/JetTasks/AliPhiCorrelationsQATask.cxx

index b8d79d6..bca14c4 100644 (file)
@@ -83,6 +83,7 @@ fDebug(0),
 fMode(0),
 fReduceMemoryFootprint(kFALSE),
 fFillMixed(kTRUE),
+fMixingTracks(50000),
 fCompareCentralities(kFALSE),
 fTwoTrackEfficiencyStudy(kFALSE),
 fUseVtxAxis(kFALSE),
@@ -221,7 +222,7 @@ void  AliAnalysisTaskPhiCorrelations::CreateOutputObjects()
 
   // event mixing
   //  Int_t trackDepth = 100; // Require e.g. 20 5-track events, or 2 50-track events
-  Int_t trackDepth = 50000; 
+  Int_t trackDepth = fMixingTracks; 
   Int_t poolsize   = 1000;  // Maximum number of events, ignored in the present implemented of AliEventPool
   
   Int_t nCentralityBins  = fHistos->GetUEHist(2)->GetEventHist()->GetNBins(1);
@@ -286,6 +287,7 @@ void  AliAnalysisTaskPhiCorrelations::AddSettingsTree()
   settingsTree->Branch("fSelectCharge", &fSelectCharge,"SelectCharge/I");
   settingsTree->Branch("fFillpT", &fFillpT,"FillpT/O");
   settingsTree->Branch("fkTrackingEfficiency", "TH1D", &fkTrackingEfficiency);
+  settingsTree->Branch("fMixingTracks", &fMixingTracks,"MixingTracks/I");
   settingsTree->Fill();
   fListOfHistos->Add(settingsTree);
 }  
@@ -591,7 +593,7 @@ void  AliAnalysisTaskPhiCorrelations::AnalyseDataMode()
     
     //pool->SetDebug(1);
       
-    if (pool->IsReady() || pool->NTracksInPool() > 1000) 
+    if (pool->IsReady() || pool->NTracksInPool() > fMixingTracks / 10) 
     {
       
       Int_t nMix = pool->GetCurrentNEvents();
index e64d16f..e3c9639 100644 (file)
@@ -65,6 +65,7 @@ class  AliAnalysisTaskPhiCorrelations : public AliAnalysisTask
     virtual     void    SetMode(Int_t mode)           { fMode  = mode;  }
     virtual     void    SetReduceMemoryFootprint(Bool_t flag) { fReduceMemoryFootprint = flag; }
     virtual    void    SetEventMixing(Bool_t flag) { fFillMixed = flag; }
+    virtual    void    SetMixingTracks(Int_t tracks) { fMixingTracks = tracks; }
     virtual    void    SetCompareCentralities(Bool_t flag) { fCompareCentralities = flag; }
     virtual    void    SetTwoTrackEfficiencyStudy(Bool_t flag) { fTwoTrackEfficiencyStudy = flag; }
     virtual    void    SetUseVtxAxis(Bool_t flag) { fUseVtxAxis = flag; }
@@ -105,6 +106,7 @@ class  AliAnalysisTaskPhiCorrelations : public AliAnalysisTask
                                          //  fMode = 1: corrections analysis   
     Bool_t              fReduceMemoryFootprint; // reduce memory consumption by writing less debug histograms
     Bool_t             fFillMixed;             // enable event mixing (default: ON)
+    Int_t              fMixingTracks;          // size of track buffer for event mixing
     Bool_t             fCompareCentralities;   // use the z vtx axis for a centrality comparison
     Bool_t             fTwoTrackEfficiencyStudy; // two-track efficiency study on
     Bool_t             fUseVtxAxis;              // use z vtx as axis (needs 7 times more memory!)
@@ -143,7 +145,7 @@ class  AliAnalysisTaskPhiCorrelations : public AliAnalysisTask
     Int_t fSelectCharge;           // (un)like sign selection when building correlations: 0: no selection; 1: unlike sign; 2: like sign
     Bool_t fFillpT;                // fill sum pT instead of number density
     
-    ClassDef( AliAnalysisTaskPhiCorrelations, 2); // Analysis task for Underlying Event analysis w.r.t. leading track
+    ClassDef( AliAnalysisTaskPhiCorrelations, 3); // Analysis task for Underlying Event analysis w.r.t. leading track
   };
 
 class AliDPhiBasicParticle : public AliVParticle
index 019be5b..85d9462 100644 (file)
@@ -263,8 +263,16 @@ void AliPhiCorrelationsQATask::Terminate(Option_t *)
     return;
   }
   
+  fGlobalTracks = dynamic_cast<AliESDtrackCuts*> (fOutput->FindObject("global_cuts"));
+  if (!fGlobalTracks)
+  {
+    Printf("ERROR: fGlobalTracks not available");
+    return;
+  }
+  
   TFile* file = TFile::Open("track_cuts.root", "RECREATE");
   fEsdTrackCuts->SaveHistograms();
   fEsdTrackCuts2->SaveHistograms();
+  fGlobalTracks->SaveHistograms();
   file->Close();
 }