added class and macro for the analysis: AliMuonForwardTrackAnalysis.*
[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"
25
26//====================================================================================================================================================
27
28class AliMuonForwardTrackAnalysis : public TObject {
29
30public:
31
32 enum {kNoOption, kOpenFlavor, kResonanceOnly};
33
34 AliMuonForwardTrackAnalysis();
35
36 virtual ~AliMuonForwardTrackAnalysis() {}; // destructor
37
38 Bool_t Init(Char_t *inputFileName);
39 Bool_t LoadNextEvent();
40 void Terminate(Char_t *outputFileName);
41
42 void BookHistos();
43
44 void SetInputDir(Char_t *inputDir) { fInputDir = inputDir; }
45 void SetOutputDir(Char_t *outputDir) { fOutputDir = outputDir; }
46
47 Int_t GetNTracksAnalyzed() { return fNTracksAnalyzed; }
48
49 void SetMassRange(Int_t nBins, Double_t min, Double_t max) { fNMassBins=nBins; fMassMin=min; fMassMax=max; }
50 void SetSingleMuonAnalysis(Bool_t singleMuonAnalysis) { fSingleMuonAnalysis = singleMuonAnalysis; }
51 void SetMuonPairAnalysis(Bool_t muonPairAnalysis) { fMuonPairAnalysis = muonPairAnalysis; }
52 void SetMatchTrigger(Bool_t matchTrigger) { fMatchTrigger = matchTrigger; }
53
54 Bool_t AnalyzeSingleMuon();
55 Bool_t AnalyzeMuonPair();
56 void BuildMuonPairs();
57
58 void SetVertResMC(Double_t xRes, Double_t yRes, Double_t zRes) { fXVertResMC=xRes; fYVertResMC=yRes; fZVertResMC=zRes; }
59
60 void SetOption(Int_t option) { fOption = option; }
61 void SetMaxNWrongClustersMC(Int_t nClusters) { fMaxNWrongClustersMC = nClusters; }
62 void SetPtMinSingleMuons(Double_t ptMin) { fPtMinSingleMuons = ptMin; }
63
64 void ReadEvents(Int_t firstEv, Int_t lastEv) { fFirstEvent = firstEv; fLastEvent = lastEv; }
65 Int_t GetFirstEvent() { return fFirstEvent; }
66 Int_t GetLastEvent() { return fLastEvent; }
67
68private:
69
70 static const Int_t fNPtBinsOffsetSingleMuons = 10;
71 static const Int_t fNRapBinsOffsetSingleMuons = 10;
72
73 TString fInputDir, fOutputDir;
74
75 TTree *fInputTree; //!
76
77 TClonesArray *fMuonForwardTracks, *fMuonForwardTrackPairs; //!
78 AliMuonForwardTrack *fMFTTrack; //!
79 AliMuonForwardTrackPair *fMFTTrackPair; //!
80 TParticle *fMCRefTrack; //!
81
82 Int_t fEv, fFirstEvent, fLastEvent, fNTracksOfEvent, fNTracksAnalyzedOfEvent, fNTracksAnalyzed, fNPairsOfEvent, fNPairsAnalyzedOfEvent;
83
84 TH1D *fHistOffsetSingleMuonsX, *fHistOffsetSingleMuonsY, *fHistOffsetSingleMuons, *fHistWOffsetSingleMuons; //!
85 TH1D *fHistErrorSingleMuonsX, *fHistErrorSingleMuonsY; //!
86 TH2D *fHistOffsetSingleMuonsX_vsPtRapidity, *fHistOffsetSingleMuonsY_vsPtRapidity, *fHistSingleMuonsPtRapidity; //!
87 TH1D *fHistOffsetSingleMuonsX_tmp[fNRapBinsOffsetSingleMuons][fNPtBinsOffsetSingleMuons]; //!
88 TH1D *fHistOffsetSingleMuonsY_tmp[fNRapBinsOffsetSingleMuons][fNPtBinsOffsetSingleMuons]; //!
89 TH1D *fHistWOffsetMuonPairs, *fHistMassMuonPairs, *fHistMassMuonPairsWithoutMFT, *fHistMassMuonPairsMC; //!
90 TH2D *fHistRapidityPtMuonPairsMC;
91
92 Int_t fNMassBins;
93 Double_t fMassMin, fMassMax;
94
95 Bool_t fSingleMuonAnalysis, fMuonPairAnalysis, fMatchTrigger;
96 Int_t fOption;
97
98 Double_t fXVertResMC, fYVertResMC, fZVertResMC;
99 Int_t fMaxNWrongClustersMC;
100 Double_t fPtMinSingleMuons;
101
102 ClassDef(AliMuonForwardTrackAnalysis, 1)
103
104};
105
106//====================================================================================================================================================
107
108#endif
109