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