3 AliAnalysisTaskSE *AddTaskEMCALTender(
4 const char* p = "lhc11h",
5 Bool_t timeCut = kFALSE,
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,
15 Bool_t reclusterize = kFALSE,
16 Float_t seedthresh = 0.1, // 100 MeV
17 Float_t cellthresh = 0.05, // 50 MeV
18 UInt_t clusterizer = AliEMCALRecParam::kClusterizerNxN,
19 Bool_t trackMatch = kFALSE,
20 Bool_t updateCellOnly= kFALSE,
23 // Get the pointer to the existing analysis manager via the static access method.
24 //==============================================================================
25 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
27 ::Error("AddTaskEMCALTender", "No analysis manager to connect to.");
31 AliVEventHandler *evhand = mgr->GetInputEventHandler();
33 // Create the task and configure it.
34 //===========================================================================
36 AliAnalysisTaskSE *ana = 0;
37 AliAnalysisDataContainer *coutput1 = 0;
39 UInt_t nonLinFunct = AliEMCALRecoUtils::kBeamTestCorrected;
43 if (period == "lhc12a15e")
44 nonLinFunct = AliEMCALRecoUtils::kPi0MCv3;
45 else if (period == "lhc12a15a")
46 nonLinFunct = AliEMCALRecoUtils::kPi0MCv2;
48 gROOT->LoadMacro("$ALICE_ROOT/PWG/EMCAL/macros/ConfigEmcalTenderSupply.C");
50 AliEMCALTenderSupply *EMCALSupply = ConfigEmcalTenderSupply(timeCut, distBC, recalibClus, recalibClusPos, nonLinearCorr, remExotic,
51 fidRegion, calibEnergy, calibTime, remBC, nonLinFunct, reclusterize, seedthresh,
52 cellthresh, clusterizer, trackMatch, updateCellOnly);
54 EMCALSupply->SetPass(pass);
56 if (evhand->InheritsFrom("AliESDInputHandler")) {
57 AliTender* alitender = new AliTender("AliTender");
58 alitender->AddSupply(EMCALSupply);
59 alitender->SetDefaultCDBStorage("raw://");
62 coutput1 = mgr->CreateContainer("emcal_tender_event",
64 AliAnalysisManager::kExchangeContainer,
67 else if (evhand->InheritsFrom("AliAODInputHandler")) {
68 AliEmcalTenderTask* emcaltender = new AliEmcalTenderTask("AliEmcalTenderTask");
69 emcaltender->SetEMCALTenderSupply(EMCALSupply);
71 coutput1 = mgr->CreateContainer("emcal_tender_event",
73 AliAnalysisManager::kExchangeContainer,
77 ::Error("AddTaskEMCALTender", "Input event handler not recognized, AOD/ESD expected. Returning...");
83 // Create ONLY the output containers for the data produced by the task.
84 // Get and connect other common input/output containers via the manager as below
85 //==============================================================================
87 mgr->ConnectInput(ana, 0, mgr->GetCommonInputContainer());
88 mgr->ConnectOutput(ana, 1, coutput1 );