]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/UserTasks/EmcalTasks/macros/AddTaskClusterizerFW.C
add fixed window clusterizer macro S. Aiola
[u/mrichter/AliRoot.git] / PWG4 / UserTasks / EmcalTasks / macros / AddTaskClusterizerFW.C
CommitLineData
ace060ef 1// $Id: $
2
3AliAnalysisTaskEMCALClusterizeFast* AddTaskClusterizerFW(Bool_t clusL0, Bool_t fOR)
4{
5 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
6 if (!mgr) {
7 ::Error("AddTaskClusterizerFW", "No analysis manager found.");
8 return 0;
9 }
10
11 Bool_t ismc=kFALSE;
12 ismc = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
13 if (ismc)
14 ::Warning("AddTaskClusterizerFW", "Task was Never tested on MC data");
15
16 TString name("ClusterizerFW");
17 TString nameout("Clusters")
18 Int_t n, s;
19 Float_t minE, minT, maxT;
20
21 if (clusL0) {
22 name += "L0";
23 nameout += "L0";
24 n = 4;
25 s = 2;
26 } else {
27 name += "L1";
28 nameout += "L1";
29 n = 32;
30 s = 8;
31 }
32
33 if (fOR) {
34 name += "FOR";
35 nameout += "FOR";
36 minE = 3;
37 minT = 0;
38 maxT = 20;
39 } else {
40 name += "FEE";
41 nameout += "FEE";
42 minE = .045;
43 minT = -1.;
44 maxT = +1.;
45 }
46
47
48 AliAnalysisTaskEMCALClusterizeFast *task = new AliAnalysisTaskEMCALClusterizeFast(name);
49 AliEMCALRecParam *recparam = task->GetRecParam();
50 recparam->SetClusterizerFlag(AliEMCALRecParam::kClusterizerFW);
51 recparam->SetMinECut(minE);
52 recparam->SetTimeMax(maxT);
53 recparam->SetTimeMin(minT);
54 task->SetGeometryName(AliEMCALGeometry::GetDefaultGeometryName());
55 task->SetAttachClusters(kTRUE);
56 task->SetOverwrite(kFALSE);
57 task->SetNewClusterArrayName(nameout);
58 task->SetnPhi(n);
59 task->SetnEta(n);
60 task->SetShiftPhi(s);
61 task->SetShiftEta(s);
62 task->SetTRUShift(clusL0);
63 task->SetClusterizeFastORs(fOR);
64 task->SetLoadPed(kFALSE);
65 task->SetLoadCalib(kFALSE);
66 task->SetRecalibrateCellsOnly(kFALSE);
67
68 mgr->AddTask(task);
69 mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
70
71 return task;
72}