CMS 3D CMS Logo

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

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

Inheritance diagram for BtlSimHitsValidation:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 BtlSimHitsValidation (const edm::ParameterSet &)
 
 ~BtlSimHitsValidation () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 

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< CrossingFrame< PSimHit > > btlSimHitsToken_
 
const std::string folder_
 
const float hitMinEnergy_
 
MonitorElementmeHitDeltaE12vsE1_
 
MonitorElementmeHitDeltaT2_
 
MonitorElementmeHitDeltaT3_
 
MonitorElementmeHitDeltaT4_
 
MonitorElementmeHitE1overEcellBulk1_
 
MonitorElementmeHitE1overEcellBulk2_
 
MonitorElementmeHitE1overEcellBulk3_
 
MonitorElementmeHitE1overEcellBulk4_
 
MonitorElementmeHitE1overEcellTail1_
 
MonitorElementmeHitE1overEcellTail2_
 
MonitorElementmeHitE1overEcellTail3_
 
MonitorElementmeHitE1overEcellTail4_
 
MonitorElementmeHitEnergy_
 
MonitorElementmeHitEta_
 
MonitorElementmeHitEvsEta_
 
MonitorElementmeHitEvsPhi_
 
MonitorElementmeHitEvsZ_
 
MonitorElementmeHitLogEnergy_
 
MonitorElementmeHitPhi_
 
MonitorElementmeHitTime_
 
MonitorElementmeHitTrkID1_
 
MonitorElementmeHitTrkID2_
 
MonitorElementmeHitTrkID3_
 
MonitorElementmeHitTrkID4_
 
MonitorElementmeHitTvsE_
 
MonitorElementmeHitTvsEta_
 
MonitorElementmeHitTvsPhi_
 
MonitorElementmeHitTvsZ_
 
MonitorElementmeHitX_
 
MonitorElementmeHitXlocal_
 
MonitorElementmeHitY_
 
MonitorElementmeHitYlocal_
 
MonitorElementmeHitZ_
 
MonitorElementmeHitZlocal_
 
MonitorElementmeNevents_
 
MonitorElementmeNhits_
 
MonitorElementmeNtrkPerCell_
 
MonitorElementmeOccupancy_
 
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecordmtdgeoToken_
 
edm::ESGetToken< MTDTopology, MTDTopologyRcdmtdtopoToken_
 

Static Private Attributes

static constexpr float BXTime_ = 25.
 
static constexpr float cellEneCut_ = 10.
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Description: BTL SIM hits validation

Implementation: [Notes on implementation]

Definition at line 44 of file BtlSimHitsValidation.cc.

Constructor & Destructor Documentation

◆ BtlSimHitsValidation()

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

Definition at line 123 of file BtlSimHitsValidation.cc.

References btlSimHitsToken_, edm::ParameterSet::getParameter(), mtdgeoToken_, and mtdtopoToken_.

124  : folder_(iConfig.getParameter<std::string>("folder")),
125  hitMinEnergy_(iConfig.getParameter<double>("hitMinimumEnergy")) {
126  btlSimHitsToken_ = consumes<CrossingFrame<PSimHit> >(iConfig.getParameter<edm::InputTag>("inputTag"));
127  mtdgeoToken_ = esConsumes<MTDGeometry, MTDDigiGeometryRecord>();
128  mtdtopoToken_ = esConsumes<MTDTopology, MTDTopologyRcd>();
129 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const std::string folder_
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeoToken_
edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdtopoToken_
edm::EDGetTokenT< CrossingFrame< PSimHit > > btlSimHitsToken_

◆ ~BtlSimHitsValidation()

BtlSimHitsValidation::~BtlSimHitsValidation ( )
override

Definition at line 131 of file BtlSimHitsValidation.cc.

131 {}

Member Function Documentation

◆ analyze()

void BtlSimHitsValidation::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 134 of file BtlSimHitsValidation.cc.

References btlSimHitsToken_, BXTime_, cellEneCut_, angle_units::operators::convertGeVToMeV(), angle_units::operators::convertMmToCm(), MTDTopologyMode::crysLayoutFromTopoMode(), TauDecayModes::dec, hcalRecHitTable_cff::detId, Exception, dqm::impl::MonitorElement::Fill(), relativeConstraints::geom, edm::EventSetup::getTransientHandle(), hitMinEnergy_, iEvent, createfilelist::int, edm::makeValid(), meHitDeltaE12vsE1_, meHitDeltaT2_, meHitDeltaT3_, meHitDeltaT4_, meHitE1overEcellBulk1_, meHitE1overEcellBulk2_, meHitE1overEcellBulk3_, meHitE1overEcellBulk4_, meHitE1overEcellTail1_, meHitE1overEcellTail2_, meHitE1overEcellTail3_, meHitE1overEcellTail4_, meHitEnergy_, meHitEta_, meHitEvsEta_, meHitEvsPhi_, meHitEvsZ_, meHitLogEnergy_, meHitPhi_, meHitTime_, meHitTrkID1_, meHitTrkID2_, meHitTrkID3_, meHitTrkID4_, meHitTvsE_, meHitTvsEta_, meHitTvsPhi_, meHitTvsZ_, meHitX_, meHitXlocal_, meHitY_, meHitYlocal_, meHitZ_, meHitZlocal_, meNevents_, meNhits_, meNtrkPerCell_, meOccupancy_, mtdgeoToken_, mtdtopoToken_, RectangularMTDTopology::nrows(), RectangularMTDTopology::pixelToModuleLocalPoint(), DetId::rawId(), nano_mu_digi_cff::rawId, rpcPointValidation_cfi::simHit, ProxyMTDTopology::specificTopology(), edm::swap(), GeomDet::toGlobal(), GeomDet::topology(), HLT_2024v14_cff::topology, hit::x, hit::y, and hit::z.

134  {
135  using namespace edm;
136  using namespace geant_units::operators;
137 
138  auto geometryHandle = iSetup.getTransientHandle(mtdgeoToken_);
139  const MTDGeometry* geom = geometryHandle.product();
140 
141  auto topologyHandle = iSetup.getTransientHandle(mtdtopoToken_);
142  const MTDTopology* topology = topologyHandle.product();
143 
144  auto btlSimHitsHandle = makeValid(iEvent.getHandle(btlSimHitsToken_));
145  MixCollection<PSimHit> btlSimHits(btlSimHitsHandle.product());
146 
147  std::unordered_map<uint32_t, std::unordered_map<uint64_t, MTDHit> > m_btlHitsPerCell;
148 
149  // --- Loop over the BLT SIM hits and accumulate the hits with the same track ID in each cell
150  for (auto const& simHit : btlSimHits) {
151  // --- Use only SIM hits compatible with the in-time bunch-crossing
152  if (simHit.tof() < 0. || simHit.tof() > BXTime_) {
153  continue;
154  }
155 
156  DetId id = simHit.detUnitId();
157 
158  // --- Build a global track ID by combining the SIM hit's eventId and trackId
159  uint64_t globalTrkID = ((uint64_t)simHit.eventId().rawId() << 32) | simHit.trackId();
160 
161  // --- Sum the energies of SIM hits with the same track ID in the same cell
162  m_btlHitsPerCell[id.rawId()][globalTrkID].energy += convertGeVToMeV(simHit.energyLoss());
163 
164  // --- Assign the time and position of the first SIM hit in time to the accumulated hit
165  if (m_btlHitsPerCell[id.rawId()][globalTrkID].time == 0. ||
166  simHit.tof() < m_btlHitsPerCell[id.rawId()][globalTrkID].time) {
167  m_btlHitsPerCell[id.rawId()][globalTrkID].time = simHit.tof();
168 
169  auto hit_pos = simHit.localPosition();
170  m_btlHitsPerCell[id.rawId()][globalTrkID].x = hit_pos.x();
171  m_btlHitsPerCell[id.rawId()][globalTrkID].y = hit_pos.y();
172  m_btlHitsPerCell[id.rawId()][globalTrkID].z = hit_pos.z();
173  }
174 
175  } // simHit loop
176 
177  // ==============================================================================
178  // Histogram filling
179  // ==============================================================================
180 
181  if (!m_btlHitsPerCell.empty()) {
182  meNhits_->Fill(log10(m_btlHitsPerCell.size()));
183  }
184 
185  // --- Loop over the BTL cells
186  for (auto const& cell : m_btlHitsPerCell) {
187  // --- Get the map of the hits in the cell
188  const auto& m_hits = cell.second;
189 
190  // --- Skip cells with no hits
191  if (m_hits.empty()) {
192  continue;
193  }
194 
195  // --- Loop over the hits in the cell, sum the hit energies and store the hit IDs in a vector
196  std::vector<uint64_t> v_hitID;
197  float ene_tot_cell = 0.;
198 
199  for (auto const& hit : m_hits) {
200  ene_tot_cell += hit.second.energy;
201  v_hitID.push_back(hit.first);
202  }
203 
204  meHitLogEnergy_->Fill(log10(ene_tot_cell));
205 
206  // --- Skip cells with a total anergy less than hitMinEnergy_
207  if (ene_tot_cell < hitMinEnergy_) {
208  continue;
209  }
210 
211  // --- Order the hits in time
212  bool swapped;
213  for (unsigned int ihit = 0; ihit < v_hitID.size() - 1; ++ihit) {
214  swapped = false;
215  for (unsigned int jhit = 0; jhit < v_hitID.size() - ihit - 1; ++jhit) {
216  if (m_hits.at(v_hitID[jhit]).time > m_hits.at(v_hitID[jhit + 1]).time) {
217  std::swap(v_hitID[jhit], v_hitID[jhit + 1]);
218  swapped = true;
219  }
220  }
221  if (swapped == false) {
222  break;
223  }
224  }
225 
226  // --- Get the longer time interval between the hits in the cell
227  float deltaT_max = 0.;
228  for (unsigned int ihit = 0; ihit < v_hitID.size() - 1; ++ihit) {
229  float deltaT = m_hits.at(v_hitID[ihit + 1]).time - m_hits.at(v_hitID[ihit]).time;
230 
231  if (deltaT > deltaT_max) {
232  deltaT_max = deltaT;
233  }
234  }
235 
236  // --- Get the hit global position
237  BTLDetId detId(cell.first);
238  DetId geoId = detId.geographicalId(MTDTopologyMode::crysLayoutFromTopoMode(topology->getMTDTopologyMode()));
239  const MTDGeomDet* thedet = geom->idToDet(geoId);
240  if (thedet == nullptr) {
241  throw cms::Exception("BtlSimHitsValidation") << "GeographicalID: " << std::hex << geoId.rawId() << " ("
242  << detId.rawId() << ") is invalid!" << std::dec << std::endl;
243  }
244  const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(thedet->topology());
245  const RectangularMTDTopology& topo = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
246 
247  Local3DPoint local_point(convertMmToCm(m_hits.at(v_hitID[0]).x),
248  convertMmToCm(m_hits.at(v_hitID[0]).y),
249  convertMmToCm(m_hits.at(v_hitID[0]).z));
250 
251  local_point = topo.pixelToModuleLocalPoint(local_point, detId.row(topo.nrows()), detId.column(topo.nrows()));
252  const auto& global_point = thedet->toGlobal(local_point);
253 
254  // --- Fill the histograms
255 
256  meHitEnergy_->Fill(ene_tot_cell);
257  meHitTime_->Fill(m_hits.at(v_hitID[0]).time);
258 
259  meHitXlocal_->Fill(m_hits.at(v_hitID[0]).x);
260  meHitYlocal_->Fill(m_hits.at(v_hitID[0]).y);
261  meHitZlocal_->Fill(m_hits.at(v_hitID[0]).z);
262 
263  meOccupancy_->Fill(global_point.z(), global_point.phi());
264 
265  meHitX_->Fill(global_point.x());
266  meHitY_->Fill(global_point.y());
267  meHitZ_->Fill(global_point.z());
268  meHitPhi_->Fill(global_point.phi());
269  meHitEta_->Fill(global_point.eta());
270 
271  meHitTvsE_->Fill(ene_tot_cell, m_hits.at(v_hitID[0]).time);
272  meHitEvsPhi_->Fill(global_point.phi(), ene_tot_cell);
273  meHitEvsEta_->Fill(global_point.eta(), ene_tot_cell);
274  meHitEvsZ_->Fill(global_point.z(), ene_tot_cell);
275  meHitTvsPhi_->Fill(global_point.phi(), m_hits.at(v_hitID[0]).time);
276  meHitTvsEta_->Fill(global_point.eta(), m_hits.at(v_hitID[0]).time);
277  meHitTvsZ_->Fill(global_point.z(), m_hits.at(v_hitID[0]).time);
278 
279  meNtrkPerCell_->Fill(v_hitID.size());
280 
281  // --- First hit in the cell
282  int trackID = (int)(v_hitID[0] & 0xFFFFFFFF) / 100000000;
283  meHitTrkID1_->Fill(trackID);
284 
285  // cells in the bulk of energy distribution
286  if (ene_tot_cell < cellEneCut_) {
287  meHitE1overEcellBulk1_->Fill(m_hits.at(v_hitID[0]).energy / ene_tot_cell);
288  }
289  // cells in the tail of energy distribution
290  else {
291  meHitE1overEcellTail1_->Fill(m_hits.at(v_hitID[0]).energy / ene_tot_cell);
292  }
293 
294  // --- Second hit in the cell
295  if (v_hitID.size() == 2) {
296  trackID = (int)(v_hitID[1] & 0xFFFFFFFF) / 100000000;
297  meHitTrkID2_->Fill(trackID);
298 
299  meHitDeltaT2_->Fill(deltaT_max);
300 
301  // cells in the bulk of energy distribution
302  if (ene_tot_cell < cellEneCut_) {
303  meHitE1overEcellBulk2_->Fill(m_hits.at(v_hitID[1]).energy / ene_tot_cell);
304  }
305  // cells in the tail of energy distribution
306  else {
307  meHitE1overEcellTail2_->Fill(m_hits.at(v_hitID[1]).energy / ene_tot_cell);
308  }
309 
310  meHitDeltaE12vsE1_->Fill(m_hits.at(v_hitID[0]).energy,
311  m_hits.at(v_hitID[0]).energy - m_hits.at(v_hitID[1]).energy);
312 
313  }
314  // --- Third hit in the cell
315  else if (v_hitID.size() == 3) {
316  trackID = (int)(v_hitID[2] & 0xFFFFFFFF) / 100000000;
317  meHitTrkID3_->Fill(trackID);
318 
319  meHitDeltaT3_->Fill(deltaT_max);
320 
321  // cells in the bulk of energy distribution
322  if (ene_tot_cell < cellEneCut_) {
323  meHitE1overEcellBulk3_->Fill(m_hits.at(v_hitID[2]).energy / ene_tot_cell);
324  }
325  // cells in the tail of energy distribution
326  else {
327  meHitE1overEcellTail3_->Fill(m_hits.at(v_hitID[2]).energy / ene_tot_cell);
328  }
329 
330  }
331  // --- Fourth hit in the cell and next ones
332  else if (v_hitID.size() >= 4) {
333  for (unsigned int ihit = 3; ihit < v_hitID.size(); ++ihit) {
334  trackID = (int)(v_hitID[ihit] & 0xFFFFFFFF) / 100000000;
335  meHitTrkID4_->Fill(trackID);
336 
337  // cells in the bulk of energy distribution
338  if (ene_tot_cell < cellEneCut_) {
339  meHitE1overEcellBulk4_->Fill(m_hits.at(v_hitID[ihit]).energy / ene_tot_cell);
340  }
341  // cells in the tail of energy distribution
342  else {
343  meHitE1overEcellTail4_->Fill(m_hits.at(v_hitID[ihit]).energy / ene_tot_cell);
344  }
345  }
346 
347  meHitDeltaT4_->Fill(deltaT_max);
348  }
349 
350  } // cell loop
351 
352  // --- This is to count the number of processed events, needed in the harvesting step
353  meNevents_->Fill(0.5);
354 }
MonitorElement * meHitEta_
MonitorElement * meHitZlocal_
MonitorElement * meHitPhi_
MonitorElement * meHitE1overEcellBulk4_
MonitorElement * meHitXlocal_
MonitorElement * meNtrkPerCell_
MonitorElement * meHitE1overEcellBulk1_
virtual const Topology & topology() const
Definition: GeomDet.cc:67
virtual const PixelTopology & specificTopology() const
MonitorElement * meHitDeltaT2_
LocalPoint pixelToModuleLocalPoint(const LocalPoint &plp, int row, int col) const
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
MonitorElement * meHitE1overEcellTail4_
void Fill(long long x)
MonitorElement * meHitEvsPhi_
MonitorElement * meHitE1overEcellTail1_
int iEvent
Definition: GenABIO.cc:224
MonitorElement * meHitTrkID3_
MonitorElement * meHitDeltaE12vsE1_
MonitorElement * meHitEnergy_
constexpr NumType convertGeVToMeV(NumType gev)
Definition: angle_units.h:74
MonitorElement * meOccupancy_
MonitorElement * meHitTrkID2_
MonitorElement * meHitE1overEcellTail3_
MonitorElement * meHitE1overEcellBulk3_
MonitorElement * meHitEvsEta_
MonitorElement * meHitDeltaT3_
int nrows() const override
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeoToken_
MonitorElement * meHitEvsZ_
MonitorElement * meHitYlocal_
MonitorElement * meHitTvsPhi_
MonitorElement * meNevents_
MonitorElement * meHitE1overEcellTail2_
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
MonitorElement * meHitTvsE_
static constexpr float cellEneCut_
MonitorElement * meHitE1overEcellBulk2_
Definition: DetId.h:17
constexpr NumType convertMmToCm(NumType millimeters)
Definition: angle_units.h:44
unsigned long long uint64_t
Definition: Time.h:13
edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdtopoToken_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
MonitorElement * meHitLogEnergy_
MonitorElement * meHitTrkID1_
MonitorElement * meHitTvsZ_
MonitorElement * meHitTime_
HLT enums.
edm::EDGetTokenT< CrossingFrame< PSimHit > > btlSimHitsToken_
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
Definition: BTLDetId.h:19
static constexpr float BXTime_
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:141
BTLDetId::CrysLayout crysLayoutFromTopoMode(const int &topoMode)
MonitorElement * meHitTvsEta_
auto makeValid(const U &iOtherHandleType) noexcept(false)
Definition: ValidHandle.h:52
MonitorElement * meHitTrkID4_
MonitorElement * meHitDeltaT4_

◆ bookHistograms()

void BtlSimHitsValidation::bookHistograms ( DQMStore::IBooker ibook,
edm::Run const &  run,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 357 of file BtlSimHitsValidation.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book1I(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookProfile(), folder_, meHitDeltaE12vsE1_, meHitDeltaT2_, meHitDeltaT3_, meHitDeltaT4_, meHitE1overEcellBulk1_, meHitE1overEcellBulk2_, meHitE1overEcellBulk3_, meHitE1overEcellBulk4_, meHitE1overEcellTail1_, meHitE1overEcellTail2_, meHitE1overEcellTail3_, meHitE1overEcellTail4_, meHitEnergy_, meHitEta_, meHitEvsEta_, meHitEvsPhi_, meHitEvsZ_, meHitLogEnergy_, meHitPhi_, meHitTime_, meHitTrkID1_, meHitTrkID2_, meHitTrkID3_, meHitTrkID4_, meHitTvsE_, meHitTvsEta_, meHitTvsPhi_, meHitTvsZ_, meHitX_, meHitXlocal_, meHitY_, meHitYlocal_, meHitZ_, meHitZlocal_, meNevents_, meNhits_, meNtrkPerCell_, meOccupancy_, and dqm::implementation::NavigatorBase::setCurrentFolder().

359  {
360  ibook.setCurrentFolder(folder_);
361 
362  // --- histograms booking
363 
364  meNevents_ = ibook.book1D("BtlNevents", "Number of events", 1, 0., 1.);
365 
366  meNhits_ = ibook.book1D("BtlNhits", "Number of BTL cells with SIM hits;log_{10}(N_{BTL cells})", 100, 0., 5.25);
367  meNtrkPerCell_ = ibook.book1D("BtlNtrkPerCell", "Number of tracks per BTL cell;N_{trk}", 10, 0., 10.);
368 
369  meHitEnergy_ = ibook.book1D("BtlHitEnergy", "BTL SIM hits energy;E_{SIM} [MeV]", 100, 0., 20.);
370  meHitLogEnergy_ = ibook.book1D("BtlHitLogEnergy", "BTL SIM hits energy;log_{10}(E_{SIM} [MeV])", 200, -6., 3.);
371  meHitTime_ = ibook.book1D("BtlHitTime", "BTL SIM hits ToA;ToA_{SIM} [ns]", 100, 0., 25.);
372 
373  meHitXlocal_ = ibook.book1D("BtlHitXlocal", "BTL SIM local X;X_{SIM}^{LOC} [mm]", 100, -30., 30.);
374  meHitYlocal_ = ibook.book1D("BtlHitYlocal", "BTL SIM local Y;Y_{SIM}^{LOC} [mm]", 100, -1.65, 1.65);
375  meHitZlocal_ = ibook.book1D("BtlHitZlocal", "BTL SIM local Z;Z_{SIM}^{LOC} [mm]", 100, -2., 2.);
376 
377  meOccupancy_ = ibook.book2D(
378  "BtlOccupancy", "BTL SIM hits occupancy;z_{SIM} [cm];#phi_{SIM} [rad]", 130, -260., 260., 200, -3.15, 3.15);
379 
380  meHitX_ = ibook.book1D("BtlHitX", "BTL SIM hits X;X_{SIM} [cm]", 100, -120., 120.);
381  meHitY_ = ibook.book1D("BtlHitY", "BTL SIM hits Y;Y_{SIM} [cm]", 100, -120., 120.);
382  meHitZ_ = ibook.book1D("BtlHitZ", "BTL SIM hits Z;Z_{SIM} [cm]", 100, -260., 260.);
383  meHitPhi_ = ibook.book1D("BtlHitPhi", "BTL SIM hits #phi;#phi_{SIM} [rad]", 200, -3.15, 3.15);
384  meHitEta_ = ibook.book1D("BtlHitEta", "BTL SIM hits #eta;#eta_{SIM}", 100, -1.55, 1.55);
385 
386  meHitTvsE_ =
387  ibook.bookProfile("BtlHitTvsE", "BTL SIM time vs energy;E_{SIM} [MeV];T_{SIM} [ns]", 50, 0., 20., 0., 100.);
388  meHitEvsPhi_ = ibook.bookProfile(
389  "BtlHitEvsPhi", "BTL SIM energy vs #phi;#phi_{SIM} [rad];E_{SIM} [MeV]", 50, -3.15, 3.15, 0., 100.);
390  meHitEvsEta_ =
391  ibook.bookProfile("BtlHitEvsEta", "BTL SIM energy vs #eta;#eta_{SIM};E_{SIM} [MeV]", 50, -1.55, 1.55, 0., 100.);
392  meHitEvsZ_ =
393  ibook.bookProfile("BtlHitEvsZ", "BTL SIM energy vs Z;Z_{SIM} [cm];E_{SIM} [MeV]", 50, -260., 260., 0., 100.);
394  meHitTvsPhi_ = ibook.bookProfile(
395  "BtlHitTvsPhi", "BTL SIM time vs #phi;#phi_{SIM} [rad];T_{SIM} [ns]", 50, -3.15, 3.15, 0., 100.);
396  meHitTvsEta_ =
397  ibook.bookProfile("BtlHitTvsEta", "BTL SIM time vs #eta;#eta_{SIM};T_{SIM} [ns]", 50, -1.55, 1.55, 0., 100.);
398  meHitTvsZ_ =
399  ibook.bookProfile("BtlHitTvsZ", "BTL SIM time vs Z;Z_{SIM} [cm];T_{SIM} [ns]", 50, -260., 260., 0., 100.);
400 
401  meHitTrkID1_ = ibook.book1I("BtlHitTrkID1", "Category of the 1^{st} hit in time;Hit category", 8, 0, 8);
402  meHitTrkID2_ = ibook.book1I("BtlHitTrkID2", "Category of the 2^{nd} hit in time;Hit category", 8, 0, 8);
403  meHitTrkID3_ = ibook.book1I("BtlHitTrkID3", "Category of the 3^{rd} hit in time;Hit category", 8, 0, 8);
404  meHitTrkID4_ = ibook.book1I("BtlHitTrkID4", "Category of the #geq4^{th} hit in time;Hit category", 8, 0, 8);
405 
406  meHitDeltaT2_ = ibook.book1D(
407  "BtlHitDeltaT2", "Time interval between hits in the same cell (2 hits);#DeltaT_{2} [ns]", 100., 0., 25.);
408  meHitDeltaT3_ = ibook.book1D(
409  "BtlHitDeltaT3", "Max time interval between hits in the same cell (3 hits);#DeltaT_{3} [ns]", 100., 0., 25.);
410  meHitDeltaT4_ = ibook.book1D("BtlHitDeltaT4",
411  "Max time interval between hits in the same cell (#geq4 hits);#DeltaT_{#geq4} [ns]",
412  100.,
413  0.,
414  25.);
415 
417  "BtlHitDeltaE12vsE", "E_{1}-E_{2} vs E_{1};E_{1} [MeV];E_{1}-E_{2} [MeV]", 100, 0., 100., 0., 100.);
418 
419  meHitE1overEcellBulk1_ = ibook.book1D("BtlHitE1overEtotBulk1",
420  "Energy fraction of the 1^{st} hit in time (E_{cell}<10 MeV);E_{1} / E_{cell}",
421  100,
422  0.,
423  1.);
424  meHitE1overEcellBulk2_ = ibook.book1D("BtlHitE1overEtotBulk2",
425  "Energy fraction of the 2^{nd} hit in time (E_{cell}<10 MeV);E_{2} / E_{cell}",
426  100,
427  0.,
428  1.);
429  meHitE1overEcellBulk3_ = ibook.book1D("BtlHitE1overEtotBulk3",
430  "Energy fraction of the 3^{rd} hit in time (E_{cell}<10 MeV);E_{3} / E_{cell}",
431  100,
432  0.,
433  1.);
435  ibook.book1D("BtlHitE1overEtotBulk4",
436  "Energy fraction of the #geq4^{th} hit in time (E_{cell}<10 MeV);E_{#geq4} / E_{cell}",
437  100,
438  0.,
439  1.);
440  meHitE1overEcellTail1_ = ibook.book1D("BtlHitE1overEtotTail1",
441  "Energy fraction of the 1^{st} hit in time (E_{cell}>10 MeV);E_{1} / E_{cell}",
442  100,
443  0.,
444  1.);
445  meHitE1overEcellTail2_ = ibook.book1D("BtlHitE1overEtotTail2",
446  "Energy fraction of the 2^{nd} hit in time (E_{cell}>10 MeV);E_{2} / E_{cell}",
447  100,
448  0.,
449  1.);
450  meHitE1overEcellTail3_ = ibook.book1D("BtlHitE1overEtotTail3",
451  "Energy fraction of the 3^{rd} hit in time (E_{cell}>10 MeV);E_{3} / E_{cell}",
452  100,
453  0.,
454  1.);
456  ibook.book1D("BtlHitE1overEtotTail4",
457  "Energy fraction of the #geq4^{th} hit in time (E_{cell}>10 MeV);E_{#geq4} / E_{cell}",
458  100,
459  0.,
460  1.);
461 }
MonitorElement * meHitEta_
MonitorElement * meHitZlocal_
MonitorElement * meHitPhi_
MonitorElement * meHitE1overEcellBulk4_
MonitorElement * book1I(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:186
MonitorElement * meHitXlocal_
MonitorElement * meNtrkPerCell_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * meHitE1overEcellBulk1_
MonitorElement * meHitDeltaT2_
MonitorElement * meHitE1overEcellTail4_
MonitorElement * meHitEvsPhi_
MonitorElement * meHitE1overEcellTail1_
MonitorElement * meHitTrkID3_
const std::string folder_
MonitorElement * meHitDeltaE12vsE1_
MonitorElement * meHitEnergy_
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())
Definition: DQMStore.h:408
MonitorElement * meOccupancy_
MonitorElement * meHitTrkID2_
MonitorElement * meHitE1overEcellTail3_
MonitorElement * meHitE1overEcellBulk3_
MonitorElement * meHitEvsEta_
MonitorElement * meHitDeltaT3_
MonitorElement * meHitEvsZ_
MonitorElement * meHitYlocal_
MonitorElement * meHitTvsPhi_
MonitorElement * meNevents_
MonitorElement * meHitE1overEcellTail2_
MonitorElement * meHitTvsE_
MonitorElement * meHitE1overEcellBulk2_
MonitorElement * meHitLogEnergy_
MonitorElement * meHitTrkID1_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:221
MonitorElement * meHitTvsZ_
MonitorElement * meHitTime_
MonitorElement * meHitTvsEta_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * meHitTrkID4_
MonitorElement * meHitDeltaT4_

◆ fillDescriptions()

void BtlSimHitsValidation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 464 of file BtlSimHitsValidation.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, ProducerED_cfi::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

464  {
466 
467  desc.add<std::string>("folder", "MTD/BTL/SimHits");
468  desc.add<edm::InputTag>("inputTag", edm::InputTag("mix", "g4SimHitsFastTimerHitsBarrel"));
469  desc.add<double>("hitMinimumEnergy", 1.); // [MeV]
470 
471  descriptions.add("btlSimHitsValid", desc);
472 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ btlSimHitsToken_

edm::EDGetTokenT<CrossingFrame<PSimHit> > BtlSimHitsValidation::btlSimHitsToken_
private

Definition at line 63 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and BtlSimHitsValidation().

◆ BXTime_

constexpr float BtlSimHitsValidation::BXTime_ = 25.
staticprivate

Definition at line 61 of file BtlSimHitsValidation.cc.

Referenced by analyze().

◆ cellEneCut_

constexpr float BtlSimHitsValidation::cellEneCut_ = 10.
staticprivate

Definition at line 110 of file BtlSimHitsValidation.cc.

Referenced by analyze().

◆ folder_

const std::string BtlSimHitsValidation::folder_
private

Definition at line 58 of file BtlSimHitsValidation.cc.

Referenced by bookHistograms().

◆ hitMinEnergy_

const float BtlSimHitsValidation::hitMinEnergy_
private

Definition at line 59 of file BtlSimHitsValidation.cc.

Referenced by analyze().

◆ meHitDeltaE12vsE1_

MonitorElement* BtlSimHitsValidation::meHitDeltaE12vsE1_
private

Definition at line 108 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitDeltaT2_

MonitorElement* BtlSimHitsValidation::meHitDeltaT2_
private

Definition at line 104 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitDeltaT3_

MonitorElement* BtlSimHitsValidation::meHitDeltaT3_
private

Definition at line 105 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitDeltaT4_

MonitorElement* BtlSimHitsValidation::meHitDeltaT4_
private

Definition at line 106 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitE1overEcellBulk1_

MonitorElement* BtlSimHitsValidation::meHitE1overEcellBulk1_
private

Definition at line 112 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitE1overEcellBulk2_

MonitorElement* BtlSimHitsValidation::meHitE1overEcellBulk2_
private

Definition at line 113 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitE1overEcellBulk3_

MonitorElement* BtlSimHitsValidation::meHitE1overEcellBulk3_
private

Definition at line 114 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitE1overEcellBulk4_

MonitorElement* BtlSimHitsValidation::meHitE1overEcellBulk4_
private

Definition at line 115 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitE1overEcellTail1_

MonitorElement* BtlSimHitsValidation::meHitE1overEcellTail1_
private

Definition at line 116 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitE1overEcellTail2_

MonitorElement* BtlSimHitsValidation::meHitE1overEcellTail2_
private

Definition at line 117 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitE1overEcellTail3_

MonitorElement* BtlSimHitsValidation::meHitE1overEcellTail3_
private

Definition at line 118 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitE1overEcellTail4_

MonitorElement* BtlSimHitsValidation::meHitE1overEcellTail4_
private

Definition at line 119 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitEnergy_

MonitorElement* BtlSimHitsValidation::meHitEnergy_
private

Definition at line 75 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitEta_

MonitorElement* BtlSimHitsValidation::meHitEta_
private

Definition at line 89 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitEvsEta_

MonitorElement* BtlSimHitsValidation::meHitEvsEta_
private

Definition at line 93 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitEvsPhi_

MonitorElement* BtlSimHitsValidation::meHitEvsPhi_
private

Definition at line 92 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitEvsZ_

MonitorElement* BtlSimHitsValidation::meHitEvsZ_
private

Definition at line 94 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitLogEnergy_

MonitorElement* BtlSimHitsValidation::meHitLogEnergy_
private

Definition at line 76 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitPhi_

MonitorElement* BtlSimHitsValidation::meHitPhi_
private

Definition at line 88 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitTime_

MonitorElement* BtlSimHitsValidation::meHitTime_
private

Definition at line 77 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitTrkID1_

MonitorElement* BtlSimHitsValidation::meHitTrkID1_
private

Definition at line 99 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitTrkID2_

MonitorElement* BtlSimHitsValidation::meHitTrkID2_
private

Definition at line 100 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitTrkID3_

MonitorElement* BtlSimHitsValidation::meHitTrkID3_
private

Definition at line 101 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitTrkID4_

MonitorElement* BtlSimHitsValidation::meHitTrkID4_
private

Definition at line 102 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitTvsE_

MonitorElement* BtlSimHitsValidation::meHitTvsE_
private

Definition at line 91 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitTvsEta_

MonitorElement* BtlSimHitsValidation::meHitTvsEta_
private

Definition at line 96 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitTvsPhi_

MonitorElement* BtlSimHitsValidation::meHitTvsPhi_
private

Definition at line 95 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitTvsZ_

MonitorElement* BtlSimHitsValidation::meHitTvsZ_
private

Definition at line 97 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitX_

MonitorElement* BtlSimHitsValidation::meHitX_
private

Definition at line 85 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitXlocal_

MonitorElement* BtlSimHitsValidation::meHitXlocal_
private

Definition at line 79 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitY_

MonitorElement* BtlSimHitsValidation::meHitY_
private

Definition at line 86 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitYlocal_

MonitorElement* BtlSimHitsValidation::meHitYlocal_
private

Definition at line 80 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitZ_

MonitorElement* BtlSimHitsValidation::meHitZ_
private

Definition at line 87 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitZlocal_

MonitorElement* BtlSimHitsValidation::meHitZlocal_
private

Definition at line 81 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meNevents_

MonitorElement* BtlSimHitsValidation::meNevents_
private

Definition at line 70 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meNhits_

MonitorElement* BtlSimHitsValidation::meNhits_
private

Definition at line 72 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meNtrkPerCell_

MonitorElement* BtlSimHitsValidation::meNtrkPerCell_
private

Definition at line 73 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meOccupancy_

MonitorElement* BtlSimHitsValidation::meOccupancy_
private

Definition at line 83 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mtdgeoToken_

edm::ESGetToken<MTDGeometry, MTDDigiGeometryRecord> BtlSimHitsValidation::mtdgeoToken_
private

Definition at line 65 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and BtlSimHitsValidation().

◆ mtdtopoToken_

edm::ESGetToken<MTDTopology, MTDTopologyRcd> BtlSimHitsValidation::mtdtopoToken_
private

Definition at line 66 of file BtlSimHitsValidation.cc.

Referenced by analyze(), and BtlSimHitsValidation().