Improve the utility to apply a different trigger pt cut to the track depending on...
[u/mrichter/AliRoot.git] / PWG / muon / AliMuonTrackCuts.h
CommitLineData
64647ced 1#ifndef ALIMUONTRACKCUTS_H
2#define ALIMUONTRACKCUTS_H
3
4#include "AliAnalysisCuts.h"
5#include "TArrayD.h"
6
7class AliVParticle;
8class TList;
9class TVector3;
10
11class AliMuonTrackCuts : public AliAnalysisCuts
12{
13 public:
14
15 enum {
16 kMuEta = BIT(0),
17 kMuThetaAbs = BIT(1),
18 kMuPdca = BIT(2),
19 kMuMatchApt = BIT(3),
20 kMuMatchLpt = BIT(4),
21 kMuMatchHpt = BIT(5),
0f7e072e 22 kMuTrackChiSquare = BIT(6)
64647ced 23 };
0f7e072e 24
64647ced 25 AliMuonTrackCuts();
a12dc5da 26 AliMuonTrackCuts(const char* name, const char* title);
27 AliMuonTrackCuts(const char* name, const char* title, Bool_t isESD); // Obsolete
64647ced 28 AliMuonTrackCuts(const AliMuonTrackCuts& obj);
d555a462 29 AliMuonTrackCuts& operator=(const AliMuonTrackCuts& obj);
64647ced 30
31 virtual ~AliMuonTrackCuts();
32
33 virtual UInt_t GetSelectionMask ( const TObject* obj );
34 virtual Bool_t IsSelected ( TObject* obj );
35 virtual Bool_t IsSelected ( TList* /*list */ );
36
37 void SetDefaultFilterMask();
38
39 Bool_t SetRun(Int_t runNumber);
40 void SetUseCustomParam( Bool_t useCustomParam = kTRUE, Int_t runNumber = -1 );
41 void SetIsMC(Bool_t isMC = kTRUE) { fIsMC = isMC; }
42
43 void Print ( Option_t* option = "" ) const;
44
45 TVector3 GetCorrectedDCA ( const AliVParticle* track ) const;
46 Double_t GetAverageMomentum ( const AliVParticle* track ) const;
47
48 enum {
49 kThetaAbs23, ///< Theta_abs between 2 and 3 degrees
50 kThetaAbs310, ///< Theta_abs between 3 and 10 degrees
51 kNthetaAbs ///< Number of theta abs bins
52 };
53
54 // Parameters
55 enum {
56 kMeanDcaX, ///< Average track DCA_x
57 kMeanDcaY, ///< Average track DCA_y
58 kMeanDcaZ, ///< Average track DCA_z
59 kMeanPCorr23, ///< Average momentum correction in 2-3 deg
60 kMeanPCorr310, ///< Average momentum correction in 3-10 deg
61 kSigmaPdca23, ///< Sigma_PxDCA in 2-3 deg
62 kSigmaPdca310, ///< Sigma_PxDCA in 3-10 deg
63 kNSigmaPdcaCut, ///< Cut value in units of sigma_PxDCA
64 kChi2NormCut, ///< Cut on the normalized chi2 of track
65 kRelPResolution, ///< Relative momentum resolution
66 kSlopeResolution, ///< Slope resolution
ea4793e5 67 kSharpPtApt, ///< Sharp tracker pt cut for Apt
68 kSharpPtLpt, ///< Sharp tracker pt cut for Lpt
69 kSharpPtHpt, ///< Sharp tracker pt cut for Hpt
64647ced 70 kNParameters ///< Total number of parameters
71 };
72
73 void SetMeanDCA ( Double_t xAtDca, Double_t yAtDca, Double_t zAtDca = 0.);
74 TVector3 GetMeanDCA () const;
75
76 void SetMeanPCorr ( Double_t pCorrThetaAbs23, Double_t pCorrThetaAbs310 );
77 Double_t GetMeanPCorr ( Double_t rAtAbsEnd ) const;
78
79 void SetSigmaPdca ( Double_t sigmaThetaAbs23, Double_t sigmaThetaAbs310 );
80 Double_t GetSigmaPdca ( Double_t rAtAbsEnd ) const;
81
82 void SetNSigmaPdca ( Double_t nSigmas );
83 Double_t GetNSigmaPdca () const;
84
85 void SetChi2NormCut ( Double_t chi2normCut );
86 Double_t GetChi2NormCut () const;
87
88 void SetRelPResolution ( Double_t relPResolution );
89 Double_t GetRelPResolution () const;
90
91 void SetSlopeResolution ( Double_t slopeResolution );
92 Double_t GetSlopeResolution () const;
ea4793e5 93
a12dc5da 94 void SetSharpPtCut ( Double_t valueApt, Double_t valueLpt, Double_t valueHpt );
ea4793e5 95 Double_t GetSharpPtCut ( Int_t trigPtCut, Bool_t warn = kTRUE ) const;
64647ced 96
97 Bool_t StreamParameters ( Int_t runNumber, Int_t maxRun );
0f7e072e 98
99 /// Apply also sharp pt cut when matching with trigger
100 void ApplySharpPtCutInMatching ( Bool_t sharpPtCut = kTRUE ) { fSharpPtCut = sharpPtCut; }
e7f23491 101 /// Get flag to apply the sharp pt cut when matching with trigger
102 Bool_t IsApplySharpPtCutInMatching () const { return fSharpPtCut; }
64647ced 103
104 private:
d555a462 105
64647ced 106 Int_t GetThetaAbsBin ( Double_t rAtAbsEnd ) const;
107 Bool_t SetParameter ( Int_t iparam, Float_t value );
a12dc5da 108 Bool_t RunMatchesRange ( Int_t runNumber, const Char_t* objName ) const;
109 Bool_t IsESDTrack ( const AliVParticle* track ) const;
64647ced 110
111 Bool_t fIsESD; ///< Event is ESD
112 Bool_t fIsMC; ///< Monte Carlo analysis
113 Bool_t fUseCustomParam; ///< Use custom parameters (do not search in OADB)
0f7e072e 114 Bool_t fSharpPtCut; ///< Flag to apply sharp pt cut in track-trigger matching
64647ced 115
116 TArrayD fParameters; ///< List of parameters
117
0f7e072e 118 ClassDef(AliMuonTrackCuts, 2); // Class for muon track filters
64647ced 119};
120
121#endif
122