AliPhysics  c69cd47 (c69cd47)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliFlowEventCuts.cxx
Go to the documentation of this file.
1  /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * *
3  * Author: The ALICE Off-line Project. *
4  * Contributors are mentioned in the code where appropriate. *
5  * *
6  * Permission to use, copy, modify and distribute this software and its *
7  * documentation strictly for non-commercial purposes is hereby granted *
8  * without fee, provided that the above copyright notice appears in all *
9  * copies and that both the copyright notice and this permission notice *
10  * appear in the supporting documentation. The authors make no claims *
11  * about the suitability of this software for any purpose. It is *
12  * provided "as is" without express or implied warranty. *
13  **************************************************************************/
14 
15 /* $Id$ */
16 
17 // AliFlowEventCuts:
18 // An event cut class for the flow framework
19 //
20 // origin: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
21 
22 #include <limits.h>
23 #include <float.h>
24 #include <TList.h>
25 #include <TH1F.h>
26 #include <TH2F.h>
27 #include <TBrowser.h>
28 #include "TMath.h"
29 #include "TNamed.h"
30 #include "AliVVertex.h"
31 #include "AliVEvent.h"
32 #include "AliESDEvent.h"
33 #include "AliAODEvent.h"
34 #include "AliAODHeader.h"
35 #include "AliCentrality.h"
36 #include "AliMultSelection.h" // available from November 2015
37 #include "AliESDVZERO.h"
38 #include "AliMultiplicity.h"
39 #include "AliMCEvent.h"
40 #include "AliFlowEventCuts.h"
41 #include "AliFlowTrackCuts.h"
42 #include "AliTriggerAnalysis.h"
43 #include "AliCollisionGeometry.h"
44 #include "AliGenEventHeader.h"
45 #include "AliAnalysisUtils.h"
46 #include <iostream>
47 using namespace std;
48 
50 
51 //-----------------------------------------------------------------------
54  fQA(NULL),
55  fCutNumberOfTracks(kFALSE),
56  fNumberOfTracksMax(INT_MAX),
57  fNumberOfTracksMin(INT_MIN),
58  fCutRefMult(kFALSE),
59  fRefMultMethod(kTPConly),
60  fUseAliESDtrackCutsRefMult(kFALSE),
61  fRefMultMethodAliESDtrackCuts(AliESDtrackCuts::kTrackletsITSTPC),
62  fRefMultMax(INT_MAX),
63  fRefMultMin(INT_MIN),
64  fRefMultCuts(NULL),
65  fMeanPtCuts(NULL),
66  fStandardTPCcuts(NULL),
67  fStandardGlobalCuts(NULL),
68  fUtils(NULL),
69  fCutPrimaryVertexX(kFALSE),
70  fPrimaryVertexXmax(INT_MAX),
71  fPrimaryVertexXmin(INT_MIN),
72  fCutPrimaryVertexY(kFALSE),
73  fPrimaryVertexYmax(INT_MAX),
74  fPrimaryVertexYmin(INT_MIN),
75  fCutPrimaryVertexZ(kFALSE),
76  fPrimaryVertexZmax(INT_MAX),
77  fPrimaryVertexZmin(INT_MIN),
78  fCutNContributors(kFALSE),
79  fNContributorsMax(INT_MAX),
80  fNContributorsMin(INT_MIN),
81  fCutMeanPt(kFALSE),
82  fMeanPtMax(-DBL_MAX),
83  fMeanPtMin(DBL_MAX),
84  fCutSPDvertexerAnomaly(kFALSE),
85  fCutSPDTRKVtxZ(kFALSE),
86  fCutTPCmultiplicityOutliers(kFALSE),
87  fCutTPCmultiplicityOutliersAOD(kFALSE),
88  fUseCentralityUnchecked(kFALSE),
89  fCentralityPercentileMethod(kTPConly),
90  fCutZDCtiming(kFALSE),
91  fTrigAna(),
92  fCutImpactParameter(kFALSE),
93  fImpactParameterMin(0.0),
94  fImpactParameterMax(100.0),
95  fhistTPCvsGlobalMult(0),
96  fData2011(kFALSE),
97  fCheckPileUp(kFALSE)
98 {
99  //constructor
100 }
101 
102 //-----------------------------------------------------------------------
103 AliFlowEventCuts::AliFlowEventCuts(const char* name, const char* title):
104  AliFlowEventSimpleCuts(name, title),
105  fQA(NULL),
106  fCutNumberOfTracks(kFALSE),
107  fNumberOfTracksMax(INT_MAX),
108  fNumberOfTracksMin(INT_MIN),
109  fCutRefMult(kFALSE),
110  fRefMultMethod(kTPConly),
111  fUseAliESDtrackCutsRefMult(kFALSE),
112  fRefMultMethodAliESDtrackCuts(AliESDtrackCuts::kTrackletsITSTPC),
113  fRefMultMax(INT_MAX),
114  fRefMultMin(INT_MIN),
115  fRefMultCuts(NULL),
116  fMeanPtCuts(NULL),
117  fStandardTPCcuts(AliFlowTrackCuts::GetStandardTPCStandaloneTrackCuts2010()),
118  fStandardGlobalCuts(AliFlowTrackCuts::GetStandardGlobalTrackCuts2010()),
119  fUtils(NULL),
120  fCutPrimaryVertexX(kFALSE),
121  fPrimaryVertexXmax(INT_MAX),
122  fPrimaryVertexXmin(INT_MIN),
123  fCutPrimaryVertexY(kFALSE),
124  fPrimaryVertexYmax(INT_MAX),
125  fPrimaryVertexYmin(INT_MIN),
126  fCutPrimaryVertexZ(kFALSE),
127  fPrimaryVertexZmax(INT_MAX),
128  fPrimaryVertexZmin(INT_MIN),
129  fCutNContributors(kFALSE),
130  fNContributorsMax(INT_MAX),
131  fNContributorsMin(INT_MIN),
132  fCutMeanPt(kFALSE),
133  fMeanPtMax(-DBL_MAX),
134  fMeanPtMin(DBL_MAX),
135  fCutSPDvertexerAnomaly(kFALSE),
136  fCutSPDTRKVtxZ(kFALSE),
137  fCutTPCmultiplicityOutliers(kFALSE),
138  fCutTPCmultiplicityOutliersAOD(kFALSE),
139  fUseCentralityUnchecked(kFALSE),
140  fCentralityPercentileMethod(kTPConly),
141  fCutZDCtiming(kFALSE),
142  fTrigAna(),
143  fCutImpactParameter(kFALSE),
144  fImpactParameterMin(0.0),
145  fImpactParameterMax(100.0),
146  fhistTPCvsGlobalMult(0),
147  fData2011(kFALSE),
148  fCheckPileUp(kFALSE)
149 {
150  //constructor
151 }
152 
156  fQA(NULL),
157  fCutNumberOfTracks(that.fCutNumberOfTracks),
158  fNumberOfTracksMax(that.fNumberOfTracksMax),
159  fNumberOfTracksMin(that.fNumberOfTracksMin),
160  fCutRefMult(that.fCutRefMult),
161  fRefMultMethod(that.fRefMultMethod),
162  fUseAliESDtrackCutsRefMult(that.fUseAliESDtrackCutsRefMult),
163  fRefMultMethodAliESDtrackCuts(that.fRefMultMethodAliESDtrackCuts),
164  fRefMultMax(that.fRefMultMax),
165  fRefMultMin(that.fRefMultMin),
166  fRefMultCuts(NULL),
167  fMeanPtCuts(NULL),
168  fStandardTPCcuts(NULL),
169  fStandardGlobalCuts(NULL),
170  fUtils(NULL),
171  fCutPrimaryVertexX(that.fCutPrimaryVertexX),
172  fPrimaryVertexXmax(that.fPrimaryVertexXmax),
173  fPrimaryVertexXmin(that.fPrimaryVertexXmin),
174  fCutPrimaryVertexY(that.fCutPrimaryVertexX),
175  fPrimaryVertexYmax(that.fPrimaryVertexYmax),
176  fPrimaryVertexYmin(that.fPrimaryVertexYmin),
177  fCutPrimaryVertexZ(that.fCutPrimaryVertexX),
178  fPrimaryVertexZmax(that.fPrimaryVertexZmax),
179  fPrimaryVertexZmin(that.fPrimaryVertexZmin),
180  fCutNContributors(that.fCutNContributors),
181  fNContributorsMax(that.fNContributorsMax),
182  fNContributorsMin(that.fNContributorsMin),
183  fCutMeanPt(that.fCutMeanPt),
184  fMeanPtMax(that.fMeanPtMax),
185  fMeanPtMin(that.fMeanPtMin),
186  fCutSPDvertexerAnomaly(that.fCutSPDvertexerAnomaly),
187  fCutSPDTRKVtxZ(that.fCutSPDTRKVtxZ),
188  fCutTPCmultiplicityOutliers(that.fCutTPCmultiplicityOutliers),
189  fCutTPCmultiplicityOutliersAOD(that.fCutTPCmultiplicityOutliersAOD),
190  fUseCentralityUnchecked(that.fUseCentralityUnchecked),
191  fCentralityPercentileMethod(that.fCentralityPercentileMethod),
192  fCutZDCtiming(that.fCutZDCtiming),
193  fTrigAna(),
194  fCutImpactParameter(that.fCutImpactParameter),
195  fImpactParameterMin(that.fImpactParameterMin),
196  fImpactParameterMax(that.fImpactParameterMax),
197  fhistTPCvsGlobalMult(that.fhistTPCvsGlobalMult),
198  fData2011(that.fData2011),
199  fCheckPileUp(that.fCheckPileUp)
200 {
201  if (that.fQA) DefineHistograms();
202  //copy constructor
203  if (that.fRefMultCuts)
205  if (that.fMeanPtCuts)
209 
210  if (that.fUtils) {
211  fUtils = new AliAnalysisUtils();
212  fUtils->SetUseMVPlpSelection(kTRUE);
213  fUtils->SetUseOutOfBunchPileUp(kTRUE);
214  }
215 }
216 
219 {
220  //dtor
221  delete fMeanPtCuts;
222  delete fRefMultCuts;
223  delete fStandardGlobalCuts;
224  delete fStandardTPCcuts;
225  if(fUtils) {
226  delete fUtils;
227  fUtils = NULL;
228  }
229  if (fQA) { fQA->SetOwner(); fQA->Delete(); delete fQA; }
230 }
231 
234 {
235  //assignment
236  if (this==&that) return *this;
237 
238  if (that.fQA)
239  {
240  if (fQA)
241  {
242  fQA->Delete();
243  delete fQA;
244  }
245  fQA = static_cast<TList*>(that.fQA->Clone());
246  }
247  else
248  {
249  fQA->Delete();
250  delete fQA;
251  fQA=NULL;
252  }
253 
263  if (that.fRefMultCuts) *fRefMultCuts=*(that.fRefMultCuts);
264  if (that.fMeanPtCuts) *fMeanPtCuts=*(that.fMeanPtCuts);
267  if (that.fUtils) {
268  fUtils = new AliAnalysisUtils();
269  fUtils->SetUseMVPlpSelection(kTRUE);
270  fUtils->SetUseOutOfBunchPileUp(kTRUE);
271  }
272 
285  fCutMeanPt=that.fCutMeanPt;
286  fMeanPtMax=that.fMeanPtMax;
287  fMeanPtMin=that.fMeanPtMin;
296  fData2011=that.fData2011;
298  return *this;
299 }
300 
301 //-----------------------------------------------------------------------
302 Bool_t AliFlowEventCuts::IsSelected(TObject* obj, TObject* objmc)
303 {
304  //check cuts
305  AliVEvent* vevent = dynamic_cast<AliVEvent*>(obj);
306  AliMCEvent* mcevent = dynamic_cast<AliMCEvent*>(objmc);
307  if (vevent) return PassesCuts(vevent,mcevent);;
308  return kFALSE; //when passed wrong type of object
309 }
310 //-----------------------------------------------------------------------
311 Bool_t AliFlowEventCuts::PassesCuts(AliVEvent *event, AliMCEvent *mcevent)
312 {
314  const AliVVertex* pvtx=event->GetPrimaryVertex();
315  Double_t pvtxx = 0.;
316  Double_t pvtxy = 0.;
317  Double_t pvtxz = 0.;
318  Int_t ncontrib = 0;
319 
320  if(pvtx){
321  pvtxx = pvtx->GetX();
322  pvtxy = pvtx->GetY();
323  pvtxz = pvtx->GetZ();
324  ncontrib = pvtx->GetNContributors();
325  }
326 
327  Bool_t pass=kTRUE;
328  AliESDEvent* esdevent = dynamic_cast<AliESDEvent*>(event);
329  AliAODEvent* aodevent = dynamic_cast<AliAODEvent*>(event);
330 
331 
332  if(fCheckPileUp){
333  // pile-up rejection
334  if(!fUtils) {
335  fUtils = new AliAnalysisUtils();
336  fUtils->SetUseMVPlpSelection(kTRUE);
337  fUtils->SetUseOutOfBunchPileUp(kTRUE);
338  }
339  if(fUtils->IsPileUpEvent(aodevent)) pass = kFALSE;
340  }
341 
342 
343  Int_t multTPC = 0;
344  Int_t multGlobal = 0;
345 
346  // to remove multiplicity outliers, an explicit cut on the correlation
347  // between global and tpc only tracks can be made by counting the two
348  // sets. as counting is expensive, only count when qa is requested or cut is enabeled
349  // the cut criteria are different for different data takign periods
350  // and (of course) cut criteria, specific routines exist for 10h, 11h data
351  // and esds (by calling AliFlowTrackCuts) or aods (evaluated here explicitely)
352  if(esdevent && (fQA || fCutTPCmultiplicityOutliers))
353  {
354  //this is pretty slow as we check the event track by track twice
355  //this cut will work for 2010 PbPb data and is dependent on
356  //TPC and ITS reco efficiency (e.g. geometry, calibration etc)
357  multTPC = fStandardTPCcuts->Count(event);
358  multGlobal = fStandardGlobalCuts->Count(event);
360  if (multTPC > ( 23+1.216*multGlobal)) pass = kFALSE;
361  if (multTPC < (-20+1.087*multGlobal)) pass = kFALSE;
362  }
363  }
364  if(aodevent && (fQA || fCutTPCmultiplicityOutliersAOD))
365  {
366  //similar (slow) cut for aod's. will work for both 2010 and 2010 pbpb data
367  //but the user is responsible that this object is configured
368  //correctly to select the dataset
369  //FIXME data could dynamically be determined by this class via the
370  //runnumber
371  Int_t nTracks(aodevent->GetNumberOfTracks());
372  for(Int_t iTracks = 0; iTracks < nTracks; iTracks++) {
373  AliAODTrack* track = dynamic_cast<AliAODTrack*>(aodevent->GetTrack(iTracks));
374  if(!track) continue;
375  if (!track || track->Pt() < .2 || track->Pt() > 5.0 || TMath::Abs(track->Eta()) > .8 || track->GetTPCNcls() < 70 || !track->GetDetPid() || track->GetDetPid()->GetTPCsignal() < 10.0) continue; // general quality cut
376  if (track->TestFilterBit(1) && track->Chi2perNDF() > 0.2) multTPC++;
377  if (!track->TestFilterBit(16) || track->Chi2perNDF() < 0.1) continue;
378  Double_t b[2] = {-99., -99.};
379  Double_t bCov[3] = {-99., -99., -99.};
380  AliAODTrack copy(*track);
381  if (copy.PropagateToDCA(event->GetPrimaryVertex(), event->GetMagneticField(), 100., b, bCov) && TMath::Abs(b[0]) < 0.3 && TMath::Abs(b[1]) < 0.3) multGlobal++;
382  }
384  {
385  if(!fData2011 && (multTPC < (-40.3+1.22*multGlobal) || multTPC > (32.1+1.59*multGlobal))) pass = kFALSE;
386  else if(fData2011 && (multTPC < (-36.73 + 1.48*multGlobal) || multTPC > (62.87 + 1.78*multGlobal))) pass = kFALSE;
387  }
388  }
389 
390  if (fQA)
391  {
392  QAbefore(0)->Fill(pvtxz);
393  QAbefore(1)->Fill(multGlobal,multTPC);
394  }
395 
396  if (fCutNContributors)
397  {
398  if (ncontrib < fNContributorsMin || ncontrib >= fNContributorsMax) pass=kFALSE;
399  }
400  if (fCutPrimaryVertexX)
401  {
402  if (pvtxx < fPrimaryVertexXmin || pvtxx >= fPrimaryVertexXmax) pass=kFALSE;
403  }
404  if (fCutPrimaryVertexY)
405  {
406  if (pvtxy < fPrimaryVertexYmin || pvtxy >= fPrimaryVertexYmax) pass=kFALSE;
407  }
408  if (fCutPrimaryVertexZ)
409  {
410  if (pvtxz < fPrimaryVertexZmin || pvtxz >= fPrimaryVertexZmax)
411  pass=kFALSE;
412  }
413  if (fCutCentralityPercentile&&esdevent)
414  {
416  {
417  AliCentrality* centr = esdevent->GetCentrality();
419  {
420  if (!centr->IsEventInCentralityClassUnchecked( fCentralityPercentileMin,
423  {
424  pass=kFALSE;
425  }
426  }
427  else
428  {
429  if (!centr->IsEventInCentralityClass( fCentralityPercentileMin,
432  {
433  pass=kFALSE;
434  }
435  }
436  } // if(!fUseNewCentralityFramework)
437  else
438  {
439  AliMultSelection *MultSelection = (AliMultSelection *) esdevent->FindListObject("MultSelection");
440  Float_t lPercentile = MultSelection->GetMultiplicityPercentile(CentrMethName(fCentralityPercentileMethod));
441  if(!(fCentralityPercentileMin <= lPercentile && lPercentile < fCentralityPercentileMax))
442  {
443  pass=kFALSE;
444  }
445  } // else
446  }
447  if (fCutSPDvertexerAnomaly&&esdevent)
448  {
449  const AliESDVertex* sdpvertex = esdevent->GetPrimaryVertexSPD();
450  if (sdpvertex->GetNContributors()<1) pass=kFALSE;
451  if (sdpvertex->GetDispersion()>0.04) pass=kFALSE;
452  if (sdpvertex->GetZRes()>0.25) pass=kFALSE;
453  const AliESDVertex* tpcvertex = esdevent->GetPrimaryVertexTPC();
454  if (tpcvertex->GetNContributors()<1) pass=kFALSE;
455  const AliMultiplicity* tracklets = esdevent->GetMultiplicity();
456  if (tpcvertex->GetNContributors()<(-10.0+0.25*tracklets->GetNumberOfITSClusters(0)))
457  {
458  pass=kFALSE;
459  }
460  }
461  if (fCutZDCtiming&&esdevent)
462  {
463  if (!fTrigAna.ZDCTimeTrigger(esdevent))
464  {
465  pass=kFALSE;
466  }
467  }
468  if(fCutNumberOfTracks) {if ( event->GetNumberOfTracks() < fNumberOfTracksMin ||
469  event->GetNumberOfTracks() >= fNumberOfTracksMax ) pass=kFALSE;}
470  if((fCutRefMult&&mcevent)||(fCutRefMult&&esdevent))
471  {
472  //reference multiplicity still to be defined
473  Double_t refMult = RefMult(event,mcevent);
474  if (refMult < fRefMultMin || refMult >= fRefMultMax )
475  {
476  pass=kFALSE;
477  }
478  }
479 
480  // Handles AOD event
481  if(aodevent) {
482  if(fCutSPDTRKVtxZ) {
483  Double_t tVtxZ = aodevent->GetPrimaryVertex()->GetZ();
484  Double_t tSPDVtxZ = aodevent->GetPrimaryVertexSPD()->GetZ();
485  if( TMath::Abs(tVtxZ-tSPDVtxZ) > 0.5 ) pass = kFALSE;
486  }
487  AliCentrality* centr = ((AliVAODHeader*)aodevent->GetHeader())->GetCentralityP();
489  Double_t v0Centr = centr->GetCentralityPercentile("V0M");
490  Double_t trkCentr = centr->GetCentralityPercentile("TRK");
491  if(TMath::Abs(v0Centr-trkCentr) > 5) pass = kFALSE;
492  }
495  if (!centr->IsEventInCentralityClassUnchecked( fCentralityPercentileMin,
498  pass = kFALSE;
499  }
500  } else {
501  if (!centr->IsEventInCentralityClass( fCentralityPercentileMin,
504  pass = kFALSE;
505  }
506  }
507  }
508  }
509 
510  if (fCutMeanPt)
511  {
512  Float_t meanpt=0.0;
513  Int_t ntracks=event->GetNumberOfTracks();
514  Int_t nselected=0;
515  for (Int_t i=0; i<ntracks; i++)
516  {
517  AliVParticle* track = event->GetTrack(i);
518  if (!track) continue;
519  Bool_t localpass=kTRUE;
520  if (fMeanPtCuts) localpass=fMeanPtCuts->IsSelected(track);
521  if (localpass)
522  {
523  meanpt += track->Pt();
524  nselected++;
525  }
526  }
527  if (nselected) meanpt=meanpt/nselected;
528  if (meanpt<fMeanPtMin || meanpt >= fMeanPtMax) pass=kFALSE;
529  }
530 
531  //impact parameter cut
532  if(fCutImpactParameter) {
533  Double_t gImpactParameter = 0.;
534  if(mcevent) {
535  AliCollisionGeometry* headerH = dynamic_cast<AliCollisionGeometry*>(dynamic_cast<AliMCEvent*>(mcevent)->GenEventHeader());
536  if(headerH)
537  gImpactParameter = headerH->ImpactParameter();
538  }
539  if ((gImpactParameter < fImpactParameterMin) || (gImpactParameter >= fImpactParameterMax ))
540  pass=kFALSE;
541  }
542 
543  if (fQA&&pass)
544  {
545  QAafter(1)->Fill(multGlobal,multTPC);
546  QAafter(0)->Fill(pvtxz);
547  }
548  return pass;
549 }
550 
551 //-----------------------------------------------------------------------
552 Float_t AliFlowEventCuts::GetCentrality(AliVEvent* event, AliMCEvent* /*mcEvent*/)
553 {
554  //get the centrality percentile of the event
555  AliESDEvent* esdEvent = dynamic_cast<AliESDEvent*>(event);
556  AliAODEvent* aodEvent = dynamic_cast<AliAODEvent*>(event);
557 
558  Float_t centrality=-1.;
559 
561  {
562  AliCentrality* centr = NULL;
563  if (esdEvent)
564  centr = esdEvent->GetCentrality();
565  if (aodEvent)
566  centr = ((AliVAODHeader*)aodEvent->GetHeader())->GetCentralityP();
567 
568  if (!centr) return -1.;
569 
571  centrality=centr->GetCentralityPercentileUnchecked(CentrMethName(fCentralityPercentileMethod));
572  else
573  centrality=centr->GetCentralityPercentile(CentrMethName(fCentralityPercentileMethod));
574  }
575  else // if(!fUseNewCentralityFramework)
576  {
577  if (esdEvent)
578  {
579  AliMultSelection *MultSelection = (AliMultSelection *) esdEvent->FindListObject("MultSelection");
580  Float_t lPercentile = MultSelection->GetMultiplicityPercentile(CentrMethName(fCentralityPercentileMethod));
581  centrality = lPercentile;
582  }
583  else if (aodEvent)
584  {
585  cout<<"New centrality framework not tested yet for AODs..."<<endl;
586  exit(0);
587  } // else if (aodEvent)
588  } // else // if(!fUseNewCentralityFramework)
589 
590  return centrality;
591 }
592 
593 //-----------------------------------------------------------------------
595 {
596  //get the string for refmultmethod, for use with AliCentrality in
597  //the cut on centrality percentile
598  switch (method)
599  {
600  case kSPDtracklets:
601  return "TKL";
602  case kSPD1clusters:
603  return "CL1";
604  case kTPConly:
605  return "TRK";
606  case kVZERO:
607  return "V0M";
608  default:
609  return "";
610  }
611 }
612 //-----------------------------------------------------------------------
614 {
615  //make a set of standard event cuts, caller becomes owner
616  AliFlowEventCuts* cuts = new AliFlowEventCuts();
617  return cuts;
618 }
619 
620 //-----------------------------------------------------------------------
621 Int_t AliFlowEventCuts::RefMult(AliVEvent* event, AliMCEvent *mcEvent)
622 {
623  //calculate the reference multiplicity, if all fails return 0
624  AliESDVZERO* vzero = NULL;
625  AliESDEvent* esdevent = dynamic_cast<AliESDEvent*>(event);
626 
627  if (fUseAliESDtrackCutsRefMult && esdevent)
628  {
629  //use the standard ALICE reference multiplicity with the default eta range
630  return AliESDtrackCuts::GetReferenceMultiplicity(esdevent, fRefMultMethodAliESDtrackCuts);
631  }
632 
634  {
636  fRefMultCuts->SetEtaRange(-0.8,0.8);
637  fRefMultCuts->SetPtMin(0.15);
638  }
640  {
641  fRefMultCuts = new AliFlowTrackCuts("tracklet refmult cuts");
643  fRefMultCuts->SetEtaRange(-0.8,0.8);
644  }
645  else if (fRefMultMethod==kVZERO)
646  {
647  if (!esdevent) return 0;
648  vzero=esdevent->GetVZEROData();
649  if (!vzero) return 0;
650  return TMath::Nint(vzero->GetMTotV0A()+vzero->GetMTotV0C());
651  }
652  else if (fRefMultMethod==kSPD1clusters)
653  {
654  if (!esdevent) return 0;
655  const AliMultiplicity* mult = esdevent->GetMultiplicity();
656  if (!mult) return 0;
657  return mult->GetNumberOfITSClusters(1);
658  }
659 
660  Int_t refmult=0;
661  fRefMultCuts->SetEvent(event,mcEvent);
662  Int_t numberOfInputObjects = fRefMultCuts->GetNumberOfInputObjects();
663  for (Int_t i=0; i<numberOfInputObjects; i++) {
665  refmult++;
666  }
667  return refmult;
668 }
669 //_____________________________________________________________________________
671 {
672  //define QA histos
673  if (fQA) return;
674 
675  Bool_t adddirstatus = TH1::AddDirectoryStatus();
676  TH1::AddDirectory(kFALSE);
677  fQA = new TList(); fQA->SetOwner();
678  fQA->SetName(Form("%s QA",GetName()));
679  TList* before = new TList(); before->SetOwner();
680  before->SetName("before");
681  TList* after = new TList(); after->SetOwner();
682  after->SetName("after");
683  fQA->Add(before);
684  fQA->Add(after);
685  before->Add(new TH1F("zvertex",";z;event cout",500,-15.,15.)); //0
686  after->Add(new TH1F("zvertex",";z;event cout",500,-15.,15.)); //0
687  before->Add(new TH2F("fTPCvsGlobalMult","TPC only vs Global track multiplicity;global;TPC only",500,0,2500,500,0,3500));//1
688  after->Add(new TH2F("fTPCvsGlobalMult","TPC only vs Global track multiplicity;global;TPC only",500,0,2500,500,0,3500));//1
689  TH1::AddDirectory(adddirstatus);
690 }
691 
692 //---------------------------------------------------------------//
693 void AliFlowEventCuts::Browse(TBrowser* b)
694 {
695  //some browsing capabilities
696  if (fQA) b->Add(fQA);
697 }
698 
699 //---------------------------------------------------------------//
700 Long64_t AliFlowEventCuts::Merge(TCollection* list)
701 {
702  //merge
703  Int_t number=0;
704  AliFlowEventCuts* obj;
705  if (!list) return 0;
706  if (list->GetEntries()<1) return 0;
707  TIter next(list);
708  while ( (obj = dynamic_cast<AliFlowEventCuts*>(next())) )
709  {
710  if (obj==this) continue;
711  TList listwrapper;
712  listwrapper.Add(obj->GetQA());
713  fQA->Merge(&listwrapper);
714  number++;
715  }
716  return number;
717 }
718 
719 
Double_t fPrimaryVertexZmax
AliESDtrackCuts::MultEstTrackType fRefMultMethodAliESDtrackCuts
Float_t GetCentrality(AliVEvent *event, AliMCEvent *mcEvent)
Double_t fPrimaryVertexXmax
Bool_t fData2011
correlation between TPCMult and GlobalMult
TObject * GetInputObject(Int_t i)
const char * title
Definition: MakeQAPdf.C:26
Long64_t Merge(TCollection *list)
TH1 * QAbefore(Int_t i)
Bool_t fCutTPCmultiplicityOutliersAOD
static AliFlowTrackCuts * GetStandardGlobalTrackCuts2010()
AliFlowTrackCuts * fStandardTPCcuts
AliFlowTrackCuts * fMeanPtCuts
centrality
Double_t fPrimaryVertexYmin
Double_t fPrimaryVertexYmax
TList * list
TH1 * QAafter(Int_t i)
AliFlowEventCuts & operator=(const AliFlowEventCuts &someCuts)
Int_t Count(AliVEvent *event=NULL)
AliAnalysisUtils * fUtils
virtual Bool_t IsSelected(TObject *obj, Int_t id=-666)
void SetParamType(trackParameterType paramType)
const char * CentrMethName(refMultMethod method) const
refMultMethod fRefMultMethod
Bool_t PassesCuts(AliVEvent *event, AliMCEvent *mcevent)
Int_t GetNumberOfInputObjects() const
static AliFlowTrackCuts * GetStandardTPCStandaloneTrackCuts()
Int_t RefMult(AliVEvent *event, AliMCEvent *mcEvent=0x0)
static AliFlowTrackCuts * GetStandardTPCStandaloneTrackCuts2010()
ClassImp(AliFlowEventCuts) AliFlowEventCuts
refMultMethod fCentralityPercentileMethod
void Browse(TBrowser *b)
Bool_t fCutPrimaryVertexX
analysis utils object
AliTriggerAnalysis fTrigAna
Double_t fPrimaryVertexZmin
Bool_t fUseAliESDtrackCutsRefMult
Double_t fImpactParameterMax
void SetEvent(AliVEvent *event, AliMCEvent *mcEvent=NULL)
AliFlowTrackCuts * fStandardGlobalCuts
Bool_t fUseCentralityUnchecked
AliFlowTrackCuts * fRefMultCuts
TList * GetQA() const
static AliFlowEventCuts * StandardCuts()
Double_t fImpactParameterMin
Double_t fPrimaryVertexXmin
virtual Bool_t IsSelected(TObject *obj, TObject *objmc)
Bool_t fCutTPCmultiplicityOutliers
void SetEtaRange(Float_t r1, Float_t r2)