49 trackerHitAssociatorConfig_(ps, consumesCollector()),
66 for (
int i = 0;
i < 8;
i++) {
67 sprintf(
histo,
"Clust_y_size_Module%d",
i + 1);
72 for (
int i = 0;
i < 3;
i++) {
73 sprintf(
histo,
"Clust_x_size_Layer%d",
i + 1);
78 for (
int i = 0;
i < 8;
i++) {
80 sprintf(
histo,
"Clust_charge_Layer1_Module%d",
i + 1);
84 sprintf(
histo,
"Clust_charge_Layer2_Module%d",
i + 1);
88 sprintf(
histo,
"Clust_charge_Layer3_Module%d",
i + 1);
94 for (
int i = 0;
i < 7;
i++) {
96 sprintf(
histo,
"Clust_x_size_Disk1_Plaquette%d",
i + 1);
100 sprintf(
histo,
"Clust_x_size_Disk2_Plaquette%d",
i + 1);
104 sprintf(
histo,
"Clust_y_size_Disk1_Plaquette%d",
i + 1);
108 sprintf(
histo,
"Clust_y_size_Disk2_Plaquette%d",
i + 1);
112 sprintf(
histo,
"Clust_charge_Disk1_Plaquette%d",
i + 1);
116 sprintf(
histo,
"Clust_charge_Disk2_Plaquette%d",
i + 1);
120 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitBPIX");
122 recHitBunchB = ibooker.
book1D(
"RecHit_Bunch_Barrel",
"RecHit Bunch Crossing, Barrel", 20, -10., 10.);
125 recHitEventB = ibooker.
book1D(
"RecHit_Event_Barrel",
"RecHit Event (in-time bunch), Barrel", 100, 0., 100.);
128 recHitXResAllB = ibooker.
book1D(
"RecHit_xres_b_All",
"RecHit X Res All Modules in Barrel", 100, -200., 200.);
131 recHitYResAllB = ibooker.
book1D(
"RecHit_yres_b_All",
"RecHit Y Res All Modules in Barrel", 100, -200., 200.);
134 recHitXFullModules = ibooker.
book1D(
"RecHit_x_FullModules",
"RecHit X distribution for full modules", 100, -2., 2.);
137 recHitXHalfModules = ibooker.
book1D(
"RecHit_x_HalfModules",
"RecHit X distribution for half modules", 100, -1., 1.);
140 recHitYAllModules = ibooker.
book1D(
"RecHit_y_AllModules",
"RecHit Y distribution for all modules", 100, -4., 4.);
143 for (
int i = 0;
i < 3;
i++) {
145 sprintf(
histo,
"RecHit_NsimHit_Layer%d",
i + 1);
149 sprintf(
histo,
"RecHit_XRes_FlippedLadder_Layer%d",
i + 1);
153 sprintf(
histo,
"RecHit_XRes_UnFlippedLadder_Layer%d",
i + 1);
155 ibooker.
book1D(
histo,
"RecHit XRes NonFlipped Ladders by Layer", 100, -200., 200.);
159 for (
int i = 0;
i < 8;
i++) {
161 sprintf(
histo,
"RecHit_YRes_Layer1_Module%d",
i + 1);
165 sprintf(
histo,
"RecHit_YRes_Layer2_Module%d",
i + 1);
169 sprintf(
histo,
"RecHit_YRes_Layer3_Module%d",
i + 1);
173 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitFPIX");
175 recHitBunchF = ibooker.
book1D(
"RecHit_Bunch_Forward",
"RecHit Bunch Crossing, Forward", 20, -10., 10.);
178 recHitEventF = ibooker.
book1D(
"RecHit_Event_Forward",
"RecHit Event (in-time bunch), Forward", 100, 0., 100.);
185 recHitXResAllF = ibooker.
book1D(
"RecHit_xres_f_All",
"RecHit X Res All in Forward", 100, -200., 200.);
188 recHitYResAllF = ibooker.
book1D(
"RecHit_yres_f_All",
"RecHit Y Res All in Forward", 100, -200., 200.);
192 ibooker.
book1D(
"RecHit_x_Plaquette_xsize1",
"RecHit X Distribution for plaquette x-size1", 100, -2., 2.);
196 ibooker.
book1D(
"RecHit_x_Plaquette_xsize2",
"RecHit X Distribution for plaquette x-size2", 100, -2., 2.);
200 ibooker.
book1D(
"RecHit_y_Plaquette_ysize2",
"RecHit Y Distribution for plaquette y-size2", 100, -4., 4.);
204 ibooker.
book1D(
"RecHit_y_Plaquette_ysize3",
"RecHit Y Distribution for plaquette y-size3", 100, -4., 4.);
208 ibooker.
book1D(
"RecHit_y_Plaquette_ysize4",
"RecHit Y Distribution for plaquette y-size4", 100, -4., 4.);
212 ibooker.
book1D(
"RecHit_y_Plaquette_ysize5",
"RecHit Y Distribution for plaquette y-size5", 100, -4., 4.);
215 for (
int i = 0;
i < 7;
i++) {
217 sprintf(
histo,
"RecHit_XRes_Disk1_Plaquette%d",
i + 1);
220 sprintf(
histo,
"RecHit_XRes_Disk2_Plaquette%d",
i + 1);
224 sprintf(
histo,
"RecHit_YRes_Disk1_Plaquette%d",
i + 1);
227 sprintf(
histo,
"RecHit_YRes_Disk2_Plaquette%d",
i + 1);
231 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitPullsBPIX");
232 recHitXPullAllB = ibooker.
book1D(
"RecHit_xres_b_All",
"RecHit X Pull All Modules in Barrel", 100, -10.0, 10.0);
233 recHitYPullAllB = ibooker.
book1D(
"RecHit_yres_b_All",
"RecHit Y Pull All Modules in Barrel", 100, -10.0, 10.0);
235 for (
int i = 0;
i < 3;
i++) {
236 sprintf(
histo,
"RecHit_XPull_FlippedLadder_Layer%d",
i + 1);
238 ibooker.
book1D(
histo,
"RecHit XPull Flipped Ladders by Layer", 100, -10.0, 10.0);
240 sprintf(
histo,
"RecHit_XPull_UnFlippedLadder_Layer%d",
i + 1);
242 ibooker.
book1D(
histo,
"RecHit XPull NonFlipped Ladders by Layer", 100, -10.0, 10.0);
245 for (
int i = 0;
i < 8;
i++) {
246 sprintf(
histo,
"RecHit_YPull_Layer1_Module%d",
i + 1);
249 sprintf(
histo,
"RecHit_YPull_Layer2_Module%d",
i + 1);
252 sprintf(
histo,
"RecHit_YPull_Layer3_Module%d",
i + 1);
256 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitPullsFPIX");
257 recHitXPullAllF = ibooker.
book1D(
"RecHit_XPull_f_All",
"RecHit X Pull All in Forward", 100, -10.0, 10.0);
259 recHitYPullAllF = ibooker.
book1D(
"RecHit_YPull_f_All",
"RecHit Y Pull All in Forward", 100, -10.0, 10.0);
261 for (
int i = 0;
i < 7;
i++) {
262 sprintf(
histo,
"RecHit_XPull_Disk1_Plaquette%d",
i + 1);
264 sprintf(
histo,
"RecHit_XPull_Disk2_Plaquette%d",
i + 1);
267 sprintf(
histo,
"RecHit_YPull_Disk1_Plaquette%d",
i + 1);
270 sprintf(
histo,
"RecHit_YPull_Disk2_Plaquette%d",
i + 1);
279 edm::LogInfo(
"EventInfo") <<
" Run = " <<
e.id().run() <<
" Event = " <<
e.id().event();
280 if (
e.id().event() % 1000 == 0)
281 std::cout <<
" Run = " <<
e.id().run() <<
" Event = " <<
e.id().event() << std::endl;
294 for (
const auto& it : theTracker->
dets()) {
295 DetId detId = it->geographicalId();
296 unsigned int subid = detId.
subdetId();
298 if (!((subid == 1) || (subid == 2)))
304 if (pixeldet == recHitColl->
end())
313 for (; pixeliter != pixelrechitRangeIteratorEnd; pixeliter++) {
318 float closest = 9999.9;
319 std::vector<PSimHit>::const_iterator closestit =
matched.begin();
321 float rechit_x = lp.
x();
322 float rechit_y = lp.
y();
325 for (std::vector<PSimHit>::const_iterator
m =
matched.begin();
m <
matched.end();
m++) {
326 float sim_x1 = (*m).entryPoint().x();
327 float sim_x2 = (*m).exitPoint().x();
328 float sim_xpos = 0.5 * (sim_x1 + sim_x2);
330 float sim_y1 = (*m).entryPoint().y();
331 float sim_y2 = (*m).exitPoint().y();
332 float sim_ypos = 0.5 * (sim_y1 + sim_y2);
334 float x_res = fabs(sim_xpos - rechit_x);
335 float y_res = fabs(sim_ypos - rechit_y);
337 float dist =
sqrt(x_res * x_res + y_res * y_res);
339 if (dist < closest) {
346 fillBarrel(*pixeliter, *closestit, detId, theGeomDet, tTopo);
349 fillForward(*pixeliter, *closestit, detId, theGeomDet, tTopo);
356 for (
unsigned int i = 0;
i < 3;
i++)
361 if (tTopo->
pxfDisk(detId) == 1)
377 int bunch =
simHit.eventId().bunchCrossing();
378 int event =
simHit.eventId().event();
389 float lerr_x =
sqrt(lerr.
xx());
390 float lerr_y =
sqrt(lerr.
yy());
394 float sim_x1 =
simHit.entryPoint().x();
395 float sim_x2 =
simHit.exitPoint().x();
396 float sim_xpos = 0.5 * (sim_x1 + sim_x2);
401 float sim_y1 =
simHit.entryPoint().y();
402 float sim_y2 =
simHit.exitPoint().y();
403 float sim_ypos = 0.5 * (sim_y1 + sim_y2);
408 float pull_x = (lp_x - sim_xpos) / lerr_x;
409 float pull_y = (lp_y - sim_ypos) / lerr_y;
418 }
else if (
rows == 80) {
426 for (
unsigned int i = 0;
i < 3;
i++) {
433 for (
unsigned int i = 0;
i < 3;
i++) {
445 for (
unsigned int i = 0;
i < 8;
i++) {
447 int sizeY = (*clust).sizeY();
451 float charge = (*clust).charge();
455 }
else if (tTopo->
pxbLayer(detId) == 2) {
456 float charge = (*clust).charge();
460 }
else if (tTopo->
pxbLayer(detId) == 3) {
461 float charge = (*clust).charge();
468 int sizeX = (*clust).sizeX();
487 int bunch =
simHit.eventId().bunchCrossing();
488 int event =
simHit.eventId().event();
499 float lerr_x =
sqrt(lerr.
xx());
500 float lerr_y =
sqrt(lerr.
yy());
502 float sim_x1 =
simHit.entryPoint().x();
503 float sim_x2 =
simHit.exitPoint().x();
504 float sim_xpos = 0.5 * (sim_x1 + sim_x2);
506 float sim_y1 =
simHit.entryPoint().y();
507 float sim_y2 =
simHit.exitPoint().y();
508 float sim_ypos = 0.5 * (sim_y1 + sim_y2);
510 float pull_x = (lp_x - sim_xpos) / lerr_x;
511 float pull_y = (lp_y - sim_ypos) / lerr_y;
515 }
else if (
rows == 160) {
521 }
else if (cols == 156) {
523 }
else if (cols == 208) {
525 }
else if (cols == 260) {
542 for (
unsigned int i = 0;
i < 7;
i++) {
544 if (tTopo->
pxfDisk(detId) == 1) {
545 int sizeX = (*clust).sizeX();
548 int sizeY = (*clust).sizeY();
551 float charge = (*clust).charge();
560 int sizeX = (*clust).sizeX();
563 int sizeY = (*clust).sizeY();
566 float charge = (*clust).charge();
578 if (tTopo->
pxfDisk(detId) == 1) {
579 int sizeX = (*clust).sizeX();
582 int sizeY = (*clust).sizeY();
585 float charge = (*clust).charge();
594 int sizeX = (*clust).sizeX();
597 int sizeY = (*clust).sizeY();
600 float charge = (*clust).charge();
MonitorElement * clustYSizeModule[8]
MonitorElement * clustXSizeDisk1Plaquettes[7]
MonitorElement * recHitNsimHitDisk1
unsigned int pxbLayer(const DetId &id) const
MonitorElement * recHitXPullDisk2Plaquettes[7]
MonitorElement * recHitXResFlippedLadderLayers[3]
MonitorElement * recHitXFullModules
~SiPixelRecHitsValid() override
MonitorElement * recHitXResAllF
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tGeomEsToken
MonitorElement * recHitXHalfModules
virtual void setCurrentFolder(std::string const &fullpath)
virtual int ncolumns() const =0
MonitorElement * recHitYPullAllF
MonitorElement * recHitXResDisk1Plaquettes[7]
MonitorElement * recHitEventF
MonitorElement * clustXSizeDisk2Plaquettes[7]
MonitorElement * recHitYResAllB
#define DEFINE_FWK_MODULE(type)
unsigned int pxfModule(const DetId &id) const
MonitorElement * recHitYPullDisk2Plaquettes[7]
MonitorElement * recHitNsimHitLayer[3]
MonitorElement * clustXSizeLayer[3]
MonitorElement * clustChargeLayer1Modules[8]
virtual int nrows() const =0
MonitorElement * recHitYPlaquetteSize5
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
MonitorElement * recHitEventB
void analyze(const edm::Event &e, const edm::EventSetup &c) override
MonitorElement * recHitXPlaquetteSize1
MonitorElement * recHitXResDisk2Plaquettes[7]
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &run, const edm::EventSetup &es) override
MonitorElement * recHitXPullNonFlippedLadderLayers[3]
const_iterator end(bool update=false) const
MonitorElement * recHitYPullDisk1Plaquettes[7]
MonitorElement * recHitXPullAllB
MonitorElement * recHitXResAllB
MonitorElement * recHitBunchB
MonitorElement * clustChargeLayer2Modules[8]
TrackerHitAssociator::Config trackerHitAssociatorConfig_
MonitorElement * recHitYResDisk2Plaquettes[7]
MonitorElement * recHitXResNonFlippedLadderLayers[3]
MonitorElement * recHitYResDisk1Plaquettes[7]
MonitorElement * recHitYResLayer2Modules[8]
MonitorElement * recHitYPlaquetteSize2
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * recHitYPullLayer3Modules[8]
edm::EDGetTokenT< SiPixelRecHitCollection > siPixelRecHitCollectionToken_
MonitorElement * clustYSizeDisk1Plaquettes[7]
unsigned int pxfDisk(const DetId &id) const
MonitorElement * recHitBunchF
void fillForward(const SiPixelRecHit &, const PSimHit &, DetId, const PixelGeomDetUnit *, const TrackerTopology *tTopo)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getData(T &iHolder) const
const TrackerGeomDet * idToDet(DetId) const override
MonitorElement * recHitXPlaquetteSize2
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
unsigned int pxfPanel(const DetId &id) const
Log< level::Info, false > LogInfo
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoEsToken
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
MonitorElement * clustChargeLayer3Modules[8]
const Plane & surface() const
The nominal surface of the GeomDet.
MonitorElement * recHitYResAllF
MonitorElement * recHitYResLayer3Modules[8]
MonitorElement * recHitYPullLayer2Modules[8]
MonitorElement * clustYSizeDisk2Plaquettes[7]
MonitorElement * recHitYPlaquetteSize4
const_iterator find(id_type i, bool update=false) const
MonitorElement * recHitXPullFlippedLadderLayers[3]
MonitorElement * recHitNsimHitDisk2
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
MonitorElement * recHitYResLayer1Modules[8]
MonitorElement * recHitYPullLayer1Modules[8]
MonitorElement * recHitXPullDisk1Plaquettes[7]
unsigned int pxbModule(const DetId &id) const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
SiPixelRecHitsValid(const edm::ParameterSet &conf)
MonitorElement * recHitYPullAllB
MonitorElement * recHitXPullAllF
MonitorElement * recHitYPlaquetteSize3
MonitorElement * clustChargeDisk1Plaquettes[7]
MonitorElement * clustChargeDisk2Plaquettes[7]
void fillBarrel(const SiPixelRecHit &, const PSimHit &, DetId, const PixelGeomDetUnit *, const TrackerTopology *tTopo)
MonitorElement * recHitYAllModules
Point3DBase< float, LocalTag > Local3DPoint