Analysis class AliMuonForwardTrackAnalysis modified (pt bins added)
[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
34 enum {kNoOption, kOpenFlavor, kResonanceOnly};
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
51 void SetMassRange(Int_t nBins, Double_t min, Double_t max) { fNMassBins=nBins; fMassMin=min; fMassMax=max; }
cd2f51d2 52 void SetPtDimuRange(Int_t nBins, Double_t min, Double_t max) { fNPtDimuBins=TMath::Min(nBins,fNMaxPtBinsDimuons) ; fPtDimuMin=min; fPtDimuMax=max; }
e806e863 53 void SetSingleMuonAnalysis(Bool_t singleMuonAnalysis) { fSingleMuonAnalysis = singleMuonAnalysis; }
54 void SetMuonPairAnalysis(Bool_t muonPairAnalysis) { fMuonPairAnalysis = muonPairAnalysis; }
55 void SetMatchTrigger(Bool_t matchTrigger) { fMatchTrigger = matchTrigger; }
56
57 Bool_t AnalyzeSingleMuon();
58 Bool_t AnalyzeMuonPair();
59 void BuildMuonPairs();
60
7e3dd1af 61 Bool_t PassedCutSingleMuon(AliMuonForwardTrack *track);
62 Bool_t PassedCutMuonPair(AliMuonForwardTrackPair *pair);
63
e806e863 64 void SetVertResMC(Double_t xRes, Double_t yRes, Double_t zRes) { fXVertResMC=xRes; fYVertResMC=yRes; fZVertResMC=zRes; }
65
66 void SetOption(Int_t option) { fOption = option; }
67 void SetMaxNWrongClustersMC(Int_t nClusters) { fMaxNWrongClustersMC = nClusters; }
68 void SetPtMinSingleMuons(Double_t ptMin) { fPtMinSingleMuons = ptMin; }
69
70 void ReadEvents(Int_t firstEv, Int_t lastEv) { fFirstEvent = firstEv; fLastEvent = lastEv; }
71 Int_t GetFirstEvent() { return fFirstEvent; }
72 Int_t GetLastEvent() { return fLastEvent; }
73
7e3dd1af 74 void UseBransonForCut(Bool_t useBranson) { fUseBransonForCut = useBranson; }
75 void UseBransonForKinematics(Bool_t useBranson) { fUseBransonForKinematics = useBranson; }
76 void UseCutOnOffsetChi2(Bool_t useCut) { fCutOnOffsetChi2 = useCut; }
77
e806e863 78private:
79
cd2f51d2 80 static const Int_t fNMaxPtBinsDimuons = 50;
e806e863 81
82 TString fInputDir, fOutputDir;
83
7e3dd1af 84 TTree *fInputTreeWithBranson, *fInputTreeWithoutBranson; //!
e806e863 85
7e3dd1af 86 TClonesArray *fMuonForwardTracksWithBranson, *fMuonForwardTrackPairsWithBranson; //!
87 TClonesArray *fMuonForwardTracksWithoutBranson, *fMuonForwardTrackPairsWithoutBranson; //!
88 AliMuonForwardTrack *fMFTTrackWithBranson, *fMFTTrackWithoutBranson, *fMFTTrack; //!
89 AliMuonForwardTrackPair *fMFTTrackPairWithBranson, *fMFTTrackPairWithoutBranson, *fMFTTrackPair; //!
90 TParticle *fMCRefTrack; //!
e806e863 91
92 Int_t fEv, fFirstEvent, fLastEvent, fNTracksOfEvent, fNTracksAnalyzedOfEvent, fNTracksAnalyzed, fNPairsOfEvent, fNPairsAnalyzedOfEvent;
93
94 TH1D *fHistOffsetSingleMuonsX, *fHistOffsetSingleMuonsY, *fHistOffsetSingleMuons, *fHistWOffsetSingleMuons; //!
95 TH1D *fHistErrorSingleMuonsX, *fHistErrorSingleMuonsY; //!
cd2f51d2 96 TH2D *fHistSingleMuonsPtRapidity, *fHistSingleMuonsOffsetChi2; //!
97 TGraph *fGraphSingleMuonsOffsetChi2; //!
98
99 TH1D *fHistWOffsetMuonPairs[fNMaxPtBinsDimuons+1]; //!
100 TH1D *fHistMassMuonPairs[fNMaxPtBinsDimuons+1]; //!
101 TH1D *fHistMassMuonPairsWithoutMFT[fNMaxPtBinsDimuons+1]; //!
102 TH1D *fHistMassMuonPairsMC[fNMaxPtBinsDimuons+1]; //!
103 TH2D *fHistRapidityPtMuonPairsMC; //!
e806e863 104
cd2f51d2 105 Int_t fNMassBins, fNPtDimuBins;
106 Double_t fMassMin, fMassMax, fPtDimuMin, fPtDimuMax;
107 TAxis *fPtAxisDimuons;
e806e863 108
109 Bool_t fSingleMuonAnalysis, fMuonPairAnalysis, fMatchTrigger;
110 Int_t fOption;
111
112 Double_t fXVertResMC, fYVertResMC, fZVertResMC;
7e3dd1af 113 Double_t fPrimaryVtxX, fPrimaryVtxY, fPrimaryVtxZ;
e806e863 114 Int_t fMaxNWrongClustersMC;
115 Double_t fPtMinSingleMuons;
116
7e3dd1af 117 Bool_t fUseBransonForCut, fUseBransonForKinematics, fCutOnOffsetChi2;
118
119 Double_t fCenterOffset, fCenterChi2, fScaleOffset, fScaleChi2, fRadiusCut;
120
e806e863 121 ClassDef(AliMuonForwardTrackAnalysis, 1)
122
123};
124
125//====================================================================================================================================================
126
127#endif
128