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 {
18  ROC,
20  };
21 
22  public:
24  : SiPixelPhase1Base(conf) {
25  }
26 
27  void analyze(const edm::Event& iEvent, const edm::EventSetup&) override {
33 
34  for (auto iq : all) {
35  auto rocno = geometryInterface.extract(roc, iq);
36  auto fedno = geometryInterface.extract(fed, iq);
37  auto detid = iq.sourceModule.rawId();
38 
39  auto ladbld = geometryInterface.extract(ladder, iq);
40  if (ladbld.second == GeometryInterface::UNDEFINED)
41  ladbld = geometryInterface.extract(blade, iq);
42 
43  histo[DETID ].fill((float) detid, iq.sourceModule, &iEvent, iq.col, iq.row);
44  histo[LADBLD].fill((float) ladbld.second, iq.sourceModule, &iEvent, iq.col, iq.row);
45  histo[ROC ].fill((float) rocno.second, iq.sourceModule, &iEvent, iq.col, iq.row);
46  histo[FED ].fill((float) fedno.second, iq.sourceModule, &iEvent, iq.col, iq.row);
47  }
48  }
49 };
50 
52 
GeometryInterface geometryInterface
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
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)