]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
to use AliPhysicsSelection class
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Jan 2010 15:57:10 +0000 (15:57 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Jan 2010 15:57:10 +0000 (15:57 +0000)
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx
PWG2/FLOW/macros/runFlowTask.C

index 0c7c5b8e27a4d721c36b7a46c2828c17f89b655f..a0e9fa0a1c1366de0e1c31d13c3a2c436ba7433d 100644 (file)
@@ -368,10 +368,14 @@ void AliAnalysisTaskFlowEvent::Exec(Option_t *)
     if (!fCFManager2) {cout << "ERROR: No pointer to correction framework cuts! " << endl; return; }
 
     if (!fESD) { Printf("ERROR: fESD not available"); return;}
-    Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
-    
-    // analysis 
-    fEvent = fEventMaker->FillTracks(fESD,fCFManager1,fCFManager2);
+    //check the offline trigger (check if the event has the correct trigger)
+    if (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected())
+      {
+       Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
+       
+       // analysis 
+       fEvent = fEventMaker->FillTracks(fESD,fCFManager1,fCFManager2);
+      }
   }
   // Fill the FlowEventSimple for ESD input combined with MC info  
   else if (fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1" ) {
index 77993329f8f075f58dfe74c6ea32d7a3d103b8a9..ec60c269a18c96c3184fda4a397c7d8bb5b56238 100644 (file)
@@ -5,6 +5,9 @@ enum anaModes {mLocal,mLocalPAR,mPROOF,mGRID};
 
 // RUN SETTINGS
 
+//Boolean to run on ESD from real data or ESD from MC data
+Bool_t DATA = kFALSE;
+
 // Flow analysis method can be:(set to kTRUE or kFALSE)
 Bool_t SP       = kTRUE;
 Bool_t LYZ1SUM  = kTRUE;
@@ -29,15 +32,14 @@ Bool_t QA = kTRUE;
 Bool_t WEIGHTS[] = {kFALSE,kFALSE,kFALSE}; //Phi, v'(pt), v'(eta)
 
 
-//void runFlowTask(Int_t mode=mLocal, Int_t nRuns = 100, 
-                //const Char_t* dataDir="/data/alice2/kolk/PP/LHC09a4/81119", Int_t offset = 0)
-                //const Char_t* dataDir="/data/alice2/kolk/Therminator_midcentral", Int_t offset = 0)
-                //const Char_t* dataDir="/Users/snelling/alice_data/Therminator_midcentral", Int_t offset = 0)
-void runFlowTask(Int_t mode=mPROOF, Int_t nRuns = 1000000, 
+void runFlowTask(Int_t mode=mLocal, Int_t nRuns = -1, 
+                //const Char_t* dataDir="/data/alice2/kolk/PP/data/LHC09d/104892/test", Int_t offset = 0)
+                 const Char_t* dataDir="/data/alice2/kolk/PP/LHC09d10/104873", Int_t offset = 0)
+//void runFlowTask(Int_t mode=mPROOF, Int_t nRuns = 1000000, 
                 //const Char_t* dataDir="/COMMON/COMMON/LHC09a14_0.9TeV_0.5T", Int_t offset = 0)
                 //const Char_t* dataDir="/COMMON/COMMON/LHC08c11_10TeV_0.5T", Int_t offset = 0)
                 //const Char_t* dataDir="/PWG2/akisiel/Therminator_midcentral_ESD", Int_t offset=0)
-                 const Char_t* dataDir="/COMMON/COMMON/LHC09a4_run8101X", Int_t offset = 0)
+                 //const Char_t* dataDir="/COMMON/COMMON/LHC09a4_run8101X", Int_t offset = 0)
 
 
 {
@@ -82,10 +84,15 @@ void runFlowTask(Int_t mode=mPROOF, Int_t nRuns = 1000000,
   
   
   //____________________________________________//
-  // Load the tasks
+  // Load the analysis task
   gROOT->LoadMacro("AddTaskFlow.C");
   AliAnalysisTaskFlowEvent* taskFE = AddTaskFlow(type,METHODS,QA,WEIGHTS);
-    
+
+  //task to check the offline trigger
+  gROOT->LoadMacro("$ALICE_ROOT/PWG1/PilotTrain/AddTaskPhysicsSelection.C");
+  AliPhysicsSelectionTask* physicsSelTask = AddTaskPhysicsSelection();
+  if (!DATA) {physicsSelTask->GetPhysicsSelection()->SetAnalyzeMC();}
+
   //____________________________________________//
   // Run the analysis
   if (!mgr->InitAnalysis()) return;