56 std::unique_ptr<TotemT2Segmentation>
segm_;
72 std::bitset<(TotemT2DetId::maxPlane + 1) * (TotemT2DetId::maxChannel + 1)>
hitTilesArray;
116 ibooker.
book1D(
"active planes",
title +
" which planes are active (LE+TE digis);plane number", 8, -0.5, 7.5);
119 title +
" how many planes are active (LE+TE digis);number of active planes",
125 ibooker.
book1D(
"activity per BX CMS",
title +
" Activity (=LE) per BX;Event.BX", 3600, -1.5, 3598. + 0.5);
128 title +
" trigger emulator (LE+TE digis);arbitrary unit;arbitrary unit",
141 title +
" time over threshold (digi, =0 if LE or TE=0);time over threshold (ns)",
147 "event flags",
title +
" event flags (digi);Event flags (TE/LE valid, TE/LE multiple)", 4, -0.5, 3.5);
149 for (
unsigned short flag_index = 1; flag_index <= 4; ++flag_index)
162 digisMultiplicity = ibooker.
book2DD(
"digis multiplicity",
163 title +
" digis multiplicity (=LE);arbitrary unit;arbitrary unit",
170 rechitMultiplicity = ibooker.
book2DD(
"rechits multiplicity",
171 title +
" rechits multiplicity;x;y",
179 eventFlagsPl = ibooker.
book1D(
180 "event flags",
title +
" event flags (digi);Event flags (TE/LE valid, TE/LE multiple)", 4, -0.5, 3.5);
182 for (
unsigned short flag_index = 1; flag_index <= 4; ++flag_index)
192 leadingEdgeCh = ibooker.
book1D(
194 trailingEdgeCh = ibooker.
book1D(
197 timeOverTresholdCh = ibooker.
book1D(
"time over threshold",
198 title +
" time over threshold (digi, =0 if LE or TE=0);time over threshold (ns)",
203 eventFlagsCh = ibooker.
book1D(
204 "event flags",
title +
" event flags (digi);Event flags (TE/LE valid, TE/LE multiple)", 4, -0.5, 3.5);
207 ibooker.
book1D(
"activity per BX",
title +
" Activity (=LE) per BX;Event.BX", 1000, -1.5, 998. + 0.5);
209 for (
unsigned short flag_index = 1; flag_index <= 4; ++flag_index)
215 nbinsx_(iConfig.getParameter<unsigned
int>(
"nbinsx")),
216 nbinsy_(iConfig.getParameter<unsigned
int>(
"nbinsy")),
248 std::unordered_map<unsigned int, std::set<unsigned int>> planes;
251 if (!ds_digis.empty()) {
254 for (
const auto& digi : ds_digis) {
266 if (digi.hasLE() && digi.hasTE())
273 plt.second.activePlanesCount->Fill(planes[plt.first].size());
276 for (
unsigned short plane = 0; plane <= 1; ++plane)
293 unsigned short pl = detid.
plane();
295 planes[secId].insert(pl);
302 unsigned short pl = detid.
plane();
303 unsigned short ch = detid.
channel();
309 sectorPlot.second.hitTilesArray.reset();
313 unsigned int channel = detid.
channel();
316 std::bitset<(TotemT2DetId::maxPlane + 1) * (TotemT2DetId::maxChannel + 1)>
mask;
318 unsigned int pl = detid.
plane() % 2 == 0 ? 0 : 1;
321 mask[4 * pl + channel] =
true;
331 for (
unsigned short error_index = 1; error_index <= 4; ++error_index)
341 for (
unsigned int i = 0;
i < 4;
i++) {
static constexpr int t2TE
MonitorElement * activityPerBX
void fillActivePlanes(std::unordered_map< unsigned int, std::set< unsigned int >> &, const TotemT2DetId &)
MonitorElement * digisMultiplicity
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
virtual void setCurrentFolder(std::string const &fullpath)
std::unique_ptr< TotemT2Segmentation > segm_
void fillEdges(const TotemT2Digi &, const TotemT2DetId &)
static constexpr uint32_t maxChannel
TotemT2DetId planeId() const
static const unsigned int MINIMAL_TRIGGER
const unsigned int nbinsx_
void fillFlags(const TotemT2Digi &, const TotemT2DetId &)
TotemT2DQMSource(const edm::ParameterSet &)
static constexpr uint32_t maxPlane
MonitorElement * activityPerBXCh
static std::string to_string(const XMLCh *ch)
static constexpr int t2ML
void bookHistograms(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &) override
MonitorElement * rechitMultiplicity
unsigned char status() const
static constexpr int t2MT
static constexpr int t2LE
const edm::EDGetTokenT< edmNew::DetSetVector< TotemT2Digi > > digiToken_
const unsigned int nbinsy_
MonitorElement * totemT2ErrorFlags_2D_
static const uint32_t maxArm
void planeName(std::string &name, NameFlag flag=nFull) const
void armName(std::string &name, NameFlag flag=nFull) const
#define DEFINE_FWK_MODULE(type)
MonitorElement * activePlanesCount
void fillBX(const TotemT2Digi &, const TotemT2DetId &, const int)
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 * trailingEdgeCh
void clearTriggerBitset()
const unsigned int windowsNum_
MonitorElement * timeOverTresholdCh
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * timeOverTreshold
static constexpr double T2_BIN_WIDTH_NS_
std::bitset<(TotemT2DetId::maxPlane+1) *(TotemT2DetId::maxChannel+1)> hitTilesArray
MonitorElement * trailingEdge
MonitorElement * triggerEmulator
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * leadingEdge
bool areChannelsTriggered(const TotemT2DetId &)
MonitorElement * eventFlags
MonitorElement * eventFlagsCh
MonitorElement * leadingEdgeCh
MonitorElement * book2DD(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
std::unordered_map< unsigned int, PlanePlots > planePlots_
~TotemT2DQMSource() override=default
unsigned short trailingEdge() const
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
void fillTriggerBitset(const TotemT2DetId &)
unsigned short leadingEdge() const
std::unordered_map< unsigned int, SectorPlots > sectorPlots_
void channelName(std::string &name, NameFlag flag=nFull) const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
void bookErrorFlagsHistogram(DQMStore::IBooker &)
void fillErrorFlagsHistogram(const TotemT2Digi &, const TotemT2DetId &)
void fillToT(const TotemT2Digi &, const TotemT2DetId &)
MonitorElement * eventFlagsPl
MonitorElement * activePlanes