|
|
Go to the documentation of this file.
92 hitMinEnergy_(iConfig.getParameter<double>(
"hitMinimumEnergy")) {
110 std::unordered_map<uint32_t, MTDHit> m_etlHits[2];
111 std::unordered_map<uint32_t, std::set<int> > m_etlTrkPerCell[2];
114 for (
auto const&
simHit : etlSimHits) {
121 int idet = (
id.zside() + 1) / 2;
123 m_etlTrkPerCell[idet][
id.rawId()].insert(
simHit.trackId());
125 auto simHitIt = m_etlHits[idet].emplace(
id.rawId(),
MTDHit()).first;
131 if ((simHitIt->second).time == 0 ||
simHit.tof() < (simHitIt->second).
time) {
134 auto hit_pos =
simHit.entryPoint();
135 (simHitIt->second).
x = hit_pos.x();
136 (simHitIt->second).
y = hit_pos.y();
137 (simHitIt->second).
z = hit_pos.z();
146 for (
int idet = 0; idet < 2; ++idet) {
149 for (
auto const&
hit : m_etlTrkPerCell[idet])
152 for (
auto const&
hit : m_etlHits[idet]) {
161 if (thedet ==
nullptr)
162 throw cms::Exception(
"EtlSimHitsValidation") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" ("
163 << detId.
rawId() <<
") is invalid!" <<
std::dec << std::endl;
167 const auto& global_point = thedet->
toGlobal(local_point);
205 meNhits_[1] = ibook.
book1D(
"EtlNhitsZpos",
"Number of ETL cells with SIM hits (+Z);N_{ETL cells}", 100, 0., 5000.);
206 meNhits_[0] = ibook.
book1D(
"EtlNhitsZneg",
"Number of ETL cells with SIM hits (-Z);N_{ETL cells}", 100, 0., 5000.);
207 meNtrkPerCell_[1] = ibook.
book1D(
"EtlNtrkPerCellZpos",
"Number of tracks per ETL sensor (+Z);N_{trk}", 10, 0., 10.);
208 meNtrkPerCell_[0] = ibook.
book1D(
"EtlNtrkPerCellZneg",
"Number of tracks per ETL sensor (-Z);N_{trk}", 10, 0., 10.);
210 meHitEnergy_[1] = ibook.
book1D(
"EtlHitEnergyZpos",
"ETL SIM hits energy (+Z);E_{SIM} [MeV]", 100, 0., 3.);
211 meHitEnergy_[0] = ibook.
book1D(
"EtlHitEnergyZneg",
"ETL SIM hits energy (-Z);E_{SIM} [MeV]", 100, 0., 3.);
212 meHitTime_[1] = ibook.
book1D(
"EtlHitTimeZpos",
"ETL SIM hits ToA (+Z);ToA_{SIM} [ns]", 100, 0., 25.);
213 meHitTime_[0] = ibook.
book1D(
"EtlHitTimeZneg",
"ETL SIM hits ToA (-Z);ToA_{SIM} [ns]", 100, 0., 25.);
215 meHitXlocal_[1] = ibook.
book1D(
"EtlHitXlocalZpos",
"ETL SIM local X (+Z);X_{SIM}^{LOC} [mm]", 100, -25., 25.);
216 meHitXlocal_[0] = ibook.
book1D(
"EtlHitXlocalZneg",
"ETL SIM local X (-Z);X_{SIM}^{LOC} [mm]", 100, -25., 25.);
217 meHitYlocal_[1] = ibook.
book1D(
"EtlHitYlocalZpos",
"ETL SIM local Y (+Z);Y_{SIM}^{LOC} [mm]", 100, -48., 48.);
218 meHitYlocal_[0] = ibook.
book1D(
"EtlHitYlocalZneg",
"ETL SIM local Y (-Z);Y_{SIM}^{LOC} [mm]", 100, -48., 48.);
219 meHitZlocal_[1] = ibook.
book1D(
"EtlHitZlocalZpos",
"ETL SIM local Z (+Z);Z_{SIM}^{LOC} [mm]", 80, -0.16, 0.16);
220 meHitZlocal_[0] = ibook.
book1D(
"EtlHitZlocalZneg",
"ETL SIM local Z (-Z);Z_{SIM}^{LOC} [mm]", 80, -0.16, 0.16);
223 "EtlOccupancyZpos",
"ETL SIM hits occupancy (+Z);X_{SIM} [cm];Y_{SIM} [cm]", 135, -135., 135., 135, -135., 135.);
225 "EtlOccupancyZneg",
"ETL SIM hits occupancy (-Z);X_{SIM} [cm];Y_{SIM} [cm]", 135, -135., 135., 135, -135., 135.);
227 meHitX_[1] = ibook.
book1D(
"EtlHitXZpos",
"ETL SIM hits X (+Z);X_{SIM} [cm]", 100, -130., 130.);
228 meHitX_[0] = ibook.
book1D(
"EtlHitXZneg",
"ETL SIM hits X (-Z);X_{SIM} [cm]", 100, -130., 130.);
229 meHitY_[1] = ibook.
book1D(
"EtlHitYZpos",
"ETL SIM hits Y (+Z);Y_{SIM} [cm]", 100, -130., 130.);
230 meHitY_[0] = ibook.
book1D(
"EtlHitYZneg",
"ETL SIM hits Y (-Z);Y_{SIM} [cm]", 100, -130., 130.);
231 meHitZ_[1] = ibook.
book1D(
"EtlHitZZpos",
"ETL SIM hits Z (+Z);Z_{SIM} [cm]", 100, 303.4, 304.2);
232 meHitZ_[0] = ibook.
book1D(
"EtlHitZZneg",
"ETL SIM hits Z (-Z);Z_{SIM} [cm]", 100, -304.2, -303.4);
234 meHitPhi_[1] = ibook.
book1D(
"EtlHitPhiZpos",
"ETL SIM hits #phi (+Z);#phi_{SIM} [rad]", 100, -3.15, 3.15);
235 meHitPhi_[0] = ibook.
book1D(
"EtlHitPhiZneg",
"ETL SIM hits #phi (-Z);#phi_{SIM} [rad]", 100, -3.15, 3.15);
236 meHitEta_[1] = ibook.
book1D(
"EtlHitEtaZpos",
"ETL SIM hits #eta (+Z);#eta_{SIM}", 100, 1.56, 3.2);
237 meHitEta_[0] = ibook.
book1D(
"EtlHitEtaZneg",
"ETL SIM hits #eta (-Z);#eta_{SIM}", 100, -3.2, -1.56);
240 "EtlHitTvsEZpos",
"ETL SIM time vs energy (+Z);E_{SIM} [MeV];T_{SIM} [ns]", 50, 0., 2., 0., 100.);
242 "EtlHitTvsEZneg",
"ETL SIM time vs energy (-Z);E_{SIM} [MeV];T_{SIM} [ns]", 50, 0., 2., 0., 100.);
244 "EtlHitEvsPhiZpos",
"ETL SIM energy vs #phi (+Z);#phi_{SIM} [rad];E_{SIM} [MeV]", 50, -3.15, 3.15, 0., 100.);
246 "EtlHitEvsPhiZneg",
"ETL SIM energy vs #phi (-Z);#phi_{SIM} [rad];E_{SIM} [MeV]", 50, -3.15, 3.15, 0., 100.);
248 "EtlHitEvsEtaZpos",
"ETL SIM energy vs #eta (+Z);#eta_{SIM};E_{SIM} [MeV]", 50, 1.56, 3.2, 0., 100.);
250 "EtlHitEvsEtaZneg",
"ETL SIM energy vs #eta (-Z);#eta_{SIM};E_{SIM} [MeV]", 50, -3.2, -1.56, 0., 100.);
252 "EtlHitTvsPhiZpos",
"ETL SIM time vs #phi (+Z);#phi_{SIM} [rad];T_{SIM} [ns]", 50, -3.15, 3.15, 0., 100.);
254 "EtlHitTvsPhiZneg",
"ETL SIM time vs #phi (-Z);#phi_{SIM} [rad];T_{SIM} [ns]", 50, -3.15, 3.15, 0., 100.);
256 "EtlHitTvsEtaZpos",
"ETL SIM time vs #eta (+Z);#eta_{SIM};T_{SIM} [ns]", 50, 1.56, 3.2, 0., 100.);
258 "EtlHitTvsEtaZneg",
"ETL SIM time vs #eta (-Z);#eta_{SIM};T_{SIM} [ns]", 50, -3.2, -1.56, 0., 100.);
267 desc.
add<
double>(
"hitMinimumEnergy", 0.1);
269 descriptions.
add(
"etlSimHits", desc);
T const * product() const
MonitorElement * meHitTime_[2]
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< CrossingFrame< PSimHit > > etlSimHitsToken_
const std::string folder_
constexpr NumType convertUnitsTo(long double desiredUnits, NumType val)
MonitorElement * meHitTvsEta_[2]
virtual void setCurrentFolder(std::string const &fullpath)
~EtlSimHitsValidation() override
Detector identifier class for the Endcap Timing Layer.
MonitorElement * meHitTvsPhi_[2]
MonitorElement * meHitZ_[2]
MonitorElement * meHitYlocal_[2]
MonitorElement * meHitEvsPhi_[2]
MonitorElement * meHitXlocal_[2]
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * meHitZlocal_[2]
ETLDetId geographicalId() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
MonitorElement * meHitEnergy_[2]
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * meHitEta_[2]
auto makeValid(const U &iOtherHandleType) noexcept(false)
const float hitMinEnergy_
T getParameter(std::string const &) const
MonitorElement * meHitX_[2]
MonitorElement * meNhits_[2]
MonitorElement * meOccupancy_[2]
constexpr uint32_t rawId() const
get the raw id
MonitorElement * meHitEvsEta_[2]
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * meHitTvsE_[2]
MonitorElement * meHitPhi_[2]
constexpr NumType convertMmToCm(NumType millimeters)
MonitorElement * meHitY_[2]
MonitorElement * meNtrkPerCell_[2]
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
EtlSimHitsValidation(const edm::ParameterSet &)