CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
TotemT2DQMSource Class Reference
Inheritance diagram for TotemT2DQMSource:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Classes

struct  ChannelPlots
 
struct  PlanePlots
 
struct  SectorPlots
 

Public Member Functions

 TotemT2DQMSource (const edm::ParameterSet &)
 
 ~TotemT2DQMSource () override=default
 
- 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
 
 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
 

Protected Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Types

enum  evFlag { t2TE = 0, t2LE, t2MT, t2ML }
 

Private Member Functions

bool areChannelsTriggered (const TotemT2DetId &)
 
void bookErrorFlagsHistogram (DQMStore::IBooker &)
 
void clearTriggerBitset ()
 
void fillActivePlanes (std::unordered_map< unsigned int, std::set< unsigned int >> &, const TotemT2DetId &)
 
void fillBX (const TotemT2Digi &, const TotemT2DetId &, const int)
 
void fillEdges (const TotemT2Digi &, const TotemT2DetId &)
 
void fillErrorFlagsHistogram (const TotemT2Digi &, const TotemT2DetId &)
 
void fillFlags (const TotemT2Digi &, const TotemT2DetId &)
 
void fillToT (const TotemT2Digi &, const TotemT2DetId &)
 
void fillTriggerBitset (const TotemT2DetId &)
 

Private Attributes

std::unordered_map< unsigned int, ChannelPlotschannelPlots_
 
const edm::EDGetTokenT< edmNew::DetSetVector< TotemT2Digi > > digiToken_
 
const unsigned int nbinsx_
 
const unsigned int nbinsy_
 
std::unordered_map< unsigned int, PlanePlotsplanePlots_
 
std::unordered_map< unsigned int, SectorPlotssectorPlots_
 
std::unique_ptr< TotemT2Segmentationsegm_
 
MonitorElementtotemT2ErrorFlags_2D_ = nullptr
 
const unsigned int windowsNum_
 

Static Private Attributes

static constexpr double T2_BIN_WIDTH_NS_ = 25. / 4
 

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
 
- 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 &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 32 of file TotemT2DQMSource.cc.

Member Enumeration Documentation

◆ evFlag

Constructor & Destructor Documentation

◆ TotemT2DQMSource()

TotemT2DQMSource::TotemT2DQMSource ( const edm::ParameterSet iConfig)

Definition at line 213 of file TotemT2DQMSource.cc.

214  : digiToken_(consumes<edmNew::DetSetVector<TotemT2Digi>>(iConfig.getParameter<edm::InputTag>("digisTag"))),
215  nbinsx_(iConfig.getParameter<unsigned int>("nbinsx")),
216  nbinsy_(iConfig.getParameter<unsigned int>("nbinsy")),
217  windowsNum_(iConfig.getParameter<unsigned int>("windowsNum")) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const unsigned int nbinsx_
const edm::EDGetTokenT< edmNew::DetSetVector< TotemT2Digi > > digiToken_
const unsigned int nbinsy_
const unsigned int windowsNum_

◆ ~TotemT2DQMSource()

TotemT2DQMSource::~TotemT2DQMSource ( )
overridedefault

Member Function Documentation

◆ analyze()

void TotemT2DQMSource::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 246 of file TotemT2DQMSource.cc.

References areChannelsTriggered(), protons_cff::arm, CTPPSDetId::armId(), nano_mu_digi_cff::bx, clearTriggerBitset(), digiToken_, fillActivePlanes(), fillBX(), fillEdges(), fillErrorFlagsHistogram(), fillFlags(), fillToT(), fillTriggerBitset(), l1ctLayer2EG_cff::id, iEvent, CTPPSDetId::maxArm, TotemT2DetId::maxChannel, planePlots_, sectorPlots_, and segm_.

246  {
247  // fill digis information
248  std::unordered_map<unsigned int, std::set<unsigned int>> planes;
249 
250  for (const auto& ds_digis : iEvent.get(digiToken_)) {
251  if (!ds_digis.empty()) {
252  const TotemT2DetId detid(ds_digis.detId());
253  const TotemT2DetId planeId(detid.planeId());
254  for (const auto& digi : ds_digis) {
255  if (digi.hasLE()) {
256  segm_->fill(planePlots_[planeId].digisMultiplicity->getTH2D(), detid);
257  if (digi.hasTE())
258  fillTriggerBitset(detid);
259  }
260  fillErrorFlagsHistogram(digi, detid);
261  fillEdges(digi, detid);
262  fillToT(digi, detid);
263  fillFlags(digi, detid);
264  int bx = iEvent.bunchCrossing();
265  fillBX(digi, detid, bx);
266  if (digi.hasLE() && digi.hasTE()) //good digi
267  fillActivePlanes(planes, detid);
268  }
269  }
270  }
271 
272  for (const auto& plt : sectorPlots_)
273  plt.second.activePlanesCount->Fill(planes[plt.first].size());
274 
275  for (unsigned short arm = 0; arm <= CTPPSDetId::maxArm; ++arm)
276  for (unsigned short plane = 0; plane <= 1; ++plane)
277  for (unsigned short id = 0; id <= TotemT2DetId::maxChannel; ++id) {
278  const TotemT2DetId detid(arm, plane, id);
279  if (areChannelsTriggered(detid)) {
280  const TotemT2DetId secId(detid.armId());
281  segm_->fill(sectorPlots_[secId].triggerEmulator->getTH2D(), detid);
282  }
283  }
284 
285  // fill rechits information
286 
288 }
void fillActivePlanes(std::unordered_map< unsigned int, std::set< unsigned int >> &, const TotemT2DetId &)
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
Definition: TotemT2DetId.h:25
std::unique_ptr< TotemT2Segmentation > segm_
void fillEdges(const TotemT2Digi &, const TotemT2DetId &)
static constexpr uint32_t maxChannel
Definition: TotemT2DetId.h:35
void fillFlags(const TotemT2Digi &, const TotemT2DetId &)
int iEvent
Definition: GenABIO.cc:224
const edm::EDGetTokenT< edmNew::DetSetVector< TotemT2Digi > > digiToken_
static const uint32_t maxArm
Definition: CTPPSDetId.h:51
void fillBX(const TotemT2Digi &, const TotemT2DetId &, const int)
bool areChannelsTriggered(const TotemT2DetId &)
std::unordered_map< unsigned int, PlanePlots > planePlots_
void fillTriggerBitset(const TotemT2DetId &)
std::unordered_map< unsigned int, SectorPlots > sectorPlots_
void fillErrorFlagsHistogram(const TotemT2Digi &, const TotemT2DetId &)
void fillToT(const TotemT2Digi &, const TotemT2DetId &)

◆ areChannelsTriggered()

bool TotemT2DQMSource::areChannelsTriggered ( const TotemT2DetId detid)
private

Definition at line 312 of file TotemT2DQMSource.cc.

References CTPPSDetId::armId(), TotemT2DetId::channel(), submitPVResolutionJobs::count, gpuClustering::pixelStatus::mask, TotemT2DetId::maxPlane, TotemT2DQMSource::SectorPlots::MINIMAL_TRIGGER, TotemT2DetId::plane(), and sectorPlots_.

Referenced by analyze().

312  {
313  unsigned int channel = detid.channel();
314 
315  // prepare mask
316  std::bitset<(TotemT2DetId::maxPlane + 1) * (TotemT2DetId::maxChannel + 1)> mask;
317  // check if plane is even or not
318  unsigned int pl = detid.plane() % 2 == 0 ? 0 : 1;
319  // set only even or only odd plane bits for this channel
320  for (; pl <= TotemT2DetId::maxPlane; pl += 2)
321  mask[4 * pl + channel] = true;
322  const TotemT2DetId secId(detid.armId());
323  // check how many masked channels were hit
324  unsigned int triggeredChannelsNumber = (mask & sectorPlots_[secId].hitTilesArray).count();
325 
326  return triggeredChannelsNumber >= SectorPlots::MINIMAL_TRIGGER;
327 }
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
Definition: TotemT2DetId.h:25
static const unsigned int MINIMAL_TRIGGER
static constexpr uint32_t maxPlane
Definition: TotemT2DetId.h:34
constexpr uint32_t mask
Definition: gpuClustering.h:26
uint32_t plane() const
Definition: TotemT2DetId.h:44
CTPPSDetId armId() const
Definition: CTPPSDetId.h:80
std::unordered_map< unsigned int, SectorPlots > sectorPlots_
uint32_t channel() const
Definition: TotemT2DetId.h:51

◆ bookErrorFlagsHistogram()

void TotemT2DQMSource::bookErrorFlagsHistogram ( DQMStore::IBooker ibooker)
private

Definition at line 329 of file TotemT2DQMSource.cc.

References dqm::implementation::IBooker::book2D(), dqm::impl::MonitorElement::setBinLabel(), to_string(), and totemT2ErrorFlags_2D_.

Referenced by bookHistograms().

329  {
330  totemT2ErrorFlags_2D_ = ibooker.book2D("nt2 readout flags", " nt2 readout flags", 4, -0.5, 3.5, 2, -0.5, 1.5);
331  for (unsigned short error_index = 1; error_index <= 4; ++error_index)
332  totemT2ErrorFlags_2D_->setBinLabel(error_index, "Flag " + std::to_string(error_index));
333 
334  int tmpIndex = 0;
335  totemT2ErrorFlags_2D_->setBinLabel(++tmpIndex, "arm 4-5", /* axis */ 2);
336  totemT2ErrorFlags_2D_->setBinLabel(++tmpIndex, "arm 5-6", /* axis */ 2);
337 }
static std::string to_string(const XMLCh *ch)
MonitorElement * totemT2ErrorFlags_2D_
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
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:212

◆ bookHistograms()

void TotemT2DQMSource::bookHistograms ( DQMStore::IBooker ibooker,
const edm::Run ,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 221 of file TotemT2DQMSource.cc.

References protons_cff::arm, CTPPSDetId::armId(), bookErrorFlagsHistogram(), dqm::implementation::NavigatorBase::cd(), channelPlots_, CTPPSDetId::maxArm, TotemT2DetId::maxChannel, TotemT2DetId::maxPlane, nbinsx_, nbinsy_, TotemT2DetId::planeId(), planePlots_, sectorPlots_, segm_, dqm::implementation::NavigatorBase::setCurrentFolder(), and windowsNum_.

221  {
222  ibooker.cd();
223  ibooker.setCurrentFolder("TotemT2");
224 
225  bookErrorFlagsHistogram(ibooker);
226 
227  for (unsigned int arm = 0; arm <= CTPPSDetId::maxArm; ++arm) {
228  for (unsigned int pl = 0; pl <= TotemT2DetId::maxPlane; ++pl) {
229  const TotemT2DetId detid(arm, pl, 0);
230  const TotemT2DetId planeId(detid.planeId());
231  planePlots_[planeId] = PlanePlots(ibooker, planeId, nbinsx_, nbinsy_);
232  for (unsigned int ch = 0; ch <= TotemT2DetId::maxChannel; ++ch) {
233  const TotemT2DetId detidCh(arm, pl, ch);
234  channelPlots_[detidCh] = ChannelPlots(ibooker, detidCh, windowsNum_);
235  }
236  }
237  const TotemT2DetId detid(arm, 0, 0);
238  const TotemT2DetId secId(detid.armId());
239  sectorPlots_[secId] = SectorPlots(ibooker, secId, nbinsx_, nbinsy_, windowsNum_);
240  }
241 
242  // build a segmentation helper for the size of histograms previously booked
243  segm_ = std::make_unique<TotemT2Segmentation>(nbinsx_, nbinsy_);
244 }
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
Definition: TotemT2DetId.h:25
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
std::unique_ptr< TotemT2Segmentation > segm_
static constexpr uint32_t maxChannel
Definition: TotemT2DetId.h:35
const unsigned int nbinsx_
static constexpr uint32_t maxPlane
Definition: TotemT2DetId.h:34
const unsigned int nbinsy_
static const uint32_t maxArm
Definition: CTPPSDetId.h:51
const unsigned int windowsNum_
std::unordered_map< unsigned int, PlanePlots > planePlots_
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
std::unordered_map< unsigned int, SectorPlots > sectorPlots_
void bookErrorFlagsHistogram(DQMStore::IBooker &)

◆ clearTriggerBitset()

void TotemT2DQMSource::clearTriggerBitset ( )
private

Definition at line 307 of file TotemT2DQMSource.cc.

References sectorPlots_.

Referenced by analyze().

307  {
308  for (auto& sectorPlot : sectorPlots_)
309  sectorPlot.second.hitTilesArray.reset();
310 }
std::unordered_map< unsigned int, SectorPlots > sectorPlots_

◆ dqmBeginRun()

void TotemT2DQMSource::dqmBeginRun ( const edm::Run ,
const edm::EventSetup  
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 219 of file TotemT2DQMSource.cc.

219 {}

◆ fillActivePlanes()

void TotemT2DQMSource::fillActivePlanes ( std::unordered_map< unsigned int, std::set< unsigned int >> &  planes,
const TotemT2DetId detid 
)
private

Definition at line 290 of file TotemT2DQMSource.cc.

References CTPPSDetId::armId(), TotemT2DetId::plane(), and sectorPlots_.

Referenced by analyze().

291  {
292  const TotemT2DetId secId(detid.armId());
293  unsigned short pl = detid.plane();
294 
295  planes[secId].insert(pl);
296 
297  sectorPlots_[secId].activePlanes->Fill(pl);
298 }
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
Definition: TotemT2DetId.h:25
uint32_t plane() const
Definition: TotemT2DetId.h:44
CTPPSDetId armId() const
Definition: CTPPSDetId.h:80
std::unordered_map< unsigned int, SectorPlots > sectorPlots_

◆ fillBX()

void TotemT2DQMSource::fillBX ( const TotemT2Digi digi,
const TotemT2DetId detid,
const int  bx 
)
private

Definition at line 355 of file TotemT2DQMSource.cc.

References CTPPSDetId::armId(), nano_mu_digi_cff::bx, channelPlots_, TotemT2Digi::hasLE(), and sectorPlots_.

Referenced by analyze().

355  {
356  const TotemT2DetId secId(detid.armId());
357  if (digi.hasLE()) {
358  sectorPlots_[secId].activityPerBX->Fill(bx);
359  channelPlots_[detid].activityPerBXCh->Fill(bx);
360  }
361 }
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
Definition: TotemT2DetId.h:25
bool hasLE() const
Definition: TotemT2Digi.h:22
CTPPSDetId armId() const
Definition: CTPPSDetId.h:80
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
std::unordered_map< unsigned int, SectorPlots > sectorPlots_

◆ fillEdges()

void TotemT2DQMSource::fillEdges ( const TotemT2Digi digi,
const TotemT2DetId detid 
)
private

Definition at line 347 of file TotemT2DQMSource.cc.

References CTPPSDetId::armId(), channelPlots_, TotemT2Digi::leadingEdge(), sectorPlots_, T2_BIN_WIDTH_NS_, and TotemT2Digi::trailingEdge().

Referenced by analyze().

347  {
348  const TotemT2DetId secId(detid.armId());
349  sectorPlots_[secId].leadingEdge->Fill(T2_BIN_WIDTH_NS_ * digi.leadingEdge());
350  sectorPlots_[secId].trailingEdge->Fill(T2_BIN_WIDTH_NS_ * digi.trailingEdge());
351  channelPlots_[detid].leadingEdgeCh->Fill(T2_BIN_WIDTH_NS_ * digi.leadingEdge());
352  channelPlots_[detid].trailingEdgeCh->Fill(T2_BIN_WIDTH_NS_ * digi.trailingEdge());
353 }
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
Definition: TotemT2DetId.h:25
static constexpr double T2_BIN_WIDTH_NS_
CTPPSDetId armId() const
Definition: CTPPSDetId.h:80
unsigned short trailingEdge() const
Definition: TotemT2Digi.h:20
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
unsigned short leadingEdge() const
Definition: TotemT2Digi.h:18
std::unordered_map< unsigned int, SectorPlots > sectorPlots_

◆ fillErrorFlagsHistogram()

void TotemT2DQMSource::fillErrorFlagsHistogram ( const TotemT2Digi digi,
const TotemT2DetId detid 
)
private

Definition at line 339 of file TotemT2DQMSource.cc.

References CTPPSDetId::arm(), dqm::impl::MonitorElement::Fill(), mps_fire::i, TotemT2Digi::status(), and totemT2ErrorFlags_2D_.

Referenced by analyze().

339  {
340  // readout flags histogram filling
341  for (unsigned int i = 0; i < 4; i++) {
342  if (digi.status() & (1 << i))
343  totemT2ErrorFlags_2D_->Fill(i + 0.0, detid.arm() + 0.0);
344  }
345 }
uint32_t arm() const
Definition: CTPPSDetId.h:57
void Fill(long long x)
unsigned char status() const
Definition: TotemT2Digi.h:21
MonitorElement * totemT2ErrorFlags_2D_

◆ fillFlags()

void TotemT2DQMSource::fillFlags ( const TotemT2Digi digi,
const TotemT2DetId detid 
)
private

Definition at line 377 of file TotemT2DQMSource.cc.

References CTPPSDetId::armId(), channelPlots_, TotemT2Digi::hasLE(), TotemT2Digi::hasManyLE(), TotemT2Digi::hasManyTE(), TotemT2Digi::hasTE(), TotemT2DetId::planeId(), planePlots_, sectorPlots_, t2LE, t2ML, t2MT, and t2TE.

Referenced by analyze().

377  {
378  const TotemT2DetId secId(detid.armId());
379  const TotemT2DetId planeId(detid.planeId());
380  if (digi.hasTE()) {
381  sectorPlots_[secId].eventFlags->Fill(t2TE + 0.0);
382  planePlots_[planeId].eventFlagsPl->Fill(t2TE + 0.0);
383  channelPlots_[detid].eventFlagsCh->Fill(t2TE + 0.0);
384  }
385 
386  if (digi.hasLE()) {
387  sectorPlots_[secId].eventFlags->Fill(t2LE + 0.0);
388  planePlots_[planeId].eventFlagsPl->Fill(t2LE + 0.0);
389  channelPlots_[detid].eventFlagsCh->Fill(t2LE + 0.0);
390  }
391 
392  if (digi.hasManyTE()) {
393  sectorPlots_[secId].eventFlags->Fill(t2MT + 0.0);
394  planePlots_[planeId].eventFlagsPl->Fill(t2MT + 0.0);
395  channelPlots_[detid].eventFlagsCh->Fill(t2MT + 0.0);
396  }
397 
398  if (digi.hasManyLE()) {
399  sectorPlots_[secId].eventFlags->Fill(t2ML + 0.0);
400  planePlots_[planeId].eventFlagsPl->Fill(t2ML + 0.0);
401  channelPlots_[detid].eventFlagsCh->Fill(t2ML + 0.0);
402  }
403 }
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
Definition: TotemT2DetId.h:25
TotemT2DetId planeId() const
Definition: TotemT2DetId.h:60
bool hasLE() const
Definition: TotemT2Digi.h:22
bool hasManyTE() const
Definition: TotemT2Digi.h:25
bool hasManyLE() const
Definition: TotemT2Digi.h:24
CTPPSDetId armId() const
Definition: CTPPSDetId.h:80
std::unordered_map< unsigned int, PlanePlots > planePlots_
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
bool hasTE() const
Definition: TotemT2Digi.h:23
std::unordered_map< unsigned int, SectorPlots > sectorPlots_

◆ fillToT()

void TotemT2DQMSource::fillToT ( const TotemT2Digi digi,
const TotemT2DetId detid 
)
private

Definition at line 363 of file TotemT2DQMSource.cc.

References CTPPSDetId::armId(), channelPlots_, TotemT2Digi::hasLE(), TotemT2Digi::hasTE(), TotemT2Digi::leadingEdge(), sectorPlots_, T2_BIN_WIDTH_NS_, and TotemT2Digi::trailingEdge().

Referenced by analyze().

363  {
364  const TotemT2DetId secId(detid.armId());
365 
366  const int t_lead = digi.leadingEdge(), t_trail = digi.trailingEdge();
367  // don't skip no-edge digis
368  double toT = 0.;
369  if (digi.hasLE() && digi.hasTE()) {
370  toT = (t_trail - t_lead) * T2_BIN_WIDTH_NS_; // in ns
371  }
372 
373  sectorPlots_[secId].timeOverTreshold->Fill(toT);
374  channelPlots_[detid].timeOverTresholdCh->Fill(toT);
375 }
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
Definition: TotemT2DetId.h:25
bool hasLE() const
Definition: TotemT2Digi.h:22
static constexpr double T2_BIN_WIDTH_NS_
CTPPSDetId armId() const
Definition: CTPPSDetId.h:80
unsigned short trailingEdge() const
Definition: TotemT2Digi.h:20
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
bool hasTE() const
Definition: TotemT2Digi.h:23
unsigned short leadingEdge() const
Definition: TotemT2Digi.h:18
std::unordered_map< unsigned int, SectorPlots > sectorPlots_

◆ fillTriggerBitset()

void TotemT2DQMSource::fillTriggerBitset ( const TotemT2DetId detid)
private

Definition at line 300 of file TotemT2DQMSource.cc.

References CTPPSDetId::armId(), TotemT2DetId::channel(), TotemT2DetId::plane(), and sectorPlots_.

Referenced by analyze().

300  {
301  const TotemT2DetId secId(detid.armId());
302  unsigned short pl = detid.plane();
303  unsigned short ch = detid.channel();
304  sectorPlots_[secId].hitTilesArray[4 * pl + ch] = true;
305 }
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
Definition: TotemT2DetId.h:25
uint32_t plane() const
Definition: TotemT2DetId.h:44
CTPPSDetId armId() const
Definition: CTPPSDetId.h:80
std::unordered_map< unsigned int, SectorPlots > sectorPlots_
uint32_t channel() const
Definition: TotemT2DetId.h:51

Member Data Documentation

◆ channelPlots_

std::unordered_map<unsigned int, ChannelPlots> TotemT2DQMSource::channelPlots_
private

Definition at line 103 of file TotemT2DQMSource.cc.

Referenced by bookHistograms(), fillBX(), fillEdges(), fillFlags(), and fillToT().

◆ digiToken_

const edm::EDGetTokenT<edmNew::DetSetVector<TotemT2Digi> > TotemT2DQMSource::digiToken_
private

Definition at line 54 of file TotemT2DQMSource.cc.

Referenced by analyze().

◆ nbinsx_

const unsigned int TotemT2DQMSource::nbinsx_
private

Definition at line 63 of file TotemT2DQMSource.cc.

Referenced by bookHistograms().

◆ nbinsy_

const unsigned int TotemT2DQMSource::nbinsy_
private

Definition at line 63 of file TotemT2DQMSource.cc.

Referenced by bookHistograms().

◆ planePlots_

std::unordered_map<unsigned int, PlanePlots> TotemT2DQMSource::planePlots_
private

Definition at line 102 of file TotemT2DQMSource.cc.

Referenced by analyze(), bookHistograms(), and fillFlags().

◆ sectorPlots_

std::unordered_map<unsigned int, SectorPlots> TotemT2DQMSource::sectorPlots_
private

◆ segm_

std::unique_ptr<TotemT2Segmentation> TotemT2DQMSource::segm_
private

Definition at line 56 of file TotemT2DQMSource.cc.

Referenced by analyze(), and bookHistograms().

◆ T2_BIN_WIDTH_NS_

constexpr double TotemT2DQMSource::T2_BIN_WIDTH_NS_ = 25. / 4
staticprivate

Definition at line 58 of file TotemT2DQMSource.cc.

Referenced by fillEdges(), and fillToT().

◆ totemT2ErrorFlags_2D_

MonitorElement* TotemT2DQMSource::totemT2ErrorFlags_2D_ = nullptr
private

Definition at line 59 of file TotemT2DQMSource.cc.

Referenced by bookErrorFlagsHistogram(), and fillErrorFlagsHistogram().

◆ windowsNum_

const unsigned int TotemT2DQMSource::windowsNum_
private

Definition at line 64 of file TotemT2DQMSource.cc.

Referenced by bookHistograms().