1 AliAnalysisTask *AddTaskHFEpPb(Bool_t isAOD = kFALSE){
\r
2 // Switches for the TOF-TPC analysis
\r
3 Bool_t kTPC_Only = kTRUE;
\r
4 Bool_t kTPCTOF_Ref = kTRUE;
\r
5 Bool_t kTPCTOF_Sys = kFALSE;
\r
6 Bool_t kTRD_Test = kFALSE;
\r
7 //get the current analysis manager
\r
8 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
\r
10 Error("AddTask_hfe_HFE", "No analysis manager found.");
\r
14 Bool_t MCthere=kTRUE;
\r
15 AliMCEventHandler *mcH = dynamic_cast<AliMCEventHandler*>(mgr->GetMCtruthEventHandler());
\r
20 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
\r
22 //@@ 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
\r
24 // Default settings
\r
25 const int kDefITScl = 3;
\r
26 const int kDefTPCcl = 110;
\r
27 const int kDefTPCclPID = 80;
\r
28 const double kDefDCAr = 1.;
\r
29 const double kDefDCAz = 2.;
\r
30 // For pPb, new fits by Martin, 07.02.2013
\r
31 const double kDefTPCs = 0.045;
\r
32 // it seems the sigma is 1 and not 0.88 (3 sigma = 2.685)
\r
33 const double kDefTPCu = 3.045;
\r
34 const double kDefTOFs = 3.;
\r
36 Double_t dEdxlm[12] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; // 50%
\r
37 Double_t dEdxhm[12] = {3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0};
\r
39 Double_t tpcl0[12] = {-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0}; // 84%
\r
40 Double_t tpcl1[12] = {-0.26,-0.26,-0.26,-0.26,-0.26,-0.26,-0.26,-0.26,-0.26,-0.26,-0.26,-0.26}; // 60%
\r
41 Double_t tpcl2[12] = {0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25}; // 40%
\r
45 const double kDefTPCs1 = 0.034;
\r
46 const double kDefTPCu1 = 2.674;
\r
49 // for the moment (09.02.2013) use the same as TOF-TPC. Refine later on
\r
50 RegisterTaskPID2(MCthere,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth);
\r
53 //------------------------------//
\r
55 //------------------------------//
\r
59 // Fits by Martin 07.02.2013
\r
63 RegisterTaskPID2(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth);
\r
64 RegisterTaskPID2(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,0.295,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth);
\r
67 RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&dEdxlm[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth); // 50%
\r
69 // RegisterTask(MCthere,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl0[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth); // 84%
\r
77 RegisterTaskPID2(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,-0.835,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth);
\r
79 RegisterTaskPID2(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,-0.184,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth);
\r
81 RegisterTaskPID2(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,0.265,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth);
\r
85 RegisterTaskPID2(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,2.0,0,AliHFEextraCuts::kBoth);
\r
86 RegisterTaskPID2(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,4.0,0,AliHFEextraCuts::kBoth);
\r
87 // TOF latest mismatch - helps nothing
\r
88 //RegisterTaskPID2(MCthere,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,kDefTOFs,1,AliHFEextraCuts::kBoth);
\r
90 // ITS hits and SPD request
\r
91 RegisterTaskPID2(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,4,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth);
\r
92 RegisterTaskPID2(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,5,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth);
\r
93 RegisterTaskPID2(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,3,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kFirst);
\r
94 RegisterTaskPID2(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,4,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kFirst);
\r
97 RegisterTaskPID2(MCthere,isAOD,100,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth);
\r
98 RegisterTaskPID2(MCthere,isAOD,120,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth);
\r
99 RegisterTaskPID2(MCthere,isAOD,130,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth);
\r
100 // TPC clusters PID
\r
101 RegisterTaskPID2(MCthere,isAOD,kDefTPCcl,100,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth);
\r
109 //===============================================================================
\r
111 AliAnalysisTask *RegisterTask(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=120, Int_t tpcClsPID = 80,
\r
112 Int_t itsCls=4, Double_t dcaxy=1.0, Double_t dcaz=2.0,
\r
113 Double_t *tpcdEdxcutlow=NULL,
\r
114 Double_t *tpcdEdxcuthigh=NULL,
\r
115 //Double_t tpcs=-0.0113, Double_t tpcu=3.09,
\r
116 Double_t tofs=3., Int_t tofm=0,
\r
117 Int_t itshitpixel = AliHFEextraCuts::kBoth,
\r
118 Bool_t withetacorrection = kFALSE){
\r
120 Int_t idcaxy = (Int_t)(dcaxy*10.);
\r
121 Int_t idcaz = (Int_t)(dcaz*10.);
\r
123 if(tpcdEdxcutlow) tpclow = (Int_t) (tpcdEdxcutlow[0]*1000.);
\r
124 Int_t itofs = (Int_t)(tofs*10.);
\r
125 Int_t ipixelany = itshitpixel;
\r
126 Int_t ietacorr = 0;
\r
127 if(withetacorrection) ietacorr = 1;
\r
129 TString appendix(TString::Format("centTPCc%dTPCp%dITS%dDCAr%dz%dTPCs%dTOFs%dm%ipa%d",tpcCls,
\r
130 tpcClsPID,itsCls,idcaxy,idcaz,tpclow,itofs,tofm,ipixelany));
\r
131 printf("Add macro appendix %s\n", appendix.Data());
\r
134 gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/configs/pPb/ConfigHFEpPb.C");
\r
135 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
\r
136 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
\r
137 AliAnalysisTaskHFE *task = ConfigHFEpPb(useMC, isAOD, appendix, tpcCls, tpcClsPID, itsCls, dcaxy, dcaz,
\r
138 tpcdEdxcutlow,tpcdEdxcuthigh,
\r
139 tofs,tofm,itshitpixel);
\r
142 task->SetAODAnalysis();
\r
144 task->SetESDAnalysis();
\r
146 task->SetHasMCData(kTRUE);
\r
148 task->SetHasMCData(kFALSE);
\r
150 task->SelectCollisionCandidates(AliVEvent::kINT7);
\r
152 TString containerName = mgr->GetCommonFileName();
\r
153 containerName += ":HFEpPbcent";
\r
154 containerName += appendix.Data();
\r
155 printf("container name: %s\n", containerName.Data());
\r
157 //create data containers
\r
158 task->ConnectOutput(1, mgr->CreateContainer(Form("HFE_Results_%s", appendix.Data()),
\r
159 TList::Class(), AliAnalysisManager::kOutputContainer,
\r
160 containerName.Data()));
\r
161 task->ConnectOutput(2, mgr->CreateContainer(Form("HFE_QA_%s", appendix.Data()), TList::Class(),
\r
162 AliAnalysisManager::kOutputContainer,
\r
163 containerName.Data()));
\r
164 mgr->ConnectInput(task, 0, cinput );
\r
166 mgr->AddTask(task);
\r
170 //===============================================================================
\r
172 AliAnalysisTask *RegisterTaskPID2(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=120, Int_t tpcClsPID = 80,
\r
173 Int_t itsCls=4, Double_t dcaxy=1.0, Double_t dcaz=2.0,
\r
174 Double_t tpcs=-0.0113, Double_t tpcu=3.09, Double_t tofs=3.,
\r
176 Int_t itshitpixel = AliHFEextraCuts::kBoth,
\r
177 Bool_t withetacorrection = kTRUE){
\r
178 gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/configs/pPb/ConfigHFEmbpPb.C");
\r
179 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
\r
180 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
\r
181 AliAnalysisTaskHFE *task = ConfigHFEmbpPb(useMC, isAOD, tpcCls, tpcClsPID, itsCls, dcaxy, dcaz,
\r
182 tpcs,tpcu,tofs,tofm,3.,kFALSE,kTRUE,kFALSE,itshitpixel,withetacorrection);
\r
184 task->SetAODAnalysis();
\r
186 task->SetESDAnalysis();
\r
188 task->SetHasMCData(kTRUE);
\r
190 task->SetHasMCData(kFALSE);
\r
192 task->SelectCollisionCandidates(AliVEvent::kINT7);
\r
194 Int_t idcaxy = (Int_t)(dcaxy*10.);
\r
195 Int_t idcaz = (Int_t)(dcaz*10.);
\r
196 Int_t itpcs = (Int_t)(tpcs*1000.);
\r
197 Int_t itofs = (Int_t)(tofs*10.);
\r
198 Int_t ipixelany = itshitpixel;
\r
199 Int_t ietacorr = 0;
\r
200 if(withetacorrection) ietacorr = 1;
\r
202 TString appendix(TString::Format("TPCc%dTPCp%dITS%dDCAr%dz%dTPCs%dTOFs%dm%ipa%d",tpcCls,
\r
203 tpcClsPID,itsCls,idcaxy,idcaz,itpcs,itofs,tofm,ipixelany));
\r
204 printf("Add macro appendix %s\n", appendix.Data());
\r
206 TString containerName = mgr->GetCommonFileName();
\r
207 containerName += ":HFEpPbmb";
\r
208 containerName += appendix.Data();
\r
209 printf("container name: %s\n", containerName.Data());
\r
211 //create data containers
\r
212 task->ConnectOutput(1, mgr->CreateContainer(Form("HFE_Results_%s", appendix.Data()),
\r
213 TList::Class(), AliAnalysisManager::kOutputContainer,
\r
214 containerName.Data()));
\r
215 task->ConnectOutput(2, mgr->CreateContainer(Form("HFE_QA_%s", appendix.Data()), TList::Class(),
\r
216 AliAnalysisManager::kOutputContainer,
\r
217 containerName.Data()));
\r
218 mgr->ConnectInput(task, 0, cinput );
\r
220 mgr->AddTask(task);
\r
225 //=========================================================================
\r