]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/EMCAL/macros/AddTaskEMCALTender.C
disabling redo V0 vertexer in PbPb and warning fix
[u/mrichter/AliRoot.git] / PWG / EMCAL / macros / AddTaskEMCALTender.C
CommitLineData
c4c7c022 1// $Id$
2
a4e91fed 3AliAnalysisTaskSE *AddTaskEMCALTender(
4 const char* p = "lhc11h",
5 Bool_t timeCut = kFALSE,
6 Bool_t distBC = kTRUE,
7 Bool_t recalibClus = kTRUE,
8 Bool_t recalibClusPos = kTRUE,
9 Bool_t nonLinearCorr = kTRUE,
10 Bool_t remExotic = kTRUE,
11 Bool_t fidRegion = kFALSE,
12 Bool_t calibEnergy = kTRUE,
13 Bool_t calibTime = kTRUE,
14 Bool_t remBC = kTRUE,
15 Bool_t reclusterize = kFALSE,
65b21890 16 UInt_t clusterizer = AliEMCALRecParam::kClusterizerNxN,
5582e90e 17 Bool_t trackMatch = kFALSE,
507f74bc 18 Bool_t updateCellOnly= kFALSE,
5582e90e 19 const char* pass = 0)
a56c1f4e 20{
fd650c0d 21 // Get the pointer to the existing analysis manager via the static access method.
22 //==============================================================================
23 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
24 if (!mgr) {
32bf39af 25 ::Error("AddTaskEMCALTender", "No analysis manager to connect to.");
fd650c0d 26 return NULL;
a56c1f4e 27 }
28
29 AliVEventHandler *evhand = mgr->GetInputEventHandler();
30
fd650c0d 31 // Create the task and configure it.
32 //===========================================================================
fd650c0d 33
a56c1f4e 34 AliAnalysisTaskSE *ana = 0;
ef8220aa 35 AliAnalysisDataContainer *coutput1 = 0;
fd650c0d 36
59f16b27 37 UInt_t nonLinFunct = AliEMCALRecoUtils::kBeamTestCorrected;
38
39 TString period(p);
40 period.ToLower();
41 if (period == "lhc12a15e")
42 nonLinFunct = AliEMCALRecoUtils::kPi0MCv3;
43 else if (period == "lhc12a15a")
44 nonLinFunct = AliEMCALRecoUtils::kPi0MCv2;
45
2f06de14 46 gROOT->LoadMacro("$ALICE_ROOT/PWG/EMCAL/macros/ConfigEmcalTenderSupply.C");
a56c1f4e 47
a4e91fed 48 AliEMCALTenderSupply *EMCALSupply = ConfigEmcalTenderSupply(timeCut, distBC, recalibClus, recalibClusPos, nonLinearCorr, remExotic,
507f74bc 49 fidRegion, calibEnergy, calibTime, remBC, nonLinFunct, reclusterize, clusterizer, trackMatch, updateCellOnly);
5582e90e 50 if (pass)
51 EMCALSupply->SetPass(pass);
a56c1f4e 52
a4e91fed 53 if (evhand->InheritsFrom("AliESDInputHandler")) {
a56c1f4e 54 AliTender* alitender = new AliTender("AliTender");
55 alitender->AddSupply(EMCALSupply);
e6e03c89 56 alitender->SetDefaultCDBStorage("raw://");
a56c1f4e 57 ana = alitender;
ef8220aa 58
59 coutput1 = mgr->CreateContainer("emcal_tender_event",
60 AliESDEvent::Class(),
61 AliAnalysisManager::kExchangeContainer,
62 "default_tender");
a56c1f4e 63 }
64 else if (evhand->InheritsFrom("AliAODInputHandler")) {
a56c1f4e 65 AliEmcalTenderTask* emcaltender = new AliEmcalTenderTask("AliEmcalTenderTask");
66 emcaltender->SetEMCALTenderSupply(EMCALSupply);
67 ana = emcaltender;
ef8220aa 68 coutput1 = mgr->CreateContainer("emcal_tender_event",
69 AliAODEvent::Class(),
70 AliAnalysisManager::kExchangeContainer,
71 "default_tender");
a56c1f4e 72 }
73 else {
74 ::Error("AddTaskEMCALTender", "Input event handler not recognized, AOD/ESD expected. Returning...");
75 return NULL;
76 }
77
78 mgr->AddTask(ana);
a55e4f1d 79
fd650c0d 80 // Create ONLY the output containers for the data produced by the task.
81 // Get and connect other common input/output containers via the manager as below
82 //==============================================================================
d0ed1257 83
ef8220aa 84 mgr->ConnectInput(ana, 0, mgr->GetCommonInputContainer());
85 mgr->ConnectOutput(ana, 1, coutput1 );
fd650c0d 86
87 return ana;
88}