CMS 3D CMS Logo

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

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

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

Public Member Functions

 EtlDigiHitsValidation (const edm::ParameterSet &)
 
 ~EtlDigiHitsValidation () 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< ETLDigiCollectionetlDigiHitsToken_
 
const std::string folder_
 
MonitorElementmeHitCharge_ [2]
 
MonitorElementmeHitEta_ [2]
 
MonitorElementmeHitPhi_ [2]
 
MonitorElementmeHitQvsEta_ [2]
 
MonitorElementmeHitQvsPhi_ [2]
 
MonitorElementmeHitTime_ [2]
 
MonitorElementmeHitTvsEta_ [2]
 
MonitorElementmeHitTvsPhi_ [2]
 
MonitorElementmeHitTvsQ_ [2]
 
MonitorElementmeHitX_ [2]
 
MonitorElementmeHitY_ [2]
 
MonitorElementmeHitZ_ [2]
 
MonitorElementmeNhits_ [2]
 
MonitorElementmeOccupancy_ [2]
 

Detailed Description

Description: ETL DIGI hits validation

Implementation: [Notes on implementation]

Definition at line 32 of file EtlDigiHitsValidation.cc.

Constructor & Destructor Documentation

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

Definition at line 73 of file EtlDigiHitsValidation.cc.

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

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

Definition at line 78 of file EtlDigiHitsValidation.cc.

78 {}

Member Function Documentation

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

Definition at line 81 of file EtlDigiHitsValidation.cc.

References TauDecayModes::dec, etlDigiHitsToken_, Exception, MonitorElement::Fill(), ETLDetId::geographicalId(), relativeConstraints::geom, edm::EventSetup::get(), edm::Event::getHandle(), MTDGeometry::idToDet(), PixelTopology::localX(), PixelTopology::localY(), edm::makeValid(), meHitCharge_, meHitEta_, meHitPhi_, meHitQvsEta_, meHitQvsPhi_, meHitTime_, meHitTvsEta_, meHitTvsPhi_, meHitTvsQ_, meHitX_, meHitY_, meHitZ_, meNhits_, meOccupancy_, edm::ESHandle< T >::product(), DetId::rawId(), simplePhotonAnalyzer_cfi::sample, 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 etlDigiHitsHandle = makeValid(iEvent.getHandle(etlDigiHitsToken_));
89 
90  // --- Loop over the ELT DIGI hits
91 
92  unsigned int n_digi_etl[2] = {0, 0};
93 
94  for (const auto& dataFrame : *etlDigiHitsHandle) {
95  // --- Get the on-time sample
96  int isample = 2;
97 
98  const auto& sample = dataFrame.sample(isample);
99 
100  ETLDetId detId = dataFrame.id();
101 
102  DetId geoId = detId.geographicalId();
103 
104  const MTDGeomDet* thedet = geom->idToDet(geoId);
105  if (thedet == nullptr)
106  throw cms::Exception("EtlDigiHitsValidation") << "GeographicalID: " << std::hex << geoId.rawId() << " ("
107  << detId.rawId() << ") is invalid!" << std::dec << std::endl;
108  const PixelTopology& topo = static_cast<const PixelTopology&>(thedet->topology());
109 
110  Local3DPoint local_point(topo.localX(sample.row()), topo.localY(sample.column()), 0.);
111  const auto& global_point = thedet->toGlobal(local_point);
112 
113  // --- Fill the histograms
114 
115  int idet = (detId.zside() + 1) / 2;
116 
117  meHitCharge_[idet]->Fill(sample.data());
118  meHitTime_[idet]->Fill(sample.toa());
119  meOccupancy_[idet]->Fill(global_point.x(), global_point.y());
120 
121  meHitX_[idet]->Fill(global_point.x());
122  meHitY_[idet]->Fill(global_point.y());
123  meHitZ_[idet]->Fill(global_point.z());
124  meHitPhi_[idet]->Fill(global_point.phi());
125  meHitEta_[idet]->Fill(global_point.eta());
126 
127  meHitTvsQ_[idet]->Fill(sample.data(), sample.toa());
128  meHitQvsPhi_[idet]->Fill(global_point.phi(), sample.data());
129  meHitQvsEta_[idet]->Fill(global_point.eta(), sample.data());
130  meHitTvsPhi_[idet]->Fill(global_point.phi(), sample.toa());
131  meHitTvsEta_[idet]->Fill(global_point.eta(), sample.toa());
132 
133  n_digi_etl[idet]++;
134 
135  } // dataFrame loop
136 
137  meNhits_[0]->Fill(n_digi_etl[0]);
138  meNhits_[1]->Fill(n_digi_etl[1]);
139 }
MonitorElement * meHitTvsPhi_[2]
MonitorElement * meHitEta_[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 * meHitTvsQ_[2]
edm::EDGetTokenT< ETLDigiCollection > etlDigiHitsToken_
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 * meHitTvsEta_[2]
ETLDetId geographicalId() const
Definition: ETLDetId.cc:4
MonitorElement * meNhits_[2]
MonitorElement * meHitCharge_[2]
virtual float localX(float mpX) const =0
MonitorElement * meHitX_[2]
MonitorElement * meHitZ_[2]
Definition: DetId.h:18
MonitorElement * meHitY_[2]
MonitorElement * meHitQvsEta_[2]
MonitorElement * meHitQvsPhi_[2]
MonitorElement * meHitPhi_[2]
MonitorElement * meHitTime_[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
auto makeValid(const U &iOtherHandleType) noexcept(false)
Definition: ValidHandle.h:59
T const * product() const
Definition: ESHandle.h:86
MonitorElement * meOccupancy_[2]
void EtlDigiHitsValidation::bookHistograms ( DQMStore::IBooker ibook,
edm::Run const &  run,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 142 of file EtlDigiHitsValidation.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookProfile(), folder_, meHitCharge_, meHitEta_, meHitPhi_, meHitQvsEta_, meHitQvsPhi_, meHitTime_, meHitTvsEta_, meHitTvsPhi_, meHitTvsQ_, meHitX_, meHitY_, meHitZ_, meNhits_, meOccupancy_, and DQMStore::IBooker::setCurrentFolder().

144  {
145  ibook.setCurrentFolder(folder_);
146 
147  // --- histograms booking
148 
149  meNhits_[0] = ibook.book1D("EtlNhitsZneg", "Number of ETL DIGI hits (-Z);N_{DIGI}", 100, 0., 5000.);
150  meNhits_[1] = ibook.book1D("EtlNhitsZpos", "Number of ETL DIGI hits (+Z);N_{DIGI}", 100, 0., 5000.);
151 
152  meHitCharge_[0] = ibook.book1D("EtlHitChargeZneg", "ETL DIGI hits charge (-Z);Q_{DIGI} [ADC counts]", 100, 0., 256.);
153  meHitCharge_[1] = ibook.book1D("EtlHitChargeZpos", "ETL DIGI hits charge (+Z);Q_{DIGI} [ADC counts]", 100, 0., 256.);
154  meHitTime_[0] = ibook.book1D("EtlHitTimeZneg", "ETL DIGI hits ToA (-Z);ToA_{DIGI} [TDC counts]", 100, 0., 2000.);
155  meHitTime_[1] = ibook.book1D("EtlHitTimeZpos", "ETL DIGI hits ToA (+Z);ToA_{DIGI} [TDC counts]", 100, 0., 2000.);
156 
157  meOccupancy_[0] = ibook.book2D("EtlOccupancyZneg",
158  "ETL DIGI hits occupancy (-Z);X_{DIGI} [cm];Y_{DIGI} [cm]",
159  135,
160  -135.,
161  135.,
162  135,
163  -135.,
164  135.);
165  meOccupancy_[1] = ibook.book2D("EtlOccupancyZpos",
166  "ETL DIGI hits occupancy (+Z);X_{DIGI} [cm];Y_{DIGI} [cm]",
167  135,
168  -135.,
169  135.,
170  135,
171  -135.,
172  135.);
173 
174  meHitX_[0] = ibook.book1D("EtlHitXZneg", "ETL DIGI hits X (-Z);X_{DIGI} [cm]", 100, -130., 130.);
175  meHitX_[1] = ibook.book1D("EtlHitXZpos", "ETL DIGI hits X (+Z);X_{DIGI} [cm]", 100, -130., 130.);
176  meHitY_[0] = ibook.book1D("EtlHitYZneg", "ETL DIGI hits Y (-Z);Y_{DIGI} [cm]", 100, -130., 130.);
177  meHitY_[1] = ibook.book1D("EtlHitYZpos", "ETL DIGI hits Y (+Z);Y_{DIGI} [cm]", 100, -130., 130.);
178  meHitZ_[0] = ibook.book1D("EtlHitZZneg", "ETL DIGI hits Z (-Z);Z_{DIGI} [cm]", 100, -304.2, -303.4);
179  meHitZ_[1] = ibook.book1D("EtlHitZZpos", "ETL DIGI hits Z (+Z);Z_{DIGI} [cm]", 100, 303.4, 304.2);
180 
181  meHitPhi_[0] = ibook.book1D("EtlHitPhiZneg", "ETL DIGI hits #phi (-Z);#phi_{DIGI} [rad]", 100, -3.15, 3.15);
182  meHitPhi_[1] = ibook.book1D("EtlHitPhiZpos", "ETL DIGI hits #phi (+Z);#phi_{DIGI} [rad]", 100, -3.15, 3.15);
183  meHitEta_[0] = ibook.book1D("EtlHitEtaZneg", "ETL DIGI hits #eta (-Z);#eta_{DIGI}", 100, -3.2, -1.56);
184  meHitEta_[1] = ibook.book1D("EtlHitEtaZpos", "ETL DIGI hits #eta (+Z);#eta_{DIGI}", 100, 1.56, 3.2);
185 
186  meHitTvsQ_[0] = ibook.bookProfile("EtlHitTvsQZneg",
187  "ETL DIGI ToA vs charge (-Z);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
188  50,
189  0.,
190  256.,
191  0.,
192  1024.);
193  meHitTvsQ_[1] = ibook.bookProfile("EtlHitTvsQZpos",
194  "ETL DIGI ToA vs charge (+Z);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
195  50,
196  0.,
197  256.,
198  0.,
199  1024.);
200  meHitQvsPhi_[0] = ibook.bookProfile("EtlHitQvsPhiZneg",
201  "ETL DIGI charge vs #phi (-Z);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
202  50,
203  -3.15,
204  3.15,
205  0.,
206  1024.);
207  meHitQvsPhi_[1] = ibook.bookProfile("EtlHitQvsPhiZpos",
208  "ETL DIGI charge vs #phi (+Z);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
209  50,
210  -3.15,
211  3.15,
212  0.,
213  1024.);
214  meHitQvsEta_[0] = ibook.bookProfile(
215  "EtlHitQvsEtaZneg", "ETL DIGI charge vs #eta (-Z);#eta_{DIGI};Q_{DIGI} [ADC counts]", 50, -3.2, -1.56, 0., 1024.);
216  meHitQvsEta_[1] = ibook.bookProfile(
217  "EtlHitQvsEtaZpos", "ETL DIGI charge vs #eta (+Z);#eta_{DIGI};Q_{DIGI} [ADC counts]", 50, 1.56, 3.2, 0., 1024.);
218  meHitTvsPhi_[0] = ibook.bookProfile("EtlHitTvsPhiZneg",
219  "ETL DIGI ToA vs #phi (-Z);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
220  50,
221  -3.15,
222  3.15,
223  0.,
224  1024.);
225  meHitTvsPhi_[1] = ibook.bookProfile("EtlHitTvsPhiZpos",
226  "ETL DIGI ToA vs #phi (+Z);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
227  50,
228  -3.15,
229  3.15,
230  0.,
231  1024.);
232  meHitTvsEta_[0] = ibook.bookProfile(
233  "EtlHitTvsEtaZneg", "ETL DIGI ToA vs #eta (-Z);#eta_{DIGI};ToA_{DIGI} [TDC counts]", 50, -3.2, -1.56, 0., 1024.);
234  meHitTvsEta_[1] = ibook.bookProfile(
235  "EtlHitTvsEtaZpos", "ETL DIGI ToA vs #eta (+Z);#eta_{DIGI};ToA_{DIGI} [TDC counts]", 50, 1.56, 3.2, 0., 1024.);
236 }
MonitorElement * meHitTvsPhi_[2]
MonitorElement * meHitEta_[2]
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:113
MonitorElement * meHitTvsQ_[2]
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * meHitTvsEta_[2]
MonitorElement * meNhits_[2]
MonitorElement * meHitCharge_[2]
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * meHitX_[2]
MonitorElement * meHitZ_[2]
MonitorElement * meHitY_[2]
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * meHitQvsEta_[2]
MonitorElement * meHitQvsPhi_[2]
MonitorElement * meHitPhi_[2]
MonitorElement * meHitTime_[2]
MonitorElement * meOccupancy_[2]
void EtlDigiHitsValidation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 239 of file EtlDigiHitsValidation.cc.

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

239  {
241 
242  desc.add<std::string>("folder", "MTD/ETL/DigiHits");
243  desc.add<edm::InputTag>("inputTag", edm::InputTag("mix", "FTLEndcap"));
244 
245  descriptions.add("etlDigiHitsDefault", desc);
246 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

edm::EDGetTokenT<ETLDigiCollection> EtlDigiHitsValidation::etlDigiHitsToken_
private

Definition at line 48 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and EtlDigiHitsValidation().

const std::string EtlDigiHitsValidation::folder_
private

Definition at line 46 of file EtlDigiHitsValidation.cc.

Referenced by bookHistograms().

MonitorElement* EtlDigiHitsValidation::meHitCharge_[2]
private

Definition at line 54 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlDigiHitsValidation::meHitEta_[2]
private

Definition at line 63 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlDigiHitsValidation::meHitPhi_[2]
private

Definition at line 62 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlDigiHitsValidation::meHitQvsEta_[2]
private

Definition at line 67 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlDigiHitsValidation::meHitQvsPhi_[2]
private

Definition at line 66 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlDigiHitsValidation::meHitTime_[2]
private

Definition at line 55 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlDigiHitsValidation::meHitTvsEta_[2]
private

Definition at line 69 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlDigiHitsValidation::meHitTvsPhi_[2]
private

Definition at line 68 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlDigiHitsValidation::meHitTvsQ_[2]
private

Definition at line 65 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlDigiHitsValidation::meHitX_[2]
private

Definition at line 59 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlDigiHitsValidation::meHitY_[2]
private

Definition at line 60 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlDigiHitsValidation::meHitZ_[2]
private

Definition at line 61 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlDigiHitsValidation::meNhits_[2]
private

Definition at line 52 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* EtlDigiHitsValidation::meOccupancy_[2]
private

Definition at line 57 of file EtlDigiHitsValidation.cc.

Referenced by analyze(), and bookHistograms().