1 #ifndef ALIANALYSISUTILS_H
2 #define ALIANALYSISUTILS_H
4 ////////////////////////////////////////////////////////////////////
6 // Class with functions useful for different analyses //
7 // - vertex selection //
8 // * 2013 pA default cuts //
9 // - identification of the fist event of the chunk //
10 // - identification pileup events //
12 ///////////////////////////////////////////////////////////////////
19 class AliAnalysisUtils : public TObject {
24 virtual ~AliAnalysisUtils(){};
26 Bool_t IsVertexSelected2013pA(AliVEvent *event);
27 Bool_t IsFirstEventInChunk(AliVEvent *event);
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
34 Double_t GetWDist(const AliVVertex* v0, const AliVVertex* v1);
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; }
40 //general pileup selection settings
41 void SetUseMVPlpSelection(Bool_t useMVPlpSelection) { fUseMVPlpSelection = useMVPlpSelection;}
42 void SetUseOutOfBunchPileUp(Bool_t useOutOfBunchPileUp) { fUseOutOfBunchPileUp = useOutOfBunchPileUp;}
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;}
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;}
60 Bool_t fisAOD; // flag for AOD:1 or ESD:0
62 Int_t fMinVtxContr; // minimum vertex contributors
63 Float_t fMaxVtxZ; // maximum |z| of primary vertex
65 Bool_t fCutOnZVertexSPD; // 0: no cut, 1: |zvtx-SPD - zvtx-TPC|<0.5cm
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
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)
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
82 ClassDef(AliAnalysisUtils,1) // base helper class