]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/muon/AliAnalysisTaskMuonQA.h
Cleanup the code. Fix memory leak. Now inherit from AliAnalysisTaskSE (Antoine, Phili...
[u/mrichter/AliRoot.git] / PWG3 / muon / AliAnalysisTaskMuonQA.h
CommitLineData
94ef1a28 1#ifndef ALIANALYSISTASKMUONQA_H
2#define ALIANALYSISTASKMUONQA_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
27de2dfb 6/* $Id$ */
7
94ef1a28 8/// \ingroup muondep
9/// \class AliAnalysisTaskMuonQA
10/// \brief Quality assurance of MUON ESDs
11//Author: Philippe Pillot - SUBATECH Nantes
12
03ac5989 13class TMap;
14class TList;
94ef1a28 15class TObjArray;
16class AliCounterCollection;
17
18class AliAnalysisTaskMuonQA : public AliAnalysisTaskSE {
19public:
20
40be9f05 21 AliAnalysisTaskMuonQA();
22 AliAnalysisTaskMuonQA(const char *name);
94ef1a28 23 virtual ~AliAnalysisTaskMuonQA();
24
25 virtual void UserCreateOutputObjects();
26 virtual void UserExec(Option_t *);
27 virtual void Terminate(Option_t *);
28
b4f7418a 29 /// Select negative (<0), positive (>0) or all (==0) tracks to fill histograms
94ef1a28 30 void SelectCharge(Short_t charge = 0) {fSelectCharge = charge;}
b4f7418a 31
32 /// Select events passing the physics selection to fill histograms
94ef1a28 33 void SelectPhysics(Bool_t flag = kTRUE) {fSelectPhysics = flag;}
34
03ac5989 35 /// Select events belonging to at least one of the trigger classes selected by the mask to fill histograms:
36 /// - if the physics selection is used, apply the mask to the trigger word returned by the physics selection
37 /// - if not, apply the mask to the trigger word built by looking for triggers listed in "fSelectTriggerClass"
38 void SelectTrigger(Bool_t flag = kTRUE, UInt_t mask = AliVEvent::kMUON) {fSelectTrigger = flag; fTriggerMask = mask;}
b4f7418a 39
76e3d5d4 40 /// Select track matching the trigger to fill histograms
41 void SelectMatched(Bool_t flag = kTRUE) {fSelectMatched = flag;}
42
417d6f63 43 /// Use only tracks passing the acceptance cuts (Rabs, eta)
44 void ApplyAccCut(Bool_t flag = kTRUE) { fApplyAccCut = flag; }
45
94ef1a28 46private:
47
48 /// Not implemented
49 AliAnalysisTaskMuonQA(const AliAnalysisTaskMuonQA& rhs);
50 /// Not implemented
51 AliAnalysisTaskMuonQA& operator = (const AliAnalysisTaskMuonQA& rhs);
52
53 Double_t ChangeThetaRange(Double_t theta);
54
03ac5989 55 UInt_t BuildTriggerWord(TString& FiredTriggerClasses);
56
57 TList* BuildListOfTriggerCases(TString& FiredTriggerClasses);
58
94ef1a28 59private:
60
03ac5989 61 enum eList {
94ef1a28 62 kNTracks = 0, ///< number of tracks
63 kMatchTrig = 1, ///< number of tracks matched with trigger
64 kSign = 2, ///< track sign
65 kDCA = 3, ///< DCA distribution
66 kP = 4, ///< P distribution
03ac5989 67 kPMuPlus = 5, ///< P distribution of mu+
68 kPMuMinus = 6, ///< P distribution of mu-
69 kPt = 7, ///< Pt distribution
70 kPtMuPlus = 8, ///< Pt distribution of mu+
71 kPtMuMinus = 9, ///< Pt distribution of mu-
72 kRapidity = 10, ///< rapidity distribution
73 kThetaX = 11, ///< thetaX distribution
74 kThetaY = 12, ///< thetaY distribution
75 kChi2 = 13, ///< normalized chi2 distribution
76 kProbChi2 = 14, ///< distribution of probability of chi2
77 kNClustersPerTrack = 15, ///< number of clusters per track
78 kNChamberHitPerTrack = 16 ///< number of chamber hit per track
79 };
80
81 enum eListExpert {
82 kNClustersPerCh = 0, ///< number of clusters per chamber
83 kNClustersPerDE = 1, ///< number of clusters per DE
84 kClusterHitMapInCh = 2, ///< cluster position distribution in chamber i
85 kClusterChargeInCh = 12, ///< cluster charge distribution in chamber i
86 kClusterChargePerDE = 22, ///< cluster charge distribution per DE
87 kClusterSizeInCh = 23, ///< cluster size distribution in chamber i
88 kClusterSizePerDE = 33 ///< cluster size distribution per DE
89 };
90
91 enum eListNorm {
92 kClusterChargePerChMean = 0, ///< cluster charge per Ch: mean
93 kClusterChargePerChSigma = 1, ///< cluster charge per Ch: dispersion
94 kClusterChargePerDEMean = 2, ///< cluster charge per DE: mean
95 kClusterChargePerDESigma = 3, ///< cluster charge per DE: dispersion
96 kClusterSizePerChMean = 4, ///< cluster size per Ch: mean
97 kClusterSizePerChSigma = 5, ///< cluster size per Ch: dispersion
98 kClusterSizePerDEMean = 6, ///< cluster size per DE: mean
99 kClusterSizePerDESigma = 7, ///< cluster size per DE: dispersion
100 kNClustersPerChPerTrack = 8, ///< number of clusters per chamber per track
101 kNClustersPerDEPerTrack = 9 ///< number of clusters per DE per track
94ef1a28 102 };
103
104 TObjArray* fList; //!< List of output object for everybody
105 TObjArray* fListExpert; //!< List of output object for experts
40be9f05 106 TObjArray* fListNorm; //!< Normalized histograms
94ef1a28 107
108 AliCounterCollection* fTrackCounters; //!< track statistics
109 AliCounterCollection* fEventCounters; //!< event statistics
110
111 Short_t fSelectCharge; ///< Fill histograms only with negative/position tracks (0=all)
76e3d5d4 112 Bool_t fSelectPhysics; ///< Fill histograms only with events passing the physics selection
113 Bool_t fSelectTrigger; ///< Fill histograms only with events passing the trigger selection
114 UInt_t fTriggerMask; ///< Trigger mask to be used when selecting events
115 Bool_t fSelectMatched; ///< Fill histograms only with tracks matching the trigger
417d6f63 116 Bool_t fApplyAccCut; ///< use only tracks passing the acceptance cuts (Rabs, eta)
03ac5989 117
118 TMap* fTriggerClass; //!< map of trigger class name associated to short name
119 TList* fSelectTriggerClass; //!< list of trigger class that can be selected to fill histograms
94ef1a28 120
121 static const Int_t nCh; ///< number of tracking chambers
122 static const Int_t nDE; ///< number of DE
123 static const Float_t dMax[5]; ///< maximum diameter of each station
94ef1a28 124
417d6f63 125 ClassDef(AliAnalysisTaskMuonQA, 6);
94ef1a28 126};
127
128#endif
129