]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGPP/MUON/dep/AliAnalysisTaskMuonFakes.h
9b4df63669b4ded94abc661ddff4322ffe45876a
[u/mrichter/AliRoot.git] / PWGPP / MUON / dep / AliAnalysisTaskMuonFakes.h
1 #ifndef ALIANALYSISTASKMUONFAKES_H
2 #define ALIANALYSISTASKMUONFAKES_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */ 
8
9 /// \ingroup muondep
10 /// \class AliAnalysisTaskMuonFakes
11 /// \brief Muon task to study fake tracks
12 //Author: Philippe Pillot - SUBATECH Nantes
13
14 #include <TString.h>
15
16 #include "AliAnalysisTaskSE.h"
17
18 class TObjArray;
19 class AliCounterCollection;
20 class AliMUONVTrackStore;
21 class AliMUONTrack;
22
23 class AliAnalysisTaskMuonFakes : public AliAnalysisTaskSE {
24 public:
25   
26   AliAnalysisTaskMuonFakes();
27   AliAnalysisTaskMuonFakes(const char *name);
28   virtual ~AliAnalysisTaskMuonFakes();
29   
30   virtual void   UserCreateOutputObjects();
31   virtual void   UserExec(Option_t *);
32   virtual void   NotifyRun();
33   virtual void   Terminate(Option_t *);
34   
35   /// Set the flag to match reconstructed and simulated tracks by using the MC labels or by position
36   void UseMCLabels(Bool_t flag = kTRUE) { fUseLabel = flag; }
37   
38   /// set the flag to fill histograms only with tracks matched with trigger or not
39   void MatchTrigger(Bool_t flag = kTRUE) { fMatchTrig = flag; }
40   
41   /// set the flag to fill histograms only with tracks passing the acceptance cuts (Rabs, eta)
42   void ApplyAccCut(Bool_t flag = kTRUE) { fApplyAccCut = flag; }
43   
44   /// Set the ocdb path toward the reconstruction parameters
45   void RecoParamLocation(const char* ocdbPath) { fRecoParamLocation = ocdbPath; }
46   
47   /// Return the list of summary canvases
48   TObjArray* GetCanvases() {return fCanvases;}
49   
50 private:
51   
52   /// Not implemented
53   AliAnalysisTaskMuonFakes(const AliAnalysisTaskMuonFakes& rhs);
54   /// Not implemented
55   AliAnalysisTaskMuonFakes& operator = (const AliAnalysisTaskMuonFakes& rhs);
56   
57   // look for fake tracks still connected to a reconstructible simulated track
58   Int_t RemoveConnectedFakes(AliMUONVTrackStore &fakeTrackStore, AliMUONVTrackStore &trackRefStore,
59                              TString &selected, TString &centrality);
60   
61 private:
62   
63   enum histoIndex {
64     // number of tracks
65     kNumberOfTracks,           ///< number of tracks
66     kNumberOfAdditionalTracks, ///< number of additional tracks
67     
68     // number of clusters
69     kNumberOfClusters,            ///< number of clusters per track
70     kNumberOfClustersM,           ///< number of clusters per matched track
71     kNumberOfClustersF,           ///< number of clusters per fake track
72     kNumberOfClustersMC,          ///< number of clusters per MC track
73     kFractionOfMatchedClusters,   ///< fraction of matched clusters in matched tracks
74     kFractionOfConnectedClusters, ///< fraction of connected clusters in fake tracks
75     
76     // number of fired chambers
77     kNumberOfChamberHit,  ///< number of fired chambers per track
78     kNumberOfChamberHitM, ///< number of fired chambers per matched track
79     kNumberOfChamberHitF, ///< number of fired chambers per fake track
80     
81     // chi2
82     kChi2PerDof,  ///< normalized chi2 of tracks
83     kChi2PerDofM, ///< normalized chi2 of matched tracks
84     kChi2PerDofF, ///< normalized chi2 of fake tracks
85     
86     // chi2 versus number of clusters
87     kChi2PerDofVsNClusters,  ///< normalized chi2 of tracks versus number of clusters
88     kChi2PerDofVsNClustersM, ///< normalized chi2 of matched tracks versus number of clusters
89     kChi2PerDofVsNClustersF, ///< normalized chi2 of fake tracks versus number of clusters
90     
91     // chi2 versus number of fired chambers
92     kChi2PerDofVsNChamberHit,  ///< normalized chi2 of tracks versus number of fired chambers
93     kChi2PerDofVsNChamberHitM, ///< normalized chi2 of matched tracks versus number of fired chambers
94     kChi2PerDofVsNChamberHitF, ///< normalized chi2 of fake tracks versus number of fired chambers
95     
96     // physics quantities
97     kP,     ///< momentum of tracks
98     kPM,    ///< momentum of matched tracks
99     kPF,    ///< momentum of fake tracks
100     kPt,    ///< transverse momentum of tracks
101     kPtM,   ///< transverse momentum of matched tracks
102     kPtF,   ///< transverse momentum of fake tracks
103     kEta,   ///< pseudo-rapidity of tracks
104     kEtaM,  ///< pseudo-rapidity of matched tracks
105     kEtaF,  ///< pseudo-rapidity of fake tracks
106     kPhi,   ///< phi angle of tracks
107     kPhiM,  ///< phi angle of matched tracks
108     kPhiF,  ///< phi angle of fake tracks
109     kDCA,   ///< DCA of tracks
110     kDCAM,  ///< DCA of matched tracks
111     kDCAF,  ///< DCA of fake tracks
112     kRAbs,  ///< R of tracks at the end of the absorber
113     kRAbsM, ///< R of matched tracks at the end of the absorber
114     kRAbsF, ///< R of fake tracks at the end of the absorber
115   };
116   
117   enum histo2Index {
118     // physics quantities
119     k2Mass,   ///< invariant mass of the pair
120     k2MassM,  ///< invariant mass of matched-matched pairs
121     k2MassF1, ///< invariant mass of matched-fake pairs
122     k2MassF2, ///< invariant mass of fake-fake pairs
123     k2P,      ///< momentum of the pair
124     k2PM,     ///< momentum of matched-matched pairs
125     k2PF1,    ///< momentum of matched-fake pairs
126     k2PF2,    ///< momentum of fake-fake pairs
127     k2Pt,     ///< transverse momentum of pair
128     k2PtM,    ///< transverse momentum of matched-matched pairs
129     k2PtF1,   ///< transverse momentum of matched-fake pairs
130     k2PtF2,   ///< transverse momentum of fake-fake pairs
131     k2Y,      ///< rapidity of pair
132     k2YM,     ///< rapidity of matched-matched pairs
133     k2YF1,    ///< rapidity of matched-fake pairs
134     k2YF2,    ///< rapidity of fake-fake pairs
135     k2Eta,    ///< pseudo-rapidity of pair
136     k2EtaM,   ///< pseudo-rapidity of matched-matched pairs
137     k2EtaF1,  ///< pseudo-rapidity of matched-fake pairs
138     k2EtaF2,  ///< pseudo-rapidity of fake-fake pairs
139     k2Phi,    ///< phi angle of pair
140     k2PhiM,   ///< phi angle of matched-matched pairs
141     k2PhiF1,  ///< phi angle of matched-fake pairs
142     k2PhiF2,  ///< phi angle of fake-fake pairs
143   };
144   
145   TObjArray* fList;     //!< list of output histograms about single tracks
146   TObjArray* fList2;     //!< list of output histograms about track pairs
147   TObjArray* fCanvases; //!< List of canvases summarizing the results
148   
149   AliCounterCollection* fTrackCounters;        //!< global counters of tracks
150   AliCounterCollection* fFakeTrackCounters;    //!< detailled counters of fake tracks
151   AliCounterCollection* fMatchedTrackCounters; //!< detailled counters of matched tracks
152   AliCounterCollection* fEventCounters;        //!< counters of events
153   AliCounterCollection* fPairCounters;         //!< global counters of track pairs
154   
155   TString  fCurrentFileName;      //!< current input file name
156   UInt_t   fRequestedStationMask; //!< sigma cut to associate clusters with TrackRefs
157   Bool_t   fRequest2ChInSameSt45; //!< 2 fired chambers requested in the same station (4 or 5) or not
158   Double_t fSigmaCut;             //!< mask of requested stations
159   Bool_t   fUseLabel;             ///< match reconstructed and simulated tracks by using the MC labels or by position
160   Bool_t   fMatchTrig;            ///< fill histograms with tracks matched with trigger only
161   Bool_t   fApplyAccCut;          ///< fill histograms with tracks passing the acceptance cuts (Rabs, eta) only
162   TString  fRecoParamLocation;    ///< ocdb path toward the reconstruction parameters
163   
164   ClassDef(AliAnalysisTaskMuonFakes, 2); // fake muon analysis
165 };
166
167 #endif
168