Changes to the DEtaDPhi corr fun (making 0 in the center of the bin in the histogram...
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisUtils.h
CommitLineData
77c42b43 1#ifndef ALIANALYSISUTILS_H
2#define ALIANALYSISUTILS_H
3
c9df49b3 4////////////////////////////////////////////////////////////////////
5// //
6// Class with functions useful for different analyses //
77c42b43 7// - vertex selection //
c9df49b3 8// * 2013 pA default cuts //
9// - identification of the fist event of the chunk //
10// - identification pileup events //
77c42b43 11// //
c9df49b3 12///////////////////////////////////////////////////////////////////
77c42b43 13
14#include "TObject.h"
15
16class AliVEvent;
c9df49b3 17class AliVVertex;
77c42b43 18
19class AliAnalysisUtils : public TObject {
20
21 public:
22
23 AliAnalysisUtils();
24 virtual ~AliAnalysisUtils(){};
c9df49b3 25
77c42b43 26 Bool_t IsVertexSelected2013pA(AliVEvent *event);
27 Bool_t IsFirstEventInChunk(AliVEvent *event);
c9df49b3 28
29 Bool_t IsPileUpEvent(AliVEvent *event); //to be used in the analysis
30 Bool_t IsPileUpMV(AliVEvent *event); //MV pileup selection implemented here
31 Bool_t IsPileUpSPD(AliVEvent *event); //this calls IsPileUpFromSPD
32 Bool_t IsOutOfBunchPileUp(AliVEvent *event); //out-of-bunch pileup rejection using trigger information
33
34 Double_t GetWDist(const AliVVertex* v0, const AliVVertex* v1);
35
77c42b43 36 void SetMinVtxContr(Int_t contr=1) {fMinVtxContr=contr;}
37 void SetMaxVtxZ(Float_t z=1e6) {fMaxVtxZ=z;}
38 void SetCutOnZVertexSPD(Bool_t iscut=true) { fCutOnZVertexSPD = iscut; }
c9df49b3 39
40 //general pileup selection settings
41 void SetUseMVPlpSelection(Bool_t useMVPlpSelection) { fUseMVPlpSelection = useMVPlpSelection;}
42 void SetUseOutOfBunchPileUp(Bool_t useOutOfBunchPileUp) { fUseOutOfBunchPileUp = useOutOfBunchPileUp;}
43
44 //Multi Vertex pileup selection
45 void SetMinPlpContribMV(Int_t minPlpContribMV) { fMinPlpContribMV = minPlpContribMV;}
46 void SetMaxPlpChi2MV(Float_t maxPlpChi2MV) { fMaxPlpChi2MV = maxPlpChi2MV;}
47 void SetMinWDistMV(Float_t minWDistMV) { fMinWDistMV = minWDistMV;}
48 void SetCheckPlpFromDifferentBCMV(Bool_t checkPlpFromDifferentBCMV) { fCheckPlpFromDifferentBCMV = checkPlpFromDifferentBCMV;}
49 //SPD Pileup slection
50 void SetMinPlpContribSPD(Int_t minPlpContribSPD) { fMinPlpContribSPD = minPlpContribSPD;}
51 void SetMinPlpZdistSPD(Float_t minPlpZdistSPD) { fMinPlpZdistSPD = minPlpZdistSPD;}
52 void SetnSigmaPlpZdistSPD(Float_t nSigmaPlpZdistSPD) { fnSigmaPlpZdistSPD = nSigmaPlpZdistSPD;}
53 void SetnSigmaPlpDiamXYSPD(Float_t nSigmaPlpDiamXYSPD) { fnSigmaPlpDiamXYSPD = nSigmaPlpDiamXYSPD;}
54 void SetnSigmaPlpDiamZSPD(Float_t nSigmaPlpDiamZSPD) { fnSigmaPlpDiamZSPD = nSigmaPlpDiamZSPD;}
55 void SetUseSPDCutInMultBins(Bool_t useSPDCutInMultBins) { fUseSPDCutInMultBins = useSPDCutInMultBins;}
56
57
77c42b43 58 private:
c9df49b3 59
77c42b43 60 Bool_t fisAOD; // flag for AOD:1 or ESD:0
c9df49b3 61
77c42b43 62 Int_t fMinVtxContr; // minimum vertex contributors
63 Float_t fMaxVtxZ; // maximum |z| of primary vertex
c9df49b3 64
77c42b43 65 Bool_t fCutOnZVertexSPD; // 0: no cut, 1: |zvtx-SPD - zvtx-TPC|<0.5cm
c9df49b3 66
67 Bool_t fUseMVPlpSelection; //switch between SPD and MV pileup
68 Bool_t fUseOutOfBunchPileUp; //BC information from the trigger is used to tag out-of-bunch pileup
69
70 Int_t fMinPlpContribMV; //minimum contributors to the pilup vertices, multi-vertex
71 Float_t fMaxPlpChi2MV; //minimum value of Chi2perNDF of the pileup vertex, multi-vertex
72 Float_t fMinWDistMV; //minimum of the sqrt of weighted distance between the primary and the pilup vertex, multi-vertex
73 Bool_t fCheckPlpFromDifferentBCMV; //pileup from different BC (Bunch Crossings)
74
75 Int_t fMinPlpContribSPD; //minimum contributors to the pilup vertices, SPD
76 Float_t fMinPlpZdistSPD; //minimum distance for the SPD pileup vertex
77 Float_t fnSigmaPlpZdistSPD; //cut on Z for SPD pileup
78 Float_t fnSigmaPlpDiamXYSPD; //cut on nsigma diamond XY for SPD pileup
79 Float_t fnSigmaPlpDiamZSPD; //cut on nsigma diamond Z for SPD pileup
80 Bool_t fUseSPDCutInMultBins; //use IsPileupFromSPDInMultBins instead of IsPileupFromSPD
81
82 ClassDef(AliAnalysisUtils,1) // base helper class
77c42b43 83};
84#endif
85