]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/QA/tasks/AliAnalysisTaskHLT.cxx
- included run number and date info in the output list
[u/mrichter/AliRoot.git] / HLT / QA / tasks / AliAnalysisTaskHLT.cxx
1 // $Id$
2 //**************************************************************************
3 //* This file is property of and copyright by the ALICE HLT Project        *
4 //* ALICE Experiment at CERN, All rights reserved.                         *
5 //*                                                                        *
6 //* Primary Authors: Zhongbao Yin <zbyin@mail.ccnu.edu.cn>,                *
7 //*                  Kalliopi Kanaki <Kalliopi.Kanaki@ift.uib.no>          *
8 //*                  for The ALICE HLT Project.                            *
9 //*                                                                        *
10 //* Permission to use, copy, modify and distribute this software and its   *
11 //* documentation strictly for non-commercial purposes is hereby granted   *
12 //* without fee, provided that the above copyright notice appears in all   *
13 //* copies and that both the copyright notice and this permission notice   *
14 //* appear in the supporting documentation. The authors make no claims     *
15 //* about the suitability of this software for any purpose. It is          *
16 //* provided "as is" without express or implied warranty.                  *
17 //**************************************************************************
18
19 /** @file  AliAnalysisTaskHLT.cxx  
20     @author Kalliopi Kanaki, Hege Erdal
21     @date 
22     @brief An analysis task containing
23     loops over HLT and offline ESD trees for comparing
24     AliESDtrack properties.    
25 */
26
27 //#include <iostream>
28
29 class AliAnalysisTask;
30 class AliAnalysisManager;
31
32 #include "AliAnalysisTaskHLT.h"
33 #include "AliHLTGlobalTriggerDecision.h"
34 #include "TH1F.h"
35 #include "TH2F.h"
36 #include "TString.h"
37 #include "AliESDEvent.h"
38 #include "AliESDtrackCuts.h"
39 #include "AliESDInputHandler.h"
40 #include "AliTracker.h" 
41
42 #include "TText.h"
43 #include "TTimeStamp.h"
44
45 ClassImp(AliAnalysisTaskHLT)
46
47 //======================================================================================================
48
49 AliAnalysisTaskHLT::AliAnalysisTaskHLT()
50 :
51 AliAnalysisTaskSE()
52   ,fUseHLTTrigger(kFALSE)
53   //,fESDOfftrackCuts(0)
54   //,fESDHLTtrackCuts(0)
55   ,fOutputList(0)
56   ,fHistTrigger(0)
57   ,fChargeOff(0)  
58   ,fMomentumOff(0)
59   ,fDCArOff(0)          
60   ,fDCAzOff(0)          
61   ,fNclusterOff(0)
62   ,fNclusterOffwCut(0)          
63   ,fPhiOff(0)   
64   ,fMultOff(0)  
65   ,fXYvertexOff(0)      
66   ,fXvertexOff(0)           
67   ,fYvertexOff(0)           
68   ,fZvertexOff(0)
69   ,fEtaOff(0)
70   ,fEtaMomentumcutOff(0)
71   ,fNclusVSphiOff(0)
72   ,fNclusVSthetaOff(0)
73   ,fEventSpecieOff(0)
74   
75   ,fChargeHLT(0)
76   ,fMomentumHLT(0)
77   ,fDCArHLT(0)  
78   ,fDCAzHLT(0)  
79   ,fNclusterHLT(0)
80   ,fNclusterHLTwCut(0)
81   ,fPhiHLT(0)     
82   ,fMultHLT(0)  
83   ,fXYvertexHLT(0)
84   ,fXvertexHLT(0)
85   ,fYvertexHLT(0)
86   ,fZvertexHLT(0)
87   ,fEtaHLT(0)
88   ,fEtaMomentumcutHLT(0)
89   ,fNclusVSphiHLT(0)        
90   ,fNclusVSthetaHLT(0)
91   ,fEventSpecieHLT(0)
92   ,fBeamType()
93   ,fTextBox(0)
94   ,fSwitch(kTRUE)
95 {
96   // Constructor
97   // Define input and output slots here
98   // Input slot #0 works with a TChain
99   // DefineInput(0, TChain::Class());
100   // Output slot #0 writes into a TH1 container
101 }
102  
103 AliAnalysisTaskHLT::AliAnalysisTaskHLT(const char *name)
104   :
105   AliAnalysisTaskSE(name) 
106   ,fUseHLTTrigger(kFALSE)   
107   //,fESDOfftrackCuts(0)
108   //,fESDHLTtrackCuts(0)
109   ,fOutputList(0)
110   ,fHistTrigger(0)
111   ,fChargeOff(0)  
112   ,fMomentumOff(0)
113   ,fDCArOff(0) 
114   ,fDCAzOff(0) 
115   ,fNclusterOff(0)
116   ,fNclusterOffwCut(0)  
117   ,fPhiOff(0)   
118   ,fMultOff(0)  
119   ,fXYvertexOff(0)      
120   ,fXvertexOff(0)           
121   ,fYvertexOff(0)           
122   ,fZvertexOff(0)
123   ,fEtaOff(0)
124   ,fEtaMomentumcutOff(0)
125   ,fNclusVSphiOff(0)
126   ,fNclusVSthetaOff(0)
127   ,fEventSpecieOff(0)
128
129   ,fChargeHLT(0)      
130   ,fMomentumHLT(0)
131   ,fNclusterHLT(0)
132   ,fNclusterHLTwCut(0)
133   ,fPhiHLT(0)     
134   ,fMultHLT(0)  
135   ,fXYvertexHLT(0)
136   ,fXvertexHLT(0)
137   ,fYvertexHLT(0)
138   ,fZvertexHLT(0)
139   ,fEtaHLT(0)
140   ,fEtaMomentumcutHLT(0)
141   ,fNclusVSphiHLT(0)        
142   ,fNclusVSthetaHLT(0)
143   ,fEventSpecieHLT(0)
144   ,fBeamType()
145   ,fTextBox(0)
146   ,fSwitch(kTRUE)
147
148   // Constructor
149   // Define input and output slots here
150   // Input slot #0 works with a TChain
151   // DefineInput(0, TChain::Class());
152   // Output slot #0 writes into a TH1 container
153   DefineOutput(1, TList::Class());
154 }
155
156
157 //----------------------------------------------------------------------------------------------------
158
159 void AliAnalysisTaskHLT::UserCreateOutputObjects(){
160   // Create histograms
161
162   OpenFile(1);
163   fOutputList = new TList();
164   fOutputList->SetOwner();
165   fOutputList->SetName(GetName());
166
167   /*
168   //0 mistriggered, 1 Good triggered, 2, triggered, 3 fake trigger, 
169   //4 events with offline track, 5 total events processed,
170   //6 offline track thru CE, 7 online track to CE
171   fHistTrigger = new TH1F("fHistTrigger", "Trigger Status", 8, -0.5, 7.5);
172   fHistTrigger->GetXaxis()->SetTitle("");
173   fHistTrigger->GetYaxis()->SetTitle("Events");
174   fHistTrigger->SetMarkerStyle(kFullCircle);
175   fHistTrigger->SetStats(0);
176   fHistTrigger->SetFillColor(2);
177   //fHistTrigger->SetDrawOption("B TEXT60");
178
179   //Set bin labels
180   (fHistTrigger->GetXaxis())->SetBinLabel(1,"missed");
181   (fHistTrigger->GetXaxis())->SetBinLabel(2,"triggerWofflTrk");
182   (fHistTrigger->GetXaxis())->SetBinLabel(3,"triggered");
183   (fHistTrigger->GetXaxis())->SetBinLabel(4,"triggerWOofflTrk");
184   (fHistTrigger->GetXaxis())->SetBinLabel(5,"NevWofflTrk");
185   (fHistTrigger->GetXaxis())->SetBinLabel(6,"Nevt");
186   (fHistTrigger->GetXaxis())->SetBinLabel(7,"offlTrkThruCE");
187   (fHistTrigger->GetXaxis())->SetBinLabel(8,"onlTrkThruCE"); 
188   */
189
190   fHistTrigger = new TH1F("fHistTrigger", "CTP trigger counter", 24, 0, 24);
191   fHistTrigger->GetXaxis()->SetTitle("");  
192   fHistTrigger->GetYaxis()->SetTitle("#Events"); 
193
194   //=========== event properties =================//
195
196   if(fBeamType.Contains("Pb")){
197      fMultOff = new TH1F("fMult_off","TPC track multiplicity (OFF)",200,0,2000);
198      fMultHLT = new TH1F("fMult_hlt","TPC track multiplicity (HLT)",200,0,2000);
199   } 
200   else {
201      fMultOff = new TH1F("fMult_off","TPC track multiplicity (OFF)",200,0,200);
202      fMultHLT = new TH1F("fMult_hlt","TPC track multiplicity (HLT)",200,0,200);
203   }
204  
205   fXYvertexOff = new TH2F("fXYvertex_off","XY primary vertex (OFF)",100,-1,1,100,-1,1);
206   fXYvertexHLT = new TH2F("fXYvertex_hlt","XY primary vertex (HLT)",100,-1,1,100,-1,1);
207   
208   fXvertexOff = new TH1F("fXvertex_off","X primary vertex (OFF)",200,-0.5,0.5);
209   fXvertexHLT = new TH1F("fXvertex_hlt","X primary vertex (HLT)",200,-0.5,0.5);
210  
211   fYvertexOff = new TH1F("fYvertex_off","Y primary vertex (OFF)",200,-0.5,0.5);
212   fYvertexHLT = new TH1F("fYvertex_hlt","Y primary vertex (HLT)",200,-0.5,0.5);
213  
214   fZvertexOff = new TH1F("fZvertex_off","Z primary vertex (OFF)",100,-20,20);
215   fZvertexHLT = new TH1F("fZvertex_hlt","Z primary vertex (HLT)",100,-20,20);
216     
217   fEventSpecieOff = new TH1F("fEventSpecie_off","Eventspecie for OFF",18, 0, 18);
218   fEventSpecieHLT = new TH1F("fEventSpecie_hlt","Eventspecie for HLT",18, 0, 18);
219
220   //=========== track properties =================//
221
222   fChargeOff = new TH1F("fCharge_off", "Charge distribution (OFF)", 3, -1.5, 1.5);  
223   fChargeHLT = new TH1F("fCharge_hlt", "Charge distribution (HLT)", 3, -1.5, 1.5);  
224   
225   fMomentumOff = new TH1F("fMomentum_off", "p_{T} (OFF)", 100, 0, 10);
226   fMomentumHLT = new TH1F("fMomentum_hlt", "p_{T} (HLT)", 100, 0, 10);
227  
228   fDCArOff = new TH1F("fDCA_off", "DCAr to beam line (OFF)", 200, -15, 15);
229   fDCArHLT = new TH1F("fDCA_hlt", "DCAr to beam line (HLT)", 200, -15, 15);
230
231   fDCAzOff = new TH1F("fDCAz_off", "DCAz to beam line (OFF)", 200, -15, 15);
232   fDCAzHLT = new TH1F("fDCAz_hlt", "DCAz to beam line (HLT)", 200, -15, 15);
233  
234   fNclusterOff = new TH1F("fNcluster_off","TPC clusters/track (OFF)", 200, 0, 200);
235   fNclusterHLT = new TH1F("fNcluster_hlt","TPC clusters/track (HLT)", 200, 0, 200);
236  
237   fPhiOff = new TH1F("fPhi_off","azimuthal angle distribution (OFF)",90,0,360);
238   fPhiHLT = new TH1F("fPhi_hlt","azimuthal angle distribution (HLT)",    90,0,360);
239
240   fEtaOff = new TH1F("fEta_off","pseudorapidity (OFF)",100,-2,2);
241   fEtaHLT = new TH1F("fEta_hlt","pseudorapidity (HLT)",100,-2,2);
242
243
244
245  
246   fNclusterOffwCut = new TH1F("fNcluster_wcut_off","TPC clusters per track with cuts (OFF)", 200, 0, 200);
247   fNclusterHLTwCut = new TH1F("fNcluster_wcut_hlt","TPC clusters per track with cuts (HLT)", 200, 0, 200);
248
249   fEtaMomentumcutOff = new TH1F("fEtaMomentumcut_off","pseudorapidity DCAcut (OFF)",100,-2,2);
250   fEtaMomentumcutHLT = new TH1F("fEtaMomentumcut_hlt","pseudorapidity DCAcut (HLT)",    100,-2,2);
251
252   fNclusVSphiOff = new TH2F("fNclus_vs_phi_off","clusters per track vs. #phi (OFF)",360,0,360,160,0,160);
253   fNclusVSphiHLT = new TH2F("fNclus_vs_phi_hlt","clusters per track vs. #phi (HLT)",    360,0,360,160,0,160);
254   
255   fNclusVSthetaOff = new TH2F("fNclus_vs_theta_off","clusters per track vs. #theta (OFF)",180,0,180,160,0,160);
256   fNclusVSthetaHLT = new TH2F("fNclus_vs_theta_hlt","clusters per track vs. #theta (HLT)",    180,0,180,160,0,160);
257  
258   //--------------------------------------------------//
259   
260   fTextBox = new TText(); 
261
262   fOutputList->Add(fHistTrigger);
263
264   fOutputList->Add(fChargeOff);           fOutputList->Add(fChargeHLT);  
265   fOutputList->Add(fMomentumOff);         fOutputList->Add(fMomentumHLT); 
266   fOutputList->Add(fDCArOff);             fOutputList->Add(fDCArHLT);     
267   fOutputList->Add(fDCAzOff);             fOutputList->Add(fDCAzHLT);     
268   fOutputList->Add(fNclusterOff);         fOutputList->Add(fNclusterHLT); 
269   fOutputList->Add(fNclusterOffwCut);     fOutputList->Add(fNclusterHLTwCut); 
270   fOutputList->Add(fPhiOff);              fOutputList->Add(fPhiHLT);      
271   fOutputList->Add(fMultOff);             fOutputList->Add(fMultHLT);    
272   fOutputList->Add(fXYvertexOff);         fOutputList->Add(fXYvertexHLT); 
273   fOutputList->Add(fXvertexOff);          fOutputList->Add(fXvertexHLT);  
274   fOutputList->Add(fYvertexOff);          fOutputList->Add(fYvertexHLT);  
275   fOutputList->Add(fZvertexOff);          fOutputList->Add(fZvertexHLT);    
276   fOutputList->Add(fEtaOff);              fOutputList->Add(fEtaHLT);  
277   fOutputList->Add(fEtaMomentumcutOff);   fOutputList->Add(fEtaMomentumcutHLT);   
278   fOutputList->Add(fNclusVSphiOff);       fOutputList->Add(fNclusVSphiHLT);  
279   fOutputList->Add(fNclusVSthetaOff);     fOutputList->Add(fNclusVSthetaHLT);
280   fOutputList->Add(fEventSpecieOff);      fOutputList->Add(fEventSpecieHLT);  
281   
282   fOutputList->Add(fTextBox);  
283   //SetupESDtrackCuts();
284   PostData(1, fOutputList);
285 }
286
287 void AliAnalysisTaskHLT::UserExec(Option_t *){
288   // see header file of AliAnalysisTask for documentation
289
290   AliESDEvent *esdOFF = dynamic_cast<AliESDEvent*>(InputEvent());  
291   if(!esdOFF){
292      printf("Error:UserExec OFF esd not available\n");
293      return;
294   }
295  
296   if(esdOFF->GetEventSpecie()==16) return; // skip calibration events, HLT doesn't set this flag yet
297
298   AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*>(fInputHandler);
299   if(!esdH){
300      printf("The ESD input handler is empty\n");
301      return;
302   }
303   
304   AliESDEvent *esdHLT = NULL;   
305   if(esdH) esdHLT = esdH->GetHLTEvent();   
306   if(!esdHLT){
307      printf("Error:UserExec HLT esd not available\n");
308      return;
309   }
310  
311   if(fSwitch==kTRUE){  
312      TTimeStamp *timestamp = new TTimeStamp(esdHLT->GetTimeStamp());
313      fTextBox->SetName("text");
314      TString s = Form("Run %d, Date %d", esdHLT->GetRunNumber(), timestamp->GetDate());
315      printf("You are analyzing run %d from date %d\n\n", esdHLT->GetRunNumber(), timestamp->GetDate());
316      fTextBox->SetTitle(s);
317      fSwitch=kFALSE;
318   }
319
320   Double_t bfield = esdOFF->GetMagneticField();
321  
322 //   UInt_t Statusnames[12]={AliESDtrack::kTPCin,
323 //                        AliESDtrack::kITSin,
324 //                        AliESDtrack::kTPCout,
325 //                        AliESDtrack::kITSout,
326 //                        AliESDtrack::kITSrefit,
327 //                        AliESDtrack::kTPCrefit,
328 //                        AliESDtrack::kTRDin,
329 //                        AliESDtrack::kTRDout,
330 //                        AliESDtrack::kTRDrefit,
331 //                        AliESDtrack::kTOFin,
332 //                        AliESDtrack::kTOFout,
333 //                        AliESDtrack::kTOFrefit};
334   
335
336
337   //---------------- HLT ESD tree -----------------------//
338
339   Int_t nr_tracksHLT = 0;        
340   const AliESDVertex *vertHLT = esdHLT->GetPrimaryVertexTracks();
341
342  // Int_t nr_contributorsHLT = vertHLT->GetNContributors();
343     
344 //   if(nr_contributorsHLT<1) {
345 //     // SPD vertex
346 //     vertHLT = esdHLT->GetPrimaryVertexSPD();
347 //     if(nr_contributorsHLT<1) {
348 //       // NO GOOD VERTEX, SKIP EVENT 
349 //       testVertexHLT=kFALSE;
350 //     }
351 //   }
352   if(vertHLT->GetStatus()==kTRUE){
353     fXYvertexHLT->Fill(vertHLT->GetX(), vertHLT->GetY() );
354     fXvertexHLT->Fill( vertHLT->GetX() );
355     fYvertexHLT->Fill( vertHLT->GetY() );
356     fZvertexHLT->Fill( vertHLT->GetZ() );
357   }
358   //At the moment no constrains on vertex before filling histograms
359   //Should be changed. 
360
361   fEventSpecieHLT->Fill(esdHLT->GetEventSpecie());
362
363   for(Int_t i=0; i<esdHLT->GetNumberOfTracks(); i++){ 
364   
365     AliESDtrack *esdtrackHLT = esdHLT->GetTrack(i); 
366     if(!esdtrackHLT) continue;
367
368     //Fill which status flags that are set for an event
369     //for(int jjj=0;jjj<12;jjj++){
370     //  if(esdtrackHLT->GetStatus()&Statusnames[jjj]) fStatusHLT->Fill(jjj);
371     //} 
372
373     if(!(esdtrackHLT->GetStatus()&AliESDtrack::kTPCin)) continue; // only interested in tracks with kTPCin flag
374     if(esdtrackHLT->GetTPCNcls()<=0) continue; 
375     nr_tracksHLT++;
376
377     //Calculating DCA "old" fashion
378     Float_t dca[2];
379     esdtrackHLT->GetDZ(esdHLT->GetPrimaryVertex()->GetXv(), esdHLT->GetPrimaryVertex()->GetYv(), esdHLT->GetPrimaryVertex()->GetZv(), bfield, dca);
380
381     fDCArHLT->Fill(dca[0]);  
382     fDCAzHLT->Fill(dca[1]);
383     
384     fChargeHLT->Fill(esdtrackHLT->Charge());
385     fNclusterHLT->Fill(esdtrackHLT->GetTPCNcls());
386     fEtaHLT->Fill(esdtrackHLT->Eta()); 
387     fPhiHLT->Fill(esdtrackHLT->Phi()*TMath::RadToDeg());
388     fMomentumHLT->Fill(TMath::Abs(esdtrackHLT->Pt()));  
389     
390     // ???? if(TMath::Abs(esdtrackHLT->Pt()) > 0.3) fEtaMomentumcutHLT->Fill(esdtrackHLT->Eta());
391       
392 //     if((esdtrackHLT->GetStatus()&AliESDtrack::kTPCin) || (esdtrackHLT->GetStatus()&AliESDtrack::kTPCin && esdtrackHLT->GetStatus()&AliESDtrack::kTPCout)){
393 //       fNclusVSphiHLT->Fill(esdtrackHLT->Phi()*TMath::RadToDeg(), esdtrackHLT->GetTPCNcls());
394 //       fNclusVSthetaHLT->Fill(esdtrackHLT->Theta()*TMath::RadToDeg(), esdtrackHLT->GetTPCNcls());
395 //     }
396
397    
398 //     if((esdtrackHLT->GetStatus()&AliESDtrack::kTPCin) || (esdtrackHLT->GetStatus()&AliESDtrack::kTPCin && esdtrackHLT->GetStatus()&AliESDtrack::kTPCout))
399 //       fNclusterHLTwCut->Fill(esdtrackHLT->GetTPCNcls());
400     
401 //     if(esdHLT->IsHLTTriggerFired()){
402 //               
403 //     }// end if for triggered hlt events        
404   } // end of loop over hlt tracks
405
406   if(nr_tracksHLT>0) fMultHLT->Fill(nr_tracksHLT);
407
408   //----------------- OFFLINE ESD tree ----------------//
409   
410   Int_t nr_tracksOff = 0;
411   const AliESDVertex *vertOff = esdOFF->GetPrimaryVertexTracks();
412
413 //   if(vertOff->GetNContributors()<1) {
414 //     // SPD vertex
415 //     vertOff = esdOFF->GetPrimaryVertexSPD();
416 //     if(vertOff->GetNContributors()<1) {
417 //       // NO GOOD VERTEX, SKIP EVENT 
418 //       testVertex=kFALSE;
419 //     }
420 //   }
421   
422   if(vertOff->GetStatus()==kTRUE){
423     fXYvertexOff->Fill(vertOff->GetX(), vertOff->GetY() );
424     fXvertexOff->Fill( vertOff->GetX() );
425     fYvertexOff->Fill( vertOff->GetY() );
426     fZvertexOff->Fill( vertOff->GetZ() );
427   }
428
429   fEventSpecieOff->Fill(esdOFF->GetEventSpecie());
430
431   for(Int_t i=0; i<esdOFF->GetNumberOfTracks(); i++){ 
432    
433     AliESDtrack *esdtrackOFF = esdOFF->GetTrack(i); 
434     if (!esdtrackOFF) continue;
435
436     if(!(esdtrackOFF->GetStatus()&AliESDtrack::kTPCin)) continue; 
437     if(esdtrackOFF->GetTPCNcls()<=0) continue; 
438     nr_tracksOff++;
439
440     //Filling of DCA for Offline
441
442     Double_t x[3]; 
443     esdtrackOFF->GetXYZ(x);
444     Double_t b[3]; 
445     AliTracker::GetBxByBz(x,b);
446     Bool_t isOK = esdtrackOFF->RelateToVertexTPCBxByBz(vertOff, b, kVeryBig);
447     if(!isOK) return;
448     
449     const AliExternalTrackParam *track = esdtrackOFF->GetTPCInnerParam();
450     if(!track) return;
451     
452     Float_t dca[2], cov[3]; // dca_xy, dca_z, sigma_xy, sigma_xy_z, sigma_z
453     esdtrackOFF->GetImpactParametersTPC(dca,cov);
454
455     fDCArOff->Fill(dca[0]);
456     fDCAzOff->Fill(dca[1]);
457     
458     fChargeOff->Fill(esdtrackOFF->Charge());
459     fNclusterOff->Fill(esdtrackOFF->GetTPCNcls()); 
460     fEtaOff->Fill(esdtrackOFF->Eta());          
461     fPhiOff->Fill(esdtrackOFF->Phi()*TMath::RadToDeg());
462     fMomentumOff->Fill( TMath::Abs(esdtrackOFF->Pt()) ); 
463
464 //     fNclusVSphiOff->Fill(esdtrackOFF->Phi()*TMath::RadToDeg(), esdtrackOFF->GetTPCNcls());
465 //     fNclusVSthetaOff->Fill(esdtrackOFF->Theta()*TMath::RadToDeg(), esdtrackOFF->GetTPCNcls());
466 // 
467 //     if(TMath::Abs(esdtrackOFF->Pt()) < 0.3) continue;
468 //     fEtaMomentumcutOff->Fill(esdtrackOFF->Eta()); 
469 //     if(esdtrackOFF->GetTPCNcls()>0) fNclusterOffwCut->Fill(esdtrackOFF->GetTPCNcls()); 
470                   
471   } // end of loop over offline tracks
472   
473   if(nr_tracksOff>0) fMultOff->Fill(nr_tracksOff);
474    
475   // Post output data.
476   PostData(1, fOutputList);
477 }
478
479 void AliAnalysisTaskHLT::Terminate(Option_t *){
480   // see header file of AliAnalysisTask for documentation
481 }
482
483 // void AliAnalysisTaskHLT::SetupESDtrackCuts(){ // not called
484 //   // Setup ESD cuts
485 //   // NB! Work in progress!
486 // 
487 //   Bool_t selPrimaries = kTRUE;
488 //   
489 //   fESDOfftrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009(selPrimaries);
490 //   //To make Offline cuts = HLT cuts
491 //   fESDOfftrackCuts->SetRequireITSRefit(kFALSE); 
492 //   fESDOfftrackCuts->SetEtaRange(-0.9,+0.9);
493 //   
494 // 
495 //   //HLT
496 //   //NB! Need to understand this a bit more! Which cuts should we keep?
497 //   fESDHLTtrackCuts = new AliESDtrackCuts;
498 // 
499 //   // TPC  
500 //   fESDHLTtrackCuts->SetRequireTPCStandAlone(kTRUE); // to get chi2 and ncls of kTPCin
501 //   fESDHLTtrackCuts->SetMinNClustersTPC(70);
502 //   fESDHLTtrackCuts->SetMaxChi2PerClusterTPC(4);
503 //   fESDHLTtrackCuts->SetAcceptKinkDaughters(kFALSE);
504 // 
505 //   fESDHLTtrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
506 //                                   AliESDtrackCuts::kAny);
507 // 
508 //   if(selPrimaries) { // 7*(0.0050+0.0060/pt^0.9)
509 //     fESDHLTtrackCuts->SetMaxDCAToVertexXYPtDep("0.0350+0.0420/pt^0.9");
510 //   }
511 //   
512 //   fESDHLTtrackCuts->SetMaxDCAToVertexZ(1.e6);
513 //   fESDHLTtrackCuts->SetDCAToVertex2D(kFALSE);
514 //   fESDHLTtrackCuts->SetRequireSigmaToVertex(kFALSE);
515 //   fESDHLTtrackCuts->SetEtaRange(-0.9,+0.9);
516 // 
517 //   return;
518 // }