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