23 debug =
pset.getUntrackedParameter<
bool>(
"debug",
false);
25 dtDigiToken_ = consumes<DTDigiCollection>(
edm::InputTag(
pset.getUntrackedParameter<
string>(
"digiLabel")));
28 consumes<DTRecSegment4DCollection>(
edm::InputTag(
pset.getUntrackedParameter<
string>(
"recHits4DLabel")));
30 recHitToken_ = consumes<DTRecHitCollection>(
edm::InputTag(
pset.getUntrackedParameter<
string>(
"recHitLabel")));
47 wheel_s =
"+" + wheel_s;
48 string histoName =
"digisPerMB" + station_s +
"W" + wheel_s;
49 string histoTitle =
"Number of digis in MB" + station_s +
"YB" + wheel_s;
61 wheel_s =
"+" + wheel_s;
62 string histoName =
"timeBoxesPerMB" + station_s +
"W" + wheel_s;
63 string histoTitle =
"Number of TDC counts in MB" + station_s +
"YB" + wheel_s;
71 timeBoxesPerEvent = ibooker.
book1D(
"timeBoxesPerEvent",
"TDC counts per event", 400, 0, 1600);
74 digisPerEvent = ibooker.
book1D(
"digisPerEvent",
"Number of digis per event", 100, 0, 900);
77 recHitsPerEvent = ibooker.
book1D(
"recHitsPerEvent",
"Number of RecHits per event", 100, 0, 250);
80 segments4DPerEvent = ibooker.
book1D(
"segments4DPerEvent",
"Number of 4D Segments per event", 50, 0, 50);
82 recHitsPer4DSegment = ibooker.
book1D(
"recHitsPer4DSegment",
"Number of RecHits per segment", 16, 0.5, 16.5);
85 t0From4DPhiSegment = ibooker.
book1D(
"t0From4DPhiSegment",
"T0 from 4D Phi segments", 100, -150, 150);
86 t0From4DZSegment = ibooker.
book1D(
"t0From4DZSegment",
"T0 from 4D Z segments", 100, -150, 150);
91 cout <<
"[DTOccupancyEfficiency] Analyze #Run: " <<
event.id().run() <<
" #Event: " <<
event.id().event() << endl;
95 event.getByToken(dtDigiToken_, dtdigis);
97 int numberOfDigis = 0;
98 std::map<int, std::map<int, int>> numberOfDigisPerRing;
101 for (dtLayerId_It = dtdigis->begin(); dtLayerId_It != dtdigis->end(); ++dtLayerId_It) {
103 digiIt != ((*dtLayerId_It).second).
second;
106 int wheelId = ((*dtLayerId_It).first).
wheel();
107 int stationId = ((*dtLayerId_It).first).
station();
108 (numberOfDigisPerRing[stationId])[wheelId] += 1;
110 timeBoxesPerEvent->Fill((*digiIt).countsTDC());
111 (timeBoxesPerRing[stationId])[wheelId]->
Fill((*digiIt).countsTDC());
116 digisPerEvent->Fill(numberOfDigis);
125 event.getByToken(recHits4DToken_, all4DSegments);
127 segments4DPerEvent->Fill(all4DSegments->size());
131 event.getByToken(recHitToken_, dtRecHits);
133 recHitsPerEvent->Fill(dtRecHits->size());
139 unsigned int nHits = (segment->hasPhi() ? (segment->phiSegment())->
recHits().size() : 0);
140 nHits += (segment->hasZed() ? (segment->zSegment())->
recHits().size() : 0);
141 recHitsPer4DSegment->Fill(
nHits);
143 if (segment->hasPhi()) {
144 double segmentPhiT0 = segment->phiSegment()->t0();
145 if (segment->phiSegment()->ist0Valid())
146 t0From4DPhiSegment->Fill(segmentPhiT0);
148 if (segment->hasZed()) {
149 double segmentZT0 = segment->zSegment()->t0();
150 if (segment->zSegment()->ist0Valid())
151 t0From4DZSegment->Fill(segmentZT0);
virtual void setCurrentFolder(std::string const &fullpath)
std::string to_string(const V &value)
~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.
std::vector< DigiType >::const_iterator const_iterator
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())
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override