]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGGA/EMCALTasks/macros/AddTaskEMCALIsoPhoton.C
including EMCal geometry explicitly as an input parameter
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / macros / AddTaskEMCALIsoPhoton.C
index bd5c2db657ec53747c2efddd160bb3fe3af43253..ca57a1d7bca3377734e3e33ced6c1fa70107dec6 100644 (file)
@@ -3,7 +3,8 @@
 AliAnalysisTaskEMCALIsoPhoton *AddTaskEMCALIsoPhoton(
                                                     TString period = "LHC11d",
                                                     TString trigbitname = "kEMC7",
-                                                    TString pathstrsel = "/"
+                                                    TString pathstrsel = "/",
+                                                    TString geoname="EMCAL_COMPLETEV1"
                                                     )
 {
   // Get the pointer to the existing analysis manager via the static access method.
@@ -42,18 +43,18 @@ AliAnalysisTaskEMCALIsoPhoton *AddTaskEMCALIsoPhoton(
   cutsp->SetEtaRange(-1.0,1.0);
   ana->SetPrimTrackCuts(cutsp);
   ana->SetPeriod(period.Data());
-  if(period.Contains("11"))
-    ana->SetGeoName("EMCAL_COMPLETEV1");
-  else
-    ana->SetGeoName("EMCAL_FIRSTYEARV1");
-
-  
+  ana->SetGeoName(geoname.Data());  
   mgr->AddTask(ana);
+  TString containername = "histosEMCALIsoPhoton";
+  if(pathstrsel != "/"){
+    TString dirpth = (TSubString)pathstrsel.operator()(1,1);
+    containername += dirpth;
+  }
   
   // Create ONLY the output containers for the data produced by the task.
   // Get and connect other common input/output containers via the manager as below
   //==============================================================================
-  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("histosEMCALIsoPhoton"
+  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(containername.Data()
                                                            TList::Class(),AliAnalysisManager::kOutputContainer,
                                                            Form("%s", AliAnalysisManager::GetCommonFileName()));