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.
//==============================================================================
//===========================================================================
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);
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()));