From b7e1ac0151837110d982912bf12f97b120b3b47b Mon Sep 17 00:00:00 2001 From: snelling Date: Fri, 15 Aug 2008 14:51:36 +0000 Subject: [PATCH] Fill fix --- PWG2/FLOW/AliFlowEventSimpleMaker.cxx | 74 ++++++++++++--------------- 1 file changed, 33 insertions(+), 41 deletions(-) diff --git a/PWG2/FLOW/AliFlowEventSimpleMaker.cxx b/PWG2/FLOW/AliFlowEventSimpleMaker.cxx index b77415888c9..34b7e08c15c 100644 --- a/PWG2/FLOW/AliFlowEventSimpleMaker.cxx +++ b/PWG2/FLOW/AliFlowEventSimpleMaker.cxx @@ -276,12 +276,11 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput, Ali AliFlowEventSimple* pEvent = new AliFlowEventSimple(10); - //Int_t iN = 256; //multiplicity for chi=1 - Int_t iN = iNumberOfInputTracks; - Int_t iGoodTracks = 0; - Int_t itrkN = 0; - Int_t iSelParticlesDiff = 0; - Int_t iSelParticlesInt = 0; + Int_t iN = iNumberOfInputTracks; //maximum number of tracks in AliFlowEventSimple + Int_t iGoodTracks = 0; //number of good tracks + Int_t itrkN = 0; //track counter + Int_t iSelParticlesDiff = 0; //number of tracks selected for Diff + Int_t iSelParticlesInt = 0; //number of tracks selected for Int //normal loop @@ -391,13 +390,11 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, Al AliFlowEventSimple* pEvent = new AliFlowEventSimple(10); - //Int_t iN = 256; //multiplicity for chi=1 - Int_t iN = iNumberOfInputTracks; - Int_t iGoodTracks = 0; - Int_t itrkN = 0; - Int_t iSelParticlesDiff = 0; - Int_t iSelParticlesInt = 0; - + Int_t iN = iNumberOfInputTracks; //maximum number of tracks in AliFlowEventSimple + Int_t iGoodTracks = 0; //number of good tracks + Int_t itrkN = 0; //track counter + Int_t iSelParticlesDiff = 0; //number of tracks selected for Diff + Int_t iSelParticlesInt = 0; //number of tracks selected for Int //normal loop while (iGoodTracks < iN && itrkN < iNumberOfInputTracks) { @@ -409,10 +406,12 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, Al pTrack->SetPhi(pParticle->Phi() ); //check if pParticle passes the cuts - if (intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle)) { + if (intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) && + intCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) { pTrack->SetForIntegratedFlow(kTRUE); } - if (diffCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) { + if (diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) && + diffCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) { pTrack->SetForDifferentialFlow(kTRUE);} //check if any bits are set @@ -498,15 +497,13 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput, A cerr<<"anInput->GetNumberOfTracks() = "<GetTrack(itrkN); //get input particle @@ -517,9 +514,11 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput, A pTrack->SetPhi(pParticle->Phi() ); //check if pParticle passes the cuts - if (intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle)) { //check these cuts!! + if (intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) && + intCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) { pTrack->SetForIntegratedFlow(kTRUE); } - if (diffCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) { + if (diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) && + diffCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) { pTrack->SetForDifferentialFlow(kTRUE);} //check if any bits are set @@ -630,14 +629,7 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, A { //fills the event with tracks from the ESD and kinematics from the MC info via the track label - /////////////////////////////////////////////////// - // - // WARNING: this method is not correct yet! - // The PID cut has to be implemented correctly - // 24/06/08 - // - ////////////////////////////////////////////////// - + if (!(anOption ==0 || anOption ==1)) { cout<<"WRONG OPTION IN AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, Int_t anOption)"<GetTrack(itrkN); //get input particle @@ -684,10 +676,10 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, A if(anOption == 0) { //cout<<"take the PID from the MC & the kinematics from the ESD"<CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle,"mcGenCuts1") && - intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle)) { //????which cuts to use on which particle + intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle)) { pTrack->SetForIntegratedFlow(kTRUE); } if (diffCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle,"mcGenCuts2") && - diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle)) { //????which cuts to use on which particle + diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle)) { pTrack->SetForDifferentialFlow(kTRUE);} } else if (anOption == 1) { -- 2.43.0