75 for (
int i=0;
i<8;
i++) {
76 sprintf(histo,
"Clust_y_size_Module%d",
i+1);
81 for (
int i=0;
i<3;
i++) {
82 sprintf(histo,
"Clust_x_size_Layer%d",
i+1);
87 for (
int i=0;
i<8;
i++) {
89 sprintf(histo,
"Clust_charge_Layer1_Module%d",
i+1);
93 sprintf(histo,
"Clust_charge_Layer2_Module%d",
i+1);
97 sprintf(histo,
"Clust_charge_Layer3_Module%d",
i+1);
103 for (
int i=0;
i<7;
i++) {
105 sprintf(histo,
"Clust_x_size_Disk1_Plaquette%d",
i+1);
109 sprintf(histo,
"Clust_x_size_Disk2_Plaquette%d",
i+1);
113 sprintf(histo,
"Clust_y_size_Disk1_Plaquette%d",
i+1);
117 sprintf(histo,
"Clust_y_size_Disk2_Plaquette%d",
i+1);
121 sprintf(histo,
"Clust_charge_Disk1_Plaquette%d",
i+1);
125 sprintf(histo,
"Clust_charge_Disk2_Plaquette%d",
i+1);
131 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitBPIX");
133 recHitBunchB = ibooker.
book1D(
"RecHit_Bunch_Barrel",
"RecHit Bunch Crossing, Barrel", 20, -10., 10.);
136 recHitEventB = ibooker.
book1D(
"RecHit_Event_Barrel",
"RecHit Event (in-time bunch), Barrel", 100, 0., 100.);
139 recHitXResAllB = ibooker.
book1D(
"RecHit_xres_b_All",
"RecHit X Res All Modules in Barrel", 100, -200., 200.);
142 recHitYResAllB = ibooker.
book1D(
"RecHit_yres_b_All",
"RecHit Y Res All Modules in Barrel", 100, -200., 200.);
148 recHitXHalfModules = ibooker.
book1D(
"RecHit_x_HalfModules",
"RecHit X distribution for half modules", 100, -1., 1.);
151 recHitYAllModules = ibooker.
book1D(
"RecHit_y_AllModules",
"RecHit Y distribution for all modules", 100, -4., 4.);
154 for (
int i=0;
i<3;
i++) {
156 sprintf(histo,
"RecHit_NsimHit_Layer%d",
i+1);
160 sprintf(histo,
"RecHit_XRes_FlippedLadder_Layer%d",
i+1);
164 sprintf(histo,
"RecHit_XRes_UnFlippedLadder_Layer%d",
i+1);
169 for (
int i=0;
i<8;
i++) {
171 sprintf(histo,
"RecHit_YRes_Layer1_Module%d",
i+1);
175 sprintf(histo,
"RecHit_YRes_Layer2_Module%d",
i+1);
179 sprintf(histo,
"RecHit_YRes_Layer3_Module%d",
i+1);
183 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitFPIX");
185 recHitBunchF = ibooker.
book1D(
"RecHit_Bunch_Forward",
"RecHit Bunch Crossing, Forward", 20, -10., 10.);
188 recHitEventF = ibooker.
book1D(
"RecHit_Event_Forward",
"RecHit Event (in-time bunch), Forward", 100, 0., 100.);
195 recHitXResAllF = ibooker.
book1D(
"RecHit_xres_f_All",
"RecHit X Res All in Forward", 100, -200., 200.);
198 recHitYResAllF = ibooker.
book1D(
"RecHit_yres_f_All",
"RecHit Y Res All in Forward", 100, -200., 200.);
219 for (
int i=0;
i<7;
i++) {
221 sprintf(histo,
"RecHit_XRes_Disk1_Plaquette%d",
i+1);
224 sprintf(histo,
"RecHit_XRes_Disk2_Plaquette%d",
i+1);
228 sprintf(histo,
"RecHit_YRes_Disk1_Plaquette%d",
i+1);
231 sprintf(histo,
"RecHit_YRes_Disk2_Plaquette%d",
i+1);
237 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitPullsBPIX");
238 recHitXPullAllB = ibooker.
book1D(
"RecHit_xres_b_All" ,
"RecHit X Pull All Modules in Barrel" , 100, -10.0, 10.0);
239 recHitYPullAllB = ibooker.
book1D(
"RecHit_yres_b_All" ,
"RecHit Y Pull All Modules in Barrel" , 100, -10.0, 10.0);
241 for (
int i=0;
i<3;
i++)
243 sprintf(histo,
"RecHit_XPull_FlippedLadder_Layer%d",
i+1);
246 sprintf(histo,
"RecHit_XPull_UnFlippedLadder_Layer%d",
i+1);
250 for (
int i=0;
i<8;
i++)
252 sprintf(histo,
"RecHit_YPull_Layer1_Module%d",
i+1);
255 sprintf(histo,
"RecHit_YPull_Layer2_Module%d",
i+1);
258 sprintf(histo,
"RecHit_YPull_Layer3_Module%d",
i+1);
262 ibooker.
setCurrentFolder(
"TrackerRecHitsV/TrackerRecHits/Pixel/recHitPullsFPIX");
263 recHitXPullAllF = ibooker.
book1D(
"RecHit_XPull_f_All",
"RecHit X Pull All in Forward", 100, -10.0, 10.0);
265 recHitYPullAllF = ibooker.
book1D(
"RecHit_YPull_f_All",
"RecHit Y Pull All in Forward", 100, -10.0, 10.0);
267 for (
int i=0;
i<7;
i++)
269 sprintf(histo,
"RecHit_XPull_Disk1_Plaquette%d",
i+1);
271 sprintf(histo,
"RecHit_XPull_Disk2_Plaquette%d",
i+1);
274 sprintf(histo,
"RecHit_YPull_Disk1_Plaquette%d",
i+1);
277 sprintf(histo,
"RecHit_YPull_Disk2_Plaquette%d",
i+1);
291 if (e.
id().
event() % 1000 == 0)
306 for (TrackerGeometry::DetContainer::const_iterator it = geom->dets().begin(); it != geom->dets().end(); it++)
308 DetId detId = ((*it)->geographicalId());
309 unsigned int subid=detId.
subdetId();
311 if (! ((subid==1) || (subid==2)))
continue;
316 if (pixeldet == recHitColl->end())
continue;
321 std::vector<PSimHit> matched;
324 for ( ; pixeliter != pixelrechitRangeIteratorEnd; pixeliter++)
329 if ( !matched.empty() )
331 float closest = 9999.9;
332 std::vector<PSimHit>::const_iterator closestit = matched.begin();
334 float rechit_x = lp.
x();
335 float rechit_y = lp.
y();
338 for (std::vector<PSimHit>::const_iterator
m = matched.begin();
m<matched.end();
m++)
340 float sim_x1 = (*m).entryPoint().x();
341 float sim_x2 = (*m).exitPoint().x();
342 float sim_xpos = 0.5*(sim_x1+sim_x2);
344 float sim_y1 = (*m).entryPoint().y();
345 float sim_y2 = (*m).exitPoint().y();
346 float sim_ypos = 0.5*(sim_y1+sim_y2);
348 float x_res = fabs(sim_xpos - rechit_x);
349 float y_res = fabs(sim_ypos - rechit_y);
351 float dist =
sqrt(x_res*x_res + y_res*y_res);
353 if ( dist < closest )
362 fillBarrel(*pixeliter, *closestit, detId, theGeomDet,tTopo);
366 fillForward(*pixeliter, *closestit, detId, theGeomDet,tTopo);
371 int NsimHit = matched.size();
374 for (
unsigned int i=0;
i<3;
i++)
380 if (tTopo->
pxfDisk(detId) == 1)
393 const float cmtomicron = 10000.0;
406 float lerr_x =
sqrt(lerr.
xx());
407 float lerr_y =
sqrt(lerr.
yy());
413 float sim_xpos = 0.5*(sim_x1 + sim_x2);
414 float res_x = (lp.
x() - sim_xpos)*cmtomicron;
420 float sim_ypos = 0.5*(sim_y1 + sim_y2);
421 float res_y = (lp.
y() - sim_ypos)*cmtomicron;
425 float pull_x = ( lp_x - sim_xpos ) / lerr_x;
426 float pull_y = ( lp_y - sim_ypos ) / lerr_y;
447 for (
unsigned int i=0;
i<3;
i++)
458 for (
unsigned int i=0;
i<3;
i++)
472 for (
unsigned int i=0;
i<8;
i++)
476 int sizeY = (*clust).sizeY();
481 float charge = (*clust).charge();
486 else if (tTopo->
pxbLayer(detId) == 2)
488 float charge = (*clust).charge();
493 else if (tTopo->
pxbLayer(detId) == 3)
495 float charge = (*clust).charge();
502 int sizeX = (*clust).sizeX();
515 const float cmtomicron = 10000.0;
528 float lerr_x =
sqrt(lerr.
xx());
529 float lerr_y =
sqrt(lerr.
yy());
533 float sim_xpos = 0.5*(sim_x1 + sim_x2);
537 float sim_ypos = 0.5*(sim_y1 + sim_y2);
539 float pull_x = ( lp_x - sim_xpos ) / lerr_x;
540 float pull_y = ( lp_y - sim_ypos ) / lerr_y;
547 else if (rows == 160)
556 else if (cols == 156)
560 else if (cols == 208)
564 else if (cols == 260)
569 float res_x = (lp.
x() - sim_xpos)*cmtomicron;
574 float res_y = (lp.
y() - sim_ypos)*cmtomicron;
582 for (
unsigned int i=0;
i<7;
i++)
586 if (tTopo->
pxfDisk(detId) == 1)
588 int sizeX = (*clust).sizeX();
591 int sizeY = (*clust).sizeY();
594 float charge = (*clust).charge();
605 int sizeX = (*clust).sizeX();
608 int sizeY = (*clust).sizeY();
611 float charge = (*clust).charge();
624 if (tTopo->
pxfDisk(detId) == 1)
626 int sizeX = (*clust).sizeX();
629 int sizeY = (*clust).sizeY();
632 float charge = (*clust).charge();
643 int sizeX = (*clust).sizeX();
646 int sizeY = (*clust).sizeY();
649 float charge = (*clust).charge();
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
EventNumber_t event() const
MonitorElement * clustYSizeModule[8]
MonitorElement * clustXSizeDisk1Plaquettes[7]
MonitorElement * recHitNsimHitDisk1
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
MonitorElement * recHitXPullDisk2Plaquettes[7]
MonitorElement * recHitXResFlippedLadderLayers[3]
int event() const
get the contents of the subdetector field (should be protected?)
MonitorElement * recHitXFullModules
MonitorElement * recHitXResAllF
MonitorElement * recHitXHalfModules
virtual int ncolumns() const =0
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]
virtual int nrows() const =0
MonitorElement * recHitYPlaquetteSize5
unsigned int pxbModule(const DetId &id) const
MonitorElement * recHitEventB
MonitorElement * recHitXPlaquetteSize1
MonitorElement * recHitXResDisk2Plaquettes[7]
const Plane & surface() const
The nominal surface of the GeomDet.
MonitorElement * recHitXPullNonFlippedLadderLayers[3]
MonitorElement * recHitYPullDisk1Plaquettes[7]
MonitorElement * recHitXPullAllB
MonitorElement * recHitXResAllB
MonitorElement * recHitBunchB
MonitorElement * clustChargeLayer2Modules[8]
virtual LocalError localPositionError() const
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
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
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
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
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.
T const * product() const
MonitorElement * recHitYPullLayer2Modules[8]
MonitorElement * clustYSizeDisk2Plaquettes[7]
MonitorElement * recHitYPlaquetteSize4
MonitorElement * recHitXPullFlippedLadderLayers[3]
MonitorElement * recHitNsimHitDisk2
MonitorElement * recHitYResLayer1Modules[8]
MonitorElement * recHitYPullLayer1Modules[8]
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &run, const edm::EventSetup &es)
MonitorElement * recHitXPullDisk1Plaquettes[7]
SiPixelRecHitsValid(const edm::ParameterSet &conf)
MonitorElement * recHitYPullAllB
virtual LocalPoint localPosition() 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)
virtual const TrackerGeomDet * idToDet(DetId) const
MonitorElement * recHitYAllModules