]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
changes from fzhou
authormcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Jun 2012 15:21:44 +0000 (15:21 +0000)
committermcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Jun 2012 15:21:44 +0000 (15:21 +0000)
PWGGA/EMCALTasks/AliAnalysisTaskPi0V2.cxx
PWGGA/EMCALTasks/macros/AddTaskEMCALPi0V2.C

index f8a6b8cfb4be2d456ec098a98acef1aa5a926453..f1297e71da2bd6245d46167707a4e35d542b4132 100644 (file)
@@ -458,9 +458,9 @@ void AliAnalysisTaskPi0V2::UserCreateOutputObjects()
 
 
 
-    hdifEMC_EP = new TH3F("hdifEMC_EP", "dif phi in EMC with EP",  100, 0., 100., 100., 0., TMath::Pi(), 15, 0., 15.);
-    hdifful_EP = new TH3F("hdifful_EP", "dif phi in full with EP", 100, 0., 100., 100., 0., TMath::Pi(), 15, 0., 15.);
-    hdifout_EP = new TH3F("hdifout_EP", "dif phi NOT in EMC with EP", 100, 0., 100., 100., 0., TMath::Pi(), 15, 0., 15.);
+    hdifEMC_EP = new TH3F("hdifEMC_EP", "dif phi in EMC with EP",  100, 0., 100., 100, 0., TMath::Pi(), 15, 0., 15.);
+    hdifful_EP = new TH3F("hdifful_EP", "dif phi in full with EP", 100, 0., 100., 100, 0., TMath::Pi(), 15, 0., 15.);
+    hdifout_EP = new TH3F("hdifout_EP", "dif phi NOT in EMC with EP", 100, 0., 100., 100, 0., TMath::Pi(), 15, 0., 15.);
     fOutput->Add(hdifEMC_EP);
     fOutput->Add(hdifful_EP);
     fOutput->Add(hdifout_EP);
@@ -575,8 +575,8 @@ void AliAnalysisTaskPi0V2::UserExec(Option_t *)
     fEPV0CR0   = TVector2::Phi_0_2pi(fEPV0CR0);    if(fEPV0CR0>TMath::Pi())   fEPV0CR0  = fEPV0CR0 - TMath::Pi();
     fEPV0CR3   = TVector2::Phi_0_2pi(fEPV0CR3);    if(fEPV0CR3>TMath::Pi())   fEPV0CR3  = fEPV0CR3 - TMath::Pi();
 
-cout<<" EPTPC: "<<fEPTPC<<" reso: "<<fEPTPCreso<<" -------------------"<<endl;
-cout<<" cent: "<<fCentrality<<" fEPV0:"<<fEPV0<<" fEPV0A:"<<fEPV0A<<" fEPV0C:"<<fEPV0C<<" fEPV0Ar:"<<fEPV0Ar<<" fEPV0Cr:"<<fEPV0Cr<<" fEPV0r:"<<fEPV0AR4<<" fEPV0AR7:"<<fEPV0AR7<<" fEPV0CR0:"<<fEPV0CR0<<" fEPV0CR3:"<<fEPV0CR3<<"--------------------------------------------"<<endl;
+//cout<<" EPTPC: "<<fEPTPC<<" reso: "<<fEPTPCreso<<" -------------------"<<endl;
+//cout<<" cent: "<<fCentrality<<" fEPV0:"<<fEPV0<<" fEPV0A:"<<fEPV0A<<" fEPV0C:"<<fEPV0C<<" fEPV0Ar:"<<fEPV0Ar<<" fEPV0Cr:"<<fEPV0Cr<<" fEPV0r:"<<fEPV0AR4<<" fEPV0AR7:"<<fEPV0AR7<<" fEPV0CR0:"<<fEPV0CR0<<" fEPV0CR3:"<<fEPV0CR3<<"--------------------------------------------"<<endl;
 
    hEPTPC->Fill(fCentrality,  fEPTPC); 
    if(fEPTPCreso!=-1) hresoTPC->Fill(fCentrality, fEPTPCreso);
index ff3aac298ade0b4cd48ab4ba12d31fce7ff5a134..9c02469406b312ff9eb36e4ff888ba4fdf3cfa2f 100644 (file)
@@ -9,6 +9,30 @@ AliAnalysisTaskPi0V2 *AddTaskEMCALPi0V2()
     ::Error("AddTaskEMCALPi0V2", "No analysis manager to connect to.");
     return NULL;
   }  
+
+  if (!mgr->GetInputEventHandler()) {
+    ::Error("AddTaskEMCALPi0V2", "This task requires an input event handler");
+    return NULL;
+  }
+
+  AliEPSelectionTask *eventplaneTask = new AliEPSelectionTask("EventplaneSelection");
+  eventplaneTask->SelectCollisionCandidates(AliVEvent::kSemiCentral | AliVEvent::kCentral | AliVEvent::kAnyINT);
+
+  eventplaneTask->SetTrackType("TPC");
+  eventplaneTask->SetUsePtWeight();
+  eventplaneTask->SetUsePhiWeight();
+  eventplaneTask->SetSaveTrackContribution();
+
+  AliESDtrackCuts* epTrackCuts = new AliESDtrackCuts("AliESDtrackCuts", "Standard");
+  epTrackCuts->SetPtRange(0.1, 4);
+  eventplaneTask->SetPersonalESDtrackCuts(epTrackCuts);
+
+  mgr->AddTask(eventplaneTask);
+
+  AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer();
+  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("EPStat",TList::Class(), AliAnalysisManager::kOutputContainer,"EPoutput.root");
+  mgr->ConnectInput(eventplaneTask, 0, mgr->GetCommonInputContainer());
+  mgr->ConnectOutput(eventplaneTask,1,coutput1);
   
   // Create the task and configure it.
   //===========================================================================