CMS 3D CMS Logo

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

#include <Validation/MtdValidation/plugins/BtlRecHitsValidation.cc>

Inheritance diagram for BtlRecHitsValidation:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 BtlRecHitsValidation (const edm::ParameterSet &)
 
 ~BtlRecHitsValidation () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 

Private Attributes

edm::EDGetTokenT< FTLRecHitCollectionbtlRecHitsToken_
 
const std::string folder_
 
MonitorElementmeHitEnergy_
 
MonitorElementmeHitEta_
 
MonitorElementmeHitEvsEta_
 
MonitorElementmeHitEvsPhi_
 
MonitorElementmeHitEvsZ_
 
MonitorElementmeHitPhi_
 
MonitorElementmeHitTime_
 
MonitorElementmeHitTvsE_
 
MonitorElementmeHitTvsEta_
 
MonitorElementmeHitTvsPhi_
 
MonitorElementmeHitTvsZ_
 
MonitorElementmeHitX_
 
MonitorElementmeHitY_
 
MonitorElementmeHitZ_
 
MonitorElementmeNhits_
 
MonitorElementmeOccupancy_
 

Detailed Description

Description: BTL RECO hits validation

Implementation: [Notes on implementation]

Definition at line 36 of file BtlRecHitsValidation.cc.

Constructor & Destructor Documentation

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

Definition at line 79 of file BtlRecHitsValidation.cc.

References btlRecHitsToken_, and edm::ParameterSet::getParameter().

80  : folder_(iConfig.getParameter<std::string>("folder")) {
81  btlRecHitsToken_ = consumes<FTLRecHitCollection>(iConfig.getParameter<edm::InputTag>("inputTag"));
82 }
T getParameter(std::string const &) const
const std::string folder_
edm::EDGetTokenT< FTLRecHitCollection > btlRecHitsToken_
BtlRecHitsValidation::~BtlRecHitsValidation ( )
override

Definition at line 84 of file BtlRecHitsValidation.cc.

84 {}

Member Function Documentation

void BtlRecHitsValidation::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 87 of file BtlRecHitsValidation.cc.

References btlRecHitsToken_, BTLDetId::column(), TauDecayModes::dec, Exception, MonitorElement::Fill(), BTLDetId::geographicalId(), relativeConstraints::geom, edm::EventSetup::get(), edm::Event::getHandle(), MTDTopology::getMTDTopologyMode(), MTDGeometry::idToDet(), edm::makeValid(), meHitEnergy_, meHitEta_, meHitEvsEta_, meHitEvsPhi_, meHitEvsZ_, meHitPhi_, meHitTime_, meHitTvsE_, meHitTvsEta_, meHitTvsPhi_, meHitTvsZ_, meHitX_, meHitY_, meHitZ_, meNhits_, meOccupancy_, RectangularMTDTopology::nrows(), RectangularMTDTopology::pixelToModuleLocalPoint(), edm::ESHandle< T >::product(), DetId::rawId(), rpcPointValidation_cfi::recHit, BTLDetId::row(), ProxyMTDTopology::specificTopology(), GeomDet::toGlobal(), GeomDet::topology(), and ecaldqm::topology().

87  {
88  using namespace edm;
89 
90  edm::ESHandle<MTDGeometry> geometryHandle;
91  iSetup.get<MTDDigiGeometryRecord>().get(geometryHandle);
92  const MTDGeometry* geom = geometryHandle.product();
93 
94  edm::ESHandle<MTDTopology> topologyHandle;
95  iSetup.get<MTDTopologyRcd>().get(topologyHandle);
96  const MTDTopology* topology = topologyHandle.product();
97 
98  auto btlRecHitsHandle = makeValid(iEvent.getHandle(btlRecHitsToken_));
99 
100  // --- Loop over the BLT RECO hits
101 
102  unsigned int n_reco_btl = 0;
103 
104  for (const auto& recHit : *btlRecHitsHandle) {
105  BTLDetId detId = recHit.id();
106  DetId geoId = detId.geographicalId(static_cast<BTLDetId::CrysLayout>(topology->getMTDTopologyMode()));
107  const MTDGeomDet* thedet = geom->idToDet(geoId);
108  if (thedet == nullptr)
109  throw cms::Exception("BtlRecHitsValidation") << "GeographicalID: " << std::hex << geoId.rawId() << " ("
110  << detId.rawId() << ") is invalid!" << std::dec << std::endl;
111  const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(thedet->topology());
112  const RectangularMTDTopology& topo = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
113 
114  Local3DPoint local_point(0., 0., 0.);
115  local_point = topo.pixelToModuleLocalPoint(local_point, detId.row(topo.nrows()), detId.column(topo.nrows()));
116  const auto& global_point = thedet->toGlobal(local_point);
117 
118  meHitEnergy_->Fill(recHit.energy());
119  meHitTime_->Fill(recHit.time());
120 
121  meOccupancy_->Fill(global_point.z(), global_point.phi());
122 
123  meHitX_->Fill(global_point.x());
124  meHitY_->Fill(global_point.y());
125  meHitZ_->Fill(global_point.z());
126  meHitPhi_->Fill(global_point.phi());
127  meHitEta_->Fill(global_point.eta());
128 
129  meHitTvsE_->Fill(recHit.energy(), recHit.time());
130  meHitEvsPhi_->Fill(global_point.phi(), recHit.energy());
131  meHitEvsEta_->Fill(global_point.eta(), recHit.energy());
132  meHitEvsZ_->Fill(global_point.z(), recHit.energy());
133  meHitTvsPhi_->Fill(global_point.phi(), recHit.time());
134  meHitTvsEta_->Fill(global_point.eta(), recHit.time());
135  meHitTvsZ_->Fill(global_point.z(), recHit.time());
136 
137  n_reco_btl++;
138 
139  } // recHit loop
140 
141  meNhits_->Fill(n_reco_btl);
142 }
MonitorElement * meHitEnergy_
CaloTopology const * topology(0)
MonitorElement * meHitEvsZ_
virtual const Topology & topology() const
Definition: GeomDet.cc:81
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
MonitorElement * meHitPhi_
int getMTDTopologyMode() const
Definition: MTDTopology.h:74
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
MonitorElement * meHitTime_
int nrows() const override
void Fill(long long x)
MonitorElement * meOccupancy_
MonitorElement * meHitEta_
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Definition: Event.h:539
const MTDGeomDet * idToDet(DetId) const override
Definition: MTDGeometry.cc:184
BTLDetId geographicalId(CrysLayout lay) const
Definition: BTLDetId.cc:162
MonitorElement * meHitTvsPhi_
MonitorElement * meHitEvsPhi_
virtual const PixelTopology & specificTopology() const
LocalPoint pixelToModuleLocalPoint(const LocalPoint &plp, int row, int col) const
Definition: DetId.h:18
edm::EDGetTokenT< FTLRecHitCollection > btlRecHitsToken_
HLT enums.
T get() const
Definition: EventSetup.h:71
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
Definition: BTLDetId.h:18
int column(unsigned nrows=16) const
Definition: BTLDetId.h:110
MonitorElement * meHitTvsE_
auto makeValid(const U &iOtherHandleType) noexcept(false)
Definition: ValidHandle.h:59
MonitorElement * meHitEvsEta_
T const * product() const
Definition: ESHandle.h:86
MonitorElement * meHitTvsEta_
MonitorElement * meHitTvsZ_
int row(unsigned nrows=16) const
Definition: BTLDetId.h:105
void BtlRecHitsValidation::bookHistograms ( DQMStore::IBooker ibook,
edm::Run const &  run,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 145 of file BtlRecHitsValidation.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookProfile(), folder_, meHitEnergy_, meHitEta_, meHitEvsEta_, meHitEvsPhi_, meHitEvsZ_, meHitPhi_, meHitTime_, meHitTvsE_, meHitTvsEta_, meHitTvsPhi_, meHitTvsZ_, meHitX_, meHitY_, meHitZ_, meNhits_, meOccupancy_, and DQMStore::IBooker::setCurrentFolder().

147  {
148  ibook.setCurrentFolder(folder_);
149 
150  // --- histograms booking
151 
152  meNhits_ = ibook.book1D("BtlNhits", "Number of BTL RECO hits;N_{RECO}", 100, 0., 5000.);
153 
154  meHitEnergy_ = ibook.book1D("BtlHitEnergy", "BTL RECO hits energy;E_{RECO} [MeV]", 100, 0., 20.);
155  meHitTime_ = ibook.book1D("BtlHitTime", "BTL RECO hits ToA;ToA_{RECO} [ns]", 100, 0., 25.);
156 
157  meOccupancy_ = ibook.book2D(
158  "BtlOccupancy", "BTL RECO hits occupancy;Z_{RECO} [cm]; #phi_{RECO} [rad]", 65, -260., 260., 126, -3.15, 3.15);
159 
160  meHitX_ = ibook.book1D("BtlHitX", "BTL RECO hits X;X_{RECO} [cm]", 60, -120., 120.);
161  meHitY_ = ibook.book1D("BtlHitY", "BTL RECO hits Y;Y_{RECO} [cm]", 60, -120., 120.);
162  meHitZ_ = ibook.book1D("BtlHitZ", "BTL RECO hits Z;Z_{RECO} [cm]", 100, -260., 260.);
163  meHitPhi_ = ibook.book1D("BtlHitPhi", "BTL RECO hits #phi;#phi_{RECO} [rad]", 126, -3.15, 3.15);
164  meHitEta_ = ibook.book1D("BtlHitEta", "BTL RECO hits #eta;#eta_{RECO}", 100, -1.55, 1.55);
165 
166  meHitTvsE_ =
167  ibook.bookProfile("BtlHitTvsE", "BTL RECO ToA vs energy;E_{RECO} [MeV];ToA_{RECO} [ns]", 50, 0., 20., 0., 100.);
168  meHitEvsPhi_ = ibook.bookProfile(
169  "BtlHitEvsPhi", "BTL RECO energy vs #phi;#phi_{RECO} [rad];E_{RECO} [MeV]", 50, -3.15, 3.15, 0., 100.);
170  meHitEvsEta_ = ibook.bookProfile(
171  "BtlHitEvsEta", "BTL RECO energy vs #eta;#eta_{RECO};E_{RECO} [MeV]", 50, -1.55, 1.55, 0., 100.);
172  meHitEvsZ_ =
173  ibook.bookProfile("BtlHitEvsZ", "BTL RECO energy vs Z;Z_{RECO} [cm];E_{RECO} [MeV]", 50, -260., 260., 0., 100.);
174  meHitTvsPhi_ = ibook.bookProfile(
175  "BtlHitTvsPhi", "BTL RECO ToA vs #phi;#phi_{RECO} [rad];ToA_{RECO} [ns]", 50, -3.15, 3.15, 0., 100.);
176  meHitTvsEta_ =
177  ibook.bookProfile("BtlHitTvsEta", "BTL RECO ToA vs #eta;#eta_{RECO};ToA_{RECO} [ns]", 50, -1.6, 1.6, 0., 100.);
178  meHitTvsZ_ =
179  ibook.bookProfile("BtlHitTvsZ", "BTL RECO ToA vs Z;Z_{RECO} [cm];ToA_{RECO} [ns]", 50, -260., 260., 0., 100.);
180 }
MonitorElement * meHitEnergy_
const std::string folder_
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:113
MonitorElement * meHitEvsZ_
MonitorElement * meHitPhi_
MonitorElement * meHitTime_
MonitorElement * meOccupancy_
MonitorElement * meHitEta_
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * meHitTvsPhi_
MonitorElement * meHitEvsPhi_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * meHitTvsE_
MonitorElement * meHitEvsEta_
MonitorElement * meHitTvsEta_
MonitorElement * meHitTvsZ_
void BtlRecHitsValidation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 183 of file BtlRecHitsValidation.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), DEFINE_FWK_MODULE, and AlCaHLTBitMon_QueryRunRegistry::string.

183  {
185 
186  desc.add<std::string>("folder", "MTD/BTL/RecHits");
187  desc.add<edm::InputTag>("inputTag", edm::InputTag("mtdRecHits", "FTLBarrel"));
188 
189  descriptions.add("btlRecHits", desc);
190 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

edm::EDGetTokenT<FTLRecHitCollection> BtlRecHitsValidation::btlRecHitsToken_
private

Definition at line 52 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and BtlRecHitsValidation().

const std::string BtlRecHitsValidation::folder_
private

Definition at line 50 of file BtlRecHitsValidation.cc.

Referenced by bookHistograms().

MonitorElement* BtlRecHitsValidation::meHitEnergy_
private

Definition at line 58 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meHitEta_
private

Definition at line 67 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meHitEvsEta_
private

Definition at line 71 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meHitEvsPhi_
private

Definition at line 70 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meHitEvsZ_
private

Definition at line 72 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meHitPhi_
private

Definition at line 66 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meHitTime_
private

Definition at line 59 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meHitTvsE_
private

Definition at line 69 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meHitTvsEta_
private

Definition at line 74 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meHitTvsPhi_
private

Definition at line 73 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meHitTvsZ_
private

Definition at line 75 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meHitX_
private

Definition at line 63 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meHitY_
private

Definition at line 64 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meHitZ_
private

Definition at line 65 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meNhits_
private

Definition at line 56 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* BtlRecHitsValidation::meOccupancy_
private

Definition at line 61 of file BtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().