1 AliTender *AddTaskEMCALTender(const char *geoname="EMCAL_COMPLETEV1", const char* datatype="pp")
3 // Parameters: geoname = "EMCAL_FIRSTYEARV1" or "EMCAL_COMPLETEV1" or ""
5 // Get the pointer to the existing analysis manager via the static access method.
6 //==============================================================================
7 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
9 ::Error("AddTaskTrgContam", "No analysis manager to connect to.");
13 // Create the task and configure it.
14 //===========================================================================
15 AliTender* ana = new AliTender("AliTender");
17 ana->SelectCollisionCandidates( AliVEvent::kEMC1 | AliVEvent::kMB | AliVEvent::kEMC7 | AliVEvent::kINT7);
20 Bool_t ismc = (mgr->GetMCtruthEventHandler() != NULL);
24 // Adding EMCAL supply
25 AliEMCALTenderSupply *EMCALSupply=new AliEMCALTenderSupply("EMCALtender");
26 EMCALSupply->SetDebugLevel(2);
28 AliEMCALRecParam *params = new AliEMCALRecParam();
29 params->SetClusteringThreshold(0.1); // 100 MeV
30 params->SetMinECut(0.05); //50 MeV
32 params->SetTimeCut(1e6);//Open this cut for AODs
33 params->SetTimeMin(-1);//Open this cut for AODs
34 params->SetTimeMax(1e6);//Open this cut for AODs
35 EMCALSupply->SetRecParam(params);
37 EMCALSupply->SetEMCALGeometryName(geoname);
39 EMCALSupply->SwitchOffCellFiducialRegion(); //Does NOT remove edge clusters
41 if (1){//datatype == "pp") {
42 //::Info("AddTaskEMCALTender", "USING pp data configuration...");
43 //params->SetClusterizerFlag(AliEMCALRecParam::kClusterizerv2); //Std for pbpb
44 EMCALSupply->SwitchOffRecalDistBadChannel();
45 EMCALSupply->SwitchOnReCalibrateCluster();
46 EMCALSupply->SwitchOnRecalculateClusPos();
47 //EMCALSupply->SetNonLinearityFunction(AliEMCALTenderSupply::kBeamTestCorrected);
48 //EMCALSupply->SwitchOnUpdateCell(); // will update cells and reclusterize
49 //EMCALSupply->SwitchOnReclustering(); //SwitchOnReclustering if needed
51 //::Info("AddTaskEMCALTender", "USING PbPb data configuration...");
52 //params->SetClusterizerFlag(AliEMCALRecParam::kClusterizerv2); //Std for pbpb
53 EMCALSupply->SwitchOnUpdateCell(); // will update cells and reclusterize
54 //EMCALSupply->SwitchOnReclustering(); //SwitchOnReclustering if needed
57 ::Info("AddTaskEMCALTender", "USING MC configuration...");
59 EMCALSupply->SetMass(0.139);
60 //EMCALSupply->SetStep(5);
61 //EMCALSupply->SwitchOnCutEtaPhiSum();
62 //EMCALSupply->SetRCut(0.0025);
64 EMCALSupply->SwitchOnCutEtaPhiSeparate();
65 EMCALSupply->SetEtaCut(0.025);
66 EMCALSupply->SetPhiCut(0.05);
68 ana->AddSupply(EMCALSupply);
69 // Create ONLY the output containers for the data produced by the task.
70 // Get and connect other common input/output containers via the manager as below
71 //==============================================================================
72 AliAnalysisDataContainer *coutput1 =
73 mgr->CreateContainer("tender_event",
75 AliAnalysisManager::kExchangeContainer,
77 mgr->ConnectInput (ana, 0, mgr->GetCommonInputContainer());
78 mgr->ConnectOutput (ana, 1, coutput1 );