]>
Commit | Line | Data |
---|---|---|
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 | ||
16 | class AliVEvent; | |
c9df49b3 | 17 | class AliVVertex; |
beb31786 | 18 | class AliPPVsMultUtils; |
77c42b43 | 19 | |
20 | class AliAnalysisUtils : public TObject { | |
21 | ||
22 | public: | |
23 | ||
24 | AliAnalysisUtils(); | |
25 | virtual ~AliAnalysisUtils(){}; | |
c9df49b3 | 26 | |
77c42b43 | 27 | Bool_t IsVertexSelected2013pA(AliVEvent *event); |
28 | Bool_t IsFirstEventInChunk(AliVEvent *event); | |
c9df49b3 | 29 | |
30 | Bool_t IsPileUpEvent(AliVEvent *event); //to be used in the analysis | |
31 | Bool_t IsPileUpMV(AliVEvent *event); //MV pileup selection implemented here | |
32 | Bool_t IsPileUpSPD(AliVEvent *event); //this calls IsPileUpFromSPD | |
33 | Bool_t IsOutOfBunchPileUp(AliVEvent *event); //out-of-bunch pileup rejection using trigger information | |
8c379b7c | 34 | Bool_t IsSPDClusterVsTrackletBG(AliVEvent *event); // background rejection with cluster-vs-tracklet cut |
c9df49b3 | 35 | |
36 | Double_t GetWDist(const AliVVertex* v0, const AliVVertex* v1); | |
37 | ||
77c42b43 | 38 | void SetMinVtxContr(Int_t contr=1) {fMinVtxContr=contr;} |
39 | void SetMaxVtxZ(Float_t z=1e6) {fMaxVtxZ=z;} | |
40 | void SetCutOnZVertexSPD(Bool_t iscut=true) { fCutOnZVertexSPD = iscut; } | |
c9df49b3 | 41 | |
42 | //general pileup selection settings | |
43 | void SetUseMVPlpSelection(Bool_t useMVPlpSelection) { fUseMVPlpSelection = useMVPlpSelection;} | |
44 | void SetUseOutOfBunchPileUp(Bool_t useOutOfBunchPileUp) { fUseOutOfBunchPileUp = useOutOfBunchPileUp;} | |
45 | ||
46 | //Multi Vertex pileup selection | |
47 | void SetMinPlpContribMV(Int_t minPlpContribMV) { fMinPlpContribMV = minPlpContribMV;} | |
48 | void SetMaxPlpChi2MV(Float_t maxPlpChi2MV) { fMaxPlpChi2MV = maxPlpChi2MV;} | |
49 | void SetMinWDistMV(Float_t minWDistMV) { fMinWDistMV = minWDistMV;} | |
50 | void SetCheckPlpFromDifferentBCMV(Bool_t checkPlpFromDifferentBCMV) { fCheckPlpFromDifferentBCMV = checkPlpFromDifferentBCMV;} | |
51 | //SPD Pileup slection | |
52 | void SetMinPlpContribSPD(Int_t minPlpContribSPD) { fMinPlpContribSPD = minPlpContribSPD;} | |
53 | void SetMinPlpZdistSPD(Float_t minPlpZdistSPD) { fMinPlpZdistSPD = minPlpZdistSPD;} | |
54 | void SetnSigmaPlpZdistSPD(Float_t nSigmaPlpZdistSPD) { fnSigmaPlpZdistSPD = nSigmaPlpZdistSPD;} | |
55 | void SetnSigmaPlpDiamXYSPD(Float_t nSigmaPlpDiamXYSPD) { fnSigmaPlpDiamXYSPD = nSigmaPlpDiamXYSPD;} | |
56 | void SetnSigmaPlpDiamZSPD(Float_t nSigmaPlpDiamZSPD) { fnSigmaPlpDiamZSPD = nSigmaPlpDiamZSPD;} | |
57 | void SetUseSPDCutInMultBins(Bool_t useSPDCutInMultBins) { fUseSPDCutInMultBins = useSPDCutInMultBins;} | |
58 | ||
8c379b7c | 59 | // SPD cluster-vs-tracklet cut |
60 | void SetASPDCvsTCut(Float_t a) { fASPDCvsTCut = a; } | |
61 | void SetBSPDCvsTCut(Float_t b) { fBSPDCvsTCut = b; } | |
c9df49b3 | 62 | |
beb31786 | 63 | //multiplicity selection in pp |
64 | Float_t GetMultiplicityPercentile(AliVEvent *event, TString lMethod = "V0M"); | |
65 | ||
77c42b43 | 66 | private: |
c9df49b3 | 67 | |
77c42b43 | 68 | Bool_t fisAOD; // flag for AOD:1 or ESD:0 |
c9df49b3 | 69 | |
77c42b43 | 70 | Int_t fMinVtxContr; // minimum vertex contributors |
71 | Float_t fMaxVtxZ; // maximum |z| of primary vertex | |
c9df49b3 | 72 | |
77c42b43 | 73 | Bool_t fCutOnZVertexSPD; // 0: no cut, 1: |zvtx-SPD - zvtx-TPC|<0.5cm |
c9df49b3 | 74 | |
75 | Bool_t fUseMVPlpSelection; //switch between SPD and MV pileup | |
76 | Bool_t fUseOutOfBunchPileUp; //BC information from the trigger is used to tag out-of-bunch pileup | |
77 | ||
78 | Int_t fMinPlpContribMV; //minimum contributors to the pilup vertices, multi-vertex | |
79 | Float_t fMaxPlpChi2MV; //minimum value of Chi2perNDF of the pileup vertex, multi-vertex | |
80 | Float_t fMinWDistMV; //minimum of the sqrt of weighted distance between the primary and the pilup vertex, multi-vertex | |
81 | Bool_t fCheckPlpFromDifferentBCMV; //pileup from different BC (Bunch Crossings) | |
82 | ||
83 | Int_t fMinPlpContribSPD; //minimum contributors to the pilup vertices, SPD | |
84 | Float_t fMinPlpZdistSPD; //minimum distance for the SPD pileup vertex | |
85 | Float_t fnSigmaPlpZdistSPD; //cut on Z for SPD pileup | |
86 | Float_t fnSigmaPlpDiamXYSPD; //cut on nsigma diamond XY for SPD pileup | |
87 | Float_t fnSigmaPlpDiamZSPD; //cut on nsigma diamond Z for SPD pileup | |
88 | Bool_t fUseSPDCutInMultBins; //use IsPileupFromSPDInMultBins instead of IsPileupFromSPD | |
89 | ||
8c379b7c | 90 | Float_t fASPDCvsTCut; // constant for the linear cut in SPD clusters vs tracklets |
91 | Float_t fBSPDCvsTCut; // slope for the linear cut in SPD clusters vs tracklets | |
beb31786 | 92 | |
93 | AliPPVsMultUtils *fPPVsMultUtils; //! multiplicity selection in pp | |
8983eb32 | 94 | |
95 | AliAnalysisUtils(const AliAnalysisUtils& obj); // copy constructor | |
96 | AliAnalysisUtils& operator=(const AliAnalysisUtils& other); // assignment | |
beb31786 | 97 | |
98 | ClassDef(AliAnalysisUtils,3) // base helper class | |
77c42b43 | 99 | }; |
100 | #endif | |
101 |