CMS 3D CMS Logo

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 
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.
15  enum { DETID, LADBLD, ROC, FED };
16 
17 public:
19 
20  void analyze(const edm::Event& iEvent, const edm::EventSetup&) override {
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 
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
GeometryInterface geometryInterface
int iEvent
Definition: GenABIO.cc:224
SiPixelPhase1GeometryDebug(const edm::ParameterSet &conf)
static const Value UNDEFINED
std::vector< HistogramManager > histo
std::pair< Column, Value > extract(Column const &col, InterestingQuantities const &iq)
void analyze(const edm::Event &iEvent, const edm::EventSetup &) override
std::vector< InterestingQuantities > const & allModules()
ID intern(std::string const &id)