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");
47 //ana->SetImportGeometryFromFile(kTRUE,"$ALICE_ROOT/OADB/EMCAL/geometry_2011.root");
50 if(period.Contains("12")){
52 ana->SetGeoName("EMCAL_COMPLETEV1");
53 //ana->SetImportGeometryFromFile(kTRUE,"$ALICE_ROOT/OADB/EMCAL/geometry_2011.root");
56 ana->SetGeoName("EMCAL_COMPLETE12SMV1");
57 //ana->SetImportGeometryFromFile(kTRUE,"$ALICE_ROOT/OADB/EMCAL/geometry_2012.root");
61 ana->SetGeoName("EMCAL_FIRSTYEARV1");
62 //ana->SetImportGeometryFromFile(kTRUE,"$ALICE_ROOT/OADB/EMCAL/geometry_2010.root");
67 TString containername = "histosEMCALIsoPhoton";
68 if(pathstrsel != "/"){
69 TString dirpth = (TSubString)pathstrsel.operator()(1,1);
70 containername += dirpth;
73 // Create ONLY the output containers for the data produced by the task.
74 // Get and connect other common input/output containers via the manager as below
75 //==============================================================================
76 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(containername.Data(),
77 TList::Class(),AliAnalysisManager::kOutputContainer,
78 Form("%s", AliAnalysisManager::GetCommonFileName()));
80 mgr->ConnectInput (ana, 0, mgr->GetCommonInputContainer());
81 mgr->ConnectOutput (ana, 1, coutput1 );