From 4a1a86a547303db207149b17e828f1ec6bba96e0 Mon Sep 17 00:00:00 2001 From: snelling Date: Tue, 16 Jun 2009 15:21:59 +0000 Subject: [PATCH] reaction plane back for ESD --- .../AliFlowTasks/AliFlowEventSimpleMaker.cxx | 44 ++++++++++--------- PWG2/FLOW/macros/runFlowTask.C | 9 +++- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/PWG2/FLOW/AliFlowTasks/AliFlowEventSimpleMaker.cxx b/PWG2/FLOW/AliFlowTasks/AliFlowEventSimpleMaker.cxx index 3566fd56e4e..ba2fa502cf5 100644 --- a/PWG2/FLOW/AliFlowTasks/AliFlowEventSimpleMaker.cxx +++ b/PWG2/FLOW/AliFlowTasks/AliFlowEventSimpleMaker.cxx @@ -400,12 +400,12 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, Al Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ; AliFlowEventSimple* pEvent = new AliFlowEventSimple(10); - + Int_t iGoodTracks = 0; //number of good tracks Int_t itrkN = 0; //track counter Int_t iSelParticlesRP = 0; //number of tracks selected for Int Int_t iSelParticlesPOI = 0; //number of tracks selected for Diff - + //normal loop while (itrkN < iNumberOfInputTracks) { AliESDtrack* pParticle = anInput->GetTrack(itrkN); //get input particle @@ -421,25 +421,27 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, Al } if (bPassedRPFlowCuts || bPassedPOIFlowCuts) { - //make new AliFLowTrackSimple - AliFlowTrackSimple* pTrack = new AliFlowTrackSimple(); - pTrack->SetPt(pParticle->Pt() ); - pTrack->SetEta(pParticle->Eta() ); - pTrack->SetPhi(pParticle->Phi() ); + for(Int_t d=0;dSetPt(pParticle->Pt() ); + pTrack->SetEta(pParticle->Eta() ); + pTrack->SetPhi(pParticle->Phi()-fEllipticFlowValue*TMath::Sin(2*(pParticle->Phi()-fMCReactionPlaneAngle)) ); - //marking the particles used for int. flow: - if(bPassedRPFlowCuts) { - pTrack->SetForRPSelection(kTRUE); - iSelParticlesRP++; - } - //marking the particles used for diff. flow: - if(bPassedPOIFlowCuts) { - pTrack->SetForPOISelection(kTRUE); - iSelParticlesPOI++; - } - //adding a particles which were used either for int. or diff. flow to the list - pEvent->TrackCollection()->Add(pTrack); - iGoodTracks++; + //marking the particles used for int. flow: + if(bPassedRPFlowCuts && iSelParticlesRP < fMultiplicityOfEvent) { + pTrack->SetForRPSelection(kTRUE); + iSelParticlesRP++; + } + //marking the particles used for diff. flow: + if(bPassedPOIFlowCuts && iGoodTracks%fNoOfLoops==0) { + pTrack->SetForPOISelection(kTRUE); + iSelParticlesPOI++; + } + //adding a particles which were used either for int. or diff. flow to the list + pEvent->TrackCollection()->Add(pTrack); + iGoodTracks++; + }//end of for(Int_t d=0;dSetEventNSelTracksRP(iSelParticlesRP); pEvent->SetNumberOfTracks(iGoodTracks); pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle); - + if ( (++fCount % 100) == 0) { if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<< fMCReactionPlaneAngle << endl; else cout<<" MC Reaction Plane Angle = unknown "<< endl; diff --git a/PWG2/FLOW/macros/runFlowTask.C b/PWG2/FLOW/macros/runFlowTask.C index f445bdb21b5..437a182a474 100644 --- a/PWG2/FLOW/macros/runFlowTask.C +++ b/PWG2/FLOW/macros/runFlowTask.C @@ -53,11 +53,17 @@ void runFlowTask(Int_t mode=mLocal, Int_t nRuns = 100, if (type == "ESD"){ AliVEventHandler* esdH = new AliESDInputHandler; mgr->SetInputEventHandler(esdH); + + AliMCEventHandler *mc = new AliMCEventHandler(); + mgr->SetMCtruthEventHandler(mc); } if (type == "AOD"){ AliVEventHandler* aodH = new AliAODInputHandler; mgr->SetInputEventHandler(aodH); + + AliMCEventHandler *mc = new AliMCEventHandler(); + mgr->SetMCtruthEventHandler(mc); } if (type == "MC" || type == "ESDMC0" || type == "ESDMC1"){ @@ -65,7 +71,8 @@ void runFlowTask(Int_t mode=mLocal, Int_t nRuns = 100, mgr->SetInputEventHandler(esdH); AliMCEventHandler *mc = new AliMCEventHandler(); - mgr->SetMCtruthEventHandler(mc); } + mgr->SetMCtruthEventHandler(mc); + } //____________________________________________// -- 2.39.3