DQM
SiPixelPhase1Common
plugins
SiPixelPhase1GeometryDebug.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: SiPixelPhase1GeometryDebug
4
// Class : SiPixelPhase1GeometryDebug
5
//
6
7
// Original Author: Marcel Schneider
8
9
#include "
DQM/SiPixelPhase1Common/interface/SiPixelPhase1Base.h
"
10
#include "
FWCore/Framework/interface/MakerMacros.h
"
11
12
// This small plugin plots out varois geometry quantities against each other.
13
// This is useful to see where a specific module or ROC ends up in a 2D map.
14
class
SiPixelPhase1GeometryDebug
:
public
SiPixelPhase1Base
{
15
enum
{
DETID
,
LADBLD
,
ROC
,
FED
};
16
17
public
:
18
explicit
SiPixelPhase1GeometryDebug
(
const
edm::ParameterSet
& conf) :
SiPixelPhase1Base
(conf) {}
19
20
void
analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
&)
override
{
21
auto
&
all
=
geometryInterface
.
allModules
();
22
GeometryInterface::Column
ladder
=
geometryInterface
.
intern
(
"PXLadder"
);
23
GeometryInterface::Column
blade =
geometryInterface
.
intern
(
"PXBlade"
);
24
GeometryInterface::Column
roc
=
geometryInterface
.
intern
(
"ROC"
);
25
GeometryInterface::Column
fed =
geometryInterface
.
intern
(
"FED"
);
26
27
for
(
auto
iq :
all
) {
28
auto
rocno =
geometryInterface
.
extract
(
roc
, iq);
29
auto
fedno =
geometryInterface
.
extract
(fed, iq);
30
auto
detid = iq.sourceModule.rawId();
31
32
auto
ladbld =
geometryInterface
.
extract
(
ladder
, iq);
33
if
(ladbld.second ==
GeometryInterface::UNDEFINED
)
34
ladbld =
geometryInterface
.
extract
(blade, iq);
35
36
histo
[
DETID
].fill((
float
)detid, iq.sourceModule, &
iEvent
, iq.col, iq.row);
37
histo
[
LADBLD
].fill((
float
)ladbld.second, iq.sourceModule, &
iEvent
, iq.col, iq.row);
38
histo
[
ROC
].fill((
float
)rocno.second, iq.sourceModule, &
iEvent
, iq.col, iq.row);
39
histo
[
FED
].fill((
float
)fedno.second, iq.sourceModule, &
iEvent
, iq.col, iq.row);
40
}
41
}
42
};
43
44
DEFINE_FWK_MODULE
(
SiPixelPhase1GeometryDebug
);
SiPixelPhase1GeometryDebug::analyze
void analyze(const edm::Event &iEvent, const edm::EventSetup &) override
Definition:
SiPixelPhase1GeometryDebug.cc:20
HistogramManagerHolder::histo
std::vector< HistogramManager > histo
Definition:
SiPixelPhase1Base.h:37
python.cmstools.all
def all(container)
workaround iterator generators for ROOT classes
Definition:
cmstools.py:26
SiPixelPhase1Base
Definition:
SiPixelPhase1Base.h:46
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
SiPixelPhase1GeometryDebug::ROC
Definition:
SiPixelPhase1GeometryDebug.cc:15
SiPixelPhase1GeometryDebug::SiPixelPhase1GeometryDebug
SiPixelPhase1GeometryDebug(const edm::ParameterSet &conf)
Definition:
SiPixelPhase1GeometryDebug.cc:18
edm::ParameterSet
Definition:
ParameterSet.h:36
GeometryInterface::UNDEFINED
static const Value UNDEFINED
Definition:
GeometryInterface.h:42
iEvent
int iEvent
Definition:
GenABIO.cc:224
SiPixelPhase1GeometryDebug::DETID
Definition:
SiPixelPhase1GeometryDebug.cc:15
edm::EventSetup
Definition:
EventSetup.h:57
GeometryInterface::Column
ID Column
Definition:
GeometryInterface.h:40
SiPixelPhase1GeometryDebug
Definition:
SiPixelPhase1GeometryDebug.cc:14
SiPixelPhase1Base.h
GeometryInterface::intern
ID intern(std::string const &id)
Definition:
GeometryInterface.h:106
GeometryInterface::extract
std::pair< Column, Value > extract(Column const &col, InterestingQuantities const &iq)
Definition:
GeometryInterface.h:76
PVValHelper::ladder
Definition:
PVValidationHelpers.h:72
PixelMapPlotter.roc
roc
Definition:
PixelMapPlotter.py:498
SiPixelPhase1GeometryDebug::LADBLD
Definition:
SiPixelPhase1GeometryDebug.cc:15
HistogramManagerHolder::geometryInterface
GeometryInterface geometryInterface
Definition:
SiPixelPhase1Base.h:41
SiPixelPhase1GeometryDebug::FED
Definition:
SiPixelPhase1GeometryDebug.cc:15
edm::Event
Definition:
Event.h:73
GeometryInterface::allModules
std::vector< InterestingQuantities > const & allModules()
Definition:
GeometryInterface.h:99
Generated for CMSSW Reference Manual by
1.8.16