]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
MC task also now uses exchange container and gets MC reaction plane from FlowEventSimple
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Feb 2009 11:31:08 +0000 (11:31 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Feb 2009 11:31:08 +0000 (11:31 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.h
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskMCEventPlane.cxx
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskMCEventPlane.h
PWG2/FLOW/AliFlowTasks/AliFlowEventSimpleMaker.cxx
PWG2/FLOW/macros/runAliAnalysisTaskFlow.C
PWG2/FLOW/macros/runFlowAnalysis.C

index 5bc6d3bc88673a939e529d108e80fd23d223df9f..ea1f4e415ccb8061c63c76f0306e7a1909a4ccd6 100644 (file)
@@ -157,11 +157,13 @@ void AliFlowAnalysisWithMCEventPlane::Init() {
  
 //-----------------------------------------------------------------------
  
-void AliFlowAnalysisWithMCEventPlane::Make(AliFlowEventSimple* anEvent, Double_t aRP) {
+void AliFlowAnalysisWithMCEventPlane::Make(AliFlowEventSimple* anEvent) {
 
   //Calculate v2 from the MC reaction plane
   if (anEvent) {
-         
+  
+    // get the MC reaction plane angle
+    Double_t aRP = anEvent->GetMCReactionPlaneAngle();  
     //fill control histograms     
     fCommonHists->FillControlHistograms(anEvent);
 
index e7a584dcae4fc5e4a707cc0ee128947d8028e2b1..cfea043a849b92c0711dfe7e3e166a904870dd66 100644 (file)
@@ -42,7 +42,7 @@ class AliFlowAnalysisWithMCEventPlane {
    void      WriteHistograms(TString* outputFileName);
    void      WriteHistograms(TString outputFileName);
    void      Init();                             //defines variables and histograms
-   void      Make(AliFlowEventSimple* anEvent, Double_t aRP);   //calculates variables and fills histograms
+   void      Make(AliFlowEventSimple* anEvent);   //calculates variables and fills histograms
    void      Finish();                           //saves histograms
    
    void      SetDebug(Bool_t kt)          { this->fDebug = kt ; }
@@ -112,9 +112,9 @@ class AliFlowAnalysisWithMCEventPlane {
    TProfile*    fHistProDiffFlowPtPOI;  //profile used to calculate the differential flow (Pt) of POI particles 
    TProfile*    fHistProDiffFlowEtaPOI; //profile used to calculate the differential flow (Eta) of POI particles    
    
-   ClassDef(AliFlowAnalysisWithMCEventPlane,1)  // macro for rootcint
+   ClassDef(AliFlowAnalysisWithMCEventPlane,1)  // Analyse particle distribution versus MC reaction plane
      };
+
      
 #endif
 
index 444ff75cafb926f3ccfee878b10bbca0fdffee04..2e2e14f89b46887d84d2667de26af539b4c063a7 100644 (file)
 **************************************************************************/
 
 #include "Riostream.h" //needed as include
-#include "TChain.h"
 #include "TProfile.h"
-#include "TTree.h"
-#include "TFile.h" //needed as include
 #include "TList.h"
 
 
 class AliAnalysisTask;
 #include "AliAnalysisManager.h"
+#include "AliFlowEventSimple.h"
 
-#include "AliESDEvent.h"
-#include "AliESDInputHandler.h"
-
-#include "AliAODEvent.h"
-#include "AliAODInputHandler.h"
-
-#include "AliMCEventHandler.h"
-#include "AliMCEvent.h"
-
-#include "AliCFManager.h"
-
-#include "AliGenCocktailEventHeader.h"
-#include "AliGenHijingEventHeader.h"
 
 #include "AliAnalysisTaskMCEventPlane.h"
-#include "AliFlowEventSimpleMaker.h"
+#include "AliFlowAnalysisWithMCEventPlane.h"
 #include "AliFlowCommonHist.h"
 #include "AliFlowCommonHistResults.h"
-#include "AliFlowAnalysisWithMCEventPlane.h"
 
 // AliAnalysisTaskMCEventPlane:
 //
@@ -53,46 +37,27 @@ class AliAnalysisTask;
 ClassImp(AliAnalysisTaskMCEventPlane)
 
 //________________________________________________________________________
-AliAnalysisTaskMCEventPlane::AliAnalysisTaskMCEventPlane(const char *name, Bool_t on) : 
+AliAnalysisTaskMCEventPlane::AliAnalysisTaskMCEventPlane(const char *name) : 
   AliAnalysisTask(name, ""), 
-  fESD(0),
-  fAOD(0),
-  fAnalysisType("MC"),
-  fCFManager1(NULL),
-  fCFManager2(NULL),
-  fMc(0),
-  fEventMaker(0),
-  fListHistos(NULL),
-  fQAInt(NULL),
-  fQADiff(NULL),
-  fQA(on)
+  fEvent(NULL),
+  fMc(NULL),
+  fListHistos(NULL)
 {
   // Constructor
   cout<<"AliAnalysisTaskMCEventPlane::AliAnalysisTaskMCEventPlane(const char *name)"<<endl;
 
   // Define input and output slots here
   // Input slot #0 works with a TChain
-  DefineInput(0, TChain::Class());
+  DefineInput(0, AliFlowEventSimple::Class());
   // Output slot #0 writes into a TList container
   DefineOutput(0, TList::Class()); 
-  if(on) {
-    DefineOutput(1, TList::Class());
-    DefineOutput(2, TList::Class()); }  
 }
 
 //________________________________________________________________________
 AliAnalysisTaskMCEventPlane::AliAnalysisTaskMCEventPlane() : 
-  fESD(0),
-  fAOD(0),
-  fAnalysisType("MC"),
-  fCFManager1(NULL),
-  fCFManager2(NULL),
-  fMc(0),
-  fEventMaker(0),
-  fListHistos(NULL),
-  fQAInt(NULL),
-  fQADiff(NULL),
-  fQA(kFALSE)
+  fEvent(NULL),
+  fMc(NULL),
+  fListHistos(NULL)
 {
   // Constructor
   cout<<"AliAnalysisTaskMCEventPlane::AliAnalysisTaskMCEventPlane()"<<endl;
@@ -114,53 +79,6 @@ void AliAnalysisTaskMCEventPlane::ConnectInputData(Option_t *)
   // Called once
   cout<<"AliAnalysisTaskMCEventPlane::ConnectInputData(Option_t *)"<<endl;
 
-  TTree* tree = dynamic_cast<TTree*> (GetInputData(0));
-  if (!tree) {
-    Printf("ERROR: Could not read chain from input slot 0");
-  } else {
-    // Disable all branches and enable only the needed ones
-    
-    if (fAnalysisType == "MC") {
-      // we want to process only MC
-      tree->SetBranchStatus("*", kFALSE);
-
-      AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
-
-      if (!esdH) {
-       Printf("ERROR: Could not get ESDInputHandler");
-      } else {
-       fESD = esdH->GetEvent();
-      }
-    }
-
-    else if (fAnalysisType == "ESD" || fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1" ) {
-      tree->SetBranchStatus("*", kFALSE);
-      tree->SetBranchStatus("Tracks.*", kTRUE);
-
-      AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
-
-      if (!esdH) {
-       Printf("ERROR: Could not get ESDInputHandler");
-      } else
-       fESD = esdH->GetEvent();
-    }
-
-    else if (fAnalysisType == "AOD") {
-      AliAODInputHandler *aodH = dynamic_cast<AliAODInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
-
-      if (!aodH) {
-       Printf("ERROR: Could not get AODInputHandler");
-      }
-      else {
-       fAOD = aodH->GetEvent();
-      }
-    }
-    else {
-      Printf("!!!!!Wrong analysis type: Only ESD, ESDMC0, ESDMC1, AOD and MC types are allowed!");
-      exit(1);
-      
-    }
-  }
 }
 
 //________________________________________________________________________
@@ -169,13 +87,6 @@ void AliAnalysisTaskMCEventPlane::CreateOutputObjects()
   // Called once
   cout<<"AliAnalysisTaskMCEventPlane::CreateOutputObjects()"<<endl;
 
-  if (!(fAnalysisType == "AOD" || fAnalysisType == "ESD"  || fAnalysisType == "ESDMC0"  || fAnalysisType == "ESDMC1" || fAnalysisType == "MC")) {
-    cout<<"WRONG ANALYSIS TYPE! only ESD, ESDMC0, ESDMC1, AOD and MC are allowed."<<endl;
-    exit(1);
-  }
-
-  //event maker
-  fEventMaker = new AliFlowEventSimpleMaker();
   //Analyser
   fMc  = new AliFlowAnalysisWithMCEventPlane() ;
       
@@ -196,121 +107,15 @@ void AliAnalysisTaskMCEventPlane::Exec(Option_t *)
   // Main loop
   // Called for each event
 
-  
-  // Process MC truth, therefore we receive the AliAnalysisManager and ask it for the AliMCEventHandler
-  // This handler can return the current MC event
-
-  AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
-  if (!eventHandler) {
-    Printf("ERROR: Could not retrieve MC event handler");
-    return;
+  fEvent = dynamic_cast<AliFlowEventSimple*>(GetInputData(0));
+  if (fEvent){
+    fMc->Make(fEvent);
   }
-
-  AliMCEvent* mcEvent = eventHandler->MCEvent();
-  if (!mcEvent) {
-    Printf("ERROR: Could not retrieve MC event");
-    return;
+  else {
+    cout << "Warning no input data!!!" << endl;
   }
 
-  fCFManager1->SetEventInfo(mcEvent);
-  fCFManager2->SetEventInfo(mcEvent);
-
-  Printf("MC particles: %d", mcEvent->GetNumberOfTracks());
-  if (mcEvent->GetNumberOfTracks() == -1)
-    {
-      cout<<"Skipping Event -- No MC information available for this event"<<endl;
-      return;
-    }
-  
-  AliGenCocktailEventHeader *header = dynamic_cast<AliGenCocktailEventHeader *> (mcEvent-> GenEventHeader()); 
-  if (!header) {
-    Printf("ERROR: Could not retrieve AliGenCocktailEventHeader");
-    return;
-  }
-  
-  TList *lhd = header->GetHeaders();
-  if (!lhd) {
-    Printf("ERROR: Could not retrieve List of headers");
-    return;
-  }
-
-  AliGenHijingEventHeader *hdh = dynamic_cast<AliGenHijingEventHeader *> (lhd->At(0)); 
-  if (!hdh) {
-    Printf("ERROR: Could not retrieve AliGenHijingEventHeader");
-    return;
-  }
-    
-  Double_t fRP = hdh->ReactionPlaneAngle();
-  //cout<<"The reactionPlane is "<<hdh->ReactionPlaneAngle()<<endl;
-  
-  if (fAnalysisType == "MC") {
-    // analysis 
-    //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(mcEvent);
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(mcEvent,fCFManager1,fCFManager2);
-    fMc->Make(fEvent,fRP);
-    delete fEvent;
-  }
-
-  else if (fAnalysisType == "ESD") {
-    if (!fESD) {
-      Printf("ERROR: fESD not available");
-      return;
-    }
-    Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
-    
-    // analysis 
-    //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD);
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,fCFManager1,fCFManager2);
-    fMc->Make(fEvent,fRP);
-    delete fEvent;
-  }
-
-  else if (fAnalysisType == "ESDMC0") {
-    if (!fESD) {
-      Printf("ERROR: fESD not available");
-      return;
-    }
-    Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
-
-    // analysis 
-    //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,mcEvent,0); //0 = kine from ESD, 1 = kine from MC
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD, mcEvent, fCFManager1, fCFManager2, 0);
-    fMc->Make(fEvent,fRP);
-    delete fEvent;
-  }
-
-  else if (fAnalysisType == "ESDMC1") {
-    if (!fESD) {
-      Printf("ERROR: fESD not available");
-      return;
-    }
-    Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
-
-    // analysis 
-    //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,mcEvent,1); //0 = kine from ESD, 1 = kine from MC
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD, mcEvent, fCFManager1, fCFManager2, 1);
-    fMc->Make(fEvent,fRP);
-    delete fEvent;
-  }
-
-  else if (fAnalysisType == "AOD") {
-    if (!fAOD) {
-      Printf("ERROR: fAOD not available");
-      return;
-    }
-    Printf("There are %d tracks in this event", fAOD->GetNumberOfTracks());
-
-    // analysis 
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fAOD);  //no CF yet!
-    fMc->Make(fEvent,fRP);
-    delete fEvent;
-  }
-
-  PostData(0,fListHistos); //here for CAF
-  if (fQA) {
-    PostData(1,fQAInt);
-    PostData(2,fQADiff); }
-
+  PostData(0,fListHistos); 
 }      
 
 
@@ -365,6 +170,5 @@ void AliAnalysisTaskMCEventPlane::Terminate(Option_t *)
     
     //fListHistos->Print();
   } else { cout << "histogram list pointer is empty" << endl;}
-    
-  cout<<"...finished MCEventPlane."<<endl;
 }
+
index ac897e16e6d4728b5e3507c6342d069c5984c7e0..e47562c9504b2d4d8823b6e8cff4c3b1da299f5d 100644 (file)
 // Author: 
 //        Naomi van der Kolk (kolk@nikhef.nl)
 
-class AliESDEvent;
-class AliAODEvent;
-class AliCFManager;
+class AliFlowEventSimple;
 class AliFlowAnalysisWithMCEventPlane;
-class AliFlowEventSimpleMaker;
 class TList;
 
 #include "TString.h"
@@ -25,7 +22,7 @@ class AliAnalysisTaskMCEventPlane : public AliAnalysisTask {
  public:
 
   AliAnalysisTaskMCEventPlane();
-  AliAnalysisTaskMCEventPlane(const char *name,Bool_t QAon = kFALSE);
+  AliAnalysisTaskMCEventPlane(const char *name);
   virtual ~AliAnalysisTaskMCEventPlane();
   
   virtual void   ConnectInputData(Option_t *);
@@ -33,41 +30,16 @@ class AliAnalysisTaskMCEventPlane : public AliAnalysisTask {
   virtual void   Exec(Option_t *option);
   virtual void   Terminate(Option_t *);
 
-  void           SetAnalysisType(TString type) { this->fAnalysisType = type; }
-  TString        GetAnalysisType() const    { return this->fAnalysisType; }
-  
-  void           SetCFManager1(AliCFManager* cfmgr) {this->fCFManager1 = cfmgr; } 
-  AliCFManager*  GetCFManager1()               {return this->fCFManager1; }
-  void           SetCFManager2(AliCFManager* cfmgr) {this->fCFManager2 = cfmgr; } 
-  AliCFManager*  GetCFManager2()               {return this->fCFManager2; }
-  void           SetQAList1(TList* list)       {this->fQAInt = list; }
-  TList*         GetQAList1()                  {return this->fQAInt; }
-  void           SetQAList2(TList* list)       {this->fQADiff = list; }
-  TList*         GetQAList2()                  {return this->fQADiff; }
-  void           SetQAOn(Bool_t kt)            {this->fQA = kt; }
-  Bool_t         GetQAOn()                     {return this->fQA; }
-
  private:
  
   AliAnalysisTaskMCEventPlane(const AliAnalysisTaskMCEventPlane& aAnalysis);
   AliAnalysisTaskMCEventPlane& operator=(const AliAnalysisTaskMCEventPlane& aAnalysis);
   
-  AliESDEvent*     fESD;                 // ESD object
-  AliAODEvent*     fAOD;                 // AOD object
-  TString fAnalysisType;                 // can be MC, ESD or AOD
-  AliCFManager*    fCFManager1;          // correction framework manager
-  AliCFManager*    fCFManager2;          // correction framework manager
-  AliFlowAnalysisWithMCEventPlane* fMc;  // MC EP analysis object
-  AliFlowEventSimpleMaker* fEventMaker;  // FlowEventSimple maker object
-  
-  TList*           fListHistos;          // collection of output
-  TList*           fQAInt;               // QA histogram list
-  TList*           fQADiff;              // QA histogram list
-
-  Bool_t           fQA;                  // flag to set the filling of the QA hostograms
-
+  AliFlowEventSimple*               fEvent;        //input event
+  AliFlowAnalysisWithMCEventPlane*  fMc;           // MC EP analysis object
+  TList*                            fListHistos;   // collection of output
 
-  ClassDef(AliAnalysisTaskMCEventPlane, 1); // AliAnalysisTaskMCEventPlane class object
+  ClassDef(AliAnalysisTaskMCEventPlane, 0); // AliAnalysisTaskMCEventPlane class object
 };
 
 #endif
index adf7e3aee11bdd303f75fb97cbfac80657045752..fb6c2bc5b88bc57e160949e00e2e8be86ba69556 100644 (file)
@@ -145,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;
+  if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  else cout<<" MC Reaction Plane Angle = unknown "<< endl;
 
   cout<<" iGoodTracks = "<< iGoodTracks << endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
@@ -228,7 +230,8 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput)
   pEvent->SetNumberOfTracks(iGoodTracks);
 
   pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
-  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  else cout<<" MC Reaction Plane Angle = unknown "<< endl;
 
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
@@ -302,7 +305,8 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput, Ali
   pEvent-> SetNumberOfTracks(iGoodTracks);
 
   pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
-  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  else cout<<" MC Reaction Plane Angle = unknown "<< endl;
 
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
@@ -364,7 +368,8 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput)
   pEvent->SetNumberOfTracks(iGoodTracks);
 
   pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
-  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  else cout<<" MC Reaction Plane Angle = unknown "<< endl;
 
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
@@ -433,7 +438,8 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, Al
   pEvent->SetNumberOfTracks(iGoodTracks);
 
   pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
-  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  else cout<<" MC Reaction Plane Angle = unknown "<< endl;
 
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
@@ -490,7 +496,8 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput)
   pEvent->SetNumberOfTracks(iGoodTracks);
 
   pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
-  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  else cout<<" MC Reaction Plane Angle = unknown "<< endl;
 
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
@@ -557,7 +564,8 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput,  A
   pEvent->SetNumberOfTracks(iGoodTracks);
 
   pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
-  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  else cout<<" MC Reaction Plane Angle = unknown "<< endl;
 
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
@@ -642,7 +650,8 @@ AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, A
   pEvent->SetNumberOfTracks(iGoodTracks);
 
   pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
-  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  else cout<<" MC Reaction Plane Angle = unknown "<< endl;
 
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
@@ -749,7 +758,8 @@ AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, A
   pEvent->SetNumberOfTracks(iGoodTracks);
 
   pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
-  cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
+  else cout<<" MC Reaction Plane Angle = unknown "<< endl;
 
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
index b544b4dd26fa482e22aa1ef2c4a5a811190ff36b..b252af443e64467a7aeb65681f7fbdeca2c0f8f6 100644 (file)
@@ -97,11 +97,11 @@ const Int_t maxnsigmatovertex2 = 3;
 //void runAliAnalysisTaskFlow(Int_t mode=mPROOF, const Char_t* data="/PWG2/akisiel/Therminator_midcentral_AOD", Int_t nRuns=44, Int_t offset=0)
 
 // Data at Nikhef
-void runAliAnalysisTaskFlow(Int_t mode=mLocal, Int_t nRuns = 64, const Char_t* dataDir="/data/alice2/kolk/Therminator_midcentral", Int_t offset = 0) 
+//void runAliAnalysisTaskFlow(Int_t mode=mLocal, Int_t nRuns = 64, const Char_t* dataDir="/data/alice2/kolk/Therminator_midcentral", Int_t offset = 0) 
 //void runAliAnalysisTaskFlow(Int_t mode=mLocalPAR, Int_t nRuns = 55, const Char_t* dataDir="/data/alice2/kolk/Therminator_midcentral", Int_t offset = 0) 
 
 // Data on my mac
-//void runAliAnalysisTaskFlow(Int_t mode=mLocal, Int_t nRuns = -1, const Char_t* dataDir="/Users/snelling/alice_data/Therminator_midcentral", Int_t offset = 0) 
+void runAliAnalysisTaskFlow(Int_t mode=mLocal, Int_t nRuns = -1, const Char_t* dataDir="/Users/snelling/alice_data/Therminator_midcentral", Int_t offset = 0) 
 //void runAliAnalysisTaskFlow(Int_t mode=mLocalPAR, Int_t nRuns = 55, const Char_t* dataDir="/Users/snelling/alice_data/Therminator_midcentral", Int_t offset = 0) 
 
 {
@@ -459,10 +459,7 @@ if (mode==mLocal || mode == mLocalPAR || mode == mGRID) {
    mgr->AddTask(taskQC);
  }
  if (MCEP){
-   AliAnalysisTaskMCEventPlane *taskMCEP = new AliAnalysisTaskMCEventPlane("TaskMCEventPlane",kFALSE);
-   taskMCEP->SetAnalysisType(type);
-   taskMCEP->SetCFManager1(cfmgr1);
-   taskMCEP->SetCFManager2(cfmgr2);
+   AliAnalysisTaskMCEventPlane *taskMCEP = new AliAnalysisTaskMCEventPlane("TaskMCEventPlane");
    mgr->AddTask(taskMCEP);
  }
 
@@ -611,7 +608,7 @@ if (mode==mLocal || mode == mLocalPAR || mode == mGRID) {
    } 
  }
  if (MCEP) { 
-   mgr->ConnectInput(taskMCEP,0,cinput1); 
+   mgr->ConnectInput(taskMCEP,0,coutputFE); 
    mgr->ConnectOutput(taskMCEP,0,coutputMCEP);
  }  
 
index 1bb572de0985948558531dc797bbd3501ec0b3a4..4fe0c3e78caf9b88d6e7e09cfe89092c3d2f35fb 100644 (file)
@@ -52,7 +52,7 @@ enum anaModes {mLocal,mLocalSource,mLocalPAR,};
 
 Int_t offset = 0;
                                           
-int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = -1, const char* 
+int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 1000, const char* 
                    //                    dir="/data/alice1/kolk/KineOnly3/")
                    dir="/Users/snelling/alice_data/KineOnly3/")
 {
@@ -319,9 +319,7 @@ int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = -1, const char*
              //fill and save the flow event          
              AliFlowEventSimple *fEvent = fEventMaker->FillTracks(kTree, cutsInt, cutsDiff); 
                            
-             //pass the flow event to flow methods for analysis 
-             Double_t fEP = 0.; // temporary number need true value of the reaction plane angle
-             if(MCEP) mcep->Make(fEvent,fEP);  //fix fEP
+             if(MCEP) mcep->Make(fEvent);
              if(QC) qc->Make(fEvent);
              if(GFC) gfc->Make(fEvent);
              if(FQD) fqd->Make(fEvent);