]> 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 27d7f9719393ba8855860044ae04809f37bcedf0..ca57a1d7bca3377734e3e33ced6c1fa70107dec6 100644 (file)
@@ -1,8 +1,11 @@
 
 
 AliAnalysisTaskEMCALIsoPhoton *AddTaskEMCALIsoPhoton(
-TString period = "LHC11d"
-)
+                                                    TString period = "LHC11d",
+                                                    TString trigbitname = "kEMC7",
+                                                    TString pathstrsel = "/",
+                                                    TString geoname="EMCAL_COMPLETEV1"
+                                                    )
 {
   // Get the pointer to the existing analysis manager via the static access method.
   //==============================================================================
@@ -16,16 +19,17 @@ TString period = "LHC11d"
   //===========================================================================
   AliAnalysisTaskEMCALIsoPhoton* ana = new  AliAnalysisTaskEMCALIsoPhoton("");
   
-  ana->SelectCollisionCandidates( AliVEvent::kEMC1 | AliVEvent::kMB | AliVEvent::kEMC7 | AliVEvent::kINT7);
-  
   Bool_t isMC = (mgr->GetMCtruthEventHandler() != NULL);
 
+  if(!isMC)
+    ana->SelectCollisionCandidates( AliVEvent::kEMC1 | AliVEvent::kMB | AliVEvent::kEMC7 | AliVEvent::kINT7);
+  
   //ana->SetClusThreshold(clusTh);
   
   ana->SetTrainMode(kTRUE);
-  //ana->SetGridMode(kTRUE);
-  // ana->SetMcMode(isMC);
-  
+  ana->SetTriggerBit(trigbitname);
+  ana->SetMcMode(isMC);
+  ana->SetPathStringSelect(pathstrsel.Data());
   AliESDtrackCuts *cutsp = new AliESDtrackCuts;
   cutsp->SetMinNClustersTPC(70);
   cutsp->SetMinRatioCrossedRowsOverFindableClustersTPC(0.8);
@@ -39,18 +43,18 @@ TString period = "LHC11d"
   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()));