AliPhysics  c0d7b22 (c0d7b22)
 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  }
488  AliCentrality* centr = ((AliVAODHeader*)aodevent->GetHeader())->GetCentralityP();
490  Double_t v0Centr = centr->GetCentralityPercentile("V0M");
491  Double_t trkCentr = centr->GetCentralityPercentile("TRK");
492  if(TMath::Abs(v0Centr-trkCentr) > 5) pass = kFALSE;
493  }
496  if (!centr->IsEventInCentralityClassUnchecked( fCentralityPercentileMin,
499  pass = kFALSE;
500  }
501  } else {
502  if (!centr->IsEventInCentralityClass( fCentralityPercentileMin,
505  pass = kFALSE;
506  }
507  }
508  }
509  }
510  else {
512  AliMultSelection *MultSelection = (AliMultSelection *) aodevent->FindListObject("MultSelection");
513  Float_t lPercentile = MultSelection->GetMultiplicityPercentile(CentrMethName(fCentralityPercentileMethod));
514  if(!MultSelection){
515  AliWarning("AliMultSelection not found, did you Run AliMultSelectionTask? \n");
516  }
517  if(!(fCentralityPercentileMin <= lPercentile && lPercentile < fCentralityPercentileMax))
518  {
519  pass=kFALSE;
520  }
521  }
522  }
523  }
524 
525  if (fCutMeanPt)
526  {
527  Float_t meanpt=0.0;
528  Int_t ntracks=event->GetNumberOfTracks();
529  Int_t nselected=0;
530  for (Int_t i=0; i<ntracks; i++)
531  {
532  AliVParticle* track = event->GetTrack(i);
533  if (!track) continue;
534  Bool_t localpass=kTRUE;
535  if (fMeanPtCuts) localpass=fMeanPtCuts->IsSelected(track);
536  if (localpass)
537  {
538  meanpt += track->Pt();
539  nselected++;
540  }
541  }
542  if (nselected) meanpt=meanpt/nselected;
543  if (meanpt<fMeanPtMin || meanpt >= fMeanPtMax) pass=kFALSE;
544  }
545 
546  //impact parameter cut
547  if(fCutImpactParameter) {
548  Double_t gImpactParameter = 0.;
549  if(mcevent) {
550  AliCollisionGeometry* headerH = dynamic_cast<AliCollisionGeometry*>(dynamic_cast<AliMCEvent*>(mcevent)->GenEventHeader());
551  if(headerH)
552  gImpactParameter = headerH->ImpactParameter();
553  }
554  if ((gImpactParameter < fImpactParameterMin) || (gImpactParameter >= fImpactParameterMax ))
555  pass=kFALSE;
556  }
557 
558  if (fQA&&pass)
559  {
560  QAafter(1)->Fill(multGlobal,multTPC);
561  QAafter(0)->Fill(pvtxz);
562  }
563  return pass;
564 }
565 
566 //-----------------------------------------------------------------------
567 Float_t AliFlowEventCuts::GetCentrality(AliVEvent* event, AliMCEvent* /*mcEvent*/)
568 {
569  //get the centrality percentile of the event
570  AliESDEvent* esdEvent = dynamic_cast<AliESDEvent*>(event);
571  AliAODEvent* aodEvent = dynamic_cast<AliAODEvent*>(event);
572 
573  Float_t centrality=-1.;
574 
576  {
577  AliCentrality* centr = NULL;
578  if (esdEvent)
579  centr = esdEvent->GetCentrality();
580  if (aodEvent)
581  centr = ((AliVAODHeader*)aodEvent->GetHeader())->GetCentralityP();
582 
583  if (!centr) return -1.;
584 
586  centrality=centr->GetCentralityPercentileUnchecked(CentrMethName(fCentralityPercentileMethod));
587  else
588  centrality=centr->GetCentralityPercentile(CentrMethName(fCentralityPercentileMethod));
589  }
590  else // if(!fUseNewCentralityFramework)
591  {
592  if (esdEvent)
593  {
594  AliMultSelection *MultSelection = (AliMultSelection *) esdEvent->FindListObject("MultSelection");
595  Float_t lPercentile = MultSelection->GetMultiplicityPercentile(CentrMethName(fCentralityPercentileMethod));
596  centrality = lPercentile;
597  }
598  else if (aodEvent)
599  {
600  AliMultSelection *MultSelection = (AliMultSelection *) aodEvent->FindListObject("MultSelection");
601  Float_t lPercentile = MultSelection->GetMultiplicityPercentile(CentrMethName(fCentralityPercentileMethod));
602  if(!MultSelection){
603  AliWarning("AliMultSelection not found, did you Run AliMultSelectionTask? \n");
604  }
605  centrality = lPercentile;
606  } // else if (aodEvent)
607  } // else // if(!fUseNewCentralityFramework)
608 
609  return centrality;
610 }
611 
612 //-----------------------------------------------------------------------
614 {
615  //get the string for refmultmethod, for use with AliCentrality in
616  //the cut on centrality percentile
617  switch (method)
618  {
619  case kSPDtracklets:
620  return "TKL";
621  case kSPD1clusters:
622  return "CL1";
623  case kTPConly:
624  return "TRK";
625  case kVZERO:
626  return "V0M";
627  default:
628  return "";
629  }
630 }
631 //-----------------------------------------------------------------------
633 {
634  //make a set of standard event cuts, caller becomes owner
635  AliFlowEventCuts* cuts = new AliFlowEventCuts();
636  return cuts;
637 }
638 
639 //-----------------------------------------------------------------------
640 Int_t AliFlowEventCuts::RefMult(AliVEvent* event, AliMCEvent *mcEvent)
641 {
642  //calculate the reference multiplicity, if all fails return 0
643  AliESDVZERO* vzero = NULL;
644  AliESDEvent* esdevent = dynamic_cast<AliESDEvent*>(event);
645 
646  if (fUseAliESDtrackCutsRefMult && esdevent)
647  {
648  //use the standard ALICE reference multiplicity with the default eta range
649  return AliESDtrackCuts::GetReferenceMultiplicity(esdevent, fRefMultMethodAliESDtrackCuts);
650  }
651 
653  {
655  fRefMultCuts->SetEtaRange(-0.8,0.8);
656  fRefMultCuts->SetPtMin(0.15);
657  }
659  {
660  fRefMultCuts = new AliFlowTrackCuts("tracklet refmult cuts");
662  fRefMultCuts->SetEtaRange(-0.8,0.8);
663  }
664  else if (fRefMultMethod==kVZERO)
665  {
666  if (!esdevent) return 0;
667  vzero=esdevent->GetVZEROData();
668  if (!vzero) return 0;
669  return TMath::Nint(vzero->GetMTotV0A()+vzero->GetMTotV0C());
670  }
671  else if (fRefMultMethod==kSPD1clusters)
672  {
673  if (!esdevent) return 0;
674  const AliMultiplicity* mult = esdevent->GetMultiplicity();
675  if (!mult) return 0;
676  return mult->GetNumberOfITSClusters(1);
677  }
678 
679  Int_t refmult=0;
680  fRefMultCuts->SetEvent(event,mcEvent);
681  Int_t numberOfInputObjects = fRefMultCuts->GetNumberOfInputObjects();
682  for (Int_t i=0; i<numberOfInputObjects; i++) {
684  refmult++;
685  }
686  return refmult;
687 }
688 //_____________________________________________________________________________
690 {
691  //define QA histos
692  if (fQA) return;
693 
694  Bool_t adddirstatus = TH1::AddDirectoryStatus();
695  TH1::AddDirectory(kFALSE);
696  fQA = new TList(); fQA->SetOwner();
697  fQA->SetName(Form("%s QA",GetName()));
698  TList* before = new TList(); before->SetOwner();
699  before->SetName("before");
700  TList* after = new TList(); after->SetOwner();
701  after->SetName("after");
702  fQA->Add(before);
703  fQA->Add(after);
704  before->Add(new TH1F("zvertex",";z;event cout",500,-15.,15.)); //0
705  after->Add(new TH1F("zvertex",";z;event cout",500,-15.,15.)); //0
706  before->Add(new TH2F("fTPCvsGlobalMult","TPC only vs Global track multiplicity;global;TPC only",500,0,2500,500,0,3500));//1
707  after->Add(new TH2F("fTPCvsGlobalMult","TPC only vs Global track multiplicity;global;TPC only",500,0,2500,500,0,3500));//1
708  TH1::AddDirectory(adddirstatus);
709 }
710 
711 //---------------------------------------------------------------//
712 void AliFlowEventCuts::Browse(TBrowser* b)
713 {
714  //some browsing capabilities
715  if (fQA) b->Add(fQA);
716 }
717 
718 //---------------------------------------------------------------//
719 Long64_t AliFlowEventCuts::Merge(TCollection* list)
720 {
721  //merge
722  Int_t number=0;
723  AliFlowEventCuts* obj;
724  if (!list) return 0;
725  if (list->GetEntries()<1) return 0;
726  TIter next(list);
727  while ( (obj = dynamic_cast<AliFlowEventCuts*>(next())) )
728  {
729  if (obj==this) continue;
730  TList listwrapper;
731  listwrapper.Add(obj->GetQA());
732  fQA->Merge(&listwrapper);
733  number++;
734  }
735  return number;
736 }
737 
738 
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)