49 std::stringstream labelBuilder;
51 const short nBeams = 8;
52 const short nDisks = 9;
57 nameAndTitle =
"NumberOfSignals_AlignmentTubes";
63 for(
unsigned int i = 1;
i <= 5; ++
i ) {
64 labelBuilder.clear(); labelBuilder.str(
"" );
65 labelBuilder <<
"TEC- D" << 5-
i;
67 labelBuilder.clear(); labelBuilder.str(
"" );
68 labelBuilder <<
"TEC+ D" << i-1;
71 for(
unsigned int i = 0;
i < 6; ++
i ) {
72 labelBuilder.clear(); labelBuilder.str(
"" );
73 labelBuilder <<
"TIB" <<
i;
75 labelBuilder.clear(); labelBuilder.str(
"" );
76 labelBuilder <<
"TOB" <<
i;
84 nameAndTitle =
"NumberOfSignals_TEC+R4";
89 nameAndTitle =
"NumberOfSignals_TEC+R6";
94 nameAndTitle =
"NumberOfSignals_TEC-R4";
99 nameAndTitle =
"NumberOfSignals_TEC-R6";
107 for(
unsigned int disk = 0; disk < 9; ++disk ) {
108 labelBuilder.clear(); labelBuilder.str(
"" );
109 labelBuilder <<
"DISK" << disk;
118 for(
unsigned int beam = 0; beam < 8; ++beam ) {
119 labelBuilder.clear(); labelBuilder.str(
"" );
120 labelBuilder <<
"BEAM" << beam;
149 if( digiType ==
"Raw" ) {
153 aEvent.
getByLabel( digiProducer, digiLabel, rawDigis );
162 else if( digiType ==
"Processed" ) {
165 aEvent.
getByLabel( digiProducer, digiLabel, processedDigis );
176 throw cms::Exception(
"LaserAlignmentT0ProducerDQM" ) <<
" ERROR ** Unknown DigiType: " << digiType <<
" specified in config." << std::endl;
197 if( writeToPlainROOTFile ) {
215 int det,
ring, beam, disk, pos;
221 det = 0; ring = 0; beam = 0; disk = 0;
224 bool isAboveThreshold =
false;
225 bool isExceedThreshold =
false;
234 if( detSetIter == aDetSetVector.
end() ) {
235 throw cms::Exception(
"[LaserAlignmentT0ProducerDQM::FillFromRawDigis]" ) <<
" ** ERROR: No raw DetSet found for det: " << detRawId <<
"." << std::endl;
241 for( ; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator ) {
253 if( isAboveThreshold && !isExceedThreshold ) {
268 }
while( moduleLoop.
TECLoop( det, ring, beam, disk ) );
274 det = 0; beam = 0; disk = 0;
277 bool isAboveThreshold =
false;
278 bool isExceedThreshold =
false;
287 if( detSetIter == aDetSetVector.
end() ) {
288 throw cms::Exception(
"[LaserAlignmentT0ProducerDQM::FillFromRawDigis]" ) <<
" ** ERROR: No raw DetSet found for det: " << detRawId <<
"." << std::endl;
294 for( ; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator ) {
306 if( isAboveThreshold && !isExceedThreshold ) {
318 }
while( moduleLoop.
TEC2TECLoop( det, beam, disk ) );
323 det = 2; beam = 0; pos = 0;
326 bool isAboveThreshold =
false;
327 bool isExceedThreshold =
false;
336 if( detSetIter == aDetSetVector.
end() ) {
337 throw cms::Exception(
"[LaserAlignmentT0ProducerDQM::FillFromRawDigis]" ) <<
" ** ERROR: No raw DetSet found for det: " << detRawId <<
"." << std::endl;
343 for( ; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator ) {
355 if( isAboveThreshold && !isExceedThreshold ) {
367 }
while( moduleLoop.
TIBTOBLoop( det, beam, pos ) );
383 int det,
ring, beam, disk, pos;
386 det = 0; ring = 0; beam = 0; disk = 0;
389 bool isAboveThreshold =
false;
390 bool isExceedThreshold =
false;
399 if( detSetIter == aDetSetVector.
end() )
continue;
404 for( ; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator ) {
416 if( isAboveThreshold && !isExceedThreshold ) {
431 }
while( moduleLoop.
TECLoop( det, ring, beam, disk ) );
436 det = 0; beam = 0; disk = 0;
439 bool isAboveThreshold =
false;
440 bool isExceedThreshold =
false;
449 if( detSetIter == aDetSetVector.
end() )
continue;
454 for( ; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator ) {
466 if( isAboveThreshold && !isExceedThreshold ) {
478 }
while( moduleLoop.
TEC2TECLoop( det, beam, disk ) );
483 det = 2; beam = 0; pos = 0;
486 bool isAboveThreshold =
false;
487 bool isExceedThreshold =
false;
496 if( detSetIter == aDetSetVector.
end() )
continue;
501 for( ; digiRangeIterator != detSetIter->data.
end(); ++digiRangeIterator ) {
513 if( isAboveThreshold && !isExceedThreshold ) {
525 }
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)
~LaserAlignmentT0ProducerDQM()
unsigned int theLowerAdcThreshold
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * nSignalsAT
MonitorElement * nSignalsTECMinusR6
void FillFromRawDigis(const edm::DetSetVector< SiStripRawDigi > &)
unsigned int theUpperAdcThreshold
bool TEC2TECLoop(int &, int &, int &) const
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
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
virtual void endJob(void)
T & GetTEC2TECEntry(int subdetector, int beam, int tecDisk)
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.
void showDirStructure(void) const
collection_type::const_iterator const_iterator
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
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)
void setCurrentFolder(const std::string &fullpath)