|
|
Go to the documentation of this file.
104 hitMinEnergy_(iConfig.getParameter<double>(
"hitMinimumEnergy")) {
126 std::unordered_map<uint32_t, MTDHit> m_btlHits;
127 std::unordered_map<uint32_t, std::set<int> > m_btlTrkPerCell;
130 for (
auto const&
simHit : btlSimHits) {
137 m_btlTrkPerCell[
id.rawId()].insert(
simHit.trackId());
139 auto simHitIt = m_btlHits.emplace(
id.rawId(),
MTDHit()).first;
145 if ((simHitIt->second).time == 0 ||
simHit.tof() < (simHitIt->second).
time) {
148 auto hit_pos =
simHit.entryPoint();
149 (simHitIt->second).
x = hit_pos.x();
150 (simHitIt->second).
y = hit_pos.y();
151 (simHitIt->second).
z = hit_pos.z();
160 if (!m_btlHits.empty())
163 for (
auto const&
hit : m_btlTrkPerCell)
166 for (
auto const&
hit : m_btlHits) {
176 if (thedet ==
nullptr)
177 throw cms::Exception(
"BtlSimHitsValidation") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" ("
178 << detId.
rawId() <<
") is invalid!" <<
std::dec << std::endl;
185 local_point = topo.pixelToModuleLocalPoint(local_point, detId.
row(topo.nrows()), detId.
column(topo.nrows()));
186 const auto& global_point = thedet->
toGlobal(local_point);
228 meNhits_ = ibook.
book1D(
"BtlNhits",
"Number of BTL cells with SIM hits;log_{10}(N_{BTL cells})", 100, 0., 5.25);
229 meNtrkPerCell_ = ibook.
book1D(
"BtlNtrkPerCell",
"Number of tracks per BTL cell;N_{trk}", 10, 0., 10.);
231 meHitEnergy_ = ibook.
book1D(
"BtlHitEnergy",
"BTL SIM hits energy;E_{SIM} [MeV]", 100, 0., 20.);
232 meHitLogEnergy_ = ibook.
book1D(
"BtlHitLogEnergy",
"BTL SIM hits energy;log_{10}(E_{SIM} [MeV])", 200, -6., 3.);
233 meHitTime_ = ibook.
book1D(
"BtlHitTime",
"BTL SIM hits ToA;ToA_{SIM} [ns]", 100, 0., 25.);
235 meHitXlocal_ = ibook.
book1D(
"BtlHitXlocal",
"BTL SIM local X;X_{SIM}^{LOC} [mm]", 100, -30., 30.);
236 meHitYlocal_ = ibook.
book1D(
"BtlHitYlocal",
"BTL SIM local Y;Y_{SIM}^{LOC} [mm]", 100, -1.65, 1.65);
237 meHitZlocal_ = ibook.
book1D(
"BtlHitZlocal",
"BTL SIM local z;z_{SIM}^{LOC} [mm]", 100, -2., 2.);
240 "BtlOccupancy",
"BTL SIM hits occupancy;z_{SIM} [cm];#phi_{SIM} [rad]", 130, -260., 260., 200, -3.15, 3.15);
242 meHitX_ = ibook.
book1D(
"BtlHitX",
"BTL SIM hits X;X_{SIM} [cm]", 100, -120., 120.);
243 meHitY_ = ibook.
book1D(
"BtlHitY",
"BTL SIM hits Y;Y_{SIM} [cm]", 100, -120., 120.);
244 meHitZ_ = ibook.
book1D(
"BtlHitZ",
"BTL SIM hits Z;Z_{SIM} [cm]", 100, -260., 260.);
245 meHitPhi_ = ibook.
book1D(
"BtlHitPhi",
"BTL SIM hits #phi;#phi_{SIM} [rad]", 200, -3.15, 3.15);
246 meHitEta_ = ibook.
book1D(
"BtlHitEta",
"BTL SIM hits #eta;#eta_{SIM}", 100, -1.55, 1.55);
249 ibook.
bookProfile(
"BtlHitTvsE",
"BTL SIM time vs energy;E_{SIM} [MeV];T_{SIM} [ns]", 50, 0., 20., 0., 100.);
251 "BtlHitEvsPhi",
"BTL SIM energy vs #phi;#phi_{SIM} [rad];E_{SIM} [MeV]", 50, -3.15, 3.15, 0., 100.);
253 ibook.
bookProfile(
"BtlHitEvsEta",
"BTL SIM energy vs #eta;#eta_{SIM};E_{SIM} [MeV]", 50, -1.55, 1.55, 0., 100.);
255 ibook.
bookProfile(
"BtlHitEvsZ",
"BTL SIM energy vs Z;Z_{SIM} [cm];E_{SIM} [MeV]", 50, -260., 260., 0., 100.);
257 "BtlHitTvsPhi",
"BTL SIM time vs #phi;#phi_{SIM} [rad];T_{SIM} [ns]", 50, -3.15, 3.15, 0., 100.);
259 ibook.
bookProfile(
"BtlHitTvsEta",
"BTL SIM time vs #eta;#eta_{SIM};T_{SIM} [ns]", 50, -1.55, 1.55, 0., 100.);
261 ibook.
bookProfile(
"BtlHitTvsZ",
"BTL SIM time vs Z;Z_{SIM} [cm];T_{SIM} [ns]", 50, -260., 260., 0., 100.);
270 desc.
add<
double>(
"hitMinimumEnergy", 1.);
272 descriptions.
add(
"btlSimHits", desc);
MonitorElement * meHitTvsE_
T const * product() const
MonitorElement * meHitEvsZ_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
MonitorElement * meHitYlocal_
MonitorElement * meHitLogEnergy_
edm::EDGetTokenT< CrossingFrame< PSimHit > > btlSimHitsToken_
MonitorElement * meHitEta_
constexpr NumType convertUnitsTo(long double desiredUnits, NumType val)
virtual void setCurrentFolder(std::string const &fullpath)
virtual const PixelTopology & specificTopology() const
virtual const Topology & topology() const
MonitorElement * meHitXlocal_
BtlSimHitsValidation(const edm::ParameterSet &)
const std::string folder_
MonitorElement * meHitTvsZ_
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0,...
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const CaloTopology * topology(nullptr)
int row(unsigned nrows=16) const
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())
const float hitMinEnergy_
MonitorElement * meHitPhi_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
BTLDetId::CrysLayout crysLayoutFromTopoMode(const int &topoMode)
MonitorElement * meNevents_
MonitorElement * meHitTime_
MonitorElement * meHitTvsEta_
auto makeValid(const U &iOtherHandleType) noexcept(false)
MonitorElement * meNhits_
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * meHitZlocal_
T getParameter(std::string const &) const
constexpr uint32_t rawId() const
get the raw id
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * meHitEnergy_
constexpr NumType convertMmToCm(NumType millimeters)
MonitorElement * meNtrkPerCell_
BTLDetId geographicalId(CrysLayout lay) const
MonitorElement * meHitTvsPhi_
MonitorElement * meHitEvsEta_
~BtlSimHitsValidation() override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * meOccupancy_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * meHitEvsPhi_
int column(unsigned nrows=16) const