CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
Phase2ITMonitorRecHit Class Reference

#include <Phase2ITMonitorRecHit.cc>

Inheritance diagram for Phase2ITMonitorRecHit:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Classes

struct  RecHitME
 

Public Member Functions

void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
void bookHistograms (DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
 
void dqmBeginRun (const edm::Run &iRun, const edm::EventSetup &iSetup) override
 
 Phase2ITMonitorRecHit (const edm::ParameterSet &)
 
 ~Phase2ITMonitorRecHit () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 

Private Member Functions

void bookLayerHistos (DQMStore::IBooker &ibooker, unsigned int det_id, std::string &subdir)
 
void fillITHistos (const edm::Event &iEvent)
 

Private Attributes

edm::ParameterSet config_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordgeomToken_
 
std::string geomType_
 
MonitorElementglobalRZ_barrel_
 
MonitorElementglobalRZ_endcap_
 
MonitorElementglobalXY_barrel_
 
MonitorElementglobalXY_endcap_
 
std::map< std::string, RecHitMElayerMEs_
 
MonitorElementnumberRecHits_
 
const TrackerGeometrytkGeom_ = nullptr
 
const edm::EDGetTokenT< SiPixelRecHitCollectiontokenRecHitsIT_
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtopoToken_
 
const TrackerTopologytTopo_ = nullptr
 

Static Private Attributes

static constexpr float million = 1e6
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Description: Plugin for Phase2 RecHit validation

Definition at line 45 of file Phase2ITMonitorRecHit.cc.

Constructor & Destructor Documentation

◆ Phase2ITMonitorRecHit()

Phase2ITMonitorRecHit::Phase2ITMonitorRecHit ( const edm::ParameterSet iConfig)
explicit

Definition at line 88 of file Phase2ITMonitorRecHit.cc.

89  : config_(iConfig),
90  tokenRecHitsIT_(consumes<SiPixelRecHitCollection>(iConfig.getParameter<edm::InputTag>("rechitsSrc"))),
91  geomToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord, edm::Transition::BeginRun>()),
92  topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd, edm::Transition::BeginRun>()) {
93  edm::LogInfo("Phase2ITMonitorRecHit") << ">>> Construct Phase2ITMonitorRecHit ";
94 }

◆ ~Phase2ITMonitorRecHit()

Phase2ITMonitorRecHit::~Phase2ITMonitorRecHit ( )
override

Definition at line 96 of file Phase2ITMonitorRecHit.cc.

96  {
97  edm::LogInfo("Phase2ITMonitorRecHit") << ">>> Destroy Phase2ITMonitorRecHit ";
98 }

Member Function Documentation

◆ analyze()

void Phase2ITMonitorRecHit::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 100 of file Phase2ITMonitorRecHit.cc.

100 { fillITHistos(iEvent); }

References fillITHistos(), and iEvent.

◆ bookHistograms()

void Phase2ITMonitorRecHit::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 182 of file Phase2ITMonitorRecHit.cc.

184  {
185  std::string top_folder = config_.getParameter<std::string>("TopFolderName");
186  ibooker.cd();
187  edm::LogInfo("Phase2ITMonitorRecHit") << " Booking Histograms in : " << top_folder;
188  std::string dir = top_folder;
189  ibooker.setCurrentFolder(dir);
190  //Global histos for IT
192  phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("GlobalNumberRecHits"), ibooker);
193 
195  phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("GlobalPositionXY_PXB"), ibooker);
196 
198  phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("GlobalPositionRZ_PXB"), ibooker);
199 
201  phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("GlobalPositionXY_PXEC"), ibooker);
202 
204  phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("GlobalPositionRZ_PXEC"), ibooker);
205 
206  //Now book layer wise histos
207  edm::ESWatcher<TrackerDigiGeometryRecord> theTkDigiGeomWatcher;
208  if (theTkDigiGeomWatcher.check(iSetup)) {
209  edm::ESHandle<TrackerGeometry> geomHandle = iSetup.getHandle(geomToken_);
210  for (auto const& det_u : tkGeom_->detUnits()) {
211  //Always check TrackerNumberingBuilder before changing this part
212  if (!(det_u->subDetector() == GeomDetEnumerators::SubDetector::P2PXB ||
213  det_u->subDetector() == GeomDetEnumerators::SubDetector::P2PXEC))
214  continue;
215  unsigned int detId_raw = det_u->geographicalId().rawId();
216  edm::LogInfo("Phase2ITMonitorRecHit") << "Detid:" << detId_raw << "\tsubdet=" << det_u->subDetector()
217  << "\t key=" << phase2tkutil::getITHistoId(detId_raw, tTopo_) << std::endl;
218  bookLayerHistos(ibooker, detId_raw, dir);
219  }
220  }
221 }

References phase2tkutil::book1DFromPSet(), phase2tkutil::book2DFromPSet(), bookLayerHistos(), dqm::implementation::NavigatorBase::cd(), edm::ESWatcher< T >::check(), config_, TrackerGeometry::detUnits(), DeadROC_duringRun::dir, geomToken_, edm::EventSetup::getHandle(), phase2tkutil::getITHistoId(), edm::ParameterSet::getParameter(), globalRZ_barrel_, globalRZ_endcap_, globalXY_barrel_, globalXY_endcap_, numberRecHits_, GeomDetEnumerators::P2PXB, GeomDetEnumerators::P2PXEC, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, tkGeom_, and tTopo_.

◆ bookLayerHistos()

void Phase2ITMonitorRecHit::bookLayerHistos ( DQMStore::IBooker ibooker,
unsigned int  det_id,
std::string &  subdir 
)
private

Definition at line 223 of file Phase2ITMonitorRecHit.cc.

223  {
225  if (key.empty())
226  return;
227  if (layerMEs_.find(key) == layerMEs_.end()) {
228  ibooker.cd();
229  RecHitME local_histos;
230  ibooker.setCurrentFolder(subdir + "/" + key);
231  edm::LogInfo("Phase2ITMonitorRecHit") << " Booking Histograms in : " << (subdir + "/" + key);
232 
233  local_histos.numberRecHits =
234  phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("LocalNumberRecHits"), ibooker);
235 
236  local_histos.posX = phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("RecHitPosX"), ibooker);
237 
238  local_histos.posY = phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("RecHitPosY"), ibooker);
239 
240  local_histos.poserrX =
242 
243  local_histos.poserrY =
245 
246  local_histos.clusterSizeX =
247  phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("LocalClusterSizeX"), ibooker);
248 
249  local_histos.clusterSizeY =
250  phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("LocalClusterSizeY"), ibooker);
251 
252  local_histos.globalPosXY =
253  phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("GlobalPositionXY_perlayer"), ibooker);
254 
255  local_histos.globalPosRZ =
256  phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("GlobalPositionRZ_perlayer"), ibooker);
257 
258  local_histos.localPosXY =
260  layerMEs_.emplace(key, local_histos);
261  }
262 }

References phase2tkutil::book1DFromPSet(), phase2tkutil::book2DFromPSet(), phase2tkutil::bookProfile1DFromPSet(), dqm::implementation::NavigatorBase::cd(), Phase2ITMonitorRecHit::RecHitME::clusterSizeX, Phase2ITMonitorRecHit::RecHitME::clusterSizeY, config_, phase2tkutil::getITHistoId(), edm::ParameterSet::getParameter(), Phase2ITMonitorRecHit::RecHitME::globalPosRZ, Phase2ITMonitorRecHit::RecHitME::globalPosXY, crabWrapper::key, layerMEs_, Phase2ITMonitorRecHit::RecHitME::localPosXY, Phase2ITMonitorRecHit::RecHitME::numberRecHits, Phase2ITMonitorRecHit::RecHitME::poserrX, Phase2ITMonitorRecHit::RecHitME::poserrY, Phase2ITMonitorRecHit::RecHitME::posX, Phase2ITMonitorRecHit::RecHitME::posY, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and tTopo_.

Referenced by bookHistograms().

◆ dqmBeginRun()

void Phase2ITMonitorRecHit::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 175 of file Phase2ITMonitorRecHit.cc.

175  {
177  tkGeom_ = &(*geomHandle);
179  tTopo_ = tTopoHandle.product();
180 }

References geomToken_, edm::EventSetup::getHandle(), edm::ESHandle< T >::product(), tkGeom_, topoToken_, and tTopo_.

◆ fillDescriptions()

void Phase2ITMonitorRecHit::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 264 of file Phase2ITMonitorRecHit.cc.

264  {
265  // rechitMonitorIT
267  {
269  psd0.add<std::string>("name", "NumberRecHits");
270  psd0.add<std::string>("title", "NumberRecHits;Number of RecHits;");
271  psd0.add<double>("xmin", 0.0);
272  psd0.add<bool>("switch", true);
273  psd0.add<double>("xmax", 250000.0);
274  psd0.add<int>("NxBins", 250);
275  desc.add<edm::ParameterSetDescription>("GlobalNumberRecHits", psd0);
276  }
277  {
279  psd0.add<std::string>("name", "Global_Position_RZ_IT_barrel");
280  psd0.add<std::string>("title", "Global_Position_RZ_IT_barrel;z [mm];r [mm]");
281  psd0.add<double>("ymax", 300.0);
282  psd0.add<int>("NxBins", 1500);
283  psd0.add<int>("NyBins", 300);
284  psd0.add<bool>("switch", true);
285  psd0.add<double>("xmax", 3000.0);
286  psd0.add<double>("xmin", -3000.0);
287  psd0.add<double>("ymin", 0.0);
288  desc.add<edm::ParameterSetDescription>("GlobalPositionRZ_PXB", psd0);
289  }
290  {
292  psd0.add<std::string>("name", "Global_Position_XY_IT_barrel");
293  psd0.add<std::string>("title", "Global_Position_XY_IT_barrel;x [mm];y [mm];");
294  psd0.add<double>("ymax", 300.0);
295  psd0.add<int>("NxBins", 600);
296  psd0.add<int>("NyBins", 600);
297  psd0.add<bool>("switch", true);
298  psd0.add<double>("xmax", 300.0);
299  psd0.add<double>("xmin", -300.0);
300  psd0.add<double>("ymin", -300.0);
301  desc.add<edm::ParameterSetDescription>("GlobalPositionXY_PXB", psd0);
302  }
303  {
305  psd0.add<std::string>("name", "Global_Position_RZ_IT_endcap");
306  psd0.add<std::string>("title", "Global_Position_RZ_IT_endcap;z [mm];r [mm]");
307  psd0.add<double>("ymax", 300.0);
308  psd0.add<int>("NxBins", 1500);
309  psd0.add<int>("NyBins", 300);
310  psd0.add<bool>("switch", true);
311  psd0.add<double>("xmax", 3000.0);
312  psd0.add<double>("xmin", -3000.0);
313  psd0.add<double>("ymin", 0.0);
314  desc.add<edm::ParameterSetDescription>("GlobalPositionRZ_PXEC", psd0);
315  }
316  {
318  psd0.add<std::string>("name", "Global_Position_XY_IT_endcap");
319  psd0.add<std::string>("title", "Global_Position_XY_IT_endcap; x [mm]; y [mm]");
320  psd0.add<double>("ymax", 300.0);
321  psd0.add<int>("NxBins", 600);
322  psd0.add<int>("NyBins", 600);
323  psd0.add<bool>("switch", true);
324  psd0.add<double>("xmax", 300.0);
325  psd0.add<double>("xmin", -300.0);
326  psd0.add<double>("ymin", -300.0);
327  desc.add<edm::ParameterSetDescription>("GlobalPositionXY_PXEC", psd0);
328  }
329  //Per layer/ring histos
330  {
332  psd0.add<std::string>("name", "LocalNumberRecHits");
333  psd0.add<std::string>("title", "NumberRecHits;Number of RecHits;");
334  psd0.add<double>("xmin", 0.0);
335  psd0.add<bool>("switch", true);
336  psd0.add<double>("xmax", 150000.0);
337  psd0.add<int>("NxBins", 150);
338  desc.add<edm::ParameterSetDescription>("LocalNumberRecHits", psd0);
339  }
340  {
342  psd0.add<std::string>("name", "Global_Position_RZ");
343  psd0.add<std::string>("title", "Global_Position_RZ;z [mm];r [mm]");
344  psd0.add<double>("ymax", 300.0);
345  psd0.add<int>("NxBins", 1500);
346  psd0.add<int>("NyBins", 300);
347  psd0.add<bool>("switch", false);
348  psd0.add<double>("xmax", 3000.0);
349  psd0.add<double>("xmin", -3000.0);
350  psd0.add<double>("ymin", 0.0);
351  desc.add<edm::ParameterSetDescription>("GlobalPositionRZ_perlayer", psd0);
352  }
353  {
355  psd0.add<std::string>("name", "Global_Position_XY");
356  psd0.add<std::string>("title", "Global_Position_XY;x [mm]; y[mm]");
357  psd0.add<double>("ymax", 300.0);
358  psd0.add<int>("NxBins", 600);
359  psd0.add<int>("NyBins", 600);
360  psd0.add<bool>("switch", false);
361  psd0.add<double>("xmax", 300.0);
362  psd0.add<double>("xmin", -300.0);
363  psd0.add<double>("ymin", -300.0);
364  desc.add<edm::ParameterSetDescription>("GlobalPositionXY_perlayer", psd0);
365  }
366  {
368  psd0.add<std::string>("name", "Local_Position_XY");
369  psd0.add<std::string>("title", "Local_Position_XY; x; y");
370  psd0.add<double>("ymax", 0.0);
371  psd0.add<int>("NxBins", 500);
372  psd0.add<int>("NyBins", 500);
373  psd0.add<bool>("switch", true);
374  psd0.add<double>("xmax", 0.0);
375  psd0.add<double>("xmin", 0.0);
376  psd0.add<double>("ymin", 0.0);
377  desc.add<edm::ParameterSetDescription>("LocalPositionXY", psd0);
378  }
379  {
381  psd0.add<std::string>("name", "Cluster_SizeX");
382  psd0.add<std::string>("title", "Cluster_SizeX; cluster size x;");
383  psd0.add<double>("xmin", -0.5);
384  psd0.add<bool>("switch", true);
385  psd0.add<double>("xmax", 20.5);
386  psd0.add<int>("NxBins", 21);
387  desc.add<edm::ParameterSetDescription>("LocalClusterSizeX", psd0);
388  }
389  {
391  psd0.add<std::string>("name", "Cluster_SizeY");
392  psd0.add<std::string>("title", "Cluster_SizeY;cluster size y;");
393  psd0.add<double>("xmin", -0.5);
394  psd0.add<bool>("switch", true);
395  psd0.add<double>("xmax", 25.5);
396  psd0.add<int>("NxBins", 26);
397  desc.add<edm::ParameterSetDescription>("LocalClusterSizeY", psd0);
398  }
399  {
401  psd0.add<std::string>("name", "RecHit_X");
402  psd0.add<std::string>("title", "RecHit_X;RecHit position X dimension;");
403  psd0.add<double>("xmin", -2.5);
404  psd0.add<bool>("switch", true);
405  psd0.add<double>("xmax", 2.5);
406  psd0.add<int>("NxBins", 100);
407  desc.add<edm::ParameterSetDescription>("RecHitPosX", psd0);
408  }
409  {
411  psd0.add<std::string>("name", "RecHit_Y");
412  psd0.add<std::string>("title", "RecHit_Y;RecHit position X dimension;");
413  psd0.add<double>("xmin", -2.5);
414  psd0.add<bool>("switch", true);
415  psd0.add<double>("xmax", 2.5);
416  psd0.add<int>("NxBins", 100);
417  desc.add<edm::ParameterSetDescription>("RecHitPosY", psd0);
418  }
419  {
421  psd0.add<std::string>("name", "RecHit_X_error_Vs_eta");
422  psd0.add<std::string>("title", "RecHit_X_error_Vs_eta;#eta;x error [#mum]");
423  psd0.add<bool>("switch", true);
424  psd0.add<int>("NxBins", 82);
425  psd0.add<double>("xmax", 4.1);
426  psd0.add<double>("xmin", -4.1);
427  psd0.add<double>("ymax", 10.0);
428  psd0.add<double>("ymin", 0.);
429  desc.add<edm::ParameterSetDescription>("RecHitPosErrorX_Eta", psd0);
430  }
431  {
433  psd0.add<std::string>("name", "RecHit_Y_error_Vs_eta");
434  psd0.add<std::string>("title", "RecHit_Y_error_Vs_eta;#eta;y error [#mum]");
435  psd0.add<bool>("switch", true);
436  psd0.add<int>("NxBins", 82);
437  psd0.add<double>("xmax", 4.1);
438  psd0.add<double>("xmin", -4.1);
439  psd0.add<double>("ymax", 10.0);
440  psd0.add<double>("ymin", 0.);
441  desc.add<edm::ParameterSetDescription>("RecHitPosErrorY_Eta", psd0);
442  }
443  desc.add<std::string>("TopFolderName", "TrackerPhase2ITRecHit");
444  desc.add<edm::InputTag>("rechitsSrc", edm::InputTag("siPixelRecHits"));
445  descriptions.add("Phase2ITMonitorRecHit", desc);
446 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ fillITHistos()

void Phase2ITMonitorRecHit::fillITHistos ( const edm::Event iEvent)
private

Definition at line 102 of file Phase2ITMonitorRecHit.cc.

102  {
103  // Get the RecHits
105  iEvent.getByToken(tokenRecHitsIT_, rechits);
106  if (!rechits.isValid())
107  return;
108  std::map<std::string, unsigned int> nrechitLayerMap;
109  unsigned long int nTotrechitsinevt = 0;
110  // Loop over modules
111  for (const auto& DSViter : *rechits) {
112  // Get the detector id
113  unsigned int rawid(DSViter.detId());
114  DetId detId(rawid);
115  // Get the geomdet
116  const GeomDetUnit* geomDetunit(tkGeom_->idToDetUnit(detId));
117  if (!geomDetunit)
118  continue;
120  nTotrechitsinevt += DSViter.size();
121  auto counterDet = nrechitLayerMap.find(key);
122  if (nrechitLayerMap.find(key) == nrechitLayerMap.end()) {
123  nrechitLayerMap.emplace(key, DSViter.size());
124  } else
125  counterDet->second += DSViter.size();
126 
127  //loop over rechits for a single detId
128  for (const auto& rechit : DSViter) {
129  LocalPoint lp = rechit.localPosition();
130  Global3DPoint globalPos = geomDetunit->surface().toGlobal(lp);
131  //in mm
132  double gx = globalPos.x() * 10.;
133  double gy = globalPos.y() * 10.;
134  double gz = globalPos.z() * 10.;
135  double gr = globalPos.perp() * 10.;
136  //Fill global positions
137  if (geomDetunit->subDetector() == GeomDetEnumerators::SubDetector::P2PXB) {
138  globalXY_barrel_->Fill(gx, gy);
139  globalRZ_barrel_->Fill(gz, gr);
140  } else if (geomDetunit->subDetector() == GeomDetEnumerators::SubDetector::P2PXEC) {
141  globalXY_endcap_->Fill(gx, gy);
142  globalRZ_endcap_->Fill(gz, gr);
143  }
144  //layer wise histo
145  if (layerMEs_[key].clusterSizeX)
146  layerMEs_[key].clusterSizeX->Fill(rechit.cluster()->sizeX());
147  if (layerMEs_[key].clusterSizeY)
148  layerMEs_[key].clusterSizeY->Fill(rechit.cluster()->sizeY());
149  if (layerMEs_[key].globalPosXY)
150  layerMEs_[key].globalPosXY->Fill(gx, gy);
151  if (layerMEs_[key].globalPosRZ)
152  layerMEs_[key].globalPosRZ->Fill(gz, gr);
153  if (layerMEs_[key].localPosXY)
154  layerMEs_[key].localPosXY->Fill(lp.x(), lp.y());
155  if (layerMEs_[key].posX)
156  layerMEs_[key].posX->Fill(lp.x());
157  if (layerMEs_[key].posY)
158  layerMEs_[key].posY->Fill(lp.y());
159  float eta = geomDetunit->surface().toGlobal(lp).eta();
160  if (layerMEs_[key].poserrX)
161  layerMEs_[key].poserrX->Fill(eta, million * rechit.localPositionError().xx());
162  if (layerMEs_[key].poserrY)
163  layerMEs_[key].poserrY->Fill(eta, million * rechit.localPositionError().yy());
164  } //end loop over rechits of a detId
165  } //End loop over DetSetVector
166 
167  //fill nRecHits per event
168  numberRecHits_->Fill(nTotrechitsinevt);
169  //fill nRecHit counter per layer
170  for (const auto& lme : nrechitLayerMap)
171  if (layerMEs_[lme.first].numberRecHits)
172  layerMEs_[lme.first].numberRecHits->Fill(lme.second);
173 }

References PVValHelper::eta, dqm::impl::MonitorElement::Fill(), phase2tkutil::getITHistoId(), globalRZ_barrel_, globalRZ_endcap_, globalXY_barrel_, globalXY_endcap_, TrackerGeometry::idToDetUnit(), iEvent, crabWrapper::key, layerMEs_, million, numberRecHits_, GeomDetEnumerators::P2PXB, GeomDetEnumerators::P2PXEC, PV3DBase< T, PVType, FrameType >::perp(), RecoTauValidation_cfi::posX, RecoTauValidation_cfi::posY, HI_PhotonSkim_cff::rechits, AlCaHLTBitMon_QueryRunRegistry::string, tkGeom_, tokenRecHitsIT_, tTopo_, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by analyze().

Member Data Documentation

◆ config_

edm::ParameterSet Phase2ITMonitorRecHit::config_
private

Definition at line 58 of file Phase2ITMonitorRecHit.cc.

Referenced by bookHistograms(), and bookLayerHistos().

◆ geomToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> Phase2ITMonitorRecHit::geomToken_
private

Definition at line 61 of file Phase2ITMonitorRecHit.cc.

Referenced by bookHistograms(), and dqmBeginRun().

◆ geomType_

std::string Phase2ITMonitorRecHit::geomType_
private

Definition at line 59 of file Phase2ITMonitorRecHit.cc.

◆ globalRZ_barrel_

MonitorElement* Phase2ITMonitorRecHit::globalRZ_barrel_
private

Definition at line 69 of file Phase2ITMonitorRecHit.cc.

Referenced by bookHistograms(), and fillITHistos().

◆ globalRZ_endcap_

MonitorElement* Phase2ITMonitorRecHit::globalRZ_endcap_
private

Definition at line 70 of file Phase2ITMonitorRecHit.cc.

Referenced by bookHistograms(), and fillITHistos().

◆ globalXY_barrel_

MonitorElement* Phase2ITMonitorRecHit::globalXY_barrel_
private

Definition at line 67 of file Phase2ITMonitorRecHit.cc.

Referenced by bookHistograms(), and fillITHistos().

◆ globalXY_endcap_

MonitorElement* Phase2ITMonitorRecHit::globalXY_endcap_
private

Definition at line 68 of file Phase2ITMonitorRecHit.cc.

Referenced by bookHistograms(), and fillITHistos().

◆ layerMEs_

std::map<std::string, RecHitME> Phase2ITMonitorRecHit::layerMEs_
private

Definition at line 84 of file Phase2ITMonitorRecHit.cc.

Referenced by bookLayerHistos(), and fillITHistos().

◆ million

constexpr float Phase2ITMonitorRecHit::million = 1e6
staticconstexprprivate

Definition at line 65 of file Phase2ITMonitorRecHit.cc.

Referenced by fillITHistos().

◆ numberRecHits_

MonitorElement* Phase2ITMonitorRecHit::numberRecHits_
private

Definition at line 66 of file Phase2ITMonitorRecHit.cc.

Referenced by bookHistograms(), and fillITHistos().

◆ tkGeom_

const TrackerGeometry* Phase2ITMonitorRecHit::tkGeom_ = nullptr
private

Definition at line 63 of file Phase2ITMonitorRecHit.cc.

Referenced by bookHistograms(), dqmBeginRun(), and fillITHistos().

◆ tokenRecHitsIT_

const edm::EDGetTokenT<SiPixelRecHitCollection> Phase2ITMonitorRecHit::tokenRecHitsIT_
private

Definition at line 60 of file Phase2ITMonitorRecHit.cc.

Referenced by fillITHistos().

◆ topoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> Phase2ITMonitorRecHit::topoToken_
private

Definition at line 62 of file Phase2ITMonitorRecHit.cc.

Referenced by dqmBeginRun().

◆ tTopo_

const TrackerTopology* Phase2ITMonitorRecHit::tTopo_ = nullptr
private
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
phase2tkutil::book1DFromPSet
MonitorElement * book1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
Definition: TrackerPhase2DQMUtil.cc:50
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
GeomDet
Definition: GeomDet.h:27
Phase2ITMonitorRecHit::globalRZ_barrel_
MonitorElement * globalRZ_barrel_
Definition: Phase2ITMonitorRecHit.cc:69
edm::ESWatcher< TrackerDigiGeometryRecord >
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
Phase2ITMonitorRecHit::million
static constexpr float million
Definition: Phase2ITMonitorRecHit.cc:65
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
Phase2ITMonitorRecHit::globalRZ_endcap_
MonitorElement * globalRZ_endcap_
Definition: Phase2ITMonitorRecHit.cc:70
Phase2ITMonitorRecHit::layerMEs_
std::map< std::string, RecHitME > layerMEs_
Definition: Phase2ITMonitorRecHit.cc:84
edm::Handle
Definition: AssociativeIterator.h:50
Phase2ITMonitorRecHit::tkGeom_
const TrackerGeometry * tkGeom_
Definition: Phase2ITMonitorRecHit.cc:63
Phase2ITMonitorRecHit::bookLayerHistos
void bookLayerHistos(DQMStore::IBooker &ibooker, unsigned int det_id, std::string &subdir)
Definition: Phase2ITMonitorRecHit.cc:223
TrackerGeometry::idToDetUnit
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: TrackerGeometry.cc:183
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
DetId
Definition: DetId.h:17
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
TrackerGeometry::detUnits
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: TrackerGeometry.h:61
PVValHelper::eta
Definition: PVValidationHelpers.h:70
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
edm::ESHandle< TrackerGeometry >
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
RecoTauValidation_cfi.posX
posX
Definition: RecoTauValidation_cfi.py:288
HI_PhotonSkim_cff.rechits
rechits
Definition: HI_PhotonSkim_cff.py:76
Phase2ITMonitorRecHit::tokenRecHitsIT_
const edm::EDGetTokenT< SiPixelRecHitCollection > tokenRecHitsIT_
Definition: Phase2ITMonitorRecHit.cc:60
Point3DBase< float, LocalTag >
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
phase2tkutil::book2DFromPSet
MonitorElement * book2DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
Definition: TrackerPhase2DQMUtil.cc:62
Phase2ITMonitorRecHit::tTopo_
const TrackerTopology * tTopo_
Definition: Phase2ITMonitorRecHit.cc:64
Phase2ITMonitorRecHit::numberRecHits_
MonitorElement * numberRecHits_
Definition: Phase2ITMonitorRecHit.cc:66
edm::ParameterSet
Definition: ParameterSet.h:47
Phase2ITMonitorRecHit::topoToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: Phase2ITMonitorRecHit.cc:62
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
Phase2ITMonitorRecHit::geomToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: Phase2ITMonitorRecHit.cc:61
Phase2ITMonitorRecHit::globalXY_barrel_
MonitorElement * globalXY_barrel_
Definition: Phase2ITMonitorRecHit.cc:67
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
phase2tkutil::getITHistoId
std::string getITHistoId(uint32_t det_id, const TrackerTopology *tTopo)
Definition: TrackerPhase2DQMUtil.cc:2
phase2tkutil::bookProfile1DFromPSet
MonitorElement * bookProfile1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
Definition: TrackerPhase2DQMUtil.cc:77
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Phase2ITMonitorRecHit::fillITHistos
void fillITHistos(const edm::Event &iEvent)
Definition: Phase2ITMonitorRecHit.cc:102
GeomDetEnumerators::P2PXB
Definition: GeomDetEnumerators.h:27
Phase2ITMonitorRecHit::config_
edm::ParameterSet config_
Definition: Phase2ITMonitorRecHit.cc:58
crabWrapper.key
key
Definition: crabWrapper.py:19
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
edm::InputTag
Definition: InputTag.h:15
Phase2ITMonitorRecHit::globalXY_endcap_
MonitorElement * globalXY_endcap_
Definition: Phase2ITMonitorRecHit.cc:68
RecoTauValidation_cfi.posY
posY
Definition: RecoTauValidation_cfi.py:289
GeomDetEnumerators::P2PXEC
Definition: GeomDetEnumerators.h:28
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23