From 6006f097a1d85b30bbc07d6c5720ae36b3440639 Mon Sep 17 00:00:00 2001 From: miweber Date: Wed, 2 May 2012 14:02:58 +0000 Subject: [PATCH] Avoid double counting in Triggered BF analysis (2nd particle loop) --- PWGCF/EBYE/BalanceFunctions/AliBalanceTriggered.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PWGCF/EBYE/BalanceFunctions/AliBalanceTriggered.cxx b/PWGCF/EBYE/BalanceFunctions/AliBalanceTriggered.cxx index 68dedf04f0a..da9a852df0e 100644 --- a/PWGCF/EBYE/BalanceFunctions/AliBalanceTriggered.cxx +++ b/PWGCF/EBYE/BalanceFunctions/AliBalanceTriggered.cxx @@ -274,10 +274,12 @@ void AliBalanceTriggered::FillBalance(Float_t fCentrality,vector **cha if(charge > 0) fHistP->Fill(trackVarsSingle,0,1.); else fHistN->Fill(trackVarsSingle,0,1.); - // 2nd particle loop (now over all particles except the same!) - for(Int_t j = 0; j < gNtrack; j++) { + // 2nd particle loop (only for j < i for non double counting in the same pT region) + // --> SAME pT region for trigger and assoc: NO double counting with this + // --> DIFF pT region for trigger and assoc: Missing assoc. particles with j > i to a trigger i + // --> can be handled afterwards by using assoc. as trigger as well ?! - if( j == i ) continue; + for(Int_t j = 0; j < i; j++) { Short_t charge2 = (Short_t) chargeVector[0]->at(j); trackVarsPair[0] = chargeVector[2]->at(i) - chargeVector[2]->at(j) ; //delta eta @@ -358,6 +360,7 @@ TH1D* AliBalanceTriggered::GetBalanceFunctionHistogram1D(Int_t var, Double_t pTM hTemp2->Add(hTemp4,-1.); hTemp2->Scale(1./hTemp6->GetEntries()); gHistBalanceFunctionHistogram->Add(hTemp1,hTemp2,1.,1.); + gHistBalanceFunctionHistogram->Scale(0.5/1.); } return gHistBalanceFunctionHistogram; -- 2.43.0