3 AliAnalysisTaskEMCALIsoPhoton *AddTaskEMCALIsoPhoton(
4 TString period = "LHC11d",
5 TString trigbitname = "kEMC7",
6 TString pathstrsel = "/"
9 // Get the pointer to the existing analysis manager via the static access method.
10 //==============================================================================
11 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
13 ::Error("AddTaskEMCALIsoPhoton", "No analysis manager to connect to.");
17 // Create the task and configure it.
18 //===========================================================================
19 AliAnalysisTaskEMCALIsoPhoton* ana = new AliAnalysisTaskEMCALIsoPhoton("");
21 Bool_t isMC = (mgr->GetMCtruthEventHandler() != NULL);
24 ana->SelectCollisionCandidates( AliVEvent::kEMC1 | AliVEvent::kMB | AliVEvent::kEMC7 | AliVEvent::kINT7);
26 //ana->SetClusThreshold(clusTh);
28 ana->SetTrainMode(kTRUE);
29 ana->SetTriggerBit(trigbitname);
31 ana->SetPathStringSelect(pathstrsel.Data());
32 AliESDtrackCuts *cutsp = new AliESDtrackCuts;
33 cutsp->SetMinNClustersTPC(70);
34 cutsp->SetMinRatioCrossedRowsOverFindableClustersTPC(0.8);
35 cutsp->SetMaxChi2PerClusterTPC(4);
36 cutsp->SetRequireTPCRefit(kTRUE);
37 cutsp->SetAcceptKinkDaughters(kFALSE);
38 cutsp->SetMaxDCAToVertexZ(3.2);
39 cutsp->SetMaxDCAToVertexXY(2.4);
40 cutsp->SetDCAToVertex2D(kTRUE);
41 cutsp->SetPtRange(0.2);
42 cutsp->SetEtaRange(-1.0,1.0);
43 ana->SetPrimTrackCuts(cutsp);
44 ana->SetPeriod(period.Data());
45 if(period.Contains("11"))
46 ana->SetGeoName("EMCAL_COMPLETEV1");
48 ana->SetGeoName("EMCAL_FIRSTYEARV1");
53 // Create ONLY the output containers for the data produced by the task.
54 // Get and connect other common input/output containers via the manager as below
55 //==============================================================================
56 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("histosEMCALIsoPhoton",
57 TList::Class(),AliAnalysisManager::kOutputContainer,
58 Form("%s", AliAnalysisManager::GetCommonFileName()));
60 mgr->ConnectInput (ana, 0, mgr->GetCommonInputContainer());
61 mgr->ConnectOutput (ana, 1, coutput1 );