Fixes for wrong use of const causing PW.CAST_TO_QUALIFIED_TYPE defect in Coverity
[u/mrichter/AliRoot.git] / PWG / muon / AliMuonEventCuts.h
CommitLineData
f8b94231 1#ifndef ALIMUONEVENTCUTS_H
2#define ALIMUONEVENTCUTS_H
3
4#include "AliAnalysisCuts.h"
f8b94231 5
6class AliVEvent;
7class AliVVertex;
8class TList;
9class TAxis;
f8b94231 10class TArrayI;
57142b8e 11class TString;
12class TObjString;
13class TObjArray;
d0809f42 14class AliAnalysisUtils;
f8b94231 15
16class AliMuonEventCuts : public AliAnalysisCuts
17{
18 public:
19
20 enum {
21 kPhysicsSelected = BIT(0),
22 kSelectedCentrality = BIT(1),
23 kSelectedTrig = BIT(2),
d0809f42 24 kGoodVertex = BIT(3),
25 kNoPileup = BIT(4)
f8b94231 26 };
27
28 AliMuonEventCuts();
29 AliMuonEventCuts(const char* name, const char* title);
30 AliMuonEventCuts(const AliMuonEventCuts& obj);
31 AliMuonEventCuts& operator=(const AliMuonEventCuts& obj);
32
33 virtual ~AliMuonEventCuts();
34
35 virtual UInt_t GetSelectionMask ( const TObject* obj );
36 virtual Bool_t IsSelected ( TObject* obj );
37 virtual Bool_t IsSelected ( TList* /*list */ );
38
39 void SetDefaultFilterMask();
40 void SetDefaultParameters();
41
d0809f42 42 /// Skip tests which are not active in the filter mask
43 void SkipTestsNonInFilterMask ( UInt_t skipMask = 0xFFFF) { fCheckMask = ~skipMask; }
44
f8b94231 45 // Handle trigger
34e8fe1d 46 void SetTrigClassPatterns (TString trigPattern );
f8b94231 47 /// Get default trigger class patterns
48 TString GetDefaultTrigClassPatterns() { return fDefaultTrigClassPatterns; };
34e8fe1d 49 void SetTrigClassLevels (TString pattern = "MSL:Lpt,MUSL:Lpt,MSH:Hpt,MUSH:Hpt,MUL:LptLpt,MUU:LptLpt,MLL:LptLpt" );
50 TArrayI GetTrigClassPtCutLevel (TString trigClassName ) const;
51 void SetTrigInputsMap (TString trigInputsMap );
f8b94231 52 /// Get trigger classes found in run
53 TList* GetAllSelectedTrigClasses () const { return fAllSelectedTrigClasses; }
72ebcde7 54 const TObjArray* GetSelectedTrigClassesInEvent ( const AliVEvent* event );
5376e016
CP
55 const TObjArray* GetSelectedTrigClassesInEvent(const TString& firedTriggerClasses,
56 UInt_t l0Inputs, UInt_t l1Inputs, UInt_t l2Inputs);
57
58 UInt_t GetTriggerInputBitMaskFromInputName(const char* inputName) const;
f8b94231 59
f8b94231 60 // Handle centrality
61 void SetCentralityClasses(Int_t nCentralityBins = -1, Double_t* centralityBins = 0x0);
62 /// Get centrality classes
63 TAxis* GetCentralityClasses() const { return fCentralityClasses; }
64
34e8fe1d 65 void SetCentralityEstimator (TString centralityEstimator = "V0M" );
f8b94231 66 TString GetCentralityEstimator () const;
67 Double_t GetCentrality ( const AliVEvent* event ) const;
68
69
70 /// Set Physics selection mask
34e8fe1d 71 void SetPhysicsSelectionMask (UInt_t physicsSelectionMask ) { fPhysicsSelectionMask = physicsSelectionMask; }
f8b94231 72
73
74 /// Set minimum number of vertex contributors
34e8fe1d 75 void SetVertexMinNContributors (Int_t vertexMinNContributors ) { fVertexMinNContributors = vertexMinNContributors; }
f8b94231 76 /// Get minimum number of vertex contributors
68e9b988 77 Int_t GetVertexMinNContributors () const { return fVertexMinNContributors; }
f8b94231 78 /// Set Vz limits
68e9b988 79 void SetVertexVzLimits ( Double_t vzMin = -999., Double_t vzMax = 999. ) { fVertexVzMin = vzMin; fVertexVzMax = vzMax; }
f8b94231 80 /// Get Vtx vz min
68e9b988 81 Double_t GetVertexVzMin () const { return fVertexVzMin; }
f8b94231 82 /// Get Vtx vz max
68e9b988 83 Double_t GetVertexVzMax () const { return fVertexVzMax; }
d0809f42 84
85 /// Return pointer to analysis utils (to configure cuts)
86 AliAnalysisUtils* GetAnalysisUtils ( ) { return fAnalysisUtils; }
f8b94231 87
88 void Print ( Option_t* option = "" ) const;
89
f8b94231 90 protected:
91
34e8fe1d 92 void BuildTriggerClasses (TString firedTrigClasses, UInt_t l0Inputs, UInt_t l1Inputs, UInt_t l2Inputs );
57142b8e 93 Bool_t CheckTriggerClassPattern ( const TString& toCheck ) const;
a3f27e84 94 Bool_t CheckTriggerClassCombination ( const TObjArray* combo, const TString& firedTriggerClasses, UInt_t l0Inputs, UInt_t l1Inputs, UInt_t l2Inputs ) const;
782b4332 95 void AddToEventSelectedClass ( const TString& toCheck, const TObjString* foundTrig, const UInt_t comboType = 0 );
f8b94231 96 Bool_t UpdateEvent( const AliVEvent* event );
97 void SetDefaultTrigClassPatterns();
57142b8e 98 void SetDefaultTrigInputsMap();
68e9b988 99
f8b94231 100 UInt_t fPhysicsSelectionMask; ///< Physics selection mask
101
68e9b988 102 Int_t fVertexMinNContributors; ///< Minimum number of SPD vertex contributors
103 Double_t fVertexVzMin; ///< SPD vertex Vz min
104 Double_t fVertexVzMax; ///< SPD vertex Vz max
f8b94231 105
d0809f42 106 UInt_t fCheckMask; ///< Mask telling which cuts to check (by default check filter mask)
107
f8b94231 108 TString fDefaultTrigClassPatterns; ///< Default trigger class patterns
109 TObjArray* fSelectedTrigPattern; ///< List of triggers to be kept
110 TObjArray* fRejectedTrigPattern; ///< List of triggers to be rejected
111 TObjArray* fSelectedTrigLevel; ///< Track-trigger pt cut for selected trigger class
57142b8e 112 TObjArray* fSelectedTrigCombination; ///< Selected trigger combinations
113 TList* fTrigInputsMap; ///< Trigger inputs map
f8b94231 114 TList* fAllSelectedTrigClasses; ///< List of all selected trigger classes found
115 TAxis* fCentralityClasses; ///< Centrality classes
d0809f42 116 AliAnalysisUtils* fAnalysisUtils; ///< Analysis utility
f8b94231 117
118 private:
4e2a9c02 119 ULong64_t fEventTriggerMask; //!< Fired trigger mask in the event
782b4332 120 TObjArray* fSelectedTrigClassesInEvent; //!< list of selected trigger classes in current event
121 enum {kComboSimple, kComboFormula, kComboAND, kComboOR}; //!< Trigger combination types
f8b94231 122
d0809f42 123 ClassDef(AliMuonEventCuts, 5); // Class for muon event filters
f8b94231 124};
125
126#endif
127