- fix data container naming issues
[u/mrichter/AliRoot.git] / MFT / AliMuonForwardTrackAnalysis.h
CommitLineData
e806e863 1#ifndef AliMuonForwardTrackAnalysis_H
2#define AliMuonForwardTrackAnalysis_H
3
4//====================================================================================================================================================
5//
6// Class for the analysis of the ALICE muon forward tracks (MUON + MFT)
7//
8// Contact author: antonio.uras@cern.ch
9//
10//====================================================================================================================================================
11
12#include "TObject.h"
13#include "TClonesArray.h"
14#include "AliMuonForwardTrack.h"
15#include "TMatrixD.h"
16#include "TTree.h"
17#include "TH1D.h"
18#include "TH2D.h"
19#include "AliLog.h"
20#include "TFile.h"
21#include "TParticle.h"
22#include "AliMUONTrackParam.h"
23#include "AliMUONTrackExtrap.h"
24#include "TDatabasePDG.h"
b5ab1ac4 25#include "TGraph.h"
cd2f51d2 26#include "TAxis.h"
e806e863 27
28//====================================================================================================================================================
29
30class AliMuonForwardTrackAnalysis : public TObject {
31
32public:
33
cabfe25b 34 enum {kNoOption, kResonanceOnly};
e806e863 35
36 AliMuonForwardTrackAnalysis();
37
38 virtual ~AliMuonForwardTrackAnalysis() {}; // destructor
39
40 Bool_t Init(Char_t *inputFileName);
41 Bool_t LoadNextEvent();
42 void Terminate(Char_t *outputFileName);
43
44 void BookHistos();
45
46 void SetInputDir(Char_t *inputDir) { fInputDir = inputDir; }
47 void SetOutputDir(Char_t *outputDir) { fOutputDir = outputDir; }
48
49 Int_t GetNTracksAnalyzed() { return fNTracksAnalyzed; }
50
cabfe25b 51 void SetMassRange(Double_t min, Double_t max) { fMassMin=min; fMassMax=max; }
52 void SetTrueMass(Double_t mass) { fTrueMass = mass; }
e806e863 53 void SetSingleMuonAnalysis(Bool_t singleMuonAnalysis) { fSingleMuonAnalysis = singleMuonAnalysis; }
54 void SetMuonPairAnalysis(Bool_t muonPairAnalysis) { fMuonPairAnalysis = muonPairAnalysis; }
cabfe25b 55 void SetMatchTrigger(Int_t triggerLevel) { fTriggerLevel = triggerLevel; }
e806e863 56
57 Bool_t AnalyzeSingleMuon();
58 Bool_t AnalyzeMuonPair();
59 void BuildMuonPairs();
60
789c2e43 61 void EvalDimuonVtxResolution(Bool_t eval) { fEvalDimuonVtxResolution = eval; }
62
7e3dd1af 63 Bool_t PassedCutSingleMuon(AliMuonForwardTrack *track);
64 Bool_t PassedCutMuonPair(AliMuonForwardTrackPair *pair);
65
e806e863 66 void SetVertResMC(Double_t xRes, Double_t yRes, Double_t zRes) { fXVertResMC=xRes; fYVertResMC=yRes; fZVertResMC=zRes; }
67
68 void SetOption(Int_t option) { fOption = option; }
cabfe25b 69
e806e863 70 void SetMaxNWrongClustersMC(Int_t nClusters) { fMaxNWrongClustersMC = nClusters; }
cabfe25b 71 void SetMinPtSingleMuons(Double_t ptMin) { fPtMinSingleMuons = ptMin; }
72 void SetMaxChi2SingleMuons(Double_t chi2Max) { fMaxChi2SingleMuons = chi2Max; }
73 void SetMaxOffsetSingleMuons(Double_t offsetMax) { fMaxOffsetSingleMuons = offsetMax; }
74 void CorrelateCutOnOffsetChi2(Bool_t option) { fCorrelateCutOnOffsetChi2 = option; }
75
76 void SetMaxWOffsetMuonPairsAtPrimaryVtx(Double_t wOffsetMax) { fMaxWOffsetMuonPairsAtPrimaryVtx = wOffsetMax; }
77 void SetMaxWOffsetMuonPairsAtPCA(Double_t wOffsetMax) { fMaxWOffsetMuonPairsAtPCA = wOffsetMax; }
78 void SetMaxDistancePrimaryVtxPCA(Double_t distanceMax) { fMaxDistancePrimaryVtxPCA = distanceMax; }
79 void SetMinPCAQuality(Double_t minQuality) { fMinPCAQuality = minQuality; }
e806e863 80
81 void ReadEvents(Int_t firstEv, Int_t lastEv) { fFirstEvent = firstEv; fLastEvent = lastEv; }
82 Int_t GetFirstEvent() { return fFirstEvent; }
83 Int_t GetLastEvent() { return fLastEvent; }
84
7e3dd1af 85 void UseBransonForCut(Bool_t useBranson) { fUseBransonForCut = useBranson; }
86 void UseBransonForKinematics(Bool_t useBranson) { fUseBransonForKinematics = useBranson; }
7e3dd1af 87
cabfe25b 88 Double_t GetPseudoProperDecayLength(AliMuonForwardTrackPair *pair, Double_t trueMass);
e806e863 89
cabfe25b 90private:
e806e863 91
92 TString fInputDir, fOutputDir;
93
7e3dd1af 94 TTree *fInputTreeWithBranson, *fInputTreeWithoutBranson; //!
e806e863 95
7e3dd1af 96 TClonesArray *fMuonForwardTracksWithBranson, *fMuonForwardTrackPairsWithBranson; //!
97 TClonesArray *fMuonForwardTracksWithoutBranson, *fMuonForwardTrackPairsWithoutBranson; //!
98 AliMuonForwardTrack *fMFTTrackWithBranson, *fMFTTrackWithoutBranson, *fMFTTrack; //!
99 AliMuonForwardTrackPair *fMFTTrackPairWithBranson, *fMFTTrackPairWithoutBranson, *fMFTTrackPair; //!
100 TParticle *fMCRefTrack; //!
e806e863 101
102 Int_t fEv, fFirstEvent, fLastEvent, fNTracksOfEvent, fNTracksAnalyzedOfEvent, fNTracksAnalyzed, fNPairsOfEvent, fNPairsAnalyzedOfEvent;
d8c2cc3e 103 Int_t fNTracksAnalyzedOfEventAfterCut, fNPairsAnalyzedOfEventAfterCut;
e806e863 104
105 TH1D *fHistOffsetSingleMuonsX, *fHistOffsetSingleMuonsY, *fHistOffsetSingleMuons, *fHistWOffsetSingleMuons; //!
106 TH1D *fHistErrorSingleMuonsX, *fHistErrorSingleMuonsY; //!
d8c2cc3e 107 TH1D *fHistZOriginSingleMuonsMC;
108
cabfe25b 109 TH2D *fHistZROriginSingleMuonsMC, *fHistSingleMuonsPtRapidity, *fHistSingleMuonsOffsetChi2; //!
110
111 TH2D *fHistRapidityPtMuonPairs; //!
e806e863 112
cabfe25b 113 TH2D *fHistMassMuonPairsMCVsPt; //!
114 TH2D *fHistMassMuonPairsVsPt; //!
115 TH2D *fHistMassMuonPairsWithoutMFTVsPt; //!
116 TH2D *fHistMassMuonPairsVsPtLSp; //!
117 TH2D *fHistMassMuonPairsWithoutMFTVsPtLSp; //!
118 TH2D *fHistMassMuonPairsVsPtLSm; //!
119 TH2D *fHistMassMuonPairsWithoutMFTVsPtLSm; //!
120
121 TH2D *fHistWOffsetMuonPairsAtPrimaryVtxVsPt; //!
122 TH2D *fHistWOffsetMuonPairsAtPCAVsPt; //!
123 TH2D *fHistDistancePrimaryVtxPCAVsPt; //!
124 TH2D *fHistPCAQualityVsPt; //!
125 TH2D *fHistPseudoProperDecayLengthVsPt; //!
126 TH2D *fHistDimuonVtxResolutionXVsPt; //!
127 TH2D *fHistDimuonVtxResolutionYVsPt; //!
128 TH2D *fHistDimuonVtxResolutionZVsPt; //!
129
789c2e43 130 Bool_t fEvalDimuonVtxResolution;
131
cabfe25b 132 Double_t fTrueMass, fMassMin, fMassMax;
e806e863 133
cabfe25b 134 Bool_t fSingleMuonAnalysis, fMuonPairAnalysis;
135 Int_t fOption, fTriggerLevel;
e806e863 136
137 Double_t fXVertResMC, fYVertResMC, fZVertResMC;
7e3dd1af 138 Double_t fPrimaryVtxX, fPrimaryVtxY, fPrimaryVtxZ;
e806e863 139 Int_t fMaxNWrongClustersMC;
140 Double_t fPtMinSingleMuons;
141
cabfe25b 142 Bool_t fUseBransonForCut, fUseBransonForKinematics, fCorrelateCutOnOffsetChi2;
7e3dd1af 143
cabfe25b 144 Double_t fMaxChi2SingleMuons, fMaxOffsetSingleMuons;
145 Double_t fMaxWOffsetMuonPairsAtPrimaryVtx, fMaxWOffsetMuonPairsAtPCA, fMaxDistancePrimaryVtxPCA, fMinPCAQuality;
7e3dd1af 146
e806e863 147 ClassDef(AliMuonForwardTrackAnalysis, 1)
148
149};
150
151//====================================================================================================================================================
152
153#endif
154