]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/EMCALTasks/macros/AddTaskEMCALTender.C
charge selection on trigger particle
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / macros / AddTaskEMCALTender.C
CommitLineData
c4c7c022 1// $Id$
2
3AliTender *AddTaskEMCALTender(
4 const char *geoname="EMCAL_COMPLETEV1",
5 const char* datatype="pp")
fd650c0d 6{
7 // Parameters: geoname = "EMCAL_FIRSTYEARV1" or "EMCAL_COMPLETEV1" or ""
8
9 // Get the pointer to the existing analysis manager via the static access method.
10 //==============================================================================
11 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
12 if (!mgr) {
13 ::Error("AddTaskTrgContam", "No analysis manager to connect to.");
14 return NULL;
15 }
16
17 // Create the task and configure it.
18 //===========================================================================
27fde6c7 19 AliTender* ana = new AliTender("AliTender");
fd650c0d 20
21 ana->SelectCollisionCandidates( AliVEvent::kEMC1 | AliVEvent::kMB | AliVEvent::kEMC7 | AliVEvent::kINT7);
22
23
24 Bool_t ismc = (mgr->GetMCtruthEventHandler() != NULL);
25
26
27 mgr->AddTask(ana);
28 // Adding EMCAL supply
29 AliEMCALTenderSupply *EMCALSupply=new AliEMCALTenderSupply("EMCALtender");
30 EMCALSupply->SetDebugLevel(2);
31
32 AliEMCALRecParam *params = new AliEMCALRecParam();
33 params->SetClusteringThreshold(0.1); // 100 MeV
34 params->SetMinECut(0.05); //50 MeV
35 params->SetW0(4.5);
36 params->SetTimeCut(1e6);//Open this cut for AODs
37 params->SetTimeMin(-1);//Open this cut for AODs
38 params->SetTimeMax(1e6);//Open this cut for AODs
39 EMCALSupply->SetRecParam(params);
40
41 EMCALSupply->SetEMCALGeometryName(geoname);
42
43 EMCALSupply->SwitchOffCellFiducialRegion(); //Does NOT remove edge clusters
44 if (!ismc) {
45 if (1){//datatype == "pp") {
27fde6c7 46 //::Info("AddTaskEMCALTender", "USING pp data configuration...");
fd650c0d 47 //params->SetClusterizerFlag(AliEMCALRecParam::kClusterizerv2); //Std for pbpb
3823de33 48 EMCALSupply->SwitchOnRecalDistBadChannel();
fd650c0d 49 EMCALSupply->SwitchOnReCalibrateCluster();
50 EMCALSupply->SwitchOnRecalculateClusPos();
51 //EMCALSupply->SetNonLinearityFunction(AliEMCALTenderSupply::kBeamTestCorrected);
52 //EMCALSupply->SwitchOnUpdateCell(); // will update cells and reclusterize
53 //EMCALSupply->SwitchOnReclustering(); //SwitchOnReclustering if needed
54 } else {
27fde6c7 55 //::Info("AddTaskEMCALTender", "USING PbPb data configuration...");
fd650c0d 56 //params->SetClusterizerFlag(AliEMCALRecParam::kClusterizerv2); //Std for pbpb
3823de33 57 EMCALSupply->SwitchOnCalibrateTime(); //
fd650c0d 58 EMCALSupply->SwitchOnUpdateCell(); // will update cells and reclusterize
59 //EMCALSupply->SwitchOnReclustering(); //SwitchOnReclustering if needed
60 }
61 } else {
62 ::Info("AddTaskEMCALTender", "USING MC configuration...");
63 }
64 EMCALSupply->SetMass(0.139);
65 //EMCALSupply->SetStep(5);
66 //EMCALSupply->SwitchOnCutEtaPhiSum();
67 //EMCALSupply->SetRCut(0.0025);
68
69 EMCALSupply->SwitchOnCutEtaPhiSeparate();
70 EMCALSupply->SetEtaCut(0.025);
71 EMCALSupply->SetPhiCut(0.05);
72
73 ana->AddSupply(EMCALSupply);
74 // Create ONLY the output containers for the data produced by the task.
75 // Get and connect other common input/output containers via the manager as below
76 //==============================================================================
85ed2f4c 77 AliAnalysisDataContainer *coutput1 =
78 mgr->CreateContainer("tender_event",
79 AliESDEvent::Class(),
80 AliAnalysisManager::kExchangeContainer,
81 "default_tender");
fd650c0d 82 mgr->ConnectInput (ana, 0, mgr->GetCommonInputContainer());
83 mgr->ConnectOutput (ana, 1, coutput1 );
84
85 return ana;
86}