test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
L1Trigger
L1GctAnalyzer
src
compareBitCounts.cc
Go to the documentation of this file.
1
#include "
L1Trigger/L1GctAnalyzer/interface/compareBitCounts.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
compareBitCounts::compareBitCounts
(
const
edm::Handle<L1GctHFBitCountsCollection>
&
data
,
const
edm::Handle<L1GctHFBitCountsCollection>
&emu,
const
GctErrorAnalyzerMBxInfo
&mbxparams) :
19
data_(data),
20
emu_(emu),
21
mbxparams_(mbxparams)
22
{
23
24
}
25
26
compareBitCounts::~compareBitCounts
() {
27
//anything need to be destructed?
28
}
29
30
bool
compareBitCounts::doCompare
(TH1I *errorFlag_hist_) {
31
32
bool
errorFlag=0;
33
34
for
(
unsigned
int
i
=0;
i
<
data_
->size();
i
++) {
35
//check that we are looking at the triggered Bx in the data
36
if
(
data_
->at(
i
).bx() !=
mbxparams_
.
GCTTrigBx
)
continue
;
37
38
for
(
unsigned
int
j
=0;
j
<
emu_
->size();
j
++) {
39
//now check that we are looking at the corresponding triggered Bx in the emulator
40
if
(
emu_
->at(
j
).bx() !=
mbxparams_
.
EmuTrigBx
)
continue
;
41
42
for
(
unsigned
int
k
=0;
k
<
NUM_GCT_RINGS
;
k
++) {
43
//now that we are on the right Bxs for data and emulator, check all the ring bitcounts match
44
if
(
data_
->at(
i
).bitCount(
k
) ==
emu_
->at(
j
).bitCount(
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
compareBitCounts::mbxparams_
GctErrorAnalyzerMBxInfo mbxparams_
Definition:
compareBitCounts.h:32
compareBitCounts::compareBitCounts
compareBitCounts(const edm::Handle< L1GctHFBitCountsCollection > &data, const edm::Handle< L1GctHFBitCountsCollection > &emu, const GctErrorAnalyzerMBxInfo &mbxparams)
Definition:
compareBitCounts.cc:18
GctErrorAnalyzerMBxInfo::EmuTrigBx
int EmuTrigBx
Definition:
GctErrorAnalyzerDefinitions.h:15
Event.h
relval_2017.k
list k
Definition:
relval_2017.py:23
MakerMacros.h
edm::Handle< L1GctHFBitCountsCollection >
Frameworkfwd.h
GctErrorAnalyzerMBxInfo
Definition:
GctErrorAnalyzerDefinitions.h:13
TFileService.h
ParameterSet.h
compareBitCounts::emu_
edm::Handle< L1GctHFBitCountsCollection > emu_
Definition:
compareBitCounts.h:31
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
compareBitCounts.h
InputTag.h
compareBitCounts::~compareBitCounts
~compareBitCounts()
Definition:
compareBitCounts.cc:26
compareBitCounts::data_
edm::Handle< L1GctHFBitCountsCollection > data_
Definition:
compareBitCounts.h:31
compareBitCounts::doCompare
bool doCompare(TH1I *errorFlag_hist_)
Definition:
compareBitCounts.cc:30
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