31 std::stringstream labelBuilder;
33 const short nBeams = 8;
34 const short nDisks = 9;
39 nameAndTitle =
"NumberOfSignals_AlignmentTubes";
40 nSignalsAT = iBooker.
book2D(nameAndTitle, nameAndTitle, 22, 0, 22, nBeams, 0, nBeams);
45 for (
unsigned int i = 1;
i <= 5; ++
i) {
48 labelBuilder <<
"TEC- D" << 5 -
i;
52 labelBuilder <<
"TEC+ D" << i - 1;
55 for (
unsigned int i = 0;
i < 6; ++
i) {
58 labelBuilder <<
"TIB" <<
i;
62 labelBuilder <<
"TOB" <<
i;
69 nameAndTitle =
"NumberOfSignals_TEC+R4";
74 nameAndTitle =
"NumberOfSignals_TEC+R6";
79 nameAndTitle =
"NumberOfSignals_TEC-R4";
84 nameAndTitle =
"NumberOfSignals_TEC-R6";
90 for (
unsigned int disk = 0; disk < 9; ++disk) {
93 labelBuilder <<
"DISK" << disk;
101 for (
unsigned int beam = 0; beam < 8; ++beam) {
102 labelBuilder.clear();
103 labelBuilder.str(
"");
104 labelBuilder <<
"BEAM" << beam;
128 if (digiType ==
"Raw") {
131 aEvent.
getByLabel(digiProducer, digiLabel, rawDigis);
139 else if (digiType ==
"Processed") {
141 aEvent.
getByLabel(digiProducer, digiLabel, processedDigis);
151 <<
" ERROR ** Unknown DigiType: " << digiType <<
" specified in config." << std::endl;
162 int det,
ring, beam, disk,
pos;
170 bool isAboveThreshold =
false;
171 bool isExceedThreshold =
false;
180 if (detSetIter == aDetSetVector.
end()) {
181 throw cms::Exception(
"[LaserAlignmentT0ProducerDQM::FillFromRawDigis]")
182 <<
" ** ERROR: No raw DetSet found for det: " << detRawId <<
"." << std::endl;
188 for (; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator) {
195 isAboveThreshold =
true;
197 isExceedThreshold =
true;
201 if (isAboveThreshold && !isExceedThreshold) {
216 }
while (moduleLoop.
TECLoop(det, ring, beam, disk));
223 bool isAboveThreshold =
false;
224 bool isExceedThreshold =
false;
233 if (detSetIter == aDetSetVector.
end()) {
234 throw cms::Exception(
"[LaserAlignmentT0ProducerDQM::FillFromRawDigis]")
235 <<
" ** ERROR: No raw DetSet found for det: " << detRawId <<
"." << std::endl;
241 for (; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator) {
248 isAboveThreshold =
true;
250 isExceedThreshold =
true;
254 if (isAboveThreshold && !isExceedThreshold) {
272 bool isAboveThreshold =
false;
273 bool isExceedThreshold =
false;
282 if (detSetIter == aDetSetVector.
end()) {
283 throw cms::Exception(
"[LaserAlignmentT0ProducerDQM::FillFromRawDigis]")
284 <<
" ** ERROR: No raw DetSet found for det: " << detRawId <<
"." << std::endl;
290 for (; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator) {
297 isAboveThreshold =
true;
299 isExceedThreshold =
true;
303 if (isAboveThreshold && !isExceedThreshold) {
314 }
while (moduleLoop.
TIBTOBLoop(det, beam, pos));
322 int det,
ring, beam, disk,
pos;
330 bool isAboveThreshold =
false;
331 bool isExceedThreshold =
false;
340 if (detSetIter == aDetSetVector.
end())
346 for (; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator) {
353 isAboveThreshold =
true;
355 isExceedThreshold =
true;
359 if (isAboveThreshold && !isExceedThreshold) {
374 }
while (moduleLoop.
TECLoop(det, ring, beam, disk));
381 bool isAboveThreshold =
false;
382 bool isExceedThreshold =
false;
391 if (detSetIter == aDetSetVector.
end())
397 for (; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator) {
404 isAboveThreshold =
true;
406 isExceedThreshold =
true;
410 if (isAboveThreshold && !isExceedThreshold) {
428 bool isAboveThreshold =
false;
429 bool isExceedThreshold =
false;
438 if (detSetIter == aDetSetVector.
end())
444 for (; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator) {
451 isAboveThreshold =
true;
453 isExceedThreshold =
true;
457 if (isAboveThreshold && !isExceedThreshold) {
468 }
while (moduleLoop.
TIBTOBLoop(det, beam, pos));
void SetTEC2TECEntry(int subdetector, int beam, int tecDisk, T)
const uint16_t & adc() const
T getParameter(std::string const &) const
iterator find(det_id_type id)
LASGlobalData< int > detectorId
void FillDetectorId(void)
std::vector< int > tecDoubleHitDetId
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)
unsigned int theLowerAdcThreshold
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * nSignalsAT
MonitorElement * nSignalsTECMinusR6
#define DEFINE_FWK_MODULE(type)
void setCurrentFolder(std::string const &fullpath)
void FillFromRawDigis(const edm::DetSetVector< SiStripRawDigi > &)
unsigned int theUpperAdcThreshold
bool TEC2TECLoop(int &, int &, int &) const
MonitorElement * nSignalsTECPlusR6
T & GetTIBTOBEntry(int subdetector, int beam, int tibTobPosition)
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
void SetTIBTOBEntry(int subdetector, int beam, int tibTobPosition, T)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
iterator end()
Return the off-the-end iterator.
MonitorElement * nSignalsTECMinusR4
void analyze(const edm::Event &, const edm::EventSetup &) override
~LaserAlignmentT0ProducerDQM() override
T & GetTEC2TECEntry(int subdetector, int beam, int tecDisk)
MonitorElement * book2D(Args &&...args)
T & GetTECEntry(int subdetector, int tecRing, int beam, int tecDisk)
std::vector< edm::ParameterSet > theDigiProducerList
MonitorElement * nSignalsTECPlusR4
bool TECLoop(int &, int &, int &, int &) const
void FillFromProcessedDigis(const edm::DetSetVector< SiStripDigi > &)
edm::ParameterSet theConfiguration
bool TIBTOBLoop(int &, int &, int &) const
LaserAlignmentT0ProducerDQM(const edm::ParameterSet &)
iterator begin()
Return an iterator to the first DetSet.
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
const uint16_t & adc() const
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...
void SetTECEntry(int subdetector, int tecRing, int beam, int tecDisk, T)