40 src_( ps.getParameter<edm::
InputTag>(
"src" ) )
45 dbe_->setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/clustBPIX");
56 for (
int i=0;
i<8;
i++) {
57 sprintf(histo,
"Clust_y_size_Module%d",
i+1);
58 clustYSizeModule[
i] = dbe_->book1D(histo,
"Cluster y-size by Module", 20, 0.5, 20.5);
62 for (
int i=0;
i<3;
i++) {
63 sprintf(histo,
"Clust_x_size_Layer%d",
i+1);
64 clustXSizeLayer[
i] = dbe_->book1D(histo,
"Cluster x-size by Layer", 20, 0.5, 20.5);
68 for (
int i=0;
i<8;
i++) {
70 sprintf(histo,
"Clust_charge_Layer1_Module%d",
i+1);
74 sprintf(histo,
"Clust_charge_Layer2_Module%d",
i+1);
78 sprintf(histo,
"Clust_charge_Layer3_Module%d",
i+1);
82 dbe_->setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/clustFPIX");
84 for (
int i=0;
i<7;
i++) {
86 sprintf(histo,
"Clust_x_size_Disk1_Plaquette%d",
i+1);
90 sprintf(histo,
"Clust_x_size_Disk2_Plaquette%d",
i+1);
94 sprintf(histo,
"Clust_y_size_Disk1_Plaquette%d",
i+1);
98 sprintf(histo,
"Clust_y_size_Disk2_Plaquette%d",
i+1);
102 sprintf(histo,
"Clust_charge_Disk1_Plaquette%d",
i+1);
106 sprintf(histo,
"Clust_charge_Disk2_Plaquette%d",
i+1);
112 dbe_->setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitBPIX");
114 recHitXResAllB = dbe_->book1D(
"RecHit_xres_b_All",
"RecHit X Res All Modules in Barrel", 100, -200., 200.);
117 recHitYResAllB = dbe_->book1D(
"RecHit_yres_b_All",
"RecHit Y Res All Modules in Barrel", 100, -200., 200.);
120 recHitXFullModules = dbe_->book1D(
"RecHit_x_FullModules",
"RecHit X distribution for full modules", 100,-2., 2.);
123 recHitXHalfModules = dbe_->book1D(
"RecHit_x_HalfModules",
"RecHit X distribution for half modules", 100, -1., 1.);
126 recHitYAllModules = dbe_->book1D(
"RecHit_y_AllModules",
"RecHit Y distribution for all modules", 100, -4., 4.);
129 for (
int i=0;
i<3;
i++) {
131 sprintf(histo,
"RecHit_XRes_FlippedLadder_Layer%d",
i+1);
135 sprintf(histo,
"RecHit_XRes_UnFlippedLadder_Layer%d",
i+1);
140 for (
int i=0;
i<8;
i++) {
142 sprintf(histo,
"RecHit_YRes_Layer1_Module%d",
i+1);
146 sprintf(histo,
"RecHit_YRes_Layer2_Module%d",
i+1);
150 sprintf(histo,
"RecHit_YRes_Layer3_Module%d",
i+1);
154 dbe_->setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitFPIX");
156 recHitXResAllF = dbe_->book1D(
"RecHit_xres_f_All",
"RecHit X Res All in Forward", 100, -200., 200.);
159 recHitYResAllF = dbe_->book1D(
"RecHit_yres_f_All",
"RecHit Y Res All in Forward", 100, -200., 200.);
162 recHitXPlaquetteSize1 = dbe_->book1D(
"RecHit_x_Plaquette_xsize1",
"RecHit X Distribution for plaquette x-size1", 100, -2., 2.);
165 recHitXPlaquetteSize2 = dbe_->book1D(
"RecHit_x_Plaquette_xsize2",
"RecHit X Distribution for plaquette x-size2", 100, -2., 2.);
168 recHitYPlaquetteSize2 = dbe_->book1D(
"RecHit_y_Plaquette_ysize2",
"RecHit Y Distribution for plaquette y-size2", 100, -4., 4.);
171 recHitYPlaquetteSize3 = dbe_->book1D(
"RecHit_y_Plaquette_ysize3",
"RecHit Y Distribution for plaquette y-size3", 100, -4., 4.);
174 recHitYPlaquetteSize4 = dbe_->book1D(
"RecHit_y_Plaquette_ysize4",
"RecHit Y Distribution for plaquette y-size4", 100, -4., 4.);
177 recHitYPlaquetteSize5 = dbe_->book1D(
"RecHit_y_Plaquette_ysize5",
"RecHit Y Distribution for plaquette y-size5", 100, -4., 4.);
180 for (
int i=0;
i<7;
i++) {
182 sprintf(histo,
"RecHit_XRes_Disk1_Plaquette%d",
i+1);
185 sprintf(histo,
"RecHit_XRes_Disk2_Plaquette%d",
i+1);
189 sprintf(histo,
"RecHit_YRes_Disk1_Plaquette%d",
i+1);
192 sprintf(histo,
"RecHit_YRes_Disk2_Plaquette%d",
i+1);
198 dbe_->setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitPullsBPIX");
199 recHitXPullAllB = dbe_->book1D(
"RecHit_xres_b_All" ,
"RecHit X Pull All Modules in Barrel" , 100, -10.0, 10.0);
200 recHitYPullAllB = dbe_->book1D(
"RecHit_yres_b_All" ,
"RecHit Y Pull All Modules in Barrel" , 100, -10.0, 10.0);
202 for (
int i=0;
i<3;
i++)
204 sprintf(histo,
"RecHit_XPull_FlippedLadder_Layer%d",
i+1);
207 sprintf(histo,
"RecHit_XPull_UnFlippedLadder_Layer%d",
i+1);
211 for (
int i=0;
i<8;
i++)
213 sprintf(histo,
"RecHit_YPull_Layer1_Module%d",
i+1);
216 sprintf(histo,
"RecHit_YPull_Layer2_Module%d",
i+1);
219 sprintf(histo,
"RecHit_YPull_Layer3_Module%d",
i+1);
223 dbe_->setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitPullsFPIX");
224 recHitXPullAllF = dbe_->book1D(
"RecHit_XPull_f_All",
"RecHit X Pull All in Forward", 100, -10.0, 10.0);
226 recHitYPullAllF = dbe_->book1D(
"RecHit_YPull_f_All",
"RecHit Y Pull All in Forward", 100, -10.0, 10.0);
228 for (
int i=0;
i<7;
i++)
230 sprintf(histo,
"RecHit_XPull_Disk1_Plaquette%d",
i+1);
232 sprintf(histo,
"RecHit_XPull_Disk2_Plaquette%d",
i+1);
235 sprintf(histo,
"RecHit_YPull_Disk1_Plaquette%d",
i+1);
238 sprintf(histo,
"RecHit_YPull_Disk2_Plaquette%d",
i+1);
259 if ( (
int) e.
id().
event() % 1000 == 0 )
274 for (TrackerGeometry::DetContainer::const_iterator it = geom->dets().begin(); it != geom->dets().end(); it++)
276 DetId detId = ((*it)->geographicalId());
277 unsigned int subid=detId.
subdetId();
279 if (! ((subid==1) || (subid==2)))
continue;
284 if (pixeldet == recHitColl->end())
continue;
289 std::vector<PSimHit> matched;
292 for ( ; pixeliter != pixelrechitRangeIteratorEnd; pixeliter++)
297 if ( !matched.empty() )
299 float closest = 9999.9;
300 std::vector<PSimHit>::const_iterator closestit = matched.begin();
302 float rechit_x = lp.
x();
303 float rechit_y = lp.
y();
306 for (std::vector<PSimHit>::const_iterator
m = matched.begin();
m<matched.end();
m++)
308 float sim_x1 = (*m).entryPoint().x();
309 float sim_x2 = (*m).exitPoint().x();
310 float sim_xpos = 0.5*(sim_x1+sim_x2);
312 float sim_y1 = (*m).entryPoint().y();
313 float sim_y2 = (*m).exitPoint().y();
314 float sim_ypos = 0.5*(sim_y1+sim_y2);
316 float x_res = fabs(sim_xpos - rechit_x);
317 float y_res = fabs(sim_ypos - rechit_y);
319 float dist =
sqrt(x_res*x_res + y_res*y_res);
321 if ( dist < closest )
330 fillBarrel(*pixeliter, *closestit, detId, theGeomDet);
334 fillForward(*pixeliter, *closestit, detId, theGeomDet);
345 const float cmtomicron = 10000.0;
352 float lerr_x =
sqrt(lerr.
xx());
353 float lerr_y =
sqrt(lerr.
yy());
359 float sim_xpos = 0.5*(sim_x1 + sim_x2);
360 float res_x = (lp.
x() - sim_xpos)*cmtomicron;
366 float sim_ypos = 0.5*(sim_y1 + sim_y2);
367 float res_y = (lp.
y() - sim_ypos)*cmtomicron;
371 float pull_x = ( lp_x - sim_xpos ) / lerr_x;
372 float pull_y = ( lp_y - sim_ypos ) / lerr_y;
393 for (
unsigned int i=0;
i<3;
i++)
404 for (
unsigned int i=0;
i<3;
i++)
418 for (
unsigned int i=0;
i<8;
i++)
422 int sizeY = (*clust).sizeY();
427 float charge = (*clust).charge();
432 else if (
PXBDetId(detId).layer() == 2)
434 float charge = (*clust).charge();
439 else if (
PXBDetId(detId).layer() == 3)
441 float charge = (*clust).charge();
448 int sizeX = (*clust).sizeX();
460 const float cmtomicron = 10000.0;
467 float lerr_x =
sqrt(lerr.
xx());
468 float lerr_y =
sqrt(lerr.
yy());
472 float sim_xpos = 0.5*(sim_x1 + sim_x2);
476 float sim_ypos = 0.5*(sim_y1 + sim_y2);
478 float pull_x = ( lp_x - sim_xpos ) / lerr_x;
479 float pull_y = ( lp_y - sim_ypos ) / lerr_y;
486 else if (rows == 160)
495 else if (cols == 156)
499 else if (cols == 208)
503 else if (cols == 260)
508 float res_x = (lp.
x() - sim_xpos)*cmtomicron;
513 float res_y = (lp.
y() - sim_ypos)*cmtomicron;
521 for (
unsigned int i=0;
i<7;
i++)
527 int sizeX = (*clust).sizeX();
530 int sizeY = (*clust).sizeY();
533 float charge = (*clust).charge();
544 int sizeX = (*clust).sizeX();
547 int sizeY = (*clust).sizeY();
550 float charge = (*clust).charge();
565 int sizeX = (*clust).sizeX();
568 int sizeY = (*clust).sizeY();
571 float charge = (*clust).charge();
582 int sizeX = (*clust).sizeX();
585 int sizeY = (*clust).sizeY();
588 float charge = (*clust).charge();
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * clustYSizeModule[8]
MonitorElement * clustXSizeDisk1Plaquettes[7]
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
MonitorElement * recHitXPullDisk2Plaquettes[7]
MonitorElement * recHitXResFlippedLadderLayers[3]
virtual LocalError localPositionError() const
MonitorElement * recHitXFullModules
MonitorElement * recHitXResAllF
MonitorElement * recHitXHalfModules
virtual int ncolumns() const =0
MonitorElement * recHitYPullAllF
MonitorElement * recHitXResDisk1Plaquettes[7]
MonitorElement * clustXSizeDisk2Plaquettes[7]
MonitorElement * recHitYResAllB
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
MonitorElement * recHitYPullDisk2Plaquettes[7]
MonitorElement * clustXSizeLayer[3]
MonitorElement * clustChargeLayer1Modules[8]
virtual int nrows() const =0
MonitorElement * recHitYPlaquetteSize5
MonitorElement * recHitXPlaquetteSize1
MonitorElement * recHitXResDisk2Plaquettes[7]
MonitorElement * recHitXPullNonFlippedLadderLayers[3]
virtual LocalPoint localPosition() const
MonitorElement * recHitYPullDisk1Plaquettes[7]
MonitorElement * recHitXPullAllB
MonitorElement * recHitXResAllB
MonitorElement * clustChargeLayer2Modules[8]
MonitorElement * recHitYResDisk2Plaquettes[7]
Local3DPoint exitPoint() const
Exit point in the local Det frame.
MonitorElement * recHitXResNonFlippedLadderLayers[3]
MonitorElement * recHitYResDisk1Plaquettes[7]
MonitorElement * recHitYResLayer2Modules[8]
MonitorElement * recHitYPlaquetteSize2
MonitorElement * recHitYPullLayer3Modules[8]
MonitorElement * clustYSizeDisk1Plaquettes[7]
void fillForward(const SiPixelRecHit &, const PSimHit &, DetId, const PixelGeomDetUnit *)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
virtual const GeomDet * idToDet(DetId) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * recHitXPlaquetteSize2
Point3DBase< float, LocalTag > Local3DPoint
MonitorElement * clustChargeLayer3Modules[8]
MonitorElement * recHitYResAllF
MonitorElement * recHitYResLayer3Modules[8]
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
MonitorElement * recHitYPullLayer2Modules[8]
MonitorElement * clustYSizeDisk2Plaquettes[7]
MonitorElement * recHitYPlaquetteSize4
MonitorElement * recHitXPullFlippedLadderLayers[3]
void fillBarrel(const SiPixelRecHit &, const PSimHit &, DetId, const PixelGeomDetUnit *)
std::vector< PSimHit > associateHit(const TrackingRecHit &thit)
MonitorElement * recHitYResLayer1Modules[8]
MonitorElement * recHitYPullLayer1Modules[8]
MonitorElement * recHitXPullDisk1Plaquettes[7]
SiPixelRecHitsValid(const edm::ParameterSet &conf)
MonitorElement * recHitYPullAllB
ClusterRef const & cluster() const
MonitorElement * recHitXPullAllF
Local3DPoint entryPoint() const
Entry point in the local Det frame.
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
MonitorElement * recHitYPlaquetteSize3
MonitorElement * clustChargeDisk1Plaquettes[7]
MonitorElement * clustChargeDisk2Plaquettes[7]
MonitorElement * recHitYAllModules