Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
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) {
20
cout
<<
"Constructing a L1ScalesTester"
<< endl;
21
}
22
23
L1ScalesTester::~L1ScalesTester
() {
24
25
}
26
27
void
L1ScalesTester::analyze
(
const
edm::Event
&
e
,
const
edm::EventSetup
& es) {
28
using namespace
edm;
29
30
ESHandle< L1CaloEtScale >
emScale ;
31
es.
get
<
L1EmEtScaleRcd
>().
get
( emScale ) ;
32
33
cout
<<
"L1EmEtScaleRcd :"
<< endl;
34
emScale->print(
cout
);
35
cout
<< endl;
36
37
ESHandle< L1CaloEcalScale >
ecalScale;
38
es.
get
<
L1CaloEcalScaleRcd
>().
get
(ecalScale);
39
40
ESHandle< L1CaloHcalScale >
hcalScale;
41
es.
get
<
L1CaloHcalScaleRcd
>().
get
(hcalScale);
42
43
cout
<<
" L1ColoEcalScale :"
<< endl;
44
ecalScale->print(
cout
);
45
cout
<< endl;
46
47
cout
<<
" L1ColoHcalScale :"
<< endl;
48
hcalScale->print(
cout
);
49
cout
<< endl;
50
51
ESHandle< L1CaloEtScale >
jetScale ;
52
es.
get
<
L1JetEtScaleRcd
>().
get
( jetScale ) ;
53
54
cout
<<
"L1JetEtScaleRcd :"
<< endl;
55
jetScale->print(
cout
);
56
cout
<< endl;
57
58
// test EM lin-rank conversion
59
cout
<<
"Testing EM linear-to-rank conversion"
<< endl;
60
for
(
unsigned
short
i
=0;
i
<32;
i
++) {
61
unsigned
rank = emScale->rank(
i
);
62
cout
<<
"EM linear : "
<<
i
<<
", Et : "
<<
i
*emScale->linearLsb() <<
" GeV, rank : "
<< rank << endl;
63
}
64
cout
<< endl;
65
66
// test jet lin-rank conversion
67
cout
<<
"Testing jet linear-to-rank conversion"
<< endl;
68
for
(
unsigned
short
i
=0;
i
<32;
i
++) {
69
unsigned
rank = jetScale->rank(
i
);
70
cout
<<
"jet linear : "
<<
i
<<
", Et : "
<<
i
*jetScale->linearLsb() <<
" GeV, rank : "
<< rank << endl;
71
}
72
cout
<< endl;
73
74
// test EM rank-et conversion
75
cout
<<
"Testing EM rank-to-Et conversion"
<< endl;
76
for
(
unsigned
i
=0;
i
<32;
i
++) {
77
double
et = emScale->et(
i
);
78
cout
<<
"EM rank : "
<<
i
<<
" Et : "
<< et <<
" GeV"
<< endl;
79
}
80
cout
<< endl;
81
82
// test jet rank-et conversion
83
cout
<<
"Testing jet rank-to-Et conversion"
<< endl;
84
for
(
unsigned
i
=0;
i
<32;
i
++) {
85
double
et = jetScale->et(
i
);
86
cout
<<
"jet rank : "
<<
i
<<
" Et : "
<< et <<
" GeV"
<< endl;
87
}
88
cout
<< endl;
89
90
91
}
L1CaloEtScale.h
i
int i
Definition:
DBlmapReader.cc:9
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:44
L1ScalesTester.h
L1ScalesTester::~L1ScalesTester
~L1ScalesTester()
Definition:
L1ScalesTester.cc:23
L1ScalesTester::L1ScalesTester
L1ScalesTester(const edm::ParameterSet &)
Definition:
L1ScalesTester.cc:19
L1CaloEcalScale.h
edm::EventSetup::get
const T & get() const
Definition:
EventSetup.h:55
alignCSCRings.e
list e
Definition:
alignCSCRings.py:90
L1JetEtScaleRcd.h
edm::ParameterSet
Definition:
ParameterSet.h:35
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
L1ScalesTester::analyze
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition:
L1ScalesTester.cc:27
L1EmEtScaleRcd.h
edm::Event
Definition:
Event.h:62
L1CaloHcalScaleRcd
Definition:
L1CaloHcalScaleRcd.h:12
Generated for CMSSW Reference Manual by
1.8.5