including EMCal geometry explicitly as an input parameter
authormcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Nov 2013 17:29:06 +0000 (17:29 +0000)
committermcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Nov 2013 17:29:06 +0000 (17:29 +0000)
PWGGA/EMCALTasks/macros/AddTaskEMCALIsoPhoton.C

index 8a5c80f..ca57a1d 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,27 +43,7 @@ AliAnalysisTaskEMCALIsoPhoton *AddTaskEMCALIsoPhoton(
   cutsp->SetEtaRange(-1.0,1.0);
   ana->SetPrimTrackCuts(cutsp);
   ana->SetPeriod(period.Data());
-  if(period.Contains("11")){
-    ana->SetGeoName("EMCAL_COMPLETEV1");
-    //ana->SetImportGeometryFromFile(kTRUE,"$ALICE_ROOT/OADB/EMCAL/geometry_2011.root");
-  }
-  else{
-    if(period.Contains("12")){
-      if(isMC){
-       ana->SetGeoName("EMCAL_COMPLETEV1");
-       //ana->SetImportGeometryFromFile(kTRUE,"$ALICE_ROOT/OADB/EMCAL/geometry_2011.root");
-      }
-      else{
-       ana->SetGeoName("EMCAL_COMPLETE12SMV1");
-       //ana->SetImportGeometryFromFile(kTRUE,"$ALICE_ROOT/OADB/EMCAL/geometry_2012.root");
-      }
-    }
-    else{
-    ana->SetGeoName("EMCAL_FIRSTYEARV1");
-    //ana->SetImportGeometryFromFile(kTRUE,"$ALICE_ROOT/OADB/EMCAL/geometry_2010.root");
-    }
-  }
-  
+  ana->SetGeoName(geoname.Data());  
   mgr->AddTask(ana);
   TString containername = "histosEMCALIsoPhoton";
   if(pathstrsel != "/"){