]>
Commit | Line | Data |
---|---|---|
0b7c6a7b | 1 | AliAnalysisTask *AddTaskHFEnpepPb(Bool_t isMC, |
2 | Bool_t isAOD, | |
3 | Bool_t kNPERef = kTRUE, | |
4 | Bool_t kNPEkAny = kFALSE, | |
5 | Bool_t kNPEsystematics | |
6 | ){ | |
8dc7fa14 | 7 | |
8 | // Default settings (TOF-TPC pPb) | |
9 | const int kDefTPCcl = 110; | |
10 | const int kDefTPCclPID = 80; | |
11 | const int kDefITScl = 4; | |
12 | const double kDefDCAr = 1.; | |
13 | const double kDefDCAz = 2.; | |
14 | const double kDefTPCs = 0.06; | |
15 | const double kDefTPCu = 3.06; | |
16 | const double kDefTOFs = 3.; | |
17 | const double kDefEtaIncMin = -0.6; | |
18 | const double kDefEtaIncMax = 0.6; | |
19 | ||
20 | // Default setting for the associated electron for the NonPhotonic Analysis | |
0b7c6a7b | 21 | const double kassETAm = -0.8; |
22 | const double kassETAp = 0.8; | |
8dc7fa14 | 23 | const int kassITS = 2; |
24 | const int kassTPCcl = 60; | |
25 | const int kassTPCPIDcl = 60; | |
26 | const double kassDCAr = 1.0; | |
27 | const double kassDCAz = 2.0; | |
28 | const double kassTPCSminus = -3.0; | |
29 | const double kassTPCSplus = 3.0; | |
30 | ||
31 | enum{ | |
32 | kHFEV0A = 1, | |
33 | kHFEV0M = 2, | |
34 | kHFECL1 = 3, | |
35 | kHFEZNA = 4 | |
36 | }; | |
37 | ||
38 | //get the current analysis manager | |
39 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
40 | if (!mgr) { | |
41 | Error("AddTask_hfe_HFE", "No analysis manager found."); | |
42 | return 0; | |
43 | } | |
44 | ||
45 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); | |
46 | ||
47 | //@@ 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
48 | ||
49 | Double_t dEdxlm[12], dEdxhm[12], dEdxaclm[12], dEdxachm[12]; | |
50 | for(int icent = 0; icent < 12; icent++){ | |
51 | dEdxlm[icent] = kDefTPCs; | |
52 | dEdxhm[icent] = kDefTOFs; | |
53 | dEdxaclm[icent] = kassTPCSminus; | |
54 | dEdxachm[icent] = kassTPCSplus; | |
55 | } | |
56 | ||
57 | if(kNPERef){ | |
58 | // ************************************************************** | |
59 | // | |
60 | // Reference task | |
61 | // | |
62 | // ************************************************************** | |
0b7c6a7b | 63 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 64 | kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 65 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 66 | kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kFALSE); |
67 | } | |
68 | ||
69 | if(kNPEkAny){ | |
70 | // ************************************************************** | |
71 | // | |
72 | // task for kAny instead of kBoth | |
73 | // | |
74 | // ************************************************************** | |
0b7c6a7b | 75 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kAny, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 76 | kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 77 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kAny, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 78 | kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kFALSE); |
79 | } | |
80 | ||
81 | if(kNPEsystematics){ | |
82 | // ************************************************************** | |
83 | // | |
84 | // Cut systematics on the associated track | |
85 | // | |
86 | // ************************************************************** | |
0b7c6a7b | 87 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 88 | 0.0, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 89 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 90 | kassETAm, 0.0, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 91 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 92 | kassETAm, kassETAp, 3, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 93 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 94 | kassETAm, kassETAp, kassITS, 80, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 95 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 96 | kassETAm, kassETAp, kassITS, 100, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 97 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 98 | kassETAm, kassETAp, kassITS, 40, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 99 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 100 | kassETAm, kassETAp, kassITS, kassTPCcl, 40, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 101 | RegisterTaskNPEpPb( isMC, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 102 | kassETAm, kassETAp, kassITS, kassTPCcl, 80, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 103 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 104 | kassETAm, kassETAp, kassITS, kassTPCcl, 100, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 105 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 106 | kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, 0.5, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 107 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 108 | kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, 2, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 109 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 110 | kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, 1, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 111 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 112 | kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, 4, dEdxaclm, dEdxachm, kTRUE, kTRUE); |
0b7c6a7b | 113 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 114 | kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm1, dEdxachm1, kTRUE, kTRUE); |
0b7c6a7b | 115 | RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, |
8dc7fa14 | 116 | kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm2, dEdxachm2, kTRUE, kTRUE); |
117 | ||
118 | } | |
119 | ||
120 | return NULL; | |
121 | } | |
122 | ||
123 | //=============================================================================== | |
124 | ||
0b7c6a7b | 125 | AliAnalysisTask *RegisterTaskNPEpPb(Bool_t isMC, Bool_t isAOD, |
8dc7fa14 | 126 | Int_t tpcCls=120, Int_t tpcClsPID=80, |
127 | Int_t itsCls=4, Double_t dcaxy=1.0, Double_t dcaz=2.0, | |
128 | Double_t *tpcdEdxcutlow=NULL, Double_t *tpcdEdxcuthigh=NULL, | |
129 | Double_t tofs=3., Int_t itshitpixel =AliHFEextraCuts::kBoth, Int_t icent=1, | |
0b7c6a7b | 130 | Double_t etaIncMin = -0.8, Double_t etaIncMax = 0.8, |
131 | Double_t assETAm=-0.8, Double_t assETAp=0.8, Int_t assITS=2, Int_t assTPCcl=100, | |
8dc7fa14 | 132 | Int_t assTPCPIDcl=80, Double_t assDCAr=1.0, Double_t assDCAz=2.0, |
133 | Double_t *assTPCSminus = NULL, Double_t *assTPCSplus=NULL , | |
134 | Bool_t useCat1Tracks = kTRUE, Bool_t useCat2Tracks = kTRUE) | |
135 | { | |
136 | ||
0b7c6a7b | 137 | Int_t iassETAm = (Int_t)(assETAm*10); |
138 | Int_t iassETAp = (Int_t)(assETAp*10); | |
8dc7fa14 | 139 | Int_t iassDCAr = (Int_t)(assDCAr*10); |
140 | Int_t iassDCAz = (Int_t)(assDCAz*10); | |
141 | Int_t iassTPCSminus = assTPCSminus ? (Int_t)(assTPCSminus[0]*10) : 0; | |
142 | Int_t iassTPCSplus = assTPCSplus ? (Int_t)(assTPCSplus[0]*10) : 0; | |
143 | Int_t ipixelany = itshitpixel; | |
144 | Int_t icat1 = useCat1Tracks ? 1 : 0; | |
145 | Int_t icat2 = useCat2Tracks ? 1 : 0; | |
146 | ||
147 | if (icent == 2) TString cesti("V0M"); | |
148 | else if (icent == 3) TString cesti("CL1"); | |
149 | else if (icent == 4) TString cesti("ZNA"); | |
150 | else TString cesti("V0A"); | |
151 | ||
152 | TString appendix(TString::Format("PhotonicSPD%dEtam%dEtap%dITS%dTPCcl%dTPCPIDcl%dDCAr%dDCAz%dTPCSminus%dTPCSplus%d%sCA%dCB%d", ipixelany, iassETAm, iassETAp, assITS, assTPCcl, | |
153 | assTPCPIDcl, iassDCAr, iassDCAz, iassTPCSminus, iassTPCSplus, cesti.Data(), icat1, icat2)); | |
154 | printf("Add macro appendix %s\n", appendix.Data()); | |
155 | ||
156 | gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/configs/pPb/ConfigHFEnpepPb.C"); | |
157 | ||
158 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
159 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); | |
0b7c6a7b | 160 | AliAnalysisTaskHFE *task = ConfigHFEnpepPb(isMC, isAOD, appendix, tpcCls, tpcClsPID, itsCls, dcaxy, dcaz, tpcdEdxcutlow, tpcdEdxcuthigh, tofs, 0, itshitpixel, icent, etaIncMin, etaIncMax, |
8dc7fa14 | 161 | assETAm, assETAp, assITS, assTPCcl, assTPCPIDcl, assDCAr, assDCAz, assTPCSminus, assTPCSplus, useCat1Tracks, useCat2Tracks); |
162 | if(isAOD) | |
163 | task->SetAODAnalysis(); | |
164 | else | |
165 | task->SetESDAnalysis(); | |
166 | ||
0b7c6a7b | 167 | if (isMC) task->SetHasMCData(kTRUE); |
8dc7fa14 | 168 | else task->SetHasMCData(kFALSE); |
169 | ||
170 | task->SelectCollisionCandidates(AliVEvent::kINT7); | |
171 | ||
172 | TString containerName = mgr->GetCommonFileName(); | |
173 | containerName += ":HFEtask"; | |
174 | containerName += appendix.Data(); | |
175 | printf("container name: %s\n", containerName.Data()); | |
176 | ||
177 | //create data containers | |
178 | task->ConnectOutput(1, mgr->CreateContainer(Form("HFE_Results_%s", appendix.Data()), TList::Class(), AliAnalysisManager::kOutputContainer, containerName.Data() )); | |
179 | task->ConnectOutput(2, mgr->CreateContainer(Form("HFE_QA_%s", appendix.Data()), TList::Class(), AliAnalysisManager::kOutputContainer, containerName.Data())); | |
180 | mgr->ConnectInput(task, 0, cinput ); | |
181 | ||
182 | mgr->AddTask(task); | |
183 | ||
184 | return NULL; | |
185 | } |