]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGPP/MUON/lite/AliAnalysisTaskTrigChEff.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGPP / MUON / lite / AliAnalysisTaskTrigChEff.h
1 #ifndef ALIANALYSISTASKTRIGCHEFF_H
2 #define ALIANALYSISTASKTRIGCHEFF_H
3
4 /* $Id$ */ 
5
6 //
7 // Class for trigger chamber efficiency calculations
8 // and tests
9 //
10 // Author: Diego Stocco
11 //
12
13 #include "AliVAnalysisMuon.h"
14
15 class AliMuonTrackCuts;
16 class AliVParticle;
17 class TList;
18 class TObjArray;
19 class TString;
20
21 class AliAnalysisTaskTrigChEff : public AliVAnalysisMuon {
22  public:
23   AliAnalysisTaskTrigChEff();
24   AliAnalysisTaskTrigChEff(const char *name, const AliMuonTrackCuts& cuts);
25   virtual ~AliAnalysisTaskTrigChEff();
26
27   void Terminate(Option_t *option);
28   void FinishTaskOutput();
29
30   void MyUserCreateOutputObjects();
31   void ProcessEvent(TString physSel, const TObjArray& selectTrigClasses, TString centrality);
32
33   TList* GetEffHistoList(TString physSel, TString trigClassNames, TString centrality, TString trackSelection);
34
35 //  /// Use ghost tracks in calculations
36 //  void SetUseGhostTracks(Bool_t useGhosts = kTRUE) { fUseGhosts = useGhosts; }
37
38  private:
39
40   AliAnalysisTaskTrigChEff(const AliAnalysisTaskTrigChEff&);
41   AliAnalysisTaskTrigChEff& operator=(const AliAnalysisTaskTrigChEff&);
42
43   enum {
44     kBendingEff,     ///< Bending plane fired
45     kNonBendingEff,  ///< Non-bending plane fired
46     kBothPlanesEff,  ///< Both planes fired
47     kAllTracks,      ///< tracks used for calculation
48     kNcounts         ///< Number of count type
49   };
50
51   enum {
52     kHchamberEff,    ///< Counts per cathode histogram index
53     kHslatEff,       ///< Counts per slat histogram index
54     kHboardEff,      ///< Counts per board histogram index
55     kHcheckBoard,    ///< Check rejected tracks per board
56     kNhistoTypes     ///< Check rejected tracks per board
57   };
58
59   enum {
60     kNoMatch,       ///< No match with trigger
61     kMatchApt,      ///< Match All Pt
62     kMatchLpt,      ///< Match Low Pt
63     kMatchHpt,      ///< Match High Pt
64     kNtrigMatch     ///< Total number of matched types
65   };
66   
67   enum {
68     kSelectTrack,   ///< Selected track
69     kNoSelectTrack, ///< Non selected tracks (includes ghosts)
70     kNtrackSel      ///< Total number of track selection
71   };
72   
73   enum {
74     kEffFromTrack,  ///< Hit pattern from tracker track extrapolation
75     kEffFromTrig,   ///< Hit pattern from trigger
76     kNeffMethods    ///< Total number of efficiency methods
77   };
78
79   TString GetHistoName(Int_t itype, Int_t icount, Int_t ichamber, Int_t itrackSel, Int_t imatch, Int_t imethod);
80   Bool_t FillEffHistoList(TString physSel, TString trigClassNames, TString centrality, TString trackSelection, TList* outList = 0x0);
81   void InitLocalKeys();
82  
83   TObjArray* fTrackSelKeys;   ///< Selection names
84   TObjArray* fCountTypeKeys;  ///< Count type keys
85   TObjArray* fHistoTypeKeys;  ///< Base histogram name
86   TObjArray* fEffMethodKeys;  ///< Efficiency methods keys
87   TObjArray* fMatchTrigKeys;  ///< Match trigger names
88
89 //  Bool_t fUseGhosts; ///< Flag to use also the trigger tracks not matching the tracker in eff. calculation
90   TList*  fList;     //!<TList output object
91
92   ClassDef(AliAnalysisTaskTrigChEff, 4); // Trigger chamber efficiencies
93 };
94
95 #endif