25 const std::vector<unsigned int> &objectsType,
26 const unsigned int &NptPlots,
29 _hltProcessName(pset.getParameter<
std::
string>(
"hltProcessName")),
30 _objectsType(
std::set<unsigned
int>(objectsType.
begin(), objectsType.
end())),
31 _nObjects(objectsType.
size()),
32 _parametersEta(pset.getParameter<
std::vector<double> >(
"parametersEta")),
33 _parametersPhi(pset.getParameter<
std::vector<double> >(
"parametersPhi")),
34 _parametersTurnOn(pset.getParameter<
std::vector<double> >(
"parametersTurnOn")),
36 _NminOneCuts(NminOneCuts) {
53 std::vector<std::string>
sources(2);
60 for (
size_t i = 0;
i < sources.size();
i++) {
69 bookHist(source, objTypeStr,
"dEtaqq", ibooker);
71 bookHist(source, objTypeStr,
"mqq", ibooker);
73 bookHist(source, objTypeStr,
"dPhibb", ibooker);
76 bookHist(source, objTypeStr,
"maxCSV", ibooker);
78 bookHist(source, objTypeStr,
"CSV1", ibooker);
81 bookHist(source, objTypeStr,
"CSV2", ibooker);
83 bookHist(source, objTypeStr,
"CSV3", ibooker);
87 bookHist(source, objTypeStr,
"Eta", ibooker);
88 bookHist(source, objTypeStr,
"Phi", ibooker);
92 bookHist(source, objTypeStr, maxPt.Data(), ibooker);
100 const std::vector<MatchStruct> &
matches,
102 if (!isPassTrigger) {
105 std::map<unsigned int, int> countobjects;
108 countobjects[*co] = 0;
112 const int totalobjectssize2 =
_NptPlots * countobjects.size();
114 for (
size_t j = 0;
j < matches.size(); ++
j) {
120 const unsigned int objType = matches[
j].objType;
123 float pt = matches[
j].pt;
124 float eta = matches[
j].eta;
125 float phi = matches[
j].phi;
128 if ((
unsigned)countobjects[objType] <
_NptPlots) {
130 maxPt += (countobjects[
objType] + 1);
131 this->
fillHist(isPassTrigger, source, objTypeStr, maxPt.Data(),
pt);
143 this->
fillHist(isPassTrigger, source, objTypeStr,
"Eta", eta);
144 this->
fillHist(isPassTrigger, source, objTypeStr,
"Phi", phi);
146 if (counttotal == totalobjectssize2) {
154 const std::vector<MatchStruct> &
matches,
155 std::map<std::string, bool> &nMinOne,
162 const bool &passAllCuts) {
163 if (!isPassTrigger) {
166 std::map<unsigned int, int> countobjects;
170 countobjects[*co] = 0;
174 const int totalobjectssize2 =
_NptPlots * countobjects.size();
176 for (
size_t j = 0;
j < matches.size(); ++
j) {
182 const unsigned int objType = matches[
j].objType;
185 float pt = matches[
j].pt;
186 float eta = matches[
j].eta;
187 float phi = matches[
j].phi;
194 if ((
unsigned)(countobjects)[objType] <
_NptPlots) {
196 maxPt += (countobjects[
objType] + 1);
198 this->
fillHist(isPassTrigger, source, objTypeStr, maxPt.Data(),
pt);
205 this->
fillHist(isPassTrigger, source, objTypeStr,
"Eta", eta);
206 this->
fillHist(isPassTrigger, source, objTypeStr,
"Phi", phi);
209 if (counttotal == totalobjectssize2) {
226 nameCSVplot =
"maxCSV";
227 if (nMinOne[nameCSVplot])
245 sourceUpper[0] = std::toupper(sourceUpper[0]);
249 if (variable.find(
"MaxPt") != std::string::npos) {
251 if (variable ==
"MaxPt1")
253 else if (variable ==
"MaxPt2")
254 desc =
"Next-to-Leading";
256 desc = variable.substr(5, 6) +
"th Leading";
259 "where event pass the " +
262 size_t nBins = nBinsStandard;
263 float *
edges =
new float[nBinsStandard + 1];
264 for (
size_t i = 0;
i < nBinsStandard + 1;
i++) {
269 if (objType == jetObj) {
270 const size_t nBinsJets = 25;
273 edges =
new float[nBinsJets + 1];
274 for (
size_t i = 0;
i < nBinsJets + 1;
i++) {
279 const size_t nBinsJets = 30;
282 edges =
new float[nBinsJets + 1];
283 for (
size_t i = 0;
i < nBinsJets + 1;
i++) {
287 h =
new TH1F(name.c_str(), title.c_str(),
nBins,
edges);
290 if (variable ==
"dEtaqq") {
295 h =
new TH1F(name.c_str(), title.c_str(),
nBins,
min,
max);
296 }
else if (variable ==
"mqq") {
301 h =
new TH1F(name.c_str(), title.c_str(),
nBins,
min,
max);
302 }
else if (variable ==
"dPhibb") {
307 h =
new TH1F(name.c_str(), title.c_str(),
nBins,
min,
max);
308 }
else if (variable ==
"CSV1") {
313 h =
new TH1F(name.c_str(), title.c_str(),
nBins,
min,
max);
314 }
else if (variable ==
"CSV2") {
319 h =
new TH1F(name.c_str(), title.c_str(),
nBins,
min,
max);
320 }
else if (variable ==
"CSV3") {
325 h =
new TH1F(name.c_str(), title.c_str(),
nBins,
min,
max);
326 }
else if (variable ==
"maxCSV") {
331 h =
new TH1F(name.c_str(), title.c_str(),
nBins,
min,
max);
333 std::string symbol = (variable ==
"Eta") ?
"#eta" :
"#phi";
338 double min = params[1];
339 double max = params[2];
340 h =
new TH1F(name.c_str(), title.c_str(),
nBins,
min,
max);
352 const float &
value) {
354 sourceUpper[0] = toupper(sourceUpper[0]);
std::map< unsigned int, double > _cutMaxEta
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getParameter(std::string const &) const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
HLTHiggsPlotter(const edm::ParameterSet &pset, const std::string &hltPath, const std::vector< unsigned int > &objectsType, const unsigned int &minCandidates, const std::vector< double > &NminOneCuts)
std::vector< double > _parametersPhi
std::set< unsigned int > _objectsType
std::map< std::string, MonitorElement * > _elements
std::vector< double > _parametersTurnOn
void fillHist(const bool &passTrigger, const std::string &source, const std::string &objType, const std::string &var, const float &value)
void bookHist(const std::string &source, const std::string &objType, const std::string &variable, DQMStore::IBooker &)
std::vector< double > _parametersEta
void beginRun(const edm::Run &, const edm::EventSetup &)
void bookHistograms(DQMStore::IBooker &, const bool &)
void analyze(const bool &isPassTrigger, const std::string &source, const std::vector< MatchStruct > &matches, const unsigned int &minCandidates)
std::map< unsigned int, double > _cutMinPt
static const std::string getTypeString(const unsigned int &objtype)
Tranform types into strings.
static std::string const source
std::vector< double > _NminOneCuts