43 std::stringstream labelBuilder;
45 const short nBeams = 8;
46 const short nDisks = 9;
51 nameAndTitle =
"NumberOfSignals_AlignmentTubes";
52 nSignalsAT = iBooker.
book2D( nameAndTitle, nameAndTitle, 22, 0, 22, nBeams, 0, nBeams );
57 for(
unsigned int i = 1;
i <= 5; ++
i ) {
58 labelBuilder.clear(); labelBuilder.str(
"" );
59 labelBuilder <<
"TEC- D" << 5-
i;
61 labelBuilder.clear(); labelBuilder.str(
"" );
62 labelBuilder <<
"TEC+ D" << i-1;
65 for(
unsigned int i = 0;
i < 6; ++
i ) {
66 labelBuilder.clear(); labelBuilder.str(
"" );
67 labelBuilder <<
"TIB" <<
i;
69 labelBuilder.clear(); labelBuilder.str(
"" );
70 labelBuilder <<
"TOB" <<
i;
78 nameAndTitle =
"NumberOfSignals_TEC+R4";
83 nameAndTitle =
"NumberOfSignals_TEC+R6";
88 nameAndTitle =
"NumberOfSignals_TEC-R4";
93 nameAndTitle =
"NumberOfSignals_TEC-R6";
101 for(
unsigned int disk = 0; disk < 9; ++disk ) {
102 labelBuilder.clear(); labelBuilder.str(
"" );
103 labelBuilder <<
"DISK" << disk;
112 for(
unsigned int beam = 0; beam < 8; ++beam ) {
113 labelBuilder.clear(); labelBuilder.str(
"" );
114 labelBuilder <<
"BEAM" << beam;
143 if( digiType ==
"Raw" ) {
147 aEvent.
getByLabel( digiProducer, digiLabel, rawDigis );
156 else if( digiType ==
"Processed" ) {
159 aEvent.
getByLabel( digiProducer, digiLabel, processedDigis );
170 throw cms::Exception(
"LaserAlignmentT0ProducerDQM" ) <<
" ERROR ** Unknown DigiType: " << digiType <<
" specified in config." << std::endl;
186 int det,
ring, beam, disk,
pos;
192 det = 0; ring = 0; beam = 0; disk = 0;
195 bool isAboveThreshold =
false;
196 bool isExceedThreshold =
false;
205 if( detSetIter == aDetSetVector.
end() ) {
206 throw cms::Exception(
"[LaserAlignmentT0ProducerDQM::FillFromRawDigis]" ) <<
" ** ERROR: No raw DetSet found for det: " << detRawId <<
"." << std::endl;
212 for( ; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator ) {
224 if( isAboveThreshold && !isExceedThreshold ) {
239 }
while( moduleLoop.
TECLoop( det, ring, beam, disk ) );
245 det = 0; beam = 0; disk = 0;
248 bool isAboveThreshold =
false;
249 bool isExceedThreshold =
false;
258 if( detSetIter == aDetSetVector.
end() ) {
259 throw cms::Exception(
"[LaserAlignmentT0ProducerDQM::FillFromRawDigis]" ) <<
" ** ERROR: No raw DetSet found for det: " << detRawId <<
"." << std::endl;
265 for( ; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator ) {
277 if( isAboveThreshold && !isExceedThreshold ) {
289 }
while( moduleLoop.
TEC2TECLoop( det, beam, disk ) );
294 det = 2; beam = 0; pos = 0;
297 bool isAboveThreshold =
false;
298 bool isExceedThreshold =
false;
307 if( detSetIter == aDetSetVector.
end() ) {
308 throw cms::Exception(
"[LaserAlignmentT0ProducerDQM::FillFromRawDigis]" ) <<
" ** ERROR: No raw DetSet found for det: " << detRawId <<
"." << std::endl;
314 for( ; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator ) {
326 if( isAboveThreshold && !isExceedThreshold ) {
338 }
while( moduleLoop.
TIBTOBLoop( det, beam, pos ) );
354 int det,
ring, beam, disk,
pos;
357 det = 0; ring = 0; beam = 0; disk = 0;
360 bool isAboveThreshold =
false;
361 bool isExceedThreshold =
false;
370 if( detSetIter == aDetSetVector.
end() )
continue;
375 for( ; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator ) {
387 if( isAboveThreshold && !isExceedThreshold ) {
402 }
while( moduleLoop.
TECLoop( det, ring, beam, disk ) );
407 det = 0; beam = 0; disk = 0;
410 bool isAboveThreshold =
false;
411 bool isExceedThreshold =
false;
420 if( detSetIter == aDetSetVector.
end() )
continue;
425 for( ; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator ) {
437 if( isAboveThreshold && !isExceedThreshold ) {
449 }
while( moduleLoop.
TEC2TECLoop( det, beam, disk ) );
454 det = 2; beam = 0; pos = 0;
457 bool isAboveThreshold =
false;
458 bool isExceedThreshold =
false;
467 if( detSetIter == aDetSetVector.
end() )
continue;
472 for( ; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator ) {
484 if( isAboveThreshold && !isExceedThreshold ) {
496 }
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)
#define DEFINE_FWK_MODULE(type)
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
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
void setCurrentFolder(const std::string &fullpath)
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)