]>
Commit | Line | Data |
---|---|---|
1debda4a | 1 | // $Id$ |
ace060ef | 2 | |
27fde6c7 | 3 | AliAnalysisTaskEMCALClusterizeFast* AddTaskClusterizerFW( |
1debda4a | 4 | const char* trigType = "L0", // Trigger type: it can be "L0" (4x4, with 2x2 sliding inside SM), |
5 | //"L1GAMMA" (4x4, with 2x2 sliding through SMs), "L1JET" (40x40 with 4x4 sliding through SMs) | |
3119d479 | 6 | const Bool_t fOR = kFALSE, |
1debda4a | 7 | const TString & geomName = "EMCAL_COMPLETEV1" |
8 | ) | |
ace060ef | 9 | { |
10 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
11 | if (!mgr) { | |
12 | ::Error("AddTaskClusterizerFW", "No analysis manager found."); | |
13 | return 0; | |
14 | } | |
15 | ||
16 | Bool_t ismc=kFALSE; | |
17 | ismc = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE; | |
18 | if (ismc) | |
19 | ::Warning("AddTaskClusterizerFW", "Task was Never tested on MC data"); | |
20 | ||
21 | TString name("ClusterizerFW"); | |
d7984cbd | 22 | TString nameout("Clusters"); |
ace060ef | 23 | Int_t n, s; |
24 | Float_t minE, minT, maxT; | |
27fde6c7 | 25 | Bool_t slidingTRU; |
a55e4f1d | 26 | Bool_t cutL0time; |
3119d479 | 27 | UInt_t inputCellType = AliAnalysisTaskEMCALClusterizeFast::kFEEData; |
ace060ef | 28 | |
27fde6c7 | 29 | name += trigType; |
30 | nameout += trigType; | |
31 | ||
32 | if (!strcmp(trigType, "L0")) { | |
33 | n = 4; | |
34 | s = 2; | |
35 | slidingTRU = 0; | |
3119d479 | 36 | if (fOR) inputCellType = AliAnalysisTaskEMCALClusterizeFast::kL0FastORsTC; |
27fde6c7 | 37 | } else if (!strcmp(trigType, "L1GAMMA")) { |
ace060ef | 38 | n = 4; |
39 | s = 2; | |
27fde6c7 | 40 | slidingTRU = 1; |
3119d479 | 41 | if (fOR) inputCellType = AliAnalysisTaskEMCALClusterizeFast::kL1FastORs; |
a55e4f1d | 42 | } else if (!strcmp(trigType, "L1JET")) { |
43 | n = 32; | |
27fde6c7 | 44 | s = 4; |
45 | slidingTRU = 1; | |
3119d479 | 46 | if (fOR) inputCellType = AliAnalysisTaskEMCALClusterizeFast::kL1FastORs; |
ace060ef | 47 | } else { |
a55e4f1d | 48 | printf("trigType not valid, returning..."); |
27fde6c7 | 49 | return 0; |
ace060ef | 50 | } |
51 | ||
52 | if (fOR) { | |
53 | name += "FOR"; | |
54 | nameout += "FOR"; | |
55 | minE = 3; | |
a55e4f1d | 56 | minT = -20; |
ace060ef | 57 | maxT = 20; |
58 | } else { | |
59 | name += "FEE"; | |
60 | nameout += "FEE"; | |
61 | minE = .045; | |
62 | minT = -1.; | |
63 | maxT = +1.; | |
64 | } | |
65 | ||
ace060ef | 66 | AliAnalysisTaskEMCALClusterizeFast *task = new AliAnalysisTaskEMCALClusterizeFast(name); |
67 | AliEMCALRecParam *recparam = task->GetRecParam(); | |
68 | recparam->SetClusterizerFlag(AliEMCALRecParam::kClusterizerFW); | |
69 | recparam->SetMinECut(minE); | |
70 | recparam->SetTimeMax(maxT); | |
71 | recparam->SetTimeMin(minT); | |
27fde6c7 | 72 | task->SetGeometryName(geomName); |
ace060ef | 73 | task->SetAttachClusters(kTRUE); |
74 | task->SetOverwrite(kFALSE); | |
75 | task->SetNewClusterArrayName(nameout); | |
76 | task->SetnPhi(n); | |
77 | task->SetnEta(n); | |
78 | task->SetShiftPhi(s); | |
79 | task->SetShiftEta(s); | |
27fde6c7 | 80 | task->SetTRUShift(!slidingTRU); |
3119d479 | 81 | task->SetInputCellType(inputCellType); |
ace060ef | 82 | task->SetLoadPed(kFALSE); |
83 | task->SetLoadCalib(kFALSE); | |
84 | task->SetRecalibrateCellsOnly(kFALSE); | |
85 | ||
86 | mgr->AddTask(task); | |
87 | mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer()); | |
d7984cbd | 88 | |
89 | cout << " *** " << name << " configured *** " << endl; | |
ace060ef | 90 | |
91 | return task; | |
92 | } |