CMS 3D CMS Logo

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

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

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

Public Member Functions

 EtlRecHitsValidation (const edm::ParameterSet &)
 
 ~EtlRecHitsValidation () 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< FTLRecHitCollectionetlRecHitsToken_
 
const std::string folder_
 
MonitorElementmeHitEnergy_ [2]
 
MonitorElementmeHitEta_ [2]
 
MonitorElementmeHitEvsEta_ [2]
 
MonitorElementmeHitEvsPhi_ [2]
 
MonitorElementmeHitPhi_ [2]
 
MonitorElementmeHitTime_ [2]
 
MonitorElementmeHitTvsE_ [2]
 
MonitorElementmeHitTvsEta_ [2]
 
MonitorElementmeHitTvsPhi_ [2]
 
MonitorElementmeHitX_ [2]
 
MonitorElementmeHitY_ [2]
 
MonitorElementmeHitZ_ [2]
 
MonitorElementmeNhits_ [2]
 
MonitorElementmeOccupancy_ [2]
 

Detailed Description

Description: ETL RECO hits validation

Implementation: [Notes on implementation]

Definition at line 32 of file EtlRecHitsValidation.cc.

Constructor & Destructor Documentation

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

Definition at line 73 of file EtlRecHitsValidation.cc.

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

74  : folder_(iConfig.getParameter<std::string>("folder")) {
75  etlRecHitsToken_ = consumes<FTLRecHitCollection>(iConfig.getParameter<edm::InputTag>("inputTag"));
76 }
T getParameter(std::string const &) const
const std::string folder_
edm::EDGetTokenT< FTLRecHitCollection > etlRecHitsToken_
EtlRecHitsValidation::~EtlRecHitsValidation ( )
override

Definition at line 78 of file EtlRecHitsValidation.cc.

78 {}

Member Function Documentation

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

Definition at line 81 of file EtlRecHitsValidation.cc.

References TauDecayModes::dec, etlRecHitsToken_, Exception, MonitorElement::Fill(), ETLDetId::geographicalId(), relativeConstraints::geom, edm::EventSetup::get(), edm::Event::getHandle(), MTDGeometry::idToDet(), PixelTopology::localX(), PixelTopology::localY(), edm::makeValid(), meHitEnergy_, meHitEta_, meHitEvsEta_, meHitEvsPhi_, meHitPhi_, meHitTime_, meHitTvsE_, meHitTvsEta_, meHitTvsPhi_, meHitX_, meHitY_, meHitZ_, meNhits_, meOccupancy_, edm::ESHandle< T >::product(), DetId::rawId(), rpcPointValidation_cfi::recHit, GeomDet::toGlobal(), GeomDet::topology(), and MTDDetId::zside().

81  {
82  using namespace edm;
83 
84  edm::ESHandle<MTDGeometry> geometryHandle;
85  iSetup.get<MTDDigiGeometryRecord>().get(geometryHandle);
86  const MTDGeometry* geom = geometryHandle.product();
87 
88  auto etlRecHitsHandle = makeValid(iEvent.getHandle(etlRecHitsToken_));
89 
90  // --- Loop over the ELT RECO hits
91 
92  unsigned int n_reco_etl[2] = {0, 0};
93 
94  for (const auto& recHit : *etlRecHitsHandle) {
95  ETLDetId detId = recHit.id();
96 
97  DetId geoId = detId.geographicalId();
98  const MTDGeomDet* thedet = geom->idToDet(geoId);
99  if (thedet == nullptr)
100  throw cms::Exception("EtlRecHitsValidation") << "GeographicalID: " << std::hex << geoId.rawId() << " ("
101  << detId.rawId() << ") is invalid!" << std::dec << std::endl;
102  const PixelTopology& topo = static_cast<const PixelTopology&>(thedet->topology());
103 
104  Local3DPoint local_point(topo.localX(recHit.row()), topo.localY(recHit.column()), 0.);
105  const auto& global_point = thedet->toGlobal(local_point);
106 
107  // --- Fill the histograms
108 
109  int idet = (detId.zside() + 1) / 2;
110 
111  meHitEnergy_[idet]->Fill(recHit.energy());
112  meHitTime_[idet]->Fill(recHit.time());
113 
114  meOccupancy_[idet]->Fill(global_point.x(), global_point.y());
115 
116  meHitX_[idet]->Fill(global_point.x());
117  meHitY_[idet]->Fill(global_point.y());
118  meHitZ_[idet]->Fill(global_point.z());
119  meHitPhi_[idet]->Fill(global_point.phi());
120  meHitEta_[idet]->Fill(global_point.eta());
121 
122  meHitTvsE_[idet]->Fill(recHit.energy(), recHit.time());
123  meHitEvsPhi_[idet]->Fill(global_point.phi(), recHit.energy());
124  meHitEvsEta_[idet]->Fill(global_point.eta(), recHit.energy());
125  meHitTvsPhi_[idet]->Fill(global_point.phi(), recHit.time());
126  meHitTvsEta_[idet]->Fill(global_point.eta(), recHit.time());
127 
128  n_reco_etl[idet]++;
129 
130  } // recHit loop
131 
132  meNhits_[0]->Fill(n_reco_etl[0]);
133  meNhits_[1]->Fill(n_reco_etl[1]);
134 }
MonitorElement * meHitPhi_[2]
MonitorElement * meHitEvsEta_[2]
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
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
MonitorElement * meHitEnergy_[2]
MonitorElement * meHitTime_[2]
MonitorElement * meHitZ_[2]
MonitorElement * meNhits_[2]
MonitorElement * meHitEvsPhi_[2]
void Fill(long long x)
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Definition: Event.h:539
const MTDGeomDet * idToDet(DetId) const override
Definition: MTDGeometry.cc:184
MonitorElement * meHitEta_[2]
ETLDetId geographicalId() const
Definition: ETLDetId.cc:4
virtual float localX(float mpX) const =0
MonitorElement * meHitX_[2]
MonitorElement * meHitY_[2]
MonitorElement * meHitTvsPhi_[2]
Definition: DetId.h:18
MonitorElement * meHitTvsEta_[2]
MonitorElement * meHitTvsE_[2]
Detector identifier class for the Endcap Timing Layer.
Definition: ETLDetId.h:15
HLT enums.
T get() const
Definition: EventSetup.h:71
int zside() const
Definition: MTDDetId.h:63
virtual float localY(float mpY) const =0
MonitorElement * meOccupancy_[2]
auto makeValid(const U &iOtherHandleType) noexcept(false)
Definition: ValidHandle.h:59
edm::EDGetTokenT< FTLRecHitCollection > etlRecHitsToken_
T const * product() const
Definition: ESHandle.h:86
void EtlRecHitsValidation::bookHistograms ( DQMStore::IBooker ibook,
edm::Run const &  run,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 137 of file EtlRecHitsValidation.cc.

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

139  {
140  ibook.setCurrentFolder(folder_);
141 
142  // --- histograms booking
143 
144  meNhits_[0] = ibook.book1D("EtlNhitsZneg", "Number of ETL RECO hits (-Z);N_{RECO}", 100, 0., 5000.);
145  meNhits_[1] = ibook.book1D("EtlNhitsZpos", "Number of ETL RECO hits (+Z);N_{RECO}", 100, 0., 5000.);
146 
147  meHitEnergy_[0] = ibook.book1D("EtlHitEnergyZneg", "ETL RECO hits energy (-Z);E_{RECO} [MeV]", 100, 0., 3.);
148  meHitEnergy_[1] = ibook.book1D("EtlHitEnergyZpos", "ETL RECO hits energy (+Z);E_{RECO} [MeV]", 100, 0., 3.);
149 
150  meHitTime_[0] = ibook.book1D("EtlHitTimeZneg", "ETL RECO hits ToA (-Z);ToA_{RECO} [ns]", 100, 0., 25.);
151  meHitTime_[1] = ibook.book1D("EtlHitTimeZpos", "ETL RECO hits ToA (+Z);ToA_{RECO} [ns]", 100, 0., 25.);
152 
153  meOccupancy_[0] = ibook.book2D("EtlOccupancyZneg",
154  "ETL RECO hits occupancy (-Z);X_{RECO} [cm];Y_{RECO} [cm]",
155  135,
156  -135.,
157  135.,
158  135,
159  -135.,
160  135.);
161  meOccupancy_[1] = ibook.book2D("EtlOccupancyZpos",
162  "ETL DIGI hits occupancy (+Z);X_{RECO} [cm];Y_{RECO} [cm]",
163  135,
164  -135.,
165  135.,
166  135,
167  -135.,
168  135.);
169 
170  meHitX_[1] = ibook.book1D("EtlHitXZpos", "ETL RECO hits X (+Z);X_{RECO} [cm]", 100, -130., 130.);
171  meHitX_[0] = ibook.book1D("EtlHitXZneg", "ETL RECO hits X (-Z);X_{RECO} [cm]", 100, -130., 130.);
172  meHitY_[1] = ibook.book1D("EtlHitYZpos", "ETL RECO hits Y (+Z);Y_{RECO} [cm]", 100, -130., 130.);
173  meHitY_[0] = ibook.book1D("EtlHitYZneg", "ETL RECO hits Y (-Z);Y_{RECO} [cm]", 100, -130., 130.);
174  meHitZ_[1] = ibook.book1D("EtlHitZZpos", "ETL RECO hits Z (+Z);Z_{RECO} [cm]", 100, 303.4, 304.2);
175  meHitZ_[0] = ibook.book1D("EtlHitZZneg", "ETL RECO hits Z (-Z);Z_{RECO} [cm]", 100, -304.2, -303.4);
176 
177  meHitPhi_[1] = ibook.book1D("EtlHitPhiZpos", "ETL RECO hits #phi (+Z);#phi_{RECO} [rad]", 100, -3.15, 3.15);
178  meHitPhi_[0] = ibook.book1D("EtlHitPhiZneg", "ETL RECO hits #phi (-Z);#phi_{RECO} [rad]", 100, -3.15, 3.15);
179  meHitEta_[1] = ibook.book1D("EtlHitEtaZpos", "ETL RECO hits #eta (+Z);#eta_{RECO}", 100, 1.56, 3.2);
180  meHitEta_[0] = ibook.book1D("EtlHitEtaZneg", "ETL RECO hits #eta (-Z);#eta_{RECO}", 100, -3.2, -1.56);
181 
182  meHitTvsE_[1] = ibook.bookProfile(
183  "EtlHitTvsEZpos", "ETL RECO time vs energy (+Z);E_{RECO} [MeV];ToA_{RECO} [ns]", 50, 0., 2., 0., 100.);
184  meHitTvsE_[0] = ibook.bookProfile(
185  "EtlHitTvsEZneg", "ETL RECO time vs energy (-Z);E_{RECO} [MeV];ToA_{RECO} [ns]", 50, 0., 2., 0., 100.);
186  meHitEvsPhi_[1] = ibook.bookProfile(
187  "EtlHitEvsPhiZpos", "ETL RECO energy vs #phi (+Z);#phi_{RECO} [rad];E_{RECO} [MeV]", 50, -3.15, 3.15, 0., 100.);
188  meHitEvsPhi_[0] = ibook.bookProfile(
189  "EtlHitEvsPhiZneg", "ETL RECO energy vs #phi (-Z);#phi_{RECO} [rad];E_{RECO} [MeV]", 50, -3.15, 3.15, 0., 100.);
190  meHitEvsEta_[1] = ibook.bookProfile(
191  "EtlHitEvsEtaZpos", "ETL RECO energy vs #eta (+Z);#eta_{RECO};E_{RECO} [MeV]", 50, 1.56, 3.2, 0., 100.);
192  meHitEvsEta_[0] = ibook.bookProfile(
193  "EtlHitEvsEtaZneg", "ETL RECO energy vs #eta (-Z);#eta_{RECO};E_{RECO} [MeV]", 50, -3.2, -1.56, 0., 100.);
194  meHitTvsPhi_[1] = ibook.bookProfile(
195  "EtlHitTvsPhiZpos", "ETL RECO time vs #phi (+Z);#phi_{RECO} [rad];ToA_{RECO} [ns]", 50, -3.15, 3.15, 0., 100.);
196  meHitTvsPhi_[0] = ibook.bookProfile(
197  "EtlHitTvsPhiZneg", "ETL RECO time vs #phi (-Z);#phi_{RECO} [rad];ToA_{RECO} [ns]", 50, -3.15, 3.15, 0., 100.);
198  meHitTvsEta_[1] = ibook.bookProfile(
199  "EtlHitTvsEtaZpos", "ETL RECO time vs #eta (+Z);#eta_{RECO};ToA_{RECO} [ns]", 50, 1.56, 3.2, 0., 100.);
200  meHitTvsEta_[0] = ibook.bookProfile(
201  "EtlHitTvsEtaZneg", "ETL RECO time vs #eta (-Z);#eta_{RECO};ToA_{RECO} [ns]", 50, -3.2, -1.56, 0., 100.);
202 }
MonitorElement * meHitPhi_[2]
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:113
MonitorElement * meHitEvsEta_[2]
MonitorElement * meHitEnergy_[2]
MonitorElement * meHitTime_[2]
MonitorElement * meHitZ_[2]
MonitorElement * meNhits_[2]
MonitorElement * meHitEvsPhi_[2]
const std::string folder_
MonitorElement * meHitEta_[2]
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * meHitX_[2]
MonitorElement * meHitY_[2]
MonitorElement * meHitTvsPhi_[2]
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * meHitTvsEta_[2]
MonitorElement * meHitTvsE_[2]
MonitorElement * meOccupancy_[2]
void EtlRecHitsValidation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 205 of file EtlRecHitsValidation.cc.

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

205  {
207 
208  desc.add<std::string>("folder", "MTD/ETL/RecHits");
209  desc.add<edm::InputTag>("inputTag", edm::InputTag("mtdRecHits", "FTLEndcap"));
210 
211  descriptions.add("etlRecHits", desc);
212 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

edm::EDGetTokenT<FTLRecHitCollection> EtlRecHitsValidation::etlRecHitsToken_
private

Definition at line 48 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and EtlRecHitsValidation().

const std::string EtlRecHitsValidation::folder_
private

Definition at line 46 of file EtlRecHitsValidation.cc.

Referenced by bookHistograms().

MonitorElement* EtlRecHitsValidation::meHitEnergy_[2]
private

Definition at line 54 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlRecHitsValidation::meHitEta_[2]
private

Definition at line 63 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlRecHitsValidation::meHitEvsEta_[2]
private

Definition at line 67 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlRecHitsValidation::meHitEvsPhi_[2]
private

Definition at line 66 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlRecHitsValidation::meHitPhi_[2]
private

Definition at line 62 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlRecHitsValidation::meHitTime_[2]
private

Definition at line 55 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlRecHitsValidation::meHitTvsE_[2]
private

Definition at line 65 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlRecHitsValidation::meHitTvsEta_[2]
private

Definition at line 69 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlRecHitsValidation::meHitTvsPhi_[2]
private

Definition at line 68 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlRecHitsValidation::meHitX_[2]
private

Definition at line 59 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlRecHitsValidation::meHitY_[2]
private

Definition at line 60 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlRecHitsValidation::meHitZ_[2]
private

Definition at line 61 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlRecHitsValidation::meNhits_[2]
private

Definition at line 52 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlRecHitsValidation::meOccupancy_[2]
private

Definition at line 57 of file EtlRecHitsValidation.cc.

Referenced by analyze(), and bookHistograms().