50 : trackerHitAssociatorConfig_(ps, consumesCollector())
73 for (
int i=0;
i<8;
i++) {
74 sprintf(histo,
"Clust_y_size_Module%d",
i+1);
79 for (
int i=0;
i<3;
i++) {
80 sprintf(histo,
"Clust_x_size_Layer%d",
i+1);
85 for (
int i=0;
i<8;
i++) {
87 sprintf(histo,
"Clust_charge_Layer1_Module%d",
i+1);
91 sprintf(histo,
"Clust_charge_Layer2_Module%d",
i+1);
95 sprintf(histo,
"Clust_charge_Layer3_Module%d",
i+1);
101 for (
int i=0;
i<7;
i++) {
103 sprintf(histo,
"Clust_x_size_Disk1_Plaquette%d",
i+1);
107 sprintf(histo,
"Clust_x_size_Disk2_Plaquette%d",
i+1);
111 sprintf(histo,
"Clust_y_size_Disk1_Plaquette%d",
i+1);
115 sprintf(histo,
"Clust_y_size_Disk2_Plaquette%d",
i+1);
119 sprintf(histo,
"Clust_charge_Disk1_Plaquette%d",
i+1);
123 sprintf(histo,
"Clust_charge_Disk2_Plaquette%d",
i+1);
129 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitBPIX");
131 recHitBunchB = ibooker.
book1D(
"RecHit_Bunch_Barrel",
"RecHit Bunch Crossing, Barrel", 20, -10., 10.);
134 recHitEventB = ibooker.
book1D(
"RecHit_Event_Barrel",
"RecHit Event (in-time bunch), Barrel", 100, 0., 100.);
137 recHitXResAllB = ibooker.
book1D(
"RecHit_xres_b_All",
"RecHit X Res All Modules in Barrel", 100, -200., 200.);
140 recHitYResAllB = ibooker.
book1D(
"RecHit_yres_b_All",
"RecHit Y Res All Modules in Barrel", 100, -200., 200.);
146 recHitXHalfModules = ibooker.
book1D(
"RecHit_x_HalfModules",
"RecHit X distribution for half modules", 100, -1., 1.);
149 recHitYAllModules = ibooker.
book1D(
"RecHit_y_AllModules",
"RecHit Y distribution for all modules", 100, -4., 4.);
152 for (
int i=0;
i<3;
i++) {
154 sprintf(histo,
"RecHit_NsimHit_Layer%d",
i+1);
158 sprintf(histo,
"RecHit_XRes_FlippedLadder_Layer%d",
i+1);
162 sprintf(histo,
"RecHit_XRes_UnFlippedLadder_Layer%d",
i+1);
167 for (
int i=0;
i<8;
i++) {
169 sprintf(histo,
"RecHit_YRes_Layer1_Module%d",
i+1);
173 sprintf(histo,
"RecHit_YRes_Layer2_Module%d",
i+1);
177 sprintf(histo,
"RecHit_YRes_Layer3_Module%d",
i+1);
181 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitFPIX");
183 recHitBunchF = ibooker.
book1D(
"RecHit_Bunch_Forward",
"RecHit Bunch Crossing, Forward", 20, -10., 10.);
186 recHitEventF = ibooker.
book1D(
"RecHit_Event_Forward",
"RecHit Event (in-time bunch), Forward", 100, 0., 100.);
193 recHitXResAllF = ibooker.
book1D(
"RecHit_xres_f_All",
"RecHit X Res All in Forward", 100, -200., 200.);
196 recHitYResAllF = ibooker.
book1D(
"RecHit_yres_f_All",
"RecHit Y Res All in Forward", 100, -200., 200.);
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);
235 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitPullsBPIX");
236 recHitXPullAllB = ibooker.
book1D(
"RecHit_xres_b_All" ,
"RecHit X Pull All Modules in Barrel" , 100, -10.0, 10.0);
237 recHitYPullAllB = ibooker.
book1D(
"RecHit_yres_b_All" ,
"RecHit Y Pull All Modules in Barrel" , 100, -10.0, 10.0);
239 for (
int i=0;
i<3;
i++)
241 sprintf(histo,
"RecHit_XPull_FlippedLadder_Layer%d",
i+1);
244 sprintf(histo,
"RecHit_XPull_UnFlippedLadder_Layer%d",
i+1);
248 for (
int i=0;
i<8;
i++)
250 sprintf(histo,
"RecHit_YPull_Layer1_Module%d",
i+1);
253 sprintf(histo,
"RecHit_YPull_Layer2_Module%d",
i+1);
256 sprintf(histo,
"RecHit_YPull_Layer3_Module%d",
i+1);
260 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitPullsFPIX");
261 recHitXPullAllF = ibooker.
book1D(
"RecHit_XPull_f_All",
"RecHit X Pull All in Forward", 100, -10.0, 10.0);
263 recHitYPullAllF = ibooker.
book1D(
"RecHit_YPull_f_All",
"RecHit Y Pull All in Forward", 100, -10.0, 10.0);
265 for (
int i=0;
i<7;
i++)
267 sprintf(histo,
"RecHit_XPull_Disk1_Plaquette%d",
i+1);
269 sprintf(histo,
"RecHit_XPull_Disk2_Plaquette%d",
i+1);
272 sprintf(histo,
"RecHit_YPull_Disk1_Plaquette%d",
i+1);
275 sprintf(histo,
"RecHit_YPull_Disk2_Plaquette%d",
i+1);
289 if (e.
id().
event() % 1000 == 0)
304 for (TrackerGeometry::DetContainer::const_iterator it = geom->
dets().begin(); it != geom->
dets().end(); it++)
306 DetId detId = ((*it)->geographicalId());
307 unsigned int subid=detId.
subdetId();
309 if (! ((subid==1) || (subid==2)))
continue;
314 if (pixeldet == recHitColl->
end())
continue;
322 for ( ; pixeliter != pixelrechitRangeIteratorEnd; pixeliter++)
327 if ( !matched.empty() )
329 float closest = 9999.9;
330 std::vector<PSimHit>::const_iterator closestit = matched.begin();
332 float rechit_x = lp.
x();
333 float rechit_y = lp.
y();
336 for (std::vector<PSimHit>::const_iterator
m = matched.begin();
m<matched.end();
m++)
338 float sim_x1 = (*m).entryPoint().x();
339 float sim_x2 = (*m).exitPoint().x();
340 float sim_xpos = 0.5*(sim_x1+sim_x2);
342 float sim_y1 = (*m).entryPoint().y();
343 float sim_y2 = (*m).exitPoint().y();
344 float sim_ypos = 0.5*(sim_y1+sim_y2);
346 float x_res = fabs(sim_xpos - rechit_x);
347 float y_res = fabs(sim_ypos - rechit_y);
349 float dist =
sqrt(x_res*x_res + y_res*y_res);
351 if ( dist < closest )
360 fillBarrel(*pixeliter, *closestit, detId, theGeomDet,tTopo);
364 fillForward(*pixeliter, *closestit, detId, theGeomDet,tTopo);
369 int NsimHit = matched.size();
372 for (
unsigned int i=0;
i<3;
i++)
378 if (tTopo->
pxfDisk(detId) == 1)
391 const float cmtomicron = 10000.0;
404 float lerr_x =
sqrt(lerr.
xx());
405 float lerr_y =
sqrt(lerr.
yy());
411 float sim_xpos = 0.5*(sim_x1 + sim_x2);
412 float res_x = (lp.
x() - sim_xpos)*cmtomicron;
418 float sim_ypos = 0.5*(sim_y1 + sim_y2);
419 float res_y = (lp.
y() - sim_ypos)*cmtomicron;
423 float pull_x = ( lp_x - sim_xpos ) / lerr_x;
424 float pull_y = ( lp_y - sim_ypos ) / lerr_y;
445 for (
unsigned int i=0;
i<3;
i++)
456 for (
unsigned int i=0;
i<3;
i++)
470 for (
unsigned int i=0;
i<8;
i++)
474 int sizeY = (*clust).sizeY();
479 float charge = (*clust).charge();
484 else if (tTopo->
pxbLayer(detId) == 2)
486 float charge = (*clust).charge();
491 else if (tTopo->
pxbLayer(detId) == 3)
493 float charge = (*clust).charge();
500 int sizeX = (*clust).sizeX();
513 const float cmtomicron = 10000.0;
526 float lerr_x =
sqrt(lerr.
xx());
527 float lerr_y =
sqrt(lerr.
yy());
531 float sim_xpos = 0.5*(sim_x1 + sim_x2);
535 float sim_ypos = 0.5*(sim_y1 + sim_y2);
537 float pull_x = ( lp_x - sim_xpos ) / lerr_x;
538 float pull_y = ( lp_y - sim_ypos ) / lerr_y;
545 else if (rows == 160)
554 else if (cols == 156)
558 else if (cols == 208)
562 else if (cols == 260)
567 float res_x = (lp.
x() - sim_xpos)*cmtomicron;
572 float res_y = (lp.
y() - sim_ypos)*cmtomicron;
580 for (
unsigned int i=0;
i<7;
i++)
584 if (tTopo->
pxfDisk(detId) == 1)
586 int sizeX = (*clust).sizeX();
589 int sizeY = (*clust).sizeY();
592 float charge = (*clust).charge();
603 int sizeX = (*clust).sizeX();
606 int sizeY = (*clust).sizeY();
609 float charge = (*clust).charge();
622 if (tTopo->
pxfDisk(detId) == 1)
624 int sizeX = (*clust).sizeX();
627 int sizeY = (*clust).sizeY();
630 float charge = (*clust).charge();
641 int sizeX = (*clust).sizeX();
644 int sizeY = (*clust).sizeY();
647 float charge = (*clust).charge();
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
EventNumber_t event() const
MonitorElement * clustYSizeModule[8]
MonitorElement * clustXSizeDisk1Plaquettes[7]
virtual int nrows() const =0
MonitorElement * recHitNsimHitDisk1
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
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
#define DEFINE_FWK_MODULE(type)
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.
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]
MonitorElement * book1D(Args &&...args)
MonitorElement * recHitBunchF
void fillForward(const SiPixelRecHit &, const PSimHit &, DetId, const PixelGeomDetUnit *, const TrackerTopology *tTopo)
EncodedEventId eventId() const
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
unsigned int pxfModule(const DetId &id) const
MonitorElement * recHitXPlaquetteSize2
unsigned int pxbLayer(const DetId &id) const
Point3DBase< float, LocalTag > Local3DPoint
MonitorElement * clustChargeLayer3Modules[8]
void setCurrentFolder(const std::string &fullpath)
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