AliPhysics  958ad07 (958ad07)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskMuonFakes.h
Go to the documentation of this file.
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 
12 //Author: Philippe Pillot - SUBATECH Nantes
13 
14 #include <TString.h>
15 
16 #include "AliAnalysisTaskSE.h"
17 #include "AliMuonTrackCuts.h"
18 
19 class TObjArray;
20 class AliCounterCollection;
21 class AliESDMuonTrack;
22 class AliMUONVTrackStore;
23 class AliMUONTrack;
24 
26 public:
27 
29  AliAnalysisTaskMuonFakes(const char *name);
30  virtual ~AliAnalysisTaskMuonFakes();
31 
32  virtual void UserCreateOutputObjects();
33  virtual void UserExec(Option_t *);
34  virtual void NotifyRun();
35  virtual void Terminate(Option_t *);
36 
38  void ShowProgressBar(Bool_t flag = kTRUE) { fShowProgressBar = flag; }
39 
41  void UseMCLabels(Bool_t flag = kTRUE) { fUseLabel = flag; }
42 
44  void CombineMCId(Bool_t flag = kTRUE) { fCombineMCId = flag; }
45 
48 
50  void MatchTrigger(Bool_t flag = kTRUE) { fMatchTrig = flag; }
51 
53  void ApplyAccCut(Bool_t flag = kTRUE) { fApplyAccCut = flag; }
54 
56  void Chi2Cut(Double_t cut) { fChi2Cut = cut; }
57 
59  void PtCut(Double_t cut) { fPtCut = cut; }
60 
61  // set standard cuts to select tracks to be considered
62  void SetMuonTrackCuts(AliMuonTrackCuts &trackCuts);
63 
65  void RecoParamLocation(const char* ocdbPath) { fRecoParamLocation = ocdbPath; }
66 
68  void DecayAsFake(Bool_t flag = kTRUE) { fDecayAsFake = flag; }
69 
71  void PrintDecayChain(Bool_t flag = kTRUE) { fPrintDecayChain = flag; }
72 
75 
78 
79 private:
80 
85 
86  // return kTRUE if the track pass the section criteria
87  Bool_t IsSelected(AliESDMuonTrack &esdTrack);
88 
89  // fill global histograms at track level
90  void FillHistoTrack(Int_t histShift, Int_t nClusters, Int_t nChamberHit, Double_t normalizedChi2,
91  Double_t p, Double_t pT, Double_t eta, Double_t phi, Double_t dca,
92  Double_t thetaTrackAbsEnd, Double_t pdca, Double_t rAbs);
93 
95  void FillHistoPair(Int_t histShift, Double_t mass, Double_t p, Double_t pt,
96  Double_t y, Double_t eta, Double_t phi);
97 
98  // look for fake tracks still connected to a reconstructible simulated track
99  Int_t RemoveConnectedFakes(AliMUONVTrackStore &fakeTrackStore, AliMUONVTrackStore &trackRefStore,
100  TString &selected, TString &centrality);
101 
102  // Check whether this combination of clusters correspond to a decaying particle or not
103  Int_t IsDecay(Int_t nClusters, Int_t *chId, Int_t *labels, Bool_t &isReconstructible, Int_t &lastCh) const;
104 
105  // Try to match clusters between track and trackRef and add the corresponding MC labels to the arrays
106  void AddCompatibleClusters(const AliMUONTrack &track, const AliMUONTrack &trackRef,
107  TArrayI *labels, Int_t *nLabels) const;
108 
109  // Check whether this track correspond to a decaying particle by using cluster MC labels
110  Int_t IsDecayByLabel(const AliMUONTrack &track, Bool_t &isReconstructible, Int_t &lastCh) const;
111 
112  // Check whether this track correspond to a decaying particle by comparing clusters position
113  Int_t IsDecayByPosition(const AliMUONTrack &track, const AliMUONVTrackStore &trackRefStore,
114  const AliMUONVTrackStore &usedTrackRefStore, Bool_t &isReconstructible,
115  Int_t &lastCh) const;
116 
117 private:
118 
119  enum histoIndex {
122  kChi2PerDof = 12,
125  kP = 30,
126  kPt = 36,
127  kEta = 42,
128  kPhi = 48,
129  kDCA = 54,
130  kPDCA23 = 60,
131  kPDCA310 = 66,
132  kRAbs = 72,
134  };
135 
142  };
143 
144  enum histo2Index {
145  k2Mass = 0,
146  k2P = 4,
147  k2Pt = 8,
148  k2Y = 12,
149  k2Eta = 16,
150  k2Phi = 20,
152  };
153 
157 
158  AliCounterCollection* fTrackCounters;
159  AliCounterCollection* fFakeTrackCounters;
160  AliCounterCollection* fMatchedTrackCounters;
161  AliCounterCollection* fEventCounters;
162  AliCounterCollection* fPairCounters;
163 
181 
182  AliMuonTrackCuts* fMuonTrackCuts;
183 
184  ClassDef(AliAnalysisTaskMuonFakes, 3); // fake muon analysis
185 };
186 
187 
188 //________________________________________________________________________
189 inline void AliAnalysisTaskMuonFakes::SetMuonTrackCuts(AliMuonTrackCuts &trackCuts)
190 {
192  delete fMuonTrackCuts;
193  fMuonTrackCuts = new AliMuonTrackCuts(trackCuts);
194 }
195 
196 #endif
197 
Bool_t fCombineMCId
combine reconstructed/simulated track matching by MC labels and by position
TString fCurrentFileName
current input file name
Double_t fPtCut
cut on minimum pt
void MatchTrigger(Bool_t flag=kTRUE)
set the flag to fill histograms only with tracks matched with trigger or not
double Double_t
Definition: External.C:58
void Chi2Cut(Double_t cut)
set specific cut value on normalized chi2 above which the track is not considered ...
virtual void Terminate(Option_t *)
Double_t mass
Bool_t fPrintDecayChain
print labels of connected particles and ancestors when looking for decays
centrality
void AddCompatibleClusters(const AliMUONTrack &track, const AliMUONTrack &trackRef, TArrayI *labels, Int_t *nLabels) const
Int_t RemoveConnectedFakes(AliMUONVTrackStore &fakeTrackStore, AliMUONVTrackStore &trackRefStore, TString &selected, TString &centrality)
Bool_t fDecayAsFake
considere decays as fake tracks or not
AliCounterCollection * fPairCounters
global counters of track pairs
void PrintDecayChain(Bool_t flag=kTRUE)
set the flag to print labels of connected particles and ancestors when looking for decays ...
ClassDef(AliAnalysisTaskMuonFakes, 3)
Double_t fSigmaCut
sigma cut to associate clusters with TrackRefs
void ShowProgressBar(Bool_t flag=kTRUE)
set the flag to show the progression bar
AliAnalysisTaskMuonFakes & operator=(const AliAnalysisTaskMuonFakes &rhs)
Not implemented.
Bool_t fRequest2ChInSameSt45
2 fired chambers requested in the same station (4 or 5) or not
void CombineMCId(Bool_t flag=kTRUE)
Set the flag to combine reconstructed/simulated track matching by MC labels and by position...
Bool_t fShowProgressBar
show the progression bar
void DecayAsFake(Bool_t flag=kTRUE)
set the flag to considere decays as fake tracks or not
UInt_t fRequestedStationMask
mask of requested stations
Bool_t fApplyAccCut
fill histograms with tracks passing the acceptance cuts (Rabs, eta) only
Bool_t IsSelected(AliESDMuonTrack &esdTrack)
AliCounterCollection * fFakeTrackCounters
detailled counters of fake tracks
Double_t fChi2Cut
cut on normalized chi2
int Int_t
Definition: External.C:63
void DisableDetailedCounters(Bool_t flag=kTRUE)
set the flag to disable the recording of event/file of problematic tracks
Int_t fNEvents
number of processed events
unsigned int UInt_t
Definition: External.C:33
void FillHistoPair(Int_t histShift, Double_t mass, Double_t p, Double_t pt, Double_t y, Double_t eta, Double_t phi)
fill global histograms at pair level
number of histograms at pair level
fraction of matched clusters in matched tracks
AliCounterCollection * fMatchedTrackCounters
detailled counters of matched tracks
Bool_t fMatchTrig
fill histograms with tracks matched with trigger only
TObjArray * GetCanvases()
Return the list of summary canvases.
Int_t IsDecayByLabel(const AliMUONTrack &track, Bool_t &isReconstructible, Int_t &lastCh) const
TString fRecoParamLocation
ocdb path toward the reconstruction parameters
void SetMuonTrackCuts(AliMuonTrackCuts &trackCuts)
normalized chi2 versus number of fired chambers
Double_t fExternalSigmaCut
sigma cut to associate clusters with TrackRefs (instead of using recoParam)
AliCounterCollection * fTrackCounters
global counters of tracks
Bool_t fDisableDetailedCounters
disable the recording of event/file of problematic tracks
Bool_t fUseLabel
match reconstructed and simulated tracks by using the MC labels or by position
void PtCut(Double_t cut)
set specific cut value on minimum pt below which the track is not considered
TObjArray * fList
list of output histograms about single tracks
AliMuonTrackCuts * fMuonTrackCuts
cuts to select tracks to be considered
virtual void UserExec(Option_t *)
number of histograms at track level
void ApplyAccCut(Bool_t flag=kTRUE)
set the flag to fill histograms only with tracks passing the acceptance cuts (Rabs, eta)
const char Option_t
Definition: External.C:48
void RecoParamLocation(const char *ocdbPath)
Set the ocdb path toward the reconstruction parameters.
void FillHistoTrack(Int_t histShift, Int_t nClusters, Int_t nChamberHit, Double_t normalizedChi2, Double_t p, Double_t pT, Double_t eta, Double_t phi, Double_t dca, Double_t thetaTrackAbsEnd, Double_t pdca, Double_t rAbs)
bool Bool_t
Definition: External.C:53
fraction of connected clusters in fake tracks
Int_t IsDecay(Int_t nClusters, Int_t *chId, Int_t *labels, Bool_t &isReconstructible, Int_t &lastCh) const
TObjArray * fCanvases
List of canvases summarizing the results.
void SetExternalSigmaCut(Double_t cut)
Set the sigma cut to associate clusters with TrackRefs by position (instead of using recoParam) ...
void UseMCLabels(Bool_t flag=kTRUE)
Set the flag to match reconstructed and simulated tracks by using the MC labels or by position...
AliCounterCollection * fEventCounters
counters of events
Int_t IsDecayByPosition(const AliMUONTrack &track, const AliMUONVTrackStore &trackRefStore, const AliMUONVTrackStore &usedTrackRefStore, Bool_t &isReconstructible, Int_t &lastCh) const
Muon task to study fake tracks.
TObjArray * fList2
list of output histograms about track pairs
normalized chi2 versus number of clusters
R at the end of the absorber.