L1Trigger
L1GctAnalyzer
src
compareRingSums.cc
Go to the documentation of this file.
1
#include "
L1Trigger/L1GctAnalyzer/interface/compareRingSums.h
"
2
#include "
DataFormats/L1CaloTrigger/interface/L1CaloCollections.h
"
3
#include "
DataFormats/L1GlobalCaloTrigger/interface/L1GctCollections.h
"
4
5
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
6
#include "
FWCore/Framework/interface/EDAnalyzer.h
"
7
8
#include "
FWCore/Framework/interface/Event.h
"
9
#include "
FWCore/Framework/interface/MakerMacros.h
"
10
11
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
12
13
#include "
FWCore/Utilities/interface/InputTag.h
"
14
15
#include "
FWCore/ServiceRegistry/interface/Service.h
"
// Framework services
16
#include "
CommonTools/UtilAlgos/interface/TFileService.h
"
// Framework service for histograms
17
18
compareRingSums::compareRingSums
(
const
edm::Handle<L1GctHFRingEtSumsCollection>
&
data
,
19
const
edm::Handle<L1GctHFRingEtSumsCollection>
&emu,
20
const
GctErrorAnalyzerMBxInfo
&mbxparams)
21
: data_(
data
), emu_(emu), mbxparams_(mbxparams) {}
22
23
compareRingSums::~compareRingSums
() {}
24
25
bool
compareRingSums::doCompare
(TH1I *errorFlag_hist_) {
26
bool
errorFlag =
false
;
27
28
for
(
unsigned
int
i
= 0;
i
<
data_
->size();
i
++) {
29
//check that the GCT trig bx is being considered
30
if
(
data_
->at(
i
).bx() !=
mbxparams_
.
GCTTrigBx
)
31
continue
;
32
33
for
(
unsigned
int
j
= 0;
j
<
emu_
->size();
j
++) {
34
//now check that the Emu trig bx is being considered
35
if
(
emu_
->at(
j
).bx() !=
mbxparams_
.
EmuTrigBx
)
36
continue
;
37
38
//now loop over each ring and make sure the energy sums match
39
for
(
unsigned
int
k
= 0;
k
<
NUM_GCT_RINGS
;
k
++) {
40
if
(
data_
->at(
i
).etSum(
k
) ==
emu_
->at(
j
).etSum(
k
)) {
41
errorFlag_hist_->Fill(0);
//i.e. the two match
42
}
else
{
43
errorFlag_hist_->Fill(1);
44
errorFlag =
true
;
45
}
46
}
47
}
48
}
49
50
return
errorFlag;
51
}
compareRingSums.h
mps_fire.i
i
Definition:
mps_fire.py:355
L1GctCollections.h
NUM_GCT_RINGS
const unsigned int NUM_GCT_RINGS
Definition:
GctErrorAnalyzerDefinitions.h:10
EDAnalyzer.h
compareRingSums::compareRingSums
compareRingSums(const edm::Handle< L1GctHFRingEtSumsCollection > &data, const edm::Handle< L1GctHFRingEtSumsCollection > &emu, const GctErrorAnalyzerMBxInfo &mbxparams)
Definition:
compareRingSums.cc:18
edm::Handle< L1GctHFRingEtSumsCollection >
MakerMacros.h
compareRingSums::emu_
edm::Handle< L1GctHFRingEtSumsCollection > emu_
Definition:
compareRingSums.h:33
Service.h
dqmdumpme.k
k
Definition:
dqmdumpme.py:60
TFileService.h
Event.h
compareRingSums::mbxparams_
GctErrorAnalyzerMBxInfo mbxparams_
Definition:
compareRingSums.h:34
compareRingSums::doCompare
bool doCompare(TH1I *errorFlag_hist_)
Definition:
compareRingSums.cc:25
L1CaloCollections.h
GctErrorAnalyzerMBxInfo::GCTTrigBx
int GCTTrigBx
Definition:
GctErrorAnalyzerDefinitions.h:16
InputTag.h
GctErrorAnalyzerMBxInfo::EmuTrigBx
int EmuTrigBx
Definition:
GctErrorAnalyzerDefinitions.h:15
Frameworkfwd.h
compareRingSums::~compareRingSums
~compareRingSums()
Definition:
compareRingSums.cc:23
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:79
ParameterSet.h
GctErrorAnalyzerMBxInfo
Definition:
GctErrorAnalyzerDefinitions.h:13
dqmiolumiharvest.j
j
Definition:
dqmiolumiharvest.py:66
compareRingSums::data_
edm::Handle< L1GctHFRingEtSumsCollection > data_
Definition:
compareRingSums.h:33
Generated for CMSSW Reference Manual by
1.8.16