127 iConfig.getParameter<std::vector<edm::InputTag> >(
"occupancyMaps"),
128 [
this](
edm::InputTag const&
tag) { return consumes<std::map<unsigned int, int> >(tag); })),
130 "file",
edm::FileInPath(
"CalibTracker/SiPixelESProducers/data/PixelSkimmedGeometry.txt"))),
131 m_tkGeomToken(esConsumes<edm::Transition::EndRun>()),
132 m_stripQualityToken(esConsumes<edm::Transition::EndRun>()),
133 m_pixelQualityToken(esConsumes<edm::Transition::EndRun>()),
134 m_rhm(consumesCollector()),
138 m_avemultiplicity = m_rhm.makeTProfile(
"avemult",
"Average Multiplicty", 6000, 0.5, 6000.5);
139 m_aveoccupancy = m_rhm.makeTProfile(
"aveoccu",
"Average Occupancy", 6000, 0.5, 6000.5);
141 m_nchannels_ideal = m_rhm.makeTH1F(
"nchannels_ideal",
"Number of channels (ideal)", 6000, 0.5, 6000.5);
142 m_nchannels_real = m_rhm.makeTH1F(
"nchannels_real",
"Number of channels (real)", 6000, 0.5, 6000.5);
144 m_averadius = m_rhm.makeTProfile(
"averadius",
"Average Module Radius", 6000, 0.5, 6000.5);
145 m_avez = m_rhm.makeTProfile(
"avez",
"Average Module z coordinate", 6000, 0.5, 6000.5);
146 m_avex = m_rhm.makeTProfile(
"avex",
"Average Module x coordinate", 6000, 0.5, 6000.5);
147 m_avey = m_rhm.makeTProfile(
"avey",
"Average Module y coordinate", 6000, 0.5, 6000.5);
149 m_zavedr = m_rhm.makeTProfile(
"zavedr",
"Average z unit vector dr", 6000, 0.5, 6000.5);
150 m_zavedz = m_rhm.makeTProfile(
"zavedz",
"Average z unit vector dz", 6000, 0.5, 6000.5);
151 m_zavedrphi = m_rhm.makeTProfile(
"zavedrphi",
"Average z unit vector drphi", 6000, 0.5, 6000.5);
152 m_xavedr = m_rhm.makeTProfile(
"xavedr",
"Average x unit vector dr", 6000, 0.5, 6000.5);
153 m_xavedz = m_rhm.makeTProfile(
"xavedz",
"Average x unit vctor dz", 6000, 0.5, 6000.5);
154 m_xavedrphi = m_rhm.makeTProfile(
"xavedrphi",
"Average Module x unit vector drphi", 6000, 0.5, 6000.5);
155 m_yavedr = m_rhm.makeTProfile(
"yavedr",
"Average y unit vector dr", 6000, 0.5, 6000.5);
156 m_yavedz = m_rhm.makeTProfile(
"yavedz",
"Average y unit vector dz", 6000, 0.5, 6000.5);
157 m_yavedrphi = m_rhm.makeTProfile(
"yavedrphi",
"Average y unit vector drphi", 6000, 0.5, 6000.5);
159 std::vector<edm::ParameterSet> wantedsubdets_ps =
160 iConfig.getParameter<std::vector<edm::ParameterSet> >(
"wantedSubDets");
162 for (std::vector<edm::ParameterSet>::const_iterator wsdps = wantedsubdets_ps.begin(); wsdps != wantedsubdets_ps.end();
164 unsigned int detsel = wsdps->getParameter<
unsigned int>(
"detSelection");
165 std::vector<std::string> selstr = wsdps->getUntrackedParameter<std::vector<std::string> >(
"selection");
188 iEvent.getByToken(*mapToken, mults);
190 for (std::map<unsigned int, int>::const_iterator
mult = mults->begin();
mult != mults->end();
mult++) {
192 (*m_avemultiplicity)->Fill(
mult->first,
mult->second);
201 iEvent.getByToken(*mapToken, occus);
203 for (std::map<unsigned int, int>::const_iterator occu = occus->begin(); occu != occus->end(); occu++) {
205 (*m_aveoccupancy)->Fill(occu->first, occu->second);
219 LogDebug(
"IsThereTest") <<
"Test of TrackerGeometry::isThere";
241 for (TrackingGeometry::DetIdContainer::const_iterator det = detunits.begin(); det != detunits.end(); ++det) {
248 GlobalPoint zpos = trkgeo.idToDet(*det)->toGlobal(locz);
249 GlobalPoint xpos = trkgeo.idToDet(*det)->toGlobal(locx);
250 GlobalPoint ypos = trkgeo.idToDet(*det)->toGlobal(locy);
256 double dzdr = posvect.
perp() > 0 ? (
dz.x() * posvect.
x() +
dz.y() * posvect.
y()) / posvect.
perp() : 0.;
257 double dxdr = posvect.
perp() > 0 ? (
dx.x() * posvect.
x() +
dx.y() * posvect.
y()) / posvect.
perp() : 0.;
258 double dydr = posvect.
perp() > 0 ? (
dy.x() * posvect.
x() +
dy.y() * posvect.
y()) / posvect.
perp() : 0.;
260 double dzdrphi = posvect.
perp() > 0 ? (
dz.y() * posvect.
x() -
dz.x() * posvect.
y()) / posvect.
perp() : 0.;
261 double dxdrphi = posvect.
perp() > 0 ? (
dx.y() * posvect.
x() -
dx.x() * posvect.
y()) / posvect.
perp() : 0.;
262 double dydrphi = posvect.
perp() > 0 ? (
dy.y() * posvect.
x() -
dy.x() * posvect.
y()) / posvect.
perp() : 0.;
264 for (std::map<unsigned int, DetIdSelector>::const_iterator
sel =
m_wantedsubdets.begin();
267 if (
sel->second.isSelected(*det)) {
279 (*m_zavedr)->Fill(
sel->first, dzdr);
281 (*m_zavedz)->Fill(
sel->first,
dz.z());
283 (*m_zavedrphi)->Fill(
sel->first, dzdrphi);
285 (*m_xavedr)->Fill(
sel->first, dxdr);
287 (*m_xavedz)->Fill(
sel->first,
dx.z());
289 (*m_xavedrphi)->Fill(
sel->first, dxdrphi);
291 (*m_yavedr)->Fill(
sel->first, dydr);
293 (*m_yavedz)->Fill(
sel->first,
dy.z());
295 (*m_yavedrphi)->Fill(
sel->first, dydrphi);
305 (*m_nchannels_ideal)->Reset();
307 (*m_nchannels_real)->Reset();
311 for (
const auto det : trkgeo.detUnits()) {
312 const StripGeomDetUnit* stripDet = dynamic_cast<const StripGeomDetUnit*>(det);
313 if (stripDet !=
nullptr) {
320 if (!stripQuality.IsStripBad(detid,
strip))
324 for (std::map<unsigned int, DetIdSelector>::const_iterator
sel =
m_wantedsubdets.begin();
327 if (
sel->second.isSelected(detid)) {
329 (*m_nchannels_ideal)->Fill(
sel->first, nchannideal);
331 (*m_nchannels_real)->Fill(
sel->first, nchannreal);
341 const std::vector<uint32_t>& pxldetids = pxlreader.
getAllDetIds();
343 for (std::vector<uint32_t>::const_iterator detid = pxldetids.begin(); detid != pxldetids.end(); ++detid) {
344 int nchannideal = pxlreader.getDetUnitDimensions(*detid).first * pxlreader.getDetUnitDimensions(*detid).second;
346 if (!pxlquality.IsModuleBad(*detid)) {
347 nchannreal = pxlreader.getDetUnitDimensions(*detid).first * pxlreader.getDetUnitDimensions(*detid).second;
356 for (std::map<unsigned int, DetIdSelector>::const_iterator
sel =
m_wantedsubdets.begin();
359 if (
sel->second.isSelected(*detid)) {
361 (*m_nchannels_ideal)->Fill(
sel->first, nchannideal);
363 (*m_nchannels_real)->Fill(
sel->first, nchannreal);