forked from pwittich/mictest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlotValidation.hh
90 lines (71 loc) · 2.59 KB
/
PlotValidation.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#include "TFile.h"
#include "TH1F.h"
#include "TString.h"
#include "TTree.h"
#include "TCanvas.h"
#include "TROOT.h"
#include "TSystem.h"
#include "TStyle.h"
#include "TH2F.h"
#include "TDirectory.h"
#include "TColor.h"
#include <vector>
#include <iostream>
#include <fstream>
#include <cmath>
typedef std::vector<Float_t> FltVec;
typedef std::vector<FltVec> FltVecVec;
typedef std::vector<FltVecVec> FltVecVecVec;
typedef std::vector<Float_t> * FltVecRef;
typedef std::vector<FltVecRef> FltVecRefVec;
typedef std::vector<FltVecRefVec> FltVecRefVecVec;
typedef std::vector<Int_t> IntVec;
typedef std::vector<IntVec> IntVecVec;
typedef std::vector<Int_t> * IntVecRef;
typedef std::vector<IntVecRef> IntVecRefVec;
typedef std::vector<TH1F *> TH1FRefVec;
typedef std::vector<TH1FRefVec> TH1FRefVecVec;
typedef std::vector<TH1FRefVecVec> TH1FRefVecVecVec;
typedef std::vector<TString> TStrVec;
class PlotValidation
{
public:
PlotValidation(TString inName, TString outName, TString outType);
~PlotValidation();
void Validation(Bool_t fullVal = false, Bool_t mvInput = false);
void PlotEfficiency();
void PlotFakeRate();
void PlotDuplicateRate();
void PlotNHits();
void PlotTiming();
void PlotMomResolutionPull();
void PlotSegment();
void PlotBranching();
void PlotSimGeo();
void PlotPosResolutionPull();
void PlotCFResidual();
void PlotCFResolutionPull();
void PrintTotals();
void MakeSubDirectory(const TString subdirname);
void ComputeResidual (const Float_t mcvar_val, const Float_t recovar_val, Float_t & var_out);
void ComputeResolutionPull(const Float_t mcvar_val, const Float_t recovar_val, const Float_t recovar_err, FltVec & var_out);
void ComputeRatioPlot(const TH1F * numer, const TH1F * denom, TH1F *& ratioPlot);
void ZeroSuppressPlot(TH1F *& histo);
void WriteTH2FPlot (TDirectory *& subdir, TH2F *& hist);
void DrawWriteSaveTH2FPlot(TDirectory *& subdir, TH2F *& histo, const TString subdirname, const TString plotName);
void WriteTH1FPlot (TDirectory *& subdir, TH1F *& histo);
void DrawWriteSaveTH1FPlot (TDirectory *& subdir, TH1F *& histo, const TString subdirname, const TString plotName, const Bool_t zeroSupLin);
void DrawWriteFitSaveTH1FPlot(TDirectory *& subdir, TH1F *& histo, const TString subdirname, const TString plotName, const Float_t fitrange);
void MoveInput();
private:
TString fInName;
TFile * fInRoot;
TString fOutType;
TString fOutName;
TFile * fOutRoot;
TCanvas * fTH1Canv;
TCanvas * fTH2Canv;
// color base
std::vector<Color_t> fColors;
UInt_t fColorSize;
};