49 : trackerHitAssociatorConfig_(ps, consumesCollector()),
68 for (
int i = 0;
i < 8;
i++) {
69 sprintf(histo,
"Clust_y_size_Module%d",
i + 1);
74 for (
int i = 0;
i < 3;
i++) {
75 sprintf(histo,
"Clust_x_size_Layer%d",
i + 1);
80 for (
int i = 0;
i < 8;
i++) {
82 sprintf(histo,
"Clust_charge_Layer1_Module%d",
i + 1);
86 sprintf(histo,
"Clust_charge_Layer2_Module%d",
i + 1);
90 sprintf(histo,
"Clust_charge_Layer3_Module%d",
i + 1);
96 for (
int i = 0;
i < 7;
i++) {
98 sprintf(histo,
"Clust_x_size_Disk1_Plaquette%d",
i + 1);
102 sprintf(histo,
"Clust_x_size_Disk2_Plaquette%d",
i + 1);
106 sprintf(histo,
"Clust_y_size_Disk1_Plaquette%d",
i + 1);
110 sprintf(histo,
"Clust_y_size_Disk2_Plaquette%d",
i + 1);
114 sprintf(histo,
"Clust_charge_Disk1_Plaquette%d",
i + 1);
118 sprintf(histo,
"Clust_charge_Disk2_Plaquette%d",
i + 1);
122 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitBPIX");
124 recHitBunchB = ibooker.
book1D(
"RecHit_Bunch_Barrel",
"RecHit Bunch Crossing, Barrel", 20, -10., 10.);
127 recHitEventB = ibooker.
book1D(
"RecHit_Event_Barrel",
"RecHit Event (in-time bunch), Barrel", 100, 0., 100.);
130 recHitXResAllB = ibooker.
book1D(
"RecHit_xres_b_All",
"RecHit X Res All Modules in Barrel", 100, -200., 200.);
133 recHitYResAllB = ibooker.
book1D(
"RecHit_yres_b_All",
"RecHit Y Res All Modules in Barrel", 100, -200., 200.);
136 recHitXFullModules = ibooker.
book1D(
"RecHit_x_FullModules",
"RecHit X distribution for full modules", 100, -2., 2.);
139 recHitXHalfModules = ibooker.
book1D(
"RecHit_x_HalfModules",
"RecHit X distribution for half modules", 100, -1., 1.);
142 recHitYAllModules = ibooker.
book1D(
"RecHit_y_AllModules",
"RecHit Y distribution for all modules", 100, -4., 4.);
145 for (
int i = 0;
i < 3;
i++) {
147 sprintf(histo,
"RecHit_NsimHit_Layer%d",
i + 1);
151 sprintf(histo,
"RecHit_XRes_FlippedLadder_Layer%d",
i + 1);
155 sprintf(histo,
"RecHit_XRes_UnFlippedLadder_Layer%d",
i + 1);
157 ibooker.
book1D(histo,
"RecHit XRes NonFlipped Ladders by Layer", 100, -200., 200.);
161 for (
int i = 0;
i < 8;
i++) {
163 sprintf(histo,
"RecHit_YRes_Layer1_Module%d",
i + 1);
167 sprintf(histo,
"RecHit_YRes_Layer2_Module%d",
i + 1);
171 sprintf(histo,
"RecHit_YRes_Layer3_Module%d",
i + 1);
175 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitFPIX");
177 recHitBunchF = ibooker.
book1D(
"RecHit_Bunch_Forward",
"RecHit Bunch Crossing, Forward", 20, -10., 10.);
180 recHitEventF = ibooker.
book1D(
"RecHit_Event_Forward",
"RecHit Event (in-time bunch), Forward", 100, 0., 100.);
187 recHitXResAllF = ibooker.
book1D(
"RecHit_xres_f_All",
"RecHit X Res All in Forward", 100, -200., 200.);
190 recHitYResAllF = ibooker.
book1D(
"RecHit_yres_f_All",
"RecHit Y Res All in Forward", 100, -200., 200.);
194 ibooker.
book1D(
"RecHit_x_Plaquette_xsize1",
"RecHit X Distribution for plaquette x-size1", 100, -2., 2.);
198 ibooker.
book1D(
"RecHit_x_Plaquette_xsize2",
"RecHit X Distribution for plaquette x-size2", 100, -2., 2.);
202 ibooker.
book1D(
"RecHit_y_Plaquette_ysize2",
"RecHit Y Distribution for plaquette y-size2", 100, -4., 4.);
206 ibooker.
book1D(
"RecHit_y_Plaquette_ysize3",
"RecHit Y Distribution for plaquette y-size3", 100, -4., 4.);
210 ibooker.
book1D(
"RecHit_y_Plaquette_ysize4",
"RecHit Y Distribution for plaquette y-size4", 100, -4., 4.);
214 ibooker.
book1D(
"RecHit_y_Plaquette_ysize5",
"RecHit Y Distribution for plaquette y-size5", 100, -4., 4.);
217 for (
int i = 0;
i < 7;
i++) {
219 sprintf(histo,
"RecHit_XRes_Disk1_Plaquette%d",
i + 1);
222 sprintf(histo,
"RecHit_XRes_Disk2_Plaquette%d",
i + 1);
226 sprintf(histo,
"RecHit_YRes_Disk1_Plaquette%d",
i + 1);
229 sprintf(histo,
"RecHit_YRes_Disk2_Plaquette%d",
i + 1);
233 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitPullsBPIX");
234 recHitXPullAllB = ibooker.
book1D(
"RecHit_xres_b_All",
"RecHit X Pull All Modules in Barrel", 100, -10.0, 10.0);
235 recHitYPullAllB = ibooker.
book1D(
"RecHit_yres_b_All",
"RecHit Y Pull All Modules in Barrel", 100, -10.0, 10.0);
237 for (
int i = 0;
i < 3;
i++) {
238 sprintf(histo,
"RecHit_XPull_FlippedLadder_Layer%d",
i + 1);
240 ibooker.
book1D(histo,
"RecHit XPull Flipped Ladders by Layer", 100, -10.0, 10.0);
242 sprintf(histo,
"RecHit_XPull_UnFlippedLadder_Layer%d",
i + 1);
244 ibooker.
book1D(histo,
"RecHit XPull NonFlipped Ladders by Layer", 100, -10.0, 10.0);
247 for (
int i = 0;
i < 8;
i++) {
248 sprintf(histo,
"RecHit_YPull_Layer1_Module%d",
i + 1);
251 sprintf(histo,
"RecHit_YPull_Layer2_Module%d",
i + 1);
254 sprintf(histo,
"RecHit_YPull_Layer3_Module%d",
i + 1);
258 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitPullsFPIX");
259 recHitXPullAllF = ibooker.
book1D(
"RecHit_XPull_f_All",
"RecHit X Pull All in Forward", 100, -10.0, 10.0);
261 recHitYPullAllF = ibooker.
book1D(
"RecHit_YPull_f_All",
"RecHit Y Pull All in Forward", 100, -10.0, 10.0);
263 for (
int i = 0;
i < 7;
i++) {
264 sprintf(histo,
"RecHit_XPull_Disk1_Plaquette%d",
i + 1);
266 sprintf(histo,
"RecHit_XPull_Disk2_Plaquette%d",
i + 1);
269 sprintf(histo,
"RecHit_YPull_Disk1_Plaquette%d",
i + 1);
272 sprintf(histo,
"RecHit_YPull_Disk2_Plaquette%d",
i + 1);
284 if (e.
id().
event() % 1000 == 0)
299 for (TrackerGeometry::DetContainer::const_iterator it = geom->
dets().begin(); it != geom->
dets().end(); it++) {
300 DetId detId = ((*it)->geographicalId());
301 unsigned int subid = detId.
subdetId();
303 if (!((subid == 1) || (subid == 2)))
309 if (pixeldet == recHitColl->
end())
318 for (; pixeliter != pixelrechitRangeIteratorEnd; pixeliter++) {
322 if (!matched.empty()) {
323 float closest = 9999.9;
324 std::vector<PSimHit>::const_iterator closestit = matched.begin();
326 float rechit_x = lp.
x();
327 float rechit_y = lp.
y();
330 for (std::vector<PSimHit>::const_iterator
m = matched.begin();
m < matched.end();
m++) {
331 float sim_x1 = (*m).entryPoint().x();
332 float sim_x2 = (*m).exitPoint().x();
333 float sim_xpos = 0.5 * (sim_x1 + sim_x2);
335 float sim_y1 = (*m).entryPoint().y();
336 float sim_y2 = (*m).exitPoint().y();
337 float sim_ypos = 0.5 * (sim_y1 + sim_y2);
339 float x_res = fabs(sim_xpos - rechit_x);
340 float y_res = fabs(sim_ypos - rechit_y);
342 float dist =
sqrt(x_res * x_res + y_res * y_res);
344 if (dist < closest) {
351 fillBarrel(*pixeliter, *closestit, detId, theGeomDet, tTopo);
354 fillForward(*pixeliter, *closestit, detId, theGeomDet, tTopo);
359 int NsimHit = matched.size();
361 for (
unsigned int i = 0;
i < 3;
i++)
366 if (tTopo->
pxfDisk(detId) == 1)
394 float lerr_x =
sqrt(lerr.
xx());
395 float lerr_y =
sqrt(lerr.
yy());
401 float sim_xpos = 0.5 * (sim_x1 + sim_x2);
402 float res_x = (lp.
x() - sim_xpos) * cmtomicron;
408 float sim_ypos = 0.5 * (sim_y1 + sim_y2);
409 float res_y = (lp.
y() - sim_ypos) * cmtomicron;
413 float pull_x = (lp_x - sim_xpos) / lerr_x;
414 float pull_y = (lp_y - sim_ypos) / lerr_y;
423 }
else if (rows == 80) {
431 for (
unsigned int i = 0;
i < 3;
i++) {
438 for (
unsigned int i = 0;
i < 3;
i++) {
450 for (
unsigned int i = 0;
i < 8;
i++) {
452 int sizeY = (*clust).sizeY();
456 float charge = (*clust).charge();
460 }
else if (tTopo->
pxbLayer(detId) == 2) {
461 float charge = (*clust).charge();
465 }
else if (tTopo->
pxbLayer(detId) == 3) {
466 float charge = (*clust).charge();
473 int sizeX = (*clust).sizeX();
504 float lerr_x =
sqrt(lerr.
xx());
505 float lerr_y =
sqrt(lerr.
yy());
509 float sim_xpos = 0.5 * (sim_x1 + sim_x2);
513 float sim_ypos = 0.5 * (sim_y1 + sim_y2);
515 float pull_x = (lp_x - sim_xpos) / lerr_x;
516 float pull_y = (lp_y - sim_ypos) / lerr_y;
520 }
else if (rows == 160) {
526 }
else if (cols == 156) {
528 }
else if (cols == 208) {
530 }
else if (cols == 260) {
534 float res_x = (lp.
x() - sim_xpos) * cmtomicron;
539 float res_y = (lp.
y() - sim_ypos) * cmtomicron;
547 for (
unsigned int i = 0;
i < 7;
i++) {
549 if (tTopo->
pxfDisk(detId) == 1) {
550 int sizeX = (*clust).sizeX();
553 int sizeY = (*clust).sizeY();
556 float charge = (*clust).charge();
565 int sizeX = (*clust).sizeX();
568 int sizeY = (*clust).sizeY();
571 float charge = (*clust).charge();
583 if (tTopo->
pxfDisk(detId) == 1) {
584 int sizeX = (*clust).sizeX();
587 int sizeY = (*clust).sizeY();
590 float charge = (*clust).charge();
599 int sizeX = (*clust).sizeX();
602 int sizeY = (*clust).sizeY();
605 float charge = (*clust).charge();
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
EventNumber_t event() const
MonitorElement * clustYSizeModule[8]
MonitorElement * clustXSizeDisk1Plaquettes[7]
virtual int nrows() const =0
MonitorElement * recHitNsimHitDisk1
MonitorElement * recHitXPullDisk2Plaquettes[7]
MonitorElement * recHitXResFlippedLadderLayers[3]
const_iterator end(bool update=false) const
int event() const
get the contents of the subdetector field (should be protected?)
MonitorElement * recHitXFullModules
~SiPixelRecHitsValid() override
MonitorElement * recHitXResAllF
LocalError localPositionError() const final
MonitorElement * recHitXHalfModules
MonitorElement * recHitYPullAllF
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * recHitXResDisk1Plaquettes[7]
MonitorElement * recHitEventF
MonitorElement * clustXSizeDisk2Plaquettes[7]
MonitorElement * recHitYResAllB
void setCurrentFolder(std::string const &fullpath)
unsigned int pxfDisk(const DetId &id) const
MonitorElement * recHitYPullDisk2Plaquettes[7]
MonitorElement * recHitNsimHitLayer[3]
MonitorElement * clustXSizeLayer[3]
MonitorElement * clustChargeLayer1Modules[8]
MonitorElement * recHitYPlaquetteSize5
unsigned int pxbModule(const DetId &id) const
MonitorElement * recHitEventB
void analyze(const edm::Event &e, const edm::EventSetup &c) override
MonitorElement * recHitXPlaquetteSize1
MonitorElement * recHitXResDisk2Plaquettes[7]
const Plane & surface() const
The nominal surface of the GeomDet.
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &run, const edm::EventSetup &es) override
MonitorElement * recHitXPullNonFlippedLadderLayers[3]
MonitorElement * recHitYPullDisk1Plaquettes[7]
MonitorElement * recHitXPullAllB
MonitorElement * recHitXResAllB
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
MonitorElement * recHitBunchB
MonitorElement * clustChargeLayer2Modules[8]
TrackerHitAssociator::Config trackerHitAssociatorConfig_
MonitorElement * recHitYResDisk2Plaquettes[7]
Local3DPoint exitPoint() const
Exit point in the local Det frame.
#define DEFINE_FWK_MODULE(type)
MonitorElement * recHitXResNonFlippedLadderLayers[3]
MonitorElement * recHitYResDisk1Plaquettes[7]
MonitorElement * recHitYResLayer2Modules[8]
MonitorElement * recHitYPlaquetteSize2
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
int bunchCrossing() const
get the detector field from this detid
MonitorElement * recHitYPullLayer3Modules[8]
edm::EDGetTokenT< SiPixelRecHitCollection > siPixelRecHitCollectionToken_
MonitorElement * clustYSizeDisk1Plaquettes[7]
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MonitorElement * recHitBunchF
void fillForward(const SiPixelRecHit &, const PSimHit &, DetId, const PixelGeomDetUnit *, const TrackerTopology *tTopo)
EncodedEventId eventId() const
unsigned int pxfModule(const DetId &id) const
MonitorElement * recHitXPlaquetteSize2
unsigned int pxbLayer(const DetId &id) const
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
MonitorElement * clustChargeLayer3Modules[8]
MonitorElement * recHitYResAllF
MonitorElement * recHitYResLayer3Modules[8]
ClusterRef cluster() const
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
MonitorElement * recHitYPullLayer2Modules[8]
MonitorElement * clustYSizeDisk2Plaquettes[7]
const_iterator find(id_type i, bool update=false) const
MonitorElement * recHitYPlaquetteSize4
virtual int ncolumns() const =0
MonitorElement * recHitXPullFlippedLadderLayers[3]
MonitorElement * recHitNsimHitDisk2
const TrackerGeomDet * idToDet(DetId) const override
MonitorElement * recHitYResLayer1Modules[8]
MonitorElement * recHitYPullLayer1Modules[8]
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
LocalPoint localPosition() const final
MonitorElement * recHitXPullDisk1Plaquettes[7]
SiPixelRecHitsValid(const edm::ParameterSet &conf)
MonitorElement * recHitYPullAllB
T const * product() const
MonitorElement * recHitXPullAllF
Local3DPoint entryPoint() const
Entry point in the local Det frame.
MonitorElement * recHitYPlaquetteSize3
MonitorElement * clustChargeDisk1Plaquettes[7]
unsigned int pxfPanel(const DetId &id) const
MonitorElement * clustChargeDisk2Plaquettes[7]
void fillBarrel(const SiPixelRecHit &, const PSimHit &, DetId, const PixelGeomDetUnit *, const TrackerTopology *tTopo)
MonitorElement * recHitYAllModules
Point3DBase< float, LocalTag > Local3DPoint