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