AliPhysics  958ad07 (958ad07)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskMuonPerformance.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKMUONPERFORMANCE_H
2 #define ALIANALYSISTASKMUONPERFORMANCE_H
3 
8 // Author D.Stocco and P.Pillot, Subatech, Nantes
9 
10 
11 #include "AliAnalysisTaskSE.h"
12 #include "AliLog.h"
13 
14 class TObjArray;
15 class TH1;
16 class TH2;
17 class TGraphAsymmErrors;
18 class TGraphErrors;
19 class TCanvas;
20 class AliMUONRecoParam;
21 class AliCFContainer;
22 class AliMCParticle;
23 class AliESDMuonTrack;
24 class AliCFEffGrid;
25 
27  public:
29  AliAnalysisTaskMuonPerformance(const char *name);
31 
33  void SetDefaultStorage(const char* ocdbPath) { fDefaultStorage = ocdbPath; }
34 
36  void SetAlignStorage(const char* ocdbPath) { fAlignOCDBpath = ocdbPath; }
37 
39  void SetRecoParamStorage(const char* ocdbPath) { fRecoParamOCDBpath = ocdbPath; }
40 
41  // Set the binning to be used to study the detector resolution versus momentum
42  void SetPBins(Int_t nBins, Double_t min, Double_t max);
43 
46 
48  void FitClusterResiduals(Bool_t flag = kTRUE) { fFitResiduals = flag; }
49 
51  void EnforceTrackingCriteria(Bool_t flag = kTRUE) { fEnforceTrkCriteria = flag; }
52 
54  void UseMCKinematics(Bool_t flag = kTRUE) { fUseMCKinematics = flag; }
55 
58 
59  virtual void UserCreateOutputObjects();
60  virtual void UserExec(Option_t *option);
61  virtual void Terminate(Option_t *option);
62  virtual void NotifyRun();
63 
64  enum {
78  };
79 
80  enum {
84  };
85 
86  private:
87 
90 
91  Bool_t GetEfficiency(AliCFEffGrid* efficiency, Double_t& calcEff, Double_t& calcEffErr);
92  Int_t RecoTrackMother(AliMCParticle* mcParticle);
93  Float_t GetBinThetaAbsEnd(Float_t RAtAbsEnd, Bool_t isTheta = kFALSE);
94  void FillContainerInfoReco(Double_t* containerInput, AliESDMuonTrack* esdTrack, Bool_t isValid, Int_t mcID);
95  void FillContainerInfoMC(Double_t* containerInput, AliMCParticle* mcPart);
96 
97  void FitLandauGausResVsP(TH2* h, const char* fitting, TGraphAsymmErrors* gMean, TGraphAsymmErrors* gMostProb, TGraphAsymmErrors* gSigma);
98  void FitGausResVsMom(TH2* h, const Double_t mean0, const Double_t sigma0, const char* fitting, TGraphAsymmErrors* gMean, TGraphAsymmErrors* gSigma);
99  void FitPDCAVsMom(TH2* h, const char* fitting, TGraphAsymmErrors* gMean, TGraphAsymmErrors* gSigma);
100  void FitClusterResidual(TH1* h, Int_t i, Double_t& sigma, TGraphErrors* gMean, TGraphErrors* gSigma);
101 
102  TCanvas* DrawVsAng(const char* name, const char* title, TH1* h1, TH2* h2);
103  TCanvas* DrawVsPos(const char* name, const char* title, TH2* h1, TH2* h2, TH2* h3);
104  TCanvas* DrawFitLandauGausResPVsP(const char* name, const char* title, TH2* h, const Int_t nBins, const char* fitting);
105  TCanvas* DrawResPVsP(const char* name, const char* title, TH2* h, const Int_t nBins);
106 
107  void Zoom(TH1* h, Double_t fractionCut = 0.01);
108 
109  void FillEffHistos(AliCFEffGrid* efficiency, const char* suffix, TObjArray* list);
110 
111  enum {
118  };
119 
120  enum {
128  };
129 
130  enum {
137  };
138 
139  // Histograms for trigger resolution
140  enum {
144  };
145 
146  // Histograms for tracker resolution
147  enum {
160 
164 
179 
184 
192 
200 
209 
212 
217  };
218 
219  // Graphs and canvases for momentum resolution at vertex
220  enum {
230  };
231 
232  // Graphs for momentum resolution at first cluster
233  enum {
236  };
237 
238  // Graphs and canvases for slope resolution at vertex
239  enum {
250  };
251 
252  // Graphs for slope resolution at first cluster
253  enum {
258  };
259 
260  // Graphs and canvases for eta resolution at vertex
261  enum {
267  };
268 
269  // Graphs and canvases for phi resolution at vertex
270  enum {
276  };
277 
278  // Graphs and cavases for DCA resolution and MCS dispersion
279  enum {
291  };
292 
293  // Graphs for cluster resolution
294  enum {
303  };
304 
321  Int_t fDEIds[200];
322 
323  AliCFContainer* fCFContainer;
335 
336  ClassDef(AliAnalysisTaskMuonPerformance, 3); // Muon performance analysis
337 };
338 
340 {
342  if (nBins > 0) fNPBins = nBins;
343  else AliError("Incorrect number of momentum bins");
344  if (pMin >= 0. && pMax > pMin) {
345  fPRange[0] = pMin;
346  fPRange[1] = pMax;
347  } else AliError("Incorrect momentum range");
348 }
349 
350 
351 #endif
slope-Y residual at vertex versus position at absorber end for tracks with MC angle in ]3...
phi residual at vertex in 3 angular regions
TCanvas * DrawVsAng(const char *name, const char *title, TH1 *h1, TH2 *h2)
void Zoom(TH1 *h, Double_t fractionCut=0.01)
Int_t RecoTrackMother(AliMCParticle *mcParticle)
double Double_t
Definition: External.C:58
TObjArray * fSlopeAtVtxList
List of graph and canvas about slope resolution at vertex.
Bool_t fFitResiduals
fit or not the cluster residuals to extract means and sigmas
P * DCA resolution versus P for tracks in ]2,3] degrees at absorber end.
const char * title
Definition: MakeQAPdf.C:27
Residual of x position in first trigger chamber.
Int_t fDEIndices[1100]
index of DE in histograms refered by ID
Bool_t fUseMCKinematics
use kinematics from MC track when available
slope-X residual at vertex versus angle at absorber end
void CorrectClusterResForSystematics(Bool_t flag=kTRUE)
set the flag to add or not the systematic shifts of the residuals to the resolution ...
slope-Y residual at vertex versus position at absorber end for tracks with MC angle <= 2 degrees ...
phi residual at vertex in 3 MC angular regions
void SetRecoParamStorage(const char *ocdbPath)
Set the OCDB path to the recoParam file used in the reco (if not set use default storage) ...
momentum residual at vertex versus P for tracks in ]3,10[ degrees at absorber end ...
TObjArray * fSlopeAt1stClList
List of graph and canvas about slope resolution at first cluster.
P * DCA distribution versus P for tracks in ]2,3] degrees at absorber end.
TObjArray * fClusterList
List of graph and canvas about cluster resolution.
phi residual at vertex versus position at absorber end for tracks with MC angle <= 2 degrees ...
void FillEffHistos(AliCFEffGrid *efficiency, const char *suffix, TObjArray *list)
TList * list
TDirectory file where lists per trigger are stored in train ouput.
void SetAlignStorage(const char *ocdbPath)
Set the OCDB path to the alignment file used in the reco (if not set use default storage) ...
eta residual at vertex versus position at absorber end for tracks with MC angle <= 2 degrees ...
void FitClusterResidual(TH1 *h, Int_t i, Double_t &sigma, TGraphErrors *gMean, TGraphErrors *gSigma)
momentum residual at first cluster versus P
ClassDef(AliAnalysisTaskMuonPerformance, 3)
mean P * MCS deviation angle versus P for tracks in ]3,10[ degrees at absorber end ...
slope-Y residual at vertex versus position at absorber end for tracks with MC angle in ]2...
P * DCA resolution versus P for tracks in ]3,10[ degrees at absorber end.
transverse momentum residual at vertex versus pT
TObjArray * fTriggerList
List of histograms for trigger resolution.
phi residual at vertex versus position at absorber end for tracks with MC angle in ]3...
momentum residual at vertex versus angle at absorber end
slope-X residual at vertex in 3 angular regions
Match trigger not passing any Pt threshold (MC)
P * MCS deviation angle dispersion versus P for tracks in ]2,3] degrees at absorber end...
P * DCA distribution versus angle at absorber end.
void FitPDCAVsMom(TH2 *h, const char *fitting, TGraphAsymmErrors *gMean, TGraphAsymmErrors *gSigma)
void SetMCTrigLevelFromMatchTrk(Bool_t flag=kTRUE)
if trk and trig parts match different MC, set the triggerable level from the MC matching the trk part...
slope-X residual at vertex versus position at absorber end in 3 MC angular regions ...
UInt_t fRequestedStationMask
mask of requested stations
momentum residual at vertex versus position at absorber end in 3 MC angular regions ...
slope-Y residual at vertex versus angle at absorber end
Double_t * sigma
matched with reconstructible track and triggerable track of different ID
TCanvas * DrawResPVsP(const char *name, const char *title, TH2 *h, const Int_t nBins)
momentum residual at vertex versus angle at absorber end versus momentum
eta residual at vertex in 3 MC angular regions
slope-X residual at vertex versus position at absorber end for tracks with MC angle in ]3...
void FillContainerInfoMC(Double_t *containerInput, AliMCParticle *mcPart)
momentum residual at vertex versus P for tracks with MC angle < 2 degrees
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
TObjArray * fPhiAtVtxList
List of graph and canvas about phi resolution at vertex.
mean P * DCA versus P for tracks in ]3,10[ degrees at absorber end
float Float_t
Definition: External.C:68
not matched with either reconstructible track or triggerable track
eta residual at vertex versus angle at absorber end
Double_t fSigmaCutTrig
sigma cut to associate trigger track to triggerable track
momentum residual at vertex versus position at absorber end for tracks with MC angle in ]2...
P * MCS deviation angle distribution versus P for tracks in ]3,10[ degrees at absorber end...
eta residual at vertex in 3 angular regions
void FitLandauGausResVsP(TH2 *h, const char *fitting, TGraphAsymmErrors *gMean, TGraphAsymmErrors *gMostProb, TGraphAsymmErrors *gSigma)
TCanvas * DrawFitLandauGausResPVsP(const char *name, const char *title, TH2 *h, const Int_t nBins, const char *fitting)
P * DCA distribution versus position at absorber end for tracks with MC angle in ]3,10[ degrees.
transverse momentum residual at first cluster versus pT
TObjArray * fEtaAtVtxList
List of graph and canvas about eta resolution at vertex.
void EnforceTrackingCriteria(Bool_t flag=kTRUE)
set the flag to select reconstructed tracks still reconstructible for efficiency calculations ...
TCanvas * DrawVsPos(const char *name, const char *title, TH2 *h1, TH2 *h2, TH2 *h3)
AliAnalysisTaskMuonPerformance & operator=(const AliAnalysisTaskMuonPerformance &)
TObjArray * fEfficiencyList
List of histograms for tracker/trigger efficiencies.
relative momentum resolution at first cluster versus P
Bool_t fMCTrigLevelFromMatchTrk
set the triggerable level from the MC matching the trk part
Bool_t fRequest2ChInSameSt45
2 fired chambers requested in the same station (4 or 5) or not
TObjArray * fPAtVtxList
List of graph and canvas about momentum resolution at vertex.
momentum residual at vertex versus position at absorber end for tracks with MC angle in ]3...
momentum residual at vertex in 3 angular regions
TObjArray * fDCAList
List of graph and canvas about DCA.
mean momentum residual at first cluster versus P
TObjArray * fTrackerList
List of histograms for tracker resolution.
P * DCA distribution versus P for tracks in ]3,10[ degrees at absorber end.
TString fDefaultStorage
location of the default OCDB storage
TObjArray * fPAt1stClList
List of graph and canvas about momentum resolution at first cluster.
most probable momentum residual at vertex versus P
relative momentum resolution at vertex versus P
eta residual at vertex versus position at absorber end for tracks with MC angle in ]3...
void SetPBins(Int_t nBins, Double_t min, Double_t max)
P * DCA distribution versus position at absorber end for tracks with MC angle in ]2,3] degrees.
slope-X residual at vertex versus position at absorber end for tracks with MC angle in ]2...
momentum residual at vertex versus position at absorber end for tracks with MC angle <= 2 degrees ...
mean P * DCA versus P for tracks in ]2,3] degrees at absorber end
slope-Y residual at vertex in 3 angular regions
eta residual at vertex versus position at absorber end in 3 MC angular regions
phi residual at vertex versus position at absorber end in 3 MC angular regions
Int_t fDEIds[200]
ID of DE refered by index in histograms.
momentum residual at vertex versus P for tracks in ]2,3] degrees at absorber end
P * DCA distribution versus position at absorber end for tracks with MC angle <= 2 degrees...
Definition: External.C:220
void FitClusterResiduals(Bool_t flag=kTRUE)
set the flag to fit or not the cluster residuals to extract means and sigmas
slope-Y residual at vertex in 3 MC angular regions
slope-X residual at vertex in 3 MC angular regions
matched with reconstructible track and triggerable track of same ID
phi residual at vertex versus angle at absorber end
AliCFContainer * fCFContainer
Pointer to the CF container.
void FitGausResVsMom(TH2 *h, const Double_t mean0, const Double_t sigma0, const char *fitting, TGraphAsymmErrors *gMean, TGraphAsymmErrors *gSigma)
Bool_t fEnforceTrkCriteria
select reconstructed tracks still reconstructible
momentum residual for tracks between 2 and 3 degrees
momentum residual at vertex in 3 MC angular regions
void UseMCKinematics(Bool_t flag=kTRUE)
set the flag to use kinematics from MC track for efficiency calculations when available ...
void SetDefaultStorage(const char *ocdbPath)
Set location of the default OCDB storage (if not set use "raw://")
slope-Y residual at vertex versus position at absorber end in 3 MC angular regions ...
momentum residuals for tracks with MC angle < 2 degrees
TString fRecoParamOCDBpath
OCDB path to the recoParam file.
const char Option_t
Definition: External.C:48
Float_t GetBinThetaAbsEnd(Float_t RAtAbsEnd, Bool_t isTheta=kFALSE)
Residual of y position in first trigger chamber.
phi residual at vertex versus position at absorber end for tracks with MC angle in ]2...
momentum residual for tracks between 3 and 10 degrees
bool Bool_t
Definition: External.C:53
eta residual at vertex versus position at absorber end for tracks with MC angle in ]2...
Bool_t fCorrectForSystematics
add or not the systematic shifts of the residuals to the resolution
void FillContainerInfoReco(Double_t *containerInput, AliESDMuonTrack *esdTrack, Bool_t isValid, Int_t mcID)
P * MCS deviation angle dispersion versus P for tracks in ]3,10[ degrees at absorber end...
slope-X residual at vertex versus position at absorber end for tracks with MC angle <= 2 degrees ...
P * DCA versus position at absorber end in 3 MC angular regions.
Definition: External.C:196
TString fAlignOCDBpath
OCDB path to the alignment file.
P * MCS deviation angle distribution versus P for tracks in ]2,3] degrees at absorber end...
mean P * MCS deviation angle versus P for tracks in ]2,3] degrees at absorber end ...
Double_t fClusterMaxRes[2]
highest chamber resolution in both directions
Bool_t GetEfficiency(AliCFEffGrid *efficiency, Double_t &calcEff, Double_t &calcEffErr)