4 DeadChannelError{}, HotChannelError{}, DigiErrorCAPID{}, DigiErrorDVER{},
27 for (
int i=0;
i<18;++
i)
41 std::cout <<
"<HcalZDCMonitor::setup> Setting up histograms" << std::endl;
44 std::cout <<
"<HcalZDCMonitor::setup> Getting variable values from cfg files" << std::endl;
51 std::cout <<
"<HcalZDCMonitor::setup> Setting up Histograms" << std::endl;
132 ZDC_Digi_Errors = ib.
book2D(
"ZDC_Digi_Errors",
"Raw Number of Digi Errors Per ZDC Channel", 2, 0, 2, 9, 0, 9);
150 ZDC_DigiErrors_DVER = ib.
book2D(
"ZDC_DigiErrors_DVER",
"Raw Number of Digi Errors Caused by Finding .dv()=0 or .er()=1",2,0,2,9,0,9);
164 ZDC_DigiErrors_CAPID = ib.
book2D(
"ZDC_DigiErrors_CAPID",
"Raw Number of Digi Errors Caused by the Caps not Alternating",2,0,2,9,0,9);
236 ZDC_TotalChannelErrors = ib.
book2D(
"ZDC_TotalChannelErrors",
"Total Number of Errors(Digi Error, Hot Cell or Dead Cell) Per Channel in the ZDC" ,2,0,2,9,0,9);
252 for (
int i = 0;
i < 5; ++
i) {
254 sprintf(title,
"h_ZDCP_EMChan_%i_Pulse",
i + 1);
255 sprintf(name,
"ZDC Plus EM Section Pulse for channel %i",
i + 1);
260 sprintf(title,
"h_ZDCM_EMChan_%i_Pulse",
i + 1);
261 sprintf(name,
"ZDC Minus EM Section Pulse for channel %i",
i + 1);
266 sprintf(title,
"h_ZDCP_EMChan_%i_Charge",
i + 1);
267 sprintf(name,
"ZDC Plus EM Section Charge for channel %i",
i + 1);
272 sprintf(title,
"h_ZDCM_EMChan_%i_Charge",
i + 1);
273 sprintf(name,
"ZDC Minus EM Section Charge for channel %i",
i + 1);
278 sprintf(title,
"h_ZDCP_EMChan_%i_TSMean",
i + 1);
279 sprintf(name,
"ZDC Plus EM Section TSMean for channel %i",
i + 1);
284 sprintf(title,
"h_ZDCM_EMChan_%i_TSMean",
i + 1);
285 sprintf(name,
"ZDC Minus EM Section TSMean for channel %i",
i + 1);
291 for (
int i = 0;
i < 4; ++
i) {
293 sprintf(title,
"h_ZDCP_HADChan_%i_Pulse",
i + 1);
294 sprintf(name,
"ZDC Plus HAD Section Pulse for channel %i",
i + 1);
299 sprintf(title,
"h_ZDCM_HADChan_%i_Pulse",
i + 1);
300 sprintf(name,
"ZDC Minus HAD Section Pulse for channel %i",
i + 1);
305 sprintf(title,
"h_ZDCP_HADChan_%i_Charge",
i + 1);
306 sprintf(name,
"ZDC Plus HAD Section Charge for channel %i",
i + 1);
311 sprintf(title,
"h_ZDCM_HADChan_%i_Charge",
i + 1);
312 sprintf(name,
"ZDC Minus HAD Section Charge for channel %i",
i + 1);
317 sprintf(title,
"h_ZDCP_HADChan_%i_TSMean",
i + 1);
318 sprintf(name,
"ZDC Plus HAD Section TSMean for channel %i",
i + 1);
323 sprintf(title,
"h_ZDCM_HADChan_%i_TSMean",
i + 1);
324 sprintf(name,
"ZDC Minus HAD Section TSMean for channel %i",
i + 1);
332 for (
int i = 0;
i < 5; ++
i) {
334 sprintf(title,
"h_ZDCP_EMChan_%i_RecHit_Energy",
i+1);
335 sprintf(name,
"ZDC EM Section Rechit Energy for channel %i",
i+1);
340 sprintf(title,
"h_ZDCM_EMChan_%i_RecHit_Energy",
i+1);
341 sprintf(name,
"ZDC EM Section Rechit Energy for channel %i",
i+1);
346 sprintf(title,
"h_ZDCP_EMChan_%i_RecHit_Timing",
i+1);
347 sprintf(name,
"ZDC EM Section Rechit Timing for channel %i",
i+1);
352 sprintf(title,
"h_ZDCM_EMChan_%i_RecHit_Timing",
i+1);
353 sprintf(name,
"ZDC EM Section Rechit Timing for channel %i",
i+1);
359 for (
int i = 0;
i < 4; ++
i) {
361 sprintf(title,
"h_ZDCP_HADChan_%i_RecHit_Energy",
i+1);
362 sprintf(name,
"ZDC HAD Section Rechit Energy for channel %i",
i+1);
367 sprintf(title,
"h_ZDCM_HADChan_%i_RecHit_Energy",
i+1);
368 sprintf(name,
"ZDC HAD Section Rechit Energy for channel %i",
i+1);
373 sprintf(title,
"h_ZDCP_HADChan_%i_RecHit_Timing",
i+1);
374 sprintf(name,
"ZDC HAD Section Rechit Timing for channel %i",
i+1);
379 sprintf(title,
"h_ZDCM_HADChan_%i_RecHit_Timing",
i+1);
380 sprintf(name,
"ZDC HAD Section Rechit Timing for channel %i",
i+1);
391 std::cout <<
"<HcalZDCMonitor::processEvent> Processing Event..." << std::endl;
404 std::vector<double> fData;
405 double digiThresh = 99.5;
407 int digiSaturation = 127;
419 for (
int i=0;
i<18;++
i) {
427 typedef std::vector<DetId> DetIdVector;
433 DetId id(baddigi_iter->rawId());
437 int iSide =
id.
zside();
438 int iSection =
id.section();
439 int iChannel =
id.channel();
440 if(iSection==1 || iSection==2){
442 DeadChannelError[(9*((1-iSide)/2))+(iChannel-1)+(5*((iSection-1)%2))]=
false;
456 digi_iter != digi.
end(); ++digi_iter)
460 int iSide = digi_iter->id().zside();
461 int iSection = digi_iter->id().section();
462 int iChannel = digi_iter->id().channel();
464 unsigned int fTS = digi_iter->
size();
465 while (fData.size()<fTS)
466 fData.push_back(-999);
467 while (fData.size()>fTS)
470 if (iSection==1 || iSection==2)
477 DeadChannelError[(9*((1-iSide)/2))+(iChannel-1)+(5*((iSection-1)%2))]=
false;
481 int iCapIDPrevious=27;
485 for (
int iTS=0; iTS<digi.
size(); ++iTS)
488 if (digi[iTS].
adc()==127) HotCounter+=1;
490 if (HotCounter >= 3)
HotChannelError[(9*((1-iSide)/2))+(iChannel-1)+(5*((iSection-1)%2))]=
true;
495 if (digi[iTS].
adc()<=10) ColdCounter+=1;
508 if (iTS>0) iCapIDPrevious=digi.
sample(iTS-1).
capid();
513 DigiErrorDVER[(9*((1-iSide)/2))+(iChannel-1)+(5*((iSection-1)%2))]=
true;
518 if (iTS==0)
continue;
521 if ((iCapID-iCapIDPrevious+4)%4!=1)
524 DigiErrorCAPID[(9*((1-iSide)/2))+(iChannel-1)+(5*((iSection-1)%2))]=
true;
536 bool saturated =
false;
537 for (
unsigned int i = 0;
i < fTS; ++
i)
540 fData[
i]=digi[
i].nominal_fC();
541 if (digi[
i].
adc()==digiSaturation){
548 fTSMean =
getTime(fData, 4, 6, fSum);
550 if (saturated==
true){
557 for (
unsigned int i = 0;
i < fTS; ++
i) {
560 if (fSum > digiThresh) {
567 for (
unsigned int i = 0;
i < fTS; ++
i) {
570 if (fSum > digiThresh) {
577 else if (iSection == 2)
580 for (
unsigned int i = 0;
i < fTS; ++
i) {
583 if (fSum > digiThresh) {
589 for (
unsigned int i = 0;
i < fTS; ++
i) {
592 if (fSum > digiThresh) {
609 for (
int i = 0;
i<18;
i++){
654 rechit_iter != rechit.
end(); ++rechit_iter)
657 int Section = (rechit_iter->id()).section();
658 int Channel = (rechit_iter->id()).channel();
720 double weightedTime = 0.;
723 double digiThreshf = 99.5;
725 for (
unsigned int ts=ts_min; ts<=ts_max; ++ts) {
726 if (fData[ts] > digiThreshf){
727 weightedTime += ts * fData[ts];
733 Time = weightedTime / SumT;
745 bool HadLumiError[18]={
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false};
751 for (
int i=0;
i<18;++
i) {
765 HadLumiError[
i]=
true;
773 HadLumiError[
i]=
true;
775 if (HadLumiError[i]==
true)
809 for (
int i=0;
i<18;++
i) {
823 HadLumiError[
i]=
true;
831 HadLumiError[
i]=
true;
833 if (HadLumiError[i]==
true)
870 for (
int i = 0;
i < 5; ++
i) {
883 for (
int i = 0;
i < 4; ++
i) {
int adc(sample_type sample)
get the ADC sample (12 bits)
MonitorElement * h_ZDCP_HAD_TSMean[4]
T getParameter(std::string const &) const
bool ChannelHasDigiError[18]
T getUntrackedParameter(std::string const &, T const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * ZDC_DigiErrorsVsLS
MonitorElement * h_ZDCP_HAD_RecHitTiming[4]
MonitorElement * h_ZDCM_EM_Pulse[5]
MonitorElement * h_ZDCM_HAD_TSMean[4]
int ColdChannelCounter[18]
MonitorElement * ZDC_Hot_Channel_Errors
MonitorElement * h_ZDCM_EM_TSMean[5]
void endLuminosityBlock()
MonitorElement * h_ZDCM_EM_RecHitTiming[5]
MonitorElement * NZDC_QualityIndexVsLB_
MonitorElement * ZDC_Dead_Channel_Errors
MonitorElement * h_2D_TSMean
MonitorElement * h_ZDCM_HAD_RecHitTiming[4]
virtual void setup(const edm::ParameterSet &ps, DQMStore::IBooker &ib)
int OfflineColdThreshold_
MonitorElement * h_ZDCP_EM_RecHitEnergy[5]
int zside() const
get the z-side of the cell (1/-1)
MonitorElement * bookInt(Args &&...args)
std::vector< ZDCDataFrame >::const_iterator const_iterator
MonitorElement * h_ZDCP_EM_Pulse[5]
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)
bool dv() const
is the Data Valid bit set?
std::vector< double > ChannelWeighting_
MonitorElement * h_ZDCP_EM_TSMean[5]
MonitorElement * h_ZDCM_EM_Charge[5]
std::vector< double > MaxErrorRates_
MonitorElement * ZDC_DeadChannelErrorsVsLS
void setup(const edm::ParameterSet &ps, DQMStore::IBooker &ib)
MonitorElement * ZDC_HotChannelErrorsVsLS
MonitorElement * h_ZDCP_HAD_Charge[4]
MonitorElement * ZDC_ColdChannelErrorsVsLS
const HcalQIESample & sample(int i) const
access a sample
MonitorElement * ZDC_DigiErrors_CAPID
MonitorElement * ZDC_DigiErrors_DVER
MonitorElement * book1D(Args &&...args)
DetIdVector::const_iterator bad_quality_begin() const
MonitorElement * h_2D_saturation
MonitorElement * h_2D_charge
MonitorElement * h_2D_RecHitTime
MonitorElement * h_ZDCM_HAD_Charge[4]
MonitorElement * h_ZDCM_HAD_RecHitEnergy[4]
MonitorElement * ZDC_Cold_Channel_Errors
const_iterator end() const
int OfflineDeadThreshold_
void endLuminosityBlock(void)
MonitorElement * PZDC_QualityIndexVsLB_
double getTime(const std::vector< double > &fData, unsigned int ts_min, unsigned int ts_max, double &fSum)
MonitorElement * h_2D_RecHitEnergy
static const int SubdetectorId
void setCurrentFolder(const std::string &fullpath)
int capid() const
get the Capacitor id
MonitorElement * book2D(Args &&...args)
bool DeadChannelError[18]
MonitorElement * EventsVsLS
MonitorElement * h_ZDCP_HAD_Pulse[4]
int size() const
total number of samples in the digi
MonitorElement * h_ZDCM_EM_RecHitEnergy[5]
MonitorElement * ZDC_Digi_Errors
MonitorElement * ZDC_TotalChannelErrors
MonitorElement * h_ZDCP_HAD_RecHitEnergy[4]
int TotalChannelErrors[18]
int DeadChannelCounter[18]
TH2F * getTH2F(void) const
MonitorElement * h_ZDCP_EM_Charge[5]
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
bool er() const
is the error bit set?
const_iterator begin() const
DetIdVector::const_iterator bad_quality_end() const
MonitorElement * h_ZDCP_EM_RecHitTiming[5]
MonitorElement * h_ZDCM_HAD_Pulse[4]