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