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
|
#ifndef BTagDifferentialPlot_H
#define BTagDifferentialPlot_H
// #include "BTagPlotPrintC.h"
#include "TH1F.h"
#include "TCanvas.h"
#include <vector>
#include <string>
#include "DQMOffline/RecoB/interface/EtaPtBin.h"
#include "DQMOffline/RecoB/interface/JetTagPlotter.h"
#include "DQMServices/Core/interface/DQMStore.h"
class BTagDifferentialPlot {
public:
typedef dqm::legacy::DQMStore DQMStore;
typedef dqm::legacy::MonitorElement MonitorElement;
enum ConstVarType { constPT, constETA };
BTagDifferentialPlot(double bEff, const ConstVarType& constVariable, const std::string& tagName, unsigned int mc);
~BTagDifferentialPlot();
void addBinPlotter(std::shared_ptr<JetTagPlotter> aPlotter) { theBinPlotters.push_back(aPlotter); }
void process(DQMStore::IBooker& ibook);
void epsPlot(const std::string& name);
void psPlot(const std::string& name);
void plot(TCanvas& theCanvas);
void plot(const std::string& name, const std::string& ext);
// void print() const;
TH1F* getDifferentialHistoB_d() { return theDifferentialHistoB_d->getTH1F(); }
TH1F* getDifferentialHistoB_u() { return theDifferentialHistoB_u->getTH1F(); }
TH1F* getDifferentialHistoB_s() { return theDifferentialHistoB_s->getTH1F(); }
TH1F* getDifferentialHistoB_c() { return theDifferentialHistoB_c->getTH1F(); }
TH1F* getDifferentialHistoB_b() { return theDifferentialHistoB_b->getTH1F(); }
TH1F* getDifferentialHistoB_g() { return theDifferentialHistoB_g->getTH1F(); }
TH1F* getDifferentialHistoB_ni() { return theDifferentialHistoB_ni->getTH1F(); }
TH1F* getDifferentialHistoB_dus() { return theDifferentialHistoB_dus->getTH1F(); }
TH1F* getDifferentialHistoB_dusg() { return theDifferentialHistoB_dusg->getTH1F(); }
TH1F* getDifferentialHistoB_pu() { return theDifferentialHistoB_pu->getTH1F(); }
private:
void setVariableName();
void bookHisto(DQMStore::IBooker& ibook);
void fillHisto();
std::pair<double, double> getMistag(const double& fixedBEfficiency, TH1F* effPurHist);
// the fixed b-efficiency(later: allow more than one) for which the misids have to be plotted
double fixedBEfficiency;
// flag if processing should be skipped
bool noProcessing;
bool processed;
ConstVarType constVar;
// the name for the variable with constant value
std::string constVariableName;
// the name of the variable to be plotted on the x-axis(e.g. "eta", "pt")
std::string diffVariableName;
// value of the constant variable(lower/upper edge of interval)
std::pair<double, double> constVariableValue;
// the common name to describe histograms
std::string commonName;
// the input
std::vector<std::shared_ptr<JetTagPlotter>> theBinPlotters;
// the histo to create/fill
MonitorElement* theDifferentialHistoB_d;
MonitorElement* theDifferentialHistoB_u;
MonitorElement* theDifferentialHistoB_s;
MonitorElement* theDifferentialHistoB_c;
MonitorElement* theDifferentialHistoB_b;
MonitorElement* theDifferentialHistoB_g;
MonitorElement* theDifferentialHistoB_ni;
MonitorElement* theDifferentialHistoB_dus;
MonitorElement* theDifferentialHistoB_dusg;
MonitorElement* theDifferentialHistoB_pu;
//flavour histograms choice
unsigned int mcPlots_;
};
#endif
|