-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPlotFactory.h
More file actions
98 lines (74 loc) · 2.22 KB
/
Copy pathPlotFactory.h
File metadata and controls
98 lines (74 loc) · 2.22 KB
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
91
92
93
94
95
96
97
98
// ***************************************************************
// This file was created using the CreateProject.sh script.
// CreateProject.sh is part of Bayesian Analysis Toolkit (BAT).
// BAT can be downloaded from http://mpp.mpg.de/bat
// ***************************************************************
#ifndef __BAT__PLOT__H
#define __BAT__PLOT__H
#include <BAT/BCModel.h>
#include <BAT/BCGaussianPrior.h>
#include <string>
#include <vector>
#include <TFile.h>
#include <TH1D.h>
#include <TCanvas.h>
#include <iostream>
#include <sstream>
#include <map>
// This is a BLFitModel header file.
// Model source code is located in file BLFit/BLFitModel.cxx
using namespace std;
// ---------------------------------------------------------
class PlotFactory
{
public:
// Constructor
PlotFactory(std::map<std::string, TH3D*> map, TH3D* data, std::vector<double> param, int rbt, int tbt);
void PlotROI(int rbin, int thetabin) {
EnergyLow = 2.35;
EnergyHigh = 2.7;
logy = false;
out_name = "hist_zoom";
countLow = 0.01;
countHigh = 10.0;
SumHist(rbin, thetabin);
plot(rbin, thetabin);
}
void PlotAll(int rbin, int thetabin) {
EnergyLow = 0.5;
EnergyHigh = 4.8;
logy = true;
out_name = "hist";
countLow = 0.01;
countHigh = 100000.0;
SumHist(rbin, thetabin);
plot(rbin, thetabin);
}
// Destructor
~PlotFactory();
private:
void plot(int rbin, int thetabin);
void SumHist(int rbin, int thetabin);
int LINE_WIDTH=2;
//Energy Binning
int _NofEnergyBin = 90;
double _EnergyMin = 0.5;
double _EnergyMax = 5.0;
double _EnergyBinWidth = (_EnergyMax - _EnergyMin) / double(_NofEnergyBin);
TH3D* hist_data_all;
std::map<std::string, TH3D*> MCMap_all;
TH1D* hist_data;
std::map<std::string, TH1D*> MCMap;
std::vector<double> paramVector;
double EnergyLow = 0.5;
double EnergyHigh = 4.8;
double countLow = 0.01;
double countHigh = 100000.0;
bool logy = true;
string out_name = "hist";
bool initialized = false;
int bin_total;
int thetabin_total;
};
// ---------------------------------------------------------
#endif