42 string station_s = to_string(
station);
43 for (
int wheel = -2; wheel < 3; wheel++) {
44 string wheel_s = to_string(wheel);
46 wheel_s =
"+" + wheel_s;
47 string histoName =
"digisPerMB" + station_s +
"W" + wheel_s;
48 string histoTitle =
"Number of digis in MB" + station_s +
"YB" + wheel_s;
49 (digisPerRing[
station])[wheel] = ibooker.
book1D(histoName, histoTitle, 100, 0, 150);
56 string station_s = to_string(
station);
57 for (
int wheel = -2; wheel < 3; wheel++) {
58 string wheel_s = to_string(wheel);
60 wheel_s =
"+" + wheel_s;
61 string histoName =
"timeBoxesPerMB" + station_s +
"W" + wheel_s;
62 string histoTitle =
"Number of TDC counts in MB" + station_s +
"YB" + wheel_s;
63 (timeBoxesPerRing[
station])[wheel] = ibooker.
book1D(histoName, histoTitle, 400, 0, 1600);
70 timeBoxesPerEvent = ibooker.
book1D(
"timeBoxesPerEvent",
"TDC counts per event", 400, 0, 1600);
73 digisPerEvent = ibooker.
book1D(
"digisPerEvent",
"Number of digis per event", 100, 0, 900);
76 recHitsPerEvent = ibooker.
book1D(
"recHitsPerEvent",
"Number of RecHits per event", 100, 0, 250);
79 segments4DPerEvent = ibooker.
book1D(
"segments4DPerEvent",
"Number of 4D Segments per event", 50, 0, 50);
81 recHitsPer4DSegment = ibooker.
book1D(
"recHitsPer4DSegment",
"Number of RecHits per segment", 16, 0.5, 16.5);
84 t0From4DPhiSegment = ibooker.
book1D(
"t0From4DPhiSegment",
"T0 from 4D Phi segments", 100, -150, 150);
85 t0From4DZSegment = ibooker.
book1D(
"t0From4DZSegment",
"T0 from 4D Z segments", 100, -150, 150);
90 cout <<
"[DTOccupancyEfficiency] Analyze #Run: " <<
event.id().run() <<
" #Event: " <<
event.id().event() << endl;
94 event.getByToken(dtDigiToken_, dtdigis);
96 int numberOfDigis = 0;
97 std::map<int, std::map<int, int>> numberOfDigisPerRing;
100 for (dtLayerId_It = dtdigis->begin(); dtLayerId_It != dtdigis->end(); ++dtLayerId_It) {
102 digiIt != ((*dtLayerId_It).second).
second;
105 int wheelId = ((*dtLayerId_It).first).wheel();
106 int stationId = ((*dtLayerId_It).first).
station();
107 (numberOfDigisPerRing[stationId])[wheelId] += 1;
109 timeBoxesPerEvent->Fill((*digiIt).countsTDC());
110 (timeBoxesPerRing[stationId])[wheelId]->
Fill((*digiIt).countsTDC());
115 digisPerEvent->Fill(numberOfDigis);
119 for (
int wheel = -2; wheel < 3; wheel++)
120 (digisPerRing[
station])[wheel]->Fill((numberOfDigisPerRing[station])[wheel]);
124 event.getByToken(recHits4DToken_, all4DSegments);
126 segments4DPerEvent->Fill(all4DSegments->size());
130 event.getByToken(recHitToken_, dtRecHits);
132 recHitsPerEvent->Fill(dtRecHits->size());
138 unsigned int nHits = (segment->hasPhi() ? (segment->phiSegment())->
recHits().size() : 0);
139 nHits += (segment->hasZed() ? (segment->zSegment())->
recHits().size() : 0);
140 recHitsPer4DSegment->Fill(nHits);
142 if (segment->hasPhi()) {
143 double segmentPhiT0 = segment->phiSegment()->t0();
144 if (segment->phiSegment()->ist0Valid())
145 t0From4DPhiSegment->Fill(segmentPhiT0);
147 if (segment->hasZed()) {
148 double segmentZT0 = segment->zSegment()->t0();
149 if (segment->zSegment()->ist0Valid())
150 t0From4DZSegment->Fill(segmentZT0);
T getUntrackedParameter(std::string const &, T const &) const
virtual void setCurrentFolder(std::string const &fullpath)
~DTOccupancyEfficiency() override
Destructor.
U second(std::pair< T, U > const &p)
C::const_iterator const_iterator
constant access iterator type
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
DTOccupancyEfficiency(const edm::ParameterSet &pset)
Constructor.
T getParameter(std::string const &) const
std::vector< DigiType >::const_iterator const_iterator
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ uint32_t const *__restrict__ gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell const int32_t nHits
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override