Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
DQM
SiStripMonitorDigi
src
SiStripBaselineValidator.cc
Go to the documentation of this file.
1
// Original Author: Ivan Amos Cali
2
// Created: Mon Jul 28 14:10:52 CEST 2008
3
//
4
//
5
6
// system include files
7
#include <memory>
8
#include <iostream>
9
10
// user include files
11
#include "
DQM/SiStripMonitorDigi/interface/SiStripBaselineValidator.h
"
12
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
13
#include "
FWCore/Framework/interface/MakerMacros.h
"
14
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
15
#include "
FWCore/Framework/interface/ESHandle.h
"
16
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
17
#include "
FWCore/ServiceRegistry/interface/Service.h
"
18
#include "
DataFormats/Common/interface/DetSet.h
"
19
#include "
DQMServices/Core/interface/DQMStore.h
"
20
21
//ROOT inclusion
22
#include "TH1F.h"
23
#include "TH2F.h"
24
#include "TString.h"
25
#include <cassert>
26
#include <fstream>
27
28
class
TFile;
29
30
using namespace
edm
;
31
using namespace
std
;
32
33
SiStripBaselineValidator::SiStripBaselineValidator
(
const
edm::ParameterSet
& conf) {
34
srcProcessedRawDigi_ = conf.
getParameter
<
edm::InputTag
>(
"srcProcessedRawDigi"
);
35
moduleRawDigiToken_ =
36
consumes<edm::DetSetVector<SiStripDigi> >(conf.
getParameter
<
edm::InputTag
>(
"srcProcessedRawDigi"
));
37
}
38
39
SiStripBaselineValidator::~SiStripBaselineValidator
() {}
40
41
void
SiStripBaselineValidator::bookHistograms
(
DQMStore::IBooker
& ibooker,
42
const
edm::Run
&
run
,
43
const
edm::EventSetup
& es) {
45
ibooker.
setCurrentFolder
(
"SiStrip/BaselineValidator"
);
46
47
h1NumbadAPVsRes_ = ibooker.
book1D
(
"ResAPVs"
,
";#ResAPVs"
, 100, 1.0, 10001);
48
49
h1ADC_vs_strip_ = ibooker.
book2D
(
"ADCvsAPVs"
,
";ADCvsAPVs"
, 768, -0.5, 767.5, 1023, -0.5, 1022.5);
50
51
return
;
52
}
53
54
void
SiStripBaselineValidator::analyze
(
const
edm::Event
&
e
,
const
edm::EventSetup
& es) {
55
edm::Handle<edm::DetSetVector<SiStripDigi>
> moduleRawDigi;
56
e
.getByToken(moduleRawDigiToken_, moduleRawDigi);
57
edm::DetSetVector<SiStripDigi>::const_iterator
itRawDigis = moduleRawDigi->begin();
58
59
int
NumResAPVs = 0;
60
for
(; itRawDigis != moduleRawDigi->end(); ++itRawDigis) {
61
62
edm::DetSet<SiStripDigi>::const_iterator
itRaw = itRawDigis->
begin
();
63
int
strip
= 0, totStripAPV = 0, apv = 0, prevapv = itRaw->strip() / 128;
64
65
for
(; itRaw != itRawDigis->
end
(); ++itRaw) {
66
67
strip
= itRaw->strip();
68
apv =
strip
/ 128;
69
float
adc
= itRaw->adc();
70
h1ADC_vs_strip_->Fill(
strip
,
adc
);
71
72
if
(prevapv != apv) {
73
if
(totStripAPV > 64) {
74
NumResAPVs++;
75
}
76
prevapv = apv;
77
totStripAPV = 0;
78
}
79
if
(
adc
> 0)
80
++totStripAPV;
81
82
}
83
if
(totStripAPV > 64) {
84
NumResAPVs++;
85
}
86
87
}
88
90
91
h1NumbadAPVsRes_->Fill(NumResAPVs);
92
93
}
94
95
//define this as a plug-in
96
DEFINE_FWK_MODULE
(
SiStripBaselineValidator
);
ecalMGPA::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition:
EcalMGPASample.h:11
MessageLogger.h
ESHandle.h
edm::DetSetVector::end
iterator end()
Return the off-the-end iterator.
Definition:
DetSetVector.h:325
edm::Run
Definition:
Run.h:45
edm
HLT enums.
Definition:
AlignableModifier.h:19
digitizers_cfi.strip
strip
Definition:
digitizers_cfi.py:19
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition:
DQMStore.cc:32
edm::DetSetVector::begin
iterator begin()
Return an iterator to the first DetSet.
Definition:
DetSetVector.h:314
DQMStore.h
edm::Handle
Definition:
AssociativeIterator.h:50
SiStripBaselineValidator::SiStripBaselineValidator
SiStripBaselineValidator(const edm::ParameterSet &)
Definition:
SiStripBaselineValidator.cc:33
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
Service.h
SiStripBaselineValidator::~SiStripBaselineValidator
~SiStripBaselineValidator() override
Definition:
SiStripBaselineValidator.cc:39
SiStripBaselineValidator::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
SiStripBaselineValidator.cc:54
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::DetSetVector::const_iterator
collection_type::const_iterator const_iterator
Definition:
DetSetVector.h:102
SiStripBaselineValidator.h
edm::EventSetup
Definition:
EventSetup.h:57
SiStripBaselineValidator::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition:
SiStripBaselineValidator.cc:41
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
std
Definition:
JetResolutionObject.h:76
writedatasetfile.run
run
Definition:
writedatasetfile.py:27
Frameworkfwd.h
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition:
DQMStore.h:177
dqm::implementation::IBooker
Definition:
DQMStore.h:43
DetSet.h
ParameterSet.h
edm::Event
Definition:
Event.h:73
SiStripBaselineValidator
Definition:
SiStripBaselineValidator.h:28
edm::InputTag
Definition:
InputTag.h:15
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition:
DQMStore.h:98
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
edm::DetSet::const_iterator
collection_type::const_iterator const_iterator
Definition:
DetSet.h:31
Generated for CMSSW Reference Manual by
1.8.16