CMS 3D CMS Logo

NearbyPixelClustersAnalyzer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Calibration/TkAlCaRecoProducers
4 // Class: NearbyPixelClustersAnalyzer
5 //
10 //
11 // Original Author: Marco Musich
12 // Created: Tue, 30 Mar 2021 09:22:07 GMT
13 //
14 //
15 
16 // system include files
17 #include <memory>
18 
19 // user include files
52 
53 #include "TH2F.h"
54 //
55 // class declaration
56 //
57 
58 class NearbyPixelClustersAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResources, edm::one::WatchRuns> {
59 public:
61  ~NearbyPixelClustersAnalyzer() override = default;
62 
63  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
64 
65 private:
66  void beginJob() override;
67  void analyze(const edm::Event&, const edm::EventSetup&) override;
68  void beginRun(edm::Run const&, edm::EventSetup const&) override;
69  void endRun(edm::Run const&, edm::EventSetup const&) override{};
70  std::map<uint32_t, TH2F*> bookModuleHistograms(const TrackerTopology* tTopo);
71  std::tuple<std::string, int, int, int> setTopoInfo(uint32_t detId, const TrackerTopology* tTopo);
72  void endJob() override;
73 
75  //const TrackerGeometry* tkGeom_,
76  unsigned int& nClusGlobal);
77 
78  bool detidIsOnPixel(const DetId& detid);
81  const PixelClusterParameterEstimator* pixelCPE_,
82  const TrackerGeometry* trackerGeometry_,
83  uint32_t rawId,
84  float traj_lx,
85  float traj_ly);
86 
88 
89  // ----------member data ---------------------------
94 
100 
102 
109 
111  std::map<std::string, TFileDirectory> outputFolders_;
112  std::map<uint32_t, TH2F*> histoMap_;
113  bool phase_;
114 };
115 
116 //
117 // constructors and destructor
118 //
120  : geomEsToken_(esConsumes()),
121  pixelCPEEsToken_(esConsumes(edm::ESInputTag("", "PixelCPEGeneric"))),
122  geomEsTokenBR_(esConsumes<edm::Transition::BeginRun>()),
123  topoEsTokenBR_(esConsumes<edm::Transition::BeginRun>()),
124  clustersToken_(consumes<SiPixelClusterCollectionNew>(iConfig.getParameter<edm::InputTag>("clusterCollection"))),
125  nearByClustersToken_(
126  consumes<SiPixelClusterCollectionNew>(iConfig.getParameter<edm::InputTag>("nearByClusterCollection"))),
127  trajTrackCollectionToken_(
128  consumes<TrajTrackAssociationCollection>(iConfig.getParameter<edm::InputTag>("trajectoryInput"))),
129  distanceToken_(consumes<edm::ValueMap<std::vector<float>>>(iConfig.getParameter<edm::InputTag>("distToTrack"))),
130  muonTracksToken_(consumes<edm::View<reco::Track>>(iConfig.getParameter<edm::InputTag>("muonTracks"))),
131  reader_(edm::FileInPath(iConfig.getParameter<std::string>("skimmedGeometryPath")).fullPath()) {
132  usesResource(TFileService::kSharedResource);
133 }
134 
135 //
136 // member functions
137 //
138 
139 // ------------ method called for each event ------------
141  using namespace edm;
142 
143  // get the Tracker geometry from event setup
144  const TrackerGeometry* trackerGeometry_ = &iSetup.getData(geomEsToken_);
145 
146  // get the Pixel CPE from event setup
147  const PixelClusterParameterEstimator* pixelCPE_ = &iSetup.getData(pixelCPEEsToken_);
148 
149  // get the muon track collection
150  const auto& muonTrackCollectionHandle = iEvent.getHandle(muonTracksToken_);
151  auto const& muonTracks = *muonTrackCollectionHandle;
152 
153  // get the track distances
154  const auto& distancesToTrack = iEvent.getHandle(distanceToken_);
155 
156  unsigned int nMuons = muonTracks.size();
157  for (unsigned int ij = 0; ij < nMuons; ij++) {
158  auto muon = muonTrackCollectionHandle->ptrAt(ij);
159  edm::RefToBase<reco::Track> trackRef = muonTrackCollectionHandle->refAt(ij);
160  const auto& distances = (*distancesToTrack)[trackRef];
161 
162  LogDebug("NearbyPixelClustersAnalyzer") << "distances size: " << distances.size() << std::endl;
163 
164  unsigned counter = 0;
165  double closestDR = 999.;
166  for (const auto& distance : distances) {
167  counter++;
168  LogDebug("NearbyPixelClustersAnalyzer")
169  << "track: " << counter << " distance:" << std::sqrt(distance) << std::endl;
170  if (distance < closestDR && distance > 0) {
171  closestDR = distance;
172  }
173  }
174 
175  h_distClosestTrack->Fill(std::sqrt(closestDR));
176  }
177 
178  // Get cluster collection
179  const auto& clusterCollectionHandle = iEvent.getHandle(clustersToken_);
180 
181  unsigned int nClusGlobal = 0;
182  countClusters(clusterCollectionHandle, nClusGlobal);
183 
184  h_nALCARECOClusters->Fill(nClusGlobal);
185  edm::LogInfo("NearbyPixelClustersAnalyzer") << "total ALCARECO clusters: " << nClusGlobal << std::endl;
186 
187  // Get nearby cluster collection
188  const auto& nearByClusterCollectionHandle = iEvent.getHandle(nearByClustersToken_);
189 
190  unsigned int nNearByClusGlobal = 0;
191  countClusters(nearByClusterCollectionHandle, /*trackerGeometry_,*/ nNearByClusGlobal);
192 
193  h_nCloseByClusters->Fill(nNearByClusGlobal);
194  edm::LogInfo("NearbyPixelClustersAnalyzer") << "total close-by clusters: " << nNearByClusGlobal << std::endl;
195 
196  // fill the detector frames
197  fillClusterFrames(nearByClusterCollectionHandle);
198 
199  // Get Traj-Track Collection
200  const auto& trajTrackCollectionHandle = iEvent.getHandle(trajTrackCollectionToken_);
201 
202  if (!trajTrackCollectionHandle.isValid())
203  return;
204 
205  for (const auto& pair : *trajTrackCollectionHandle) {
206  const edm::Ref<std::vector<Trajectory>> traj = pair.key;
207  const reco::TrackRef track = pair.val;
208 
209  for (const TrajectoryMeasurement& measurement : traj->measurements()) {
210  if (!measurement.updatedState().isValid())
211  return;
212 
213  const TransientTrackingRecHit::ConstRecHitPointer& recHit = measurement.recHit();
214 
215  // Only looking for pixel hits
216  DetId r_rawId = recHit->geographicalId();
217 
218  if (!this->detidIsOnPixel(r_rawId))
219  continue;
220 
221  // Skipping hits with undeterminable positions
222  TrajectoryStateOnSurface trajStateOnSurface = this->getTrajectoryStateOnSurface(measurement);
223 
224  if (!(trajStateOnSurface.isValid()))
225  continue;
226 
227  // Position measurements
228  // Looking for valid and missing hits
229  LocalPoint localPosition = trajStateOnSurface.localPosition();
230 
231  const auto& traj_lx = localPosition.x();
232  const auto& traj_ly = localPosition.y();
233 
234  const auto loc = this->findClosestCluster(
235  nearByClusterCollectionHandle, pixelCPE_, trackerGeometry_, r_rawId.rawId(), traj_lx, traj_ly);
236 
237  float dist = (loc.first != -999.) ? std::sqrt(loc.first * loc.first + loc.second * loc.second) : -0.1;
238 
239  if (recHit->getType() == TrackingRecHit::valid) {
240  edm::LogInfo("NearbyPixelClustersAnalyzer")
241  << "RawID:" << r_rawId.rawId() << " (valid hit), distance: " << dist << std::endl;
242  h_distClosestValid->Fill(dist);
243  }
244 
245  if (recHit->getType() == TrackingRecHit::missing) {
246  edm::LogInfo("NearbyPixelClustersAnalyzer")
247  << "RawID:" << r_rawId.rawId() << " (missing hit), distance: " << dist << std::endl;
248  h_distClosestMissing->Fill(dist);
249  }
250 
251  if (recHit->getType() == TrackingRecHit::inactive) {
252  edm::LogInfo("NearbyPixelClustersAnalyzer")
253  << "RawID:" << r_rawId.rawId() << " (inactive hit), distance: " << dist << std::endl;
254  h_distClosestInactive->Fill(dist);
255  }
256  }
257  }
258 }
259 
260 // ------------ method called once each job just before starting event loop ------------
262  TFileDirectory ClusterCounts = fs->mkdir("ClusterCounts");
263  h_nALCARECOClusters = ClusterCounts.make<TH1I>(
264  "h_nALCARECOClusters", "Number of Pixel clusters per event (ALCARECO) ;N_{clusters};events", 20, 0, 20);
265  h_nCloseByClusters = ClusterCounts.make<TH1I>(
266  "h_nCloseByClusters", "Number of Pixel clusters per event (close-by) ;N_{clusters};events", 20, 0, 20);
267 
268  TFileDirectory Distances = fs->mkdir("TrajDistance");
269  h_distClosestValid = Distances.make<TH1F>(
270  "h_distClosestValid",
271  "Distance of Closest cluster to trajectory (valid);distance (cm); valid trajectory measurements",
272  110,
273  -0.105,
274  0.995);
275  h_distClosestMissing = Distances.make<TH1F>(
276  "h_distClosestMissing",
277  "Distance of Closest cluster to trajectory (missing);distance (cm);missing trajectory measurements",
278  110,
279  -0.105,
280  0.995);
281  h_distClosestInactive = Distances.make<TH1F>(
282  "h_distClosestInactive",
283  "Distance of Closest cluster to trajectory (inactive);distance (cm);inactive trajectory measurements",
284  110,
285  -0.105,
286  0.995);
287 
288  TFileDirectory TkDistances = fs->mkdir("OtherTrackDistance");
289  h_distClosestTrack = TkDistances.make<TH1F>(
290  "h_distClosestTrack",
291  "#DeltaR Distance of Closest track to the muon trajectory;#DeltaR distance; muon trajectories",
292  100,
293  0.,
294  5.);
295 }
296 
297 // ------------ method called once each job just after ending the event loop ------------
299  // please remove this method if not needed
300 }
301 
302 /*--------------------------------------------------------------------*/
304 /*--------------------------------------------------------------------*/
305 {
306  if (detid.det() != DetId::Tracker)
307  return false;
309  return true;
311  return true;
312  return false;
313 }
314 
315 /*--------------------------------------------------------------------*/
317  const TrajectoryMeasurement& measurement)
318 /*--------------------------------------------------------------------*/
319 {
320  const static TrajectoryStateCombiner trajStateCombiner;
321 
322  const auto& forwardPredictedState = measurement.forwardPredictedState();
323  const auto& backwardPredictedState = measurement.backwardPredictedState();
324 
325  if (forwardPredictedState.isValid() && backwardPredictedState.isValid())
326  return trajStateCombiner(forwardPredictedState, backwardPredictedState);
327 
328  else if (backwardPredictedState.isValid())
329  return backwardPredictedState;
330 
331  else if (forwardPredictedState.isValid())
332  return forwardPredictedState;
333 
334  edm::LogError("NearbyPixelClusterProducer") << "Error saving traj. measurement data."
335  << " Trajectory state on surface cannot be determined." << std::endl;
336 
337  return TrajectoryStateOnSurface();
338 }
339 
340 /*--------------------------------------------------------------------*/
342  //const TrackerGeometry* tkGeom_,
343  unsigned int& nClusGlobal)
344 /*--------------------------------------------------------------------*/
345 {
346  for (const auto& DSVItr : *handle) {
347  uint32_t rawid(DSVItr.detId());
348  DetId detId(rawid);
349  LogDebug("NearbyPixelClustersAnalyzer") << "DetId: " << detId.rawId() << " size: " << DSVItr.size() << std::endl;
350  nClusGlobal += DSVItr.size();
351  }
352 }
353 
354 /*--------------------------------------------------------------------*/
357  const PixelClusterParameterEstimator* pixelCPE_,
358  const TrackerGeometry* trackerGeometry_,
359  uint32_t rawId,
360  float traj_lx,
361  float traj_ly)
362 /*--------------------------------------------------------------------*/
363 {
364  const SiPixelClusterCollectionNew& clusterCollection = *handle;
365  SiPixelClusterCollectionNew::const_iterator itClusterSet = clusterCollection.begin();
366 
367  float minD = 10000.;
368 
369  auto loc = std::make_pair(-999., -999.);
370 
371  for (; itClusterSet != clusterCollection.end(); itClusterSet++) {
372  DetId detId(itClusterSet->id());
373  if (detId.rawId() != rawId)
374  continue;
375 
376  unsigned int subDetId = detId.subdetId();
378  edm::LogError("NearByPixelClustersAnalyzer")
379  << "ERROR: not a pixel cluster!!!" << std::endl; // should not happen
380  continue;
381  }
382 
383  const PixelGeomDetUnit* pixdet = (const PixelGeomDetUnit*)trackerGeometry_->idToDetUnit(detId);
384  edmNew::DetSet<SiPixelCluster>::const_iterator itCluster = itClusterSet->begin();
385  for (; itCluster != itClusterSet->end(); ++itCluster) {
386  LocalPoint lp(itCluster->x(), itCluster->y(), 0.);
387  PixelClusterParameterEstimator::ReturnType params = pixelCPE_->getParameters(*itCluster, *pixdet);
388  lp = std::get<0>(params);
389 
390  float D = sqrt((lp.x() - traj_lx) * (lp.x() - traj_lx) + (lp.y() - traj_ly) * (lp.y() - traj_ly));
391  if (D < minD) {
392  minD = D;
393  loc.first = (lp.x() - traj_lx);
394  loc.second = (lp.y() - traj_ly);
395  }
396  } // loop on cluster sets
397  }
398  return loc;
399 }
400 
402  const SiPixelClusterCollectionNew& clusterCollection = *handle;
403  SiPixelClusterCollectionNew::const_iterator itClusterSet = clusterCollection.begin();
404 
405  for (; itClusterSet != clusterCollection.end(); itClusterSet++) {
406  DetId detId(itClusterSet->id());
407 
408  edmNew::DetSet<SiPixelCluster>::const_iterator itCluster = itClusterSet->begin();
409  for (; itCluster != itClusterSet->end(); ++itCluster) {
410  const std::vector<SiPixelCluster::Pixel> pixelsVec = (*itCluster).pixels();
411  for (unsigned int i = 0; i < pixelsVec.size(); ++i) {
412  float pixx = pixelsVec[i].x; // index as float=iteger, row index
413  float pixy = pixelsVec[i].y; // same, col index
414  float pixel_charge = pixelsVec[i].adc;
415  histoMap_[detId.rawId()]->Fill(pixy, pixx, pixel_charge);
416  }
417  }
418  }
419 }
420 
421 // ------------ method called for each run ------------------------------------------
423 /*-----------------------------------------------------------------------------------*/
424 {
425  edm::LogInfo("NearbyPixelClustersAnalyzer")
426  << "@SUB=NearbyPixelClustersAnalyzer::beginRun() before booking histoMap_.size(): " << histoMap_.size()
427  << std::endl;
428 
429  const TrackerTopology* tTopo_ = &iSetup.getData(topoEsTokenBR_);
430  const TrackerGeometry* pDD_ = &iSetup.getData(geomEsTokenBR_);
431 
433  phase_ = true;
434  } else {
435  phase_ = false;
436  }
437 
438  unsigned nPixelDets = 0;
439  for (const auto& it : pDD_->detUnits()) {
440  const PixelGeomDetUnit* mit = dynamic_cast<PixelGeomDetUnit const*>(it);
441  if (mit != nullptr) {
442  nPixelDets++;
443  }
444  }
445 
446  const auto& detIds = reader_.getAllDetIds();
447  if (detIds.size() != nPixelDets) {
448  throw cms::Exception("Inconsistent Data")
449  << "The size of the detId list specified from file (" << detIds.size()
450  << ") differs from the one in TrackerGeometry (" << nPixelDets << ")! Please cross-check" << std::endl;
451  }
452 
453  for (const auto& it : detIds) {
454  auto topolInfo = setTopoInfo(it, tTopo_);
455 
456  std::string thePart = std::get<0>(topolInfo);
457 
458  // book the TFileDirectory if it's not already done
459  if (!outputFolders_.count(thePart)) {
460  LogDebug("NearbyPixelClustersAnalyzer") << "booking " << thePart << std::endl;
461  outputFolders_[thePart] = fs->mkdir(thePart);
462  }
463  }
464 
465  if (histoMap_.empty()) {
467  }
468 
469  edm::LogInfo("NearbyPixelClusterAnalyzer")
470  << "@SUB=NearbyPixelClusterAnalyzer::beginRun() After booking histoMap_.size(): " << histoMap_.size()
471  << std::endl;
472 }
473 
474 // ------------ method called to determine the topology ------------
475 std::tuple<std::string, int, int, int> NearbyPixelClustersAnalyzer::setTopoInfo(uint32_t detId,
476  const TrackerTopology* tTopo)
477 /*-----------------------------------------------------------------------------------*/
478 {
479  int subdetId_(-999), layer_(-999), side_(-999);
480  std::string ret = "";
481 
482  subdetId_ = DetId(detId).subdetId();
483  switch (subdetId_) {
484  case PixelSubdetector::PixelBarrel: // PXB
485  layer_ = tTopo->pxbLayer(detId);
486  side_ = 0;
487  ret += Form("BPix_Layer%i", layer_);
488  break;
490  side_ = tTopo->pxfSide(detId);
491  layer_ = tTopo->pxfDisk(detId);
492  ret += ("FPix_");
493  ret += (side_ == 1) ? Form("P_disk%i", layer_) : Form("M_disk%i", layer_);
494  break;
495  default:
496  edm::LogError("NearbyPixelClusterAnalyzer") << "we should never be here!" << std::endl;
497  break;
498  }
499 
500  return std::make_tuple(ret, subdetId_, layer_, side_);
501 }
502 
503 /* ------------ method called once to book all the module level histograms ---------*/
505 /*-----------------------------------------------------------------------------------*/
506 {
507  std::map<uint32_t, TH2F*> hd;
508 
509  const auto& detIds = reader_.getAllDetIds();
510  for (const auto& it : detIds) {
511  // check if det id is correct and if it is actually cabled in the detector
512  if (it == 0 || it == 0xFFFFFFFF) {
513  edm::LogError("DetIdNotGood") << "@SUB=analyze"
514  << "Wrong det id: " << it << " ... neglecting!" << std::endl;
515  continue;
516  }
517 
518  auto topolInfo = setTopoInfo(it, tTopo_);
519  std::string thePart = std::get<0>(topolInfo);
520 
521  unsigned int nCols = reader_.getDetUnitDimensions(it).first;
522  unsigned int nRows = reader_.getDetUnitDimensions(it).second;
523 
524  int subdetId = DetId(it).subdetId();
525 
527  : PixelEndcapName(it, tTopo_, phase_).name();
528 
529  hd[it] = outputFolders_[thePart].make<TH2F>(
530  Form("ClusterFrame_%s", moduleName.c_str()),
531  Form("Cluster Map for module %s;n. cols;n. rows;pixel charge [ADC counts]", moduleName.c_str()),
532  nCols,
533  0,
534  nCols,
535  nRows,
536  0,
537  nRows);
538  }
539 
540  return hd;
541 }
542 
543 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
546  desc.setComment("Analysis of the closebyPixelClusters collections");
547  desc.add<edm::InputTag>("clusterCollection", edm::InputTag("ALCARECOSiPixelCalSingleMuonTight"));
548  desc.add<edm::InputTag>("nearByClusterCollection", edm::InputTag("closebyPixelClusters"));
549  desc.add<edm::InputTag>("trajectoryInput", edm::InputTag("refittedTracks"));
550  desc.add<edm::InputTag>("muonTracks", edm::InputTag("ALCARECOSiPixelCalSingleMuonTight"));
551  desc.add<edm::InputTag>("distToTrack", edm::InputTag("trackDistances"));
552  desc.add<std::string>("skimmedGeometryPath",
553  "SLHCUpgradeSimulations/Geometry/data/PhaseI/PixelSkimmedGeometry_phase1.txt");
554  descriptions.addWithDefaultLabel(desc);
555 }
556 
557 //define this as a plug-in
SiPixelDetInfoFileReader::getAllDetIds
const std::vector< uint32_t > & getAllDetIds() const
Definition: SiPixelDetInfoFileReader.cc:85
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:543
TrajectoryStateCombiner.h
NearbyPixelClustersAnalyzer::h_nCloseByClusters
TH1I * h_nCloseByClusters
Definition: NearbyPixelClustersAnalyzer.cc:104
NearbyPixelClustersAnalyzer::setTopoInfo
std::tuple< std::string, int, int, int > setTopoInfo(uint32_t detId, const TrackerTopology *tTopo)
Definition: NearbyPixelClustersAnalyzer.cc:475
PixelClusterParameterEstimator
Definition: PixelClusterParameterEstimator.h:15
counter
Definition: counter.py:1
TrajectoryStateOnSurface.h
EDAnalyzer.h
mps_fire.i
i
Definition: mps_fire.py:428
PixelSubdetector.h
FreeTrajectoryState.h
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
PixelBarrelName.h
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
NearbyPixelClustersAnalyzer::h_distClosestMissing
TH1F * h_distClosestMissing
Definition: NearbyPixelClustersAnalyzer.cc:106
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
TrackerGeometry.h
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
PixelTopology.h
ESInputTag
sistrip::View
View
Definition: ConstantsForView.h:26
custom_jme_cff.nMuons
nMuons
Definition: custom_jme_cff.py:148
TrackerTopology::pxfSide
unsigned int pxfSide(const DetId &id) const
Definition: TrackerTopology.h:192
muon
Definition: MuonCocktails.h:17
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
patZpeak.handle
handle
Definition: patZpeak.py:23
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
edm::Run
Definition: Run.h:45
edm::EDGetTokenT
Definition: EDGetToken.h:33
contentValuesFiles.fullPath
fullPath
Definition: contentValuesFiles.py:64
NearbyPixelClustersAnalyzer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: NearbyPixelClustersAnalyzer.cc:544
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
NearbyPixelClustersAnalyzer::countClusters
void countClusters(const edm::Handle< SiPixelClusterCollectionNew > &handle, unsigned int &nClusGlobal)
Definition: NearbyPixelClustersAnalyzer.cc:341
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
PixelClusterParameterEstimator.h
SiPixelCluster.h
NearbyPixelClustersAnalyzer::outputFolders_
std::map< std::string, TFileDirectory > outputFolders_
Definition: NearbyPixelClustersAnalyzer.cc:111
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
PixelBarrelName
Definition: PixelBarrelName.h:16
edmNew::DetSetVector::const_iterator
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetSetVectorNew.h:197
edmNew::DetSetVector::begin
const_iterator begin(bool update=false) const
Definition: DetSetVectorNew.h:545
TransientTrackingRecHit.h
NearbyPixelClustersAnalyzer::phase_
bool phase_
Definition: NearbyPixelClustersAnalyzer.cc:113
TFileDirectory
Definition: TFileDirectory.h:24
NearbyPixelClustersAnalyzer::bookModuleHistograms
std::map< uint32_t, TH2F * > bookModuleHistograms(const TrackerTopology *tTopo)
Definition: NearbyPixelClustersAnalyzer.cc:504
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
edm::Handle
Definition: AssociativeIterator.h:50
NearbyPixelClustersAnalyzer::endRun
void endRun(edm::Run const &, edm::EventSetup const &) override
Definition: NearbyPixelClustersAnalyzer.cc:69
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
edm::Ref
Definition: AssociativeIterator.h:58
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
TrackerGeometry::idToDetUnit
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: TrackerGeometry.cc:183
NearbyPixelClustersAnalyzer::h_nALCARECOClusters
TH1I * h_nALCARECOClusters
Definition: NearbyPixelClustersAnalyzer.cc:103
DetId
Definition: DetId.h:17
SiPixelDetInfoFileReader
Definition: SiPixelDetInfoFileReader.h:28
PixelBarrelName::name
std::string name() const override
from base class
Definition: PixelBarrelName.cc:731
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
edmNew::DetSet::end
iterator end()
Definition: DetSetNew.h:56
MakerMacros.h
TrackerTopology.h
NearbyPixelClustersAnalyzer
Definition: NearbyPixelClustersAnalyzer.cc:58
Track.h
PixelEndcapName
Definition: PixelEndcapName.h:16
TrackFwd.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
NearbyPixelClustersAnalyzer::geomEsTokenBR_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomEsTokenBR_
Definition: NearbyPixelClustersAnalyzer.cc:92
TrajectoryMeasurement::backwardPredictedState
TrajectoryStateOnSurface const & backwardPredictedState() const
Access to backward predicted state (from smoother)
Definition: TrajectoryMeasurement.h:179
NearbyPixelClustersAnalyzer::endJob
void endJob() override
Definition: NearbyPixelClustersAnalyzer.cc:298
TrackerGeometry::detUnits
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: TrackerGeometry.h:61
GeomDetEnumerators::P1PXEC
Definition: GeomDetEnumerators.h:26
Service.h
TrajectoryMeasurement::forwardPredictedState
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
Definition: TrajectoryMeasurement.h:177
PixelGeomDetUnit
Definition: PixelGeomDetUnit.h:15
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
NearbyPixelClustersAnalyzer::clustersToken_
edm::EDGetTokenT< SiPixelClusterCollectionNew > clustersToken_
Definition: NearbyPixelClustersAnalyzer.cc:95
Point3DBase< float, LocalTag >
SiPixelRecHit.h
TrackerGeometry::isThere
bool isThere(GeomDetEnumerators::SubDetector subdet) const
Definition: TrackerGeometry.cc:219
TrajTrackAssociation.h
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
NearbyPixelClustersAnalyzer::fs
edm::Service< TFileService > fs
Definition: NearbyPixelClustersAnalyzer.cc:101
NearbyPixelClustersAnalyzer::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: NearbyPixelClustersAnalyzer.cc:422
TFileService.h
TFileService::mkdir
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
GeomDetEnumerators::P1PXB
Definition: GeomDetEnumerators.h:25
TrackerDigiGeometryRecord.h
TrajectoryStateCombiner
Definition: TrajectoryStateCombiner.h:13
TrajectoryStateOnSurface::localPosition
LocalPoint localPosition() const
Definition: TrajectoryStateOnSurface.h:74
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Transition
Transition
Definition: Transition.h:12
DetId::Tracker
Definition: DetId.h:25
Event.h
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > >
TrackingRecHit::missing
Definition: TrackingRecHit.h:47
NearbyPixelClustersAnalyzer::histoMap_
std::map< uint32_t, TH2F * > histoMap_
Definition: NearbyPixelClustersAnalyzer.cc:112
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
TrackingRecHit::ConstRecHitPointer
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
Definition: TrackingRecHit.h:25
edm::Service< TFileService >
iEvent
int iEvent
Definition: GenABIO.cc:224
EcalCalibMonitorClient_cfi.moduleName
moduleName
Definition: EcalCalibMonitorClient_cfi.py:17
NearbyPixelClustersAnalyzer::h_distClosestTrack
TH1F * h_distClosestTrack
Definition: NearbyPixelClustersAnalyzer.cc:108
NearbyPixelClustersAnalyzer::distanceToken_
edm::EDGetTokenT< edm::ValueMap< std::vector< float > > > distanceToken_
Definition: NearbyPixelClustersAnalyzer.cc:98
TrackerTopology::pxfDisk
unsigned int pxfDisk(const DetId &id) const
Definition: TrackerTopology.h:446
NearbyPixelClustersAnalyzer::beginJob
void beginJob() override
Definition: NearbyPixelClustersAnalyzer.cc:261
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
NearbyPixelClustersAnalyzer::nearByClustersToken_
edm::EDGetTokenT< SiPixelClusterCollectionNew > nearByClustersToken_
Definition: NearbyPixelClustersAnalyzer.cc:96
edm::EventSetup
Definition: EventSetup.h:58
DetSetVector.h
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
GeometricDet.h
NearbyPixelClustersAnalyzer::~NearbyPixelClustersAnalyzer
~NearbyPixelClustersAnalyzer() override=default
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord >
NearbyPixelClustersAnalyzer::pixelCPEEsToken_
const edm::ESGetToken< PixelClusterParameterEstimator, TkPixelCPERecord > pixelCPEEsToken_
Definition: NearbyPixelClustersAnalyzer.cc:91
TrackingRecHit::valid
Definition: TrackingRecHit.h:46
SiPixelDetInfoFileReader.h
NearbyPixelClustersAnalyzer::reader_
SiPixelDetInfoFileReader reader_
Definition: NearbyPixelClustersAnalyzer.cc:110
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
NearbyPixelClustersAnalyzer::detidIsOnPixel
bool detidIsOnPixel(const DetId &detid)
Definition: NearbyPixelClustersAnalyzer.cc:303
edmNew::DetSetVector
Definition: DetSetNew.h:13
funct::D
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
std
Definition: JetResolutionObject.h:76
NearbyPixelClustersAnalyzer::geomEsToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomEsToken_
Definition: NearbyPixelClustersAnalyzer.cc:90
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
NearbyPixelClustersAnalyzer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: NearbyPixelClustersAnalyzer.cc:140
DetId.h
Frameworkfwd.h
edmNew::DetSetVector::end
const_iterator end(bool update=false) const
Definition: DetSetVectorNew.h:550
Exception
Definition: hltDiff.cc:245
NearbyPixelClustersAnalyzer::h_distClosestInactive
TH1F * h_distClosestInactive
Definition: NearbyPixelClustersAnalyzer.cc:107
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
TFileDirectory::make
T * make(const Args &...args) const
make new ROOT object
Definition: TFileDirectory.h:53
PixelGeomDetUnit.h
NearbyPixelClustersAnalyzer::topoEsTokenBR_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoEsTokenBR_
Definition: NearbyPixelClustersAnalyzer.cc:93
GeomDetEnumerators::subDetId
constexpr unsigned int subDetId[21]
Definition: GeomDetEnumerators.h:34
NearbyPixelClustersAnalyzer::getTrajectoryStateOnSurface
TrajectoryStateOnSurface getTrajectoryStateOnSurface(const TrajectoryMeasurement &measurement)
Definition: NearbyPixelClustersAnalyzer.cc:316
PixelClusterParameterEstimator::getParameters
virtual ReturnType getParameters(const SiPixelCluster &cl, const GeomDetUnit &det) const =0
edm::RefToBase< reco::Track >
NearbyPixelClustersAnalyzer::h_distClosestValid
TH1F * h_distClosestValid
Definition: NearbyPixelClustersAnalyzer.cc:105
TkPixelCPERecord.h
edm::Ref::key
key_type key() const
Accessor for product key.
Definition: Ref.h:250
TrackingRecHit::inactive
Definition: TrackingRecHit.h:48
NearbyPixelClustersAnalyzer::fillClusterFrames
void fillClusterFrames(const edm::Handle< SiPixelClusterCollectionNew > &handle)
Definition: NearbyPixelClustersAnalyzer.cc:401
NearbyPixelClustersAnalyzer::muonTracksToken_
edm::EDGetTokenT< edm::View< reco::Track > > muonTracksToken_
Definition: NearbyPixelClustersAnalyzer.cc:99
ParameterSet.h
sistrip::layer_
static const char layer_[]
Definition: ConstantsForGranularity.h:30
PixelEndcapName::name
std::string name() const override
from base class
Definition: PixelEndcapName.cc:365
NearbyPixelClustersAnalyzer::trajTrackCollectionToken_
edm::EDGetTokenT< TrajTrackAssociationCollection > trajTrackCollectionToken_
Definition: NearbyPixelClustersAnalyzer.cc:97
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
SiPixelDetInfoFileReader::getDetUnitDimensions
const std::pair< int, int > & getDetUnitDimensions(uint32_t detId) const
Definition: SiPixelDetInfoFileReader.cc:89
edm::Event
Definition: Event.h:73
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7746
TrajectoryMeasurement
Definition: TrajectoryMeasurement.h:25
NearbyPixelClustersAnalyzer::findClosestCluster
std::pair< float, float > findClosestCluster(const edm::Handle< SiPixelClusterCollectionNew > &handle, const PixelClusterParameterEstimator *pixelCPE_, const TrackerGeometry *trackerGeometry_, uint32_t rawId, float traj_lx, float traj_ly)
Definition: NearbyPixelClustersAnalyzer.cc:355
StreamID.h
DetSetVectorNew.h
edm::InputTag
Definition: InputTag.h:15
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
NearbyPixelClustersAnalyzer::NearbyPixelClustersAnalyzer
NearbyPixelClustersAnalyzer(const edm::ParameterSet &)
Definition: NearbyPixelClustersAnalyzer.cc:119
edm::ConfigurationDescriptions::addWithDefaultLabel
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:87
PixelClusterParameterEstimator::ReturnType
std::tuple< LocalPoint, LocalError, SiPixelRecHitQuality::QualWordType > ReturnType
Definition: PixelClusterParameterEstimator.h:22
PixelEndcapName.h
TrackerGeometry
Definition: TrackerGeometry.h:14
edmNew::DetSet::const_iterator
const data_type * const_iterator
Definition: DetSetNew.h:31