reaction plane back for ESD
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 16 Jun 2009 15:21:59 +0000 (15:21 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 16 Jun 2009 15:21:59 +0000 (15:21 +0000)
PWG2/FLOW/AliFlowTasks/AliFlowEventSimpleMaker.cxx
PWG2/FLOW/macros/runFlowTask.C

index 3566fd5..ba2fa50 100644 (file)
@@ -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;d<fNoOfLoops;d++) {
+        //make new AliFLowTrackSimple
+        AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
+        pTrack->SetPt(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;d<iLoops;d++)
     }//end of if(bPassedIntFlowCuts || bPassedDiffFlowCuts) 
     itrkN++; 
     bPassedRPFlowCuts  = kFALSE;
@@ -449,7 +451,7 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, Al
   pEvent->SetEventNSelTracksRP(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;
index f445bdb..437a182 100644 (file)
@@ -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); 
+  }
   
   
   //____________________________________________//