121 iConfig.getParameter<
std::vector<
edm::
InputTag> >(
"multiplicityMaps"),
124 iConfig.getParameter<std::vector<edm::InputTag> >(
"occupancyMaps"),
125 [
this](
edm::InputTag const&
tag) { return consumes<std::map<unsigned int, int> >(tag); })),
127 "file",
edm::FileInPath(
"CalibTracker/SiPixelESProducers/data/PixelSkimmedGeometry.txt"))),
153 std::vector<edm::ParameterSet> wantedsubdets_ps =
154 iConfig.getParameter<std::vector<edm::ParameterSet> >(
"wantedSubDets");
156 for (std::vector<edm::ParameterSet>::const_iterator wsdps = wantedsubdets_ps.begin(); wsdps != wantedsubdets_ps.end();
158 unsigned int detsel = wsdps->getParameter<
unsigned int>(
"detSelection");
159 std::vector<std::string> selstr = wsdps->getUntrackedParameter<std::vector<std::string> >(
"selection");
177 for (std::vector<
edm::EDGetTokenT<std::map<unsigned int, int> > >::const_iterator mapToken =
184 for (std::map<unsigned int, int>::const_iterator
mult = mults->begin();
mult != mults->end();
mult++) {
186 (*m_avemultiplicity)->Fill(
mult->first,
mult->second);
190 for (std::vector<
edm::EDGetTokenT<std::map<unsigned int, int> > >::const_iterator mapToken =
197 for (std::map<unsigned int, int>::const_iterator occu = occus->begin(); occu != occus->end(); occu++) {
199 (*m_aveoccupancy)->Fill(occu->first, occu->second);
216 LogDebug(
"IsThereTest") <<
"Test of TrackerGeometry::isThere";
238 for (TrackingGeometry::DetIdContainer::const_iterator det = detunits.begin(); det != detunits.end(); ++det) {
253 double dzdr = posvect.
perp() > 0 ? (dz.
x() * posvect.
x() + dz.
y() * posvect.
y()) / posvect.
perp() : 0.;
254 double dxdr = posvect.
perp() > 0 ? (dx.
x() * posvect.
x() + dx.
y() * posvect.
y()) / posvect.
perp() : 0.;
255 double dydr = posvect.
perp() > 0 ? (dy.
x() * posvect.
x() + dy.
y() * posvect.
y()) / posvect.
perp() : 0.;
257 double dzdrphi = posvect.
perp() > 0 ? (dz.
y() * posvect.
x() - dz.
x() * posvect.
y()) / posvect.
perp() : 0.;
258 double dxdrphi = posvect.
perp() > 0 ? (dx.
y() * posvect.
x() - dx.
x() * posvect.
y()) / posvect.
perp() : 0.;
259 double dydrphi = posvect.
perp() > 0 ? (dy.
y() * posvect.
x() - dy.
x() * posvect.
y()) / posvect.
perp() : 0.;
261 for (std::map<unsigned int, DetIdSelector>::const_iterator
sel =
m_wantedsubdets.begin();
264 if (
sel->second.isSelected(*det)) {
268 (*m_averadius)->Fill(
sel->first, position.perp());
270 (*m_avez)->Fill(
sel->first, position.z());
272 (*m_avex)->Fill(
sel->first, position.x());
274 (*m_avey)->Fill(
sel->first, position.y());
276 (*m_zavedr)->Fill(
sel->first, dzdr);
278 (*m_zavedz)->Fill(
sel->first, dz.
z());
280 (*m_zavedrphi)->Fill(
sel->first, dzdrphi);
282 (*m_xavedr)->Fill(
sel->first, dxdr);
284 (*m_xavedz)->Fill(
sel->first, dx.
z());
286 (*m_xavedrphi)->Fill(
sel->first, dxdrphi);
288 (*m_yavedr)->Fill(
sel->first, dydr);
290 (*m_yavedz)->Fill(
sel->first, dy.
z());
292 (*m_yavedrphi)->Fill(
sel->first, dydrphi);
302 (*m_nchannels_ideal)->Reset();
304 (*m_nchannels_real)->Reset();
309 for (
const auto det : trkgeo->
detUnits()) {
311 if (stripDet !=
nullptr) {
322 for (std::map<unsigned int, DetIdSelector>::const_iterator
sel =
m_wantedsubdets.begin();
325 if (
sel->second.isSelected(detid)) {
327 (*m_nchannels_ideal)->Fill(
sel->first, nchannideal);
329 (*m_nchannels_real)->Fill(
sel->first, nchannreal);
340 const std::vector<uint32_t>& pxldetids = pxlreader.
getAllDetIds();
342 for (std::vector<uint32_t>::const_iterator detid = pxldetids.begin(); detid != pxldetids.end(); ++detid) {
343 int nchannideal = pxlreader.getDetUnitDimensions(*detid).first * pxlreader.getDetUnitDimensions(*detid).second;
346 nchannreal = pxlreader.getDetUnitDimensions(*detid).first * pxlreader.getDetUnitDimensions(*detid).second;
355 for (std::map<unsigned int, DetIdSelector>::const_iterator
sel =
m_wantedsubdets.begin();
358 if (
sel->second.isSelected(*detid)) {
360 (*m_nchannels_ideal)->Fill(
sel->first, nchannideal);
362 (*m_nchannels_real)->Fill(
sel->first, nchannreal);
const DetIdContainer & detUnitIds() const override
Returm a vector of all GeomDetUnit DetIds.
OccupancyPlots(const edm::ParameterSet &)
const std::vector< uint32_t > & getAllDetIds() const
TH1F ** m_nchannels_ideal
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void beginRun(const edm::Run &, const edm::EventSetup &) override
bool IsStripBad(const uint32_t &detid, const short &strip) const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
std::map< unsigned int, DetIdSelector > m_wantedsubdets
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
RunHistogramManager m_rhm
std::vector< edm::EDGetTokenT< std::map< unsigned int, int > > > m_multiplicityMapTokens
bool isThere(GeomDetEnumerators::SubDetector subdet) const
TH1F ** makeTH1F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
#define DEFINE_FWK_MODULE(type)
TProfile ** m_aveoccupancy
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
DetId geographicalId() const
The label of this GeomDet.
bool IsModuleBad(const uint32_t &detid) const
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
TProfile ** m_avemultiplicity
virtual int nstrips() const =0
void beginRun(const edm::Run &iRun)
std::vector< edm::EDGetTokenT< std::map< unsigned int, int > > > m_occupancyMapTokens
std::vector< DetId > DetIdContainer
~OccupancyPlots() override
static int position[264][3]
const TrackerGeomDet * idToDet(DetId) const override
std::string fullPath() const
void endRun(const edm::Run &, const edm::EventSetup &) override
void analyze(const edm::Event &, const edm::EventSetup &) override