Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
L1TriggerConfig
L1ScalesProducers
src
L1ScalesTester.cc
Go to the documentation of this file.
1
#include "
L1TriggerConfig/L1ScalesProducers/interface/L1ScalesTester.h
"
2
3
#include "
FWCore/Framework/interface/EventSetup.h
"
4
#include "
FWCore/Framework/interface/ESHandle.h
"
5
6
#include "
CondFormats/L1TObjects/interface/L1CaloEtScale.h
"
7
#include "
CondFormats/DataRecord/interface/L1EmEtScaleRcd.h
"
8
#include "
CondFormats/DataRecord/interface/L1JetEtScaleRcd.h
"
9
#include "
CondFormats/L1TObjects/interface/L1CaloEcalScale.h
"
10
#include "
CondFormats/L1TObjects/interface/L1CaloHcalScale.h
"
11
#include "
CondFormats/DataRecord/interface/L1CaloEcalScaleRcd.h
"
12
#include "
CondFormats/DataRecord/interface/L1CaloHcalScaleRcd.h
"
13
14
#include <iostream>
15
16
using
std::cout
;
17
using
std::endl;
18
19
L1ScalesTester::L1ScalesTester
(
const
edm::ParameterSet
& ps) {
cout
<<
"Constructing a L1ScalesTester"
<< endl; }
20
21
L1ScalesTester::~L1ScalesTester
() {}
22
23
void
L1ScalesTester::analyze
(
const
edm::Event
&
e
,
const
edm::EventSetup
& es) {
24
using namespace
edm;
25
26
ESHandle<L1CaloEtScale>
emScale;
27
es.
get
<
L1EmEtScaleRcd
>().
get
(emScale);
28
29
cout
<<
"L1EmEtScaleRcd :"
<< endl;
30
emScale->print(
cout
);
31
cout
<< endl;
32
33
ESHandle<L1CaloEcalScale>
ecalScale;
34
es.
get
<
L1CaloEcalScaleRcd
>().
get
(ecalScale);
35
36
ESHandle<L1CaloHcalScale>
hcalScale;
37
es.
get
<
L1CaloHcalScaleRcd
>().
get
(hcalScale);
38
39
cout
<<
" L1ColoEcalScale :"
<< endl;
40
ecalScale->print(
cout
);
41
cout
<< endl;
42
43
cout
<<
" L1ColoHcalScale :"
<< endl;
44
hcalScale->print(
cout
);
45
cout
<< endl;
46
47
ESHandle<L1CaloEtScale>
jetScale;
48
es.
get
<
L1JetEtScaleRcd
>().
get
(jetScale);
49
50
cout
<<
"L1JetEtScaleRcd :"
<< endl;
51
jetScale->print(
cout
);
52
cout
<< endl;
53
54
// test EM lin-rank conversion
55
cout
<<
"Testing EM linear-to-rank conversion"
<< endl;
56
for
(
unsigned
short
i
= 0;
i
< 32;
i
++) {
57
unsigned
rank = emScale->rank(
i
);
58
cout
<<
"EM linear : "
<<
i
<<
", Et : "
<<
i
* emScale->linearLsb() <<
" GeV, rank : "
<< rank << endl;
59
}
60
cout
<< endl;
61
62
// test jet lin-rank conversion
63
cout
<<
"Testing jet linear-to-rank conversion"
<< endl;
64
for
(
unsigned
short
i
= 0;
i
< 32;
i
++) {
65
unsigned
rank = jetScale->rank(
i
);
66
cout
<<
"jet linear : "
<<
i
<<
", Et : "
<<
i
* jetScale->linearLsb() <<
" GeV, rank : "
<< rank << endl;
67
}
68
cout
<< endl;
69
70
// test EM rank-et conversion
71
cout
<<
"Testing EM rank-to-Et conversion"
<< endl;
72
for
(
unsigned
i
= 0;
i
< 32;
i
++) {
73
double
et = emScale->et(
i
);
74
cout
<<
"EM rank : "
<<
i
<<
" Et : "
<< et <<
" GeV"
<< endl;
75
}
76
cout
<< endl;
77
78
// test jet rank-et conversion
79
cout
<<
"Testing jet rank-to-Et conversion"
<< endl;
80
for
(
unsigned
i
= 0;
i
< 32;
i
++) {
81
double
et = jetScale->et(
i
);
82
cout
<<
"jet rank : "
<<
i
<<
" Et : "
<< et <<
" GeV"
<< endl;
83
}
84
cout
<< endl;
85
}
L1CaloEtScale.h
mps_fire.i
i
Definition:
mps_fire.py:428
L1CaloHcalScale.h
EventSetup.h
L1CaloEcalScaleRcd.h
L1CaloHcalScaleRcd.h
L1EmEtScaleRcd
Definition:
L1EmEtScaleRcd.h:30
L1CaloEcalScaleRcd
Definition:
L1CaloEcalScaleRcd.h:12
L1JetEtScaleRcd
Definition:
L1JetEtScaleRcd.h:30
edm::ESHandle
Definition:
DTSurvey.h:22
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:59
L1ScalesTester.h
L1ScalesTester::L1ScalesTester
L1ScalesTester(const edm::ParameterSet &)
Definition:
L1ScalesTester.cc:19
L1ScalesTester::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
L1ScalesTester.cc:23
L1CaloEcalScale.h
alignCSCRings.e
list e
Definition:
alignCSCRings.py:91
L1JetEtScaleRcd.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:82
L1ScalesTester::~L1ScalesTester
~L1ScalesTester() override
Definition:
L1ScalesTester.cc:21
edm::ParameterSet
Definition:
ParameterSet.h:47
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:144
L1EmEtScaleRcd.h
edm::Event
Definition:
Event.h:73
L1CaloHcalScaleRcd
Definition:
L1CaloHcalScaleRcd.h:13
Generated for CMSSW Reference Manual by
1.8.5