12 theStripDigiInputTag(stripDigiInputTag),
14 theNDigisPerLayerPlots(),
17 theNDigisPerEventPlot(
dbe_->book1D(
"CSCComparatorDigisPerEvent",
"CSC Comparator Digis per event", 100, 0, 100) )
19 for(
int i = 0;
i < 10; ++
i)
21 char title1[200], title2[200], title3[200], title4[200];
22 sprintf(title1,
"CSCComparatorDigiTimeType%d",
i+1);
23 sprintf(title2,
"CSCComparatorDigisPerLayerType%d",
i+1);
24 sprintf(title3,
"CSCComparatorStripAmplitudeType%d",
i+1);
25 sprintf(title4,
"CSCComparator3StripAmplitudeType%d",
i+1);
63 unsigned nDigisPerEvent = 0;
66 std::vector<CSCComparatorDigi>::const_iterator digiItr = (*j).second.first;
67 std::vector<CSCComparatorDigi>::const_iterator
last = (*j).second.second;
77 for( ; digiItr !=
last; ++digiItr) {
81 int strip = digiItr->getStrip();
82 for(std::vector<CSCStripDigi>::const_iterator stripItr = stripRange.first;
83 stripItr != stripRange.second; ++stripItr)
85 if(stripItr->getStrip() ==
strip)
87 std::vector<int>
adc = stripItr->getADCCounts();
88 float pedc = 0.5*(adc[0]+adc[1]);
89 float amp = adc[4] - pedc;
92 if(stripItr != stripRange.first && stripItr != stripRange.second-1)
94 std::vector<int> adcl = (stripItr-1)->getADCCounts();
95 std::vector<int> adcr = (stripItr+1)->getADCCounts();
96 float pedl = 0.5*(adcl[0]+adcl[1]);
97 float pedr = 0.5*(adcr[0]+adcr[1]);
98 float three = adcl[4]-pedl
int adc(sample_type sample)
get the ADC sample (12 bits)
edm::InputTag theInputTag
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
CSCComparatorDigiValidation(DQMStore *dbe, const edm::InputTag &inputTag, const edm::InputTag &stripDigiInputTag)
void analyze(const edm::Event &, const edm::EventSetup &)
edm::InputTag theStripDigiInputTag
uint32_t rawId() const
get the raw id
const CSCChamberSpecs * specs() const
MonitorElement * theNDigisPerEventPlot
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MonitorElement * theStripDigiPlots[10]
MonitorElement * theTimeBinPlots[10]
MonitorElement * the3StripPlots[10]
MonitorElement * theNDigisPerLayerPlots[10]
std::pair< const_iterator, const_iterator > Range
~CSCComparatorDigiValidation()
const CSCChamber * chamber() const
const CSCLayer * findLayer(int detId) const