passing the mc reaction plane to the floweventsimple
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Feb 2009 10:54:40 +0000 (10:54 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Feb 2009 10:54:40 +0000 (10:54 +0000)
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx
PWG2/FLOW/AliFlowTasks/AliFlowEventSimpleMaker.cxx
PWG2/FLOW/AliFlowTasks/AliFlowEventSimpleMaker.h

index f4d7218..480630c 100644 (file)
@@ -208,13 +208,17 @@ void AliAnalysisTaskFlowEvent::Exec(Option_t *)
          AliGenHijingEventHeader *hdh = dynamic_cast<AliGenHijingEventHeader *> (lhd->At(0)); 
          if (hdh) {
            fRP = hdh->ReactionPlaneAngle();
-           cout<<"The reactionPlane is: "<< fRP <<endl;
+           //      cout<<"The reactionPlane is: "<< fRP <<endl;
          }
        }
       }
     }
   }
-        
+
+  // set the value of the monte carlo event plane for the flow event
+  fEventMaker->SetMCReactionPlaneAngle(fRP);
+
+  // Fill the FlowEventSimple for MC input          
   if (fAnalysisType == "MC") {
 
     // Process MC truth, therefore we receive the AliAnalysisManager and ask it for the AliMCEventHandler
@@ -233,6 +237,7 @@ void AliAnalysisTaskFlowEvent::Exec(Option_t *)
     // here we have the fEvent and want to make it available as an output stream
     // so no delete fEvent;
   }
+  // Fill the FlowEventSimple for ESD input  
   else if (fAnalysisType == "ESD") {
     if (!fESD) {
       Printf("ERROR: fESD not available");
@@ -243,6 +248,7 @@ void AliAnalysisTaskFlowEvent::Exec(Option_t *)
     // analysis 
     fEvent = fEventMaker->FillTracks(fESD,fCFManager1,fCFManager2);
   }
+  // Fill the FlowEventSimple for ESD input combined with MC info  
   else if (fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1" ) {
     if (!fESD) {
       Printf("ERROR: fESD not available");
@@ -265,7 +271,7 @@ void AliAnalysisTaskFlowEvent::Exec(Option_t *)
       fEvent = fEventMaker->FillTracks(fESD, mcEvent, fCFManager1, fCFManager2, 1); //0 = kine from ESD, 1 = kine from MC
     }
   }
-  
+  // Fill the FlowEventSimple for AOD input  
   else if (fAnalysisType == "AOD") {
     if (!fAOD) {
       Printf("ERROR: fAOD not available");
index c81823f..adf7e3a 100644 (file)
@@ -40,7 +40,8 @@
 
 ClassImp(AliFlowEventSimpleMaker)
 //----------------------------------------------------------------------- 
-AliFlowEventSimpleMaker::AliFlowEventSimpleMaker()
+AliFlowEventSimpleMaker::AliFlowEventSimpleMaker() :
+   fMCReactionPlaneAngle(0.)
 {
   //constructor
 }
@@ -144,8 +145,10 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(TTree* anInput, AliFlowT
   
   pEvent->SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);//tracks used either for int. or for diff. flow
+  pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
 
-  cout<<" iGoodTracks = "<<iGoodTracks<<endl;
+  cout<<" iGoodTracks = "<< iGoodTracks << endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
 
@@ -223,6 +226,10 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput)
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
+
+  pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
@@ -293,6 +300,10 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput, Ali
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent-> SetNumberOfTracks(iGoodTracks);
+
+  pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
@@ -351,6 +362,10 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput)
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
+
+  pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
@@ -416,6 +431,10 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, Al
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
+
+  pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
@@ -469,6 +488,10 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput)
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
+
+  pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
@@ -532,6 +555,10 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput,  A
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
+
+  pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
@@ -613,6 +640,10 @@ AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, A
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
+
+  pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
@@ -716,6 +747,10 @@ AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, A
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
+
+  pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
index ed721dd..8013af3 100644 (file)
@@ -17,7 +17,7 @@ class AliAODEvent;
 
 // AliFlowEventSimpleMaker:
 // Class to fill the AliFlowEventSimple with AliFlowTrackSimple objects
-// author: N. van der Kolk (kolk@nikhef.nl)
+// author: N. van der Kolk (kolk@nikhef.nl),  Ante Bilandzic (anteb@nikhef.nl),  Raimond Snellings (Raimond.Snellings@nikhef.nl) 
           
 class AliFlowEventSimpleMaker {
 
@@ -25,7 +25,8 @@ class AliFlowEventSimpleMaker {
 
   AliFlowEventSimpleMaker();             //constructor
   virtual ~AliFlowEventSimpleMaker();    //destructor
-  
+
+  void SetMCReactionPlaneAngle(Double_t fPhiRP)  { this->fMCReactionPlaneAngle = fPhiRP; } 
   //TTree
   AliFlowEventSimple* FillTracks(TTree* anInput, AliFlowTrackSimpleCuts* intCuts, AliFlowTrackSimpleCuts* diffCuts);   //use own cut class
   //AliMCEvent
@@ -46,6 +47,7 @@ class AliFlowEventSimpleMaker {
  private:
   AliFlowEventSimpleMaker(const AliFlowEventSimpleMaker& anAnalysis);            //copy constructor
   AliFlowEventSimpleMaker& operator=(const AliFlowEventSimpleMaker& anAnalysis); //assignment operator
+  Double_t  fMCReactionPlaneAngle;   // the angle of the reaction plane from the MC truth
        
   ClassDef(AliFlowEventSimpleMaker,0)    // macro for rootcint
 };