test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
,
const
edm::Handle<L1GctHFRingEtSumsCollection>
&emu,
const
GctErrorAnalyzerMBxInfo
&mbxparams) :
19
data_(data),
20
emu_(emu),
21
mbxparams_(mbxparams)
22
{
23
24
}
25
26
compareRingSums::~compareRingSums
() {
27
28
}
29
30
bool
compareRingSums::doCompare
(TH1I *errorFlag_hist_) {
31
32
bool
errorFlag=0;
33
34
for
(
unsigned
int
i
=0;
i
<
data_
->size();
i
++) {
35
//check that the GCT trig bx is being considered
36
if
(
data_
->at(
i
).bx() !=
mbxparams_
.
GCTTrigBx
)
continue
;
37
38
for
(
unsigned
int
j
=0;
j
<
emu_
->size();
j
++) {
39
//now check that the Emu trig bx is being considered
40
if
(
emu_
->at(
j
).bx() !=
mbxparams_
.
EmuTrigBx
)
continue
;
41
42
//now loop over each ring and make sure the energy sums match
43
for
(
unsigned
int
k
=0;
k
<
NUM_GCT_RINGS
;
k
++) {
44
if
(
data_
->at(
i
).etSum(
k
) ==
emu_
->at(
j
).etSum(
k
)) {
45
errorFlag_hist_->Fill(0);
//i.e. the two match
46
}
else
{
47
errorFlag_hist_->Fill(1);
48
errorFlag=1;
49
}
50
}
51
}
52
}
53
54
return
errorFlag;
55
56
}
i
int i
Definition:
DBlmapReader.cc:9
compareRingSums::~compareRingSums
~compareRingSums()
Definition:
compareRingSums.cc:26
compareRingSums::emu_
edm::Handle< L1GctHFRingEtSumsCollection > emu_
Definition:
compareRingSums.h:31
GctErrorAnalyzerMBxInfo::EmuTrigBx
int EmuTrigBx
Definition:
GctErrorAnalyzerDefinitions.h:15
Event.h
relval_2017.k
list k
Definition:
relval_2017.py:23
MakerMacros.h
edm::Handle< L1GctHFRingEtSumsCollection >
compareRingSums::mbxparams_
GctErrorAnalyzerMBxInfo mbxparams_
Definition:
compareRingSums.h:32
compareRingSums::doCompare
bool doCompare(TH1I *errorFlag_hist_)
Definition:
compareRingSums.cc:30
Frameworkfwd.h
GctErrorAnalyzerMBxInfo
Definition:
GctErrorAnalyzerDefinitions.h:13
TFileService.h
ParameterSet.h
j
int j
Definition:
DBlmapReader.cc:9
Service.h
L1CaloCollections.h
EDAnalyzer.h
L1GctCollections.h
NUM_GCT_RINGS
const unsigned int NUM_GCT_RINGS
Definition:
GctErrorAnalyzerDefinitions.h:10
compareRingSums::data_
edm::Handle< L1GctHFRingEtSumsCollection > data_
Definition:
compareRingSums.h:31
compareRingSums.h
compareRingSums::compareRingSums
compareRingSums(const edm::Handle< L1GctHFRingEtSumsCollection > &data, const edm::Handle< L1GctHFRingEtSumsCollection > &emu, const GctErrorAnalyzerMBxInfo &mbxparams)
Definition:
compareRingSums.cc:18
InputTag.h
GctErrorAnalyzerMBxInfo::GCTTrigBx
int GCTTrigBx
Definition:
GctErrorAnalyzerDefinitions.h:16
AlCaHLTBitMon_QueryRunRegistry.data
tuple data
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:288
Generated for CMSSW Reference Manual by
1.8.5