modified
authorssakai <ssakai@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Jun 2013 13:19:51 +0000 (13:19 +0000)
committerssakai <ssakai@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Jun 2013 13:19:51 +0000 (13:19 +0000)
PWGHF/hfe/macros/AddTaskEMCalHFEpA.C

index e8419ae..4b51e89 100644 (file)
@@ -1,60 +1,60 @@
-AliAnalysisTask *AddTaskEMCalHFEpA(
+AliAnalysisTaskEMCalHFEpA *AddTaskEMCalHFEpA(
 
-                       Bool_t  isMC                    = kFALSE, 
-                       Int_t   triggerIndex    = 0, 
-                       Int_t   configIndex     = 0, 
-                       Int_t   centralityIndex = 0, 
-                       Bool_t  isAOD                   = kFALSE,
-                       Bool_t isEMCal                  = kFALSE,
-                       char * period                   = "b",
-                       Int_t EMCalThreshould   = 0
-               )
+                        Bool_t  isMC                    = kFALSE, 
+                        Int_t   triggerIndex    = 0, 
+                        Int_t   configIndex     = 0, 
+                        Int_t   centralityIndex = 0, 
+                        Bool_t  isAOD                   = kFALSE,
+                        Bool_t isEMCal                  = kFALSE,
+                        char * period                   = "b",
+                        Int_t EMCalThreshould   = 0
+                )
 {
-       AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-       
-       if (!mgr) {
-       ::Error("AddTaskEMCalHFEpA", "No analysis manager to connect to.");
-       return NULL;
-       }
-       
-       if (!mgr->GetInputEventHandler()) {
-       ::Error("AddTaskEMCalHFEpA", "This task requires an input event handler");
-       return NULL;
-       }
-       
-       //_______________________
-       //Config Task
-       //gROOT->LoadMacro("ConfigEMCalHFEpA.C");
+        AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+        
+        if (!mgr) {
+        ::Error("AddTaskEMCalHFEpA", "No analysis manager to connect to.");
+        return NULL;
+        }
+        
+        if (!mgr->GetInputEventHandler()) {
+        ::Error("AddTaskEMCalHFEpA", "This task requires an input event handler");
+        return NULL;
+        }
+        
+        //_______________________
+        //Config Task
+        //gROOT->LoadMacro("ConfigEMCalHFEpA.C");
         gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/configs/pPb/ConfigEMCalHFEpA.C");
-       AliAnalysisTaskEMCalHFEpA *task = ConfigEMCalHFEpA(isMC,triggerIndex,configIndex,centralityIndex,isAOD,isEMCal, EMCalThreshould);
-       
-       //_______________________
-       //Trigger
-       if(!isMC)
-       {
-               if(triggerIndex == 0) task->SelectCollisionCandidates(AliVEvent::kINT7);
-               if(triggerIndex == 1) task->SelectCollisionCandidates(AliVEvent::kEMC7);
-               if(triggerIndex == 2) task->SelectCollisionCandidates(AliVEvent::kEMCEGA);
-               
-               //if(triggerIndex == 3) task->SelectCollisionCandidates(AliVEvent::kEMC8);
-               //if(triggerIndex == 4) task->SelectCollisionCandidates(AliVEvent::kEMCEJE); //Jet Trigger
-       }
-       
-       mgr->AddTask(task);
-       
-       TString containerName = mgr->GetCommonFileName();
-       containerName += ":HFE_EMCal_pPb_cris";
-       containerName += Form("_%d_%d_%d_%d",triggerIndex,configIndex,centralityIndex,EMCalThreshould);
-       
+        AliAnalysisTaskEMCalHFEpA *task = ConfigEMCalHFEpA(isMC,triggerIndex,configIndex,centralityIndex,isAOD,isEMCal, EMCalThreshould);
+        
+        //_______________________
+        //Trigger
+        if(!isMC)
+        {
+                if(triggerIndex == 0) task->SelectCollisionCandidates(AliVEvent::kINT7);
+                if(triggerIndex == 1) task->SelectCollisionCandidates(AliVEvent::kEMC7);
+                if(triggerIndex == 2) task->SelectCollisionCandidates(AliVEvent::kEMCEGA);
+                
+                //if(triggerIndex == 3) task->SelectCollisionCandidates(AliVEvent::kEMC8);
+                //if(triggerIndex == 4) task->SelectCollisionCandidates(AliVEvent::kEMCEJE); //Jet Trigger
+        }
+        
+        mgr->AddTask(task);
+        
+        TString containerName = mgr->GetCommonFileName();
+        containerName += ":HFE_EMCal_pPb_cris";
+        containerName += Form("_%d_%d_%d_%d",triggerIndex,configIndex,centralityIndex,EMCalThreshould);
+        
 
-       
-       //Create containers for input/output
-       AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
-       AliAnalysisDataContainer *coutput = mgr->CreateContainer(Form("chist_RpPb_%d_%d_%d_%d",triggerIndex,configIndex,centralityIndex, EMCalThreshould), TList::Class(),    AliAnalysisManager::kOutputContainer, containerName.Data());
+        
+        //Create containers for input/output
+        AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
+        AliAnalysisDataContainer *coutput = mgr->CreateContainer(Form("chist_RpPb_%d_%d_%d_%d",triggerIndex,configIndex,centralityIndex, EMCalThreshould), TList::Class(),    AliAnalysisManager::kOutputContainer, containerName.Data());
 
-       //Connect input/output
-       mgr->ConnectInput(task, 0, cinput);
-       mgr->ConnectOutput(task, 1, coutput);
-       
-       return task;
+        //Connect input/output
+        mgr->ConnectInput(task, 0, cinput);
+        mgr->ConnectOutput(task, 1, coutput);
+        
+        return task;
 }