13 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
14 prefixME_.append(
"/");
99 std::cout <<
"<HcalDeadCellMonitor::setup> Setting up histograms"<<std::endl;
106 Nevents = ib.
book1D(
"NumberOfDeadCellEvents",
"Number of Events Seen by DeadCellMonitor",2,0,2);
111 "Total Number of Dead Hcal Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
115 "Total Number of Dead HB Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
119 "Total Number of Dead HE Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
122 "Total Number of Dead HO Cells Ring 0,1 |ieta|<=10 (excluding known problems) vs LS;Lumi Section;Dead Cells",
125 "Total Number of Dead HO Cells Ring 2 |ieta|>10 (excluding known problems) vs LS;Lumi Section;Dead Cells",
128 "Total Number of Dead HF Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
131 "Total Number of Dead HBHEHF Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
143 "RBX loss vs LS; Lumi Section; Index of lost RBX",
147 "Total Number of Dead HBHEHF Cells in last 10 LS. Last bin contains OverFlow",
150 "Total Number of Dead Cells Ring 0,1 (abs(ieta)<=10) in last 10 LS. Last bin contains OverFlow",
157 me=ib.
bookInt(
"Test_DigiMissing_Periodic_Lumi_Check");
162 me=ib.
bookInt(
"Min_Events_Required_Periodic_Lumi_Check");
164 me=ib.
bookInt(
"Test_NeverPresent_RecHits");
166 me=ib.
bookFloat(
"HBMinimumRecHitEnergy");
168 me=ib.
bookFloat(
"HEMinimumRecHitEnergy");
170 me=ib.
bookFloat(
"HOMinimumRecHitEnergy");
172 me=ib.
bookFloat(
"HFMinimumRecHitEnergy");
174 me=ib.
bookInt(
"Test_RecHitsMissing_Periodic_Lumi_Check");
180 std::stringstream
units;
181 std::stringstream
name;
187 "Digi Present At Least Once",
"");
190 "Total Number of Never-Present Hcal Cells vs LS;Lumi Section;Dead Cells",
194 "Total Number of Never-Present HB Cells vs LS;Lumi Section;Dead Cells",
198 "Total Number of Never-Present HE Cells vs LS;Lumi Section;Dead Cells",
202 "Total Number of Never-Present HO Cells vs LS;Lumi Section;Dead Cells",
206 "Total Number of Never-Present HF Cells vs LS;Lumi Section;Dead Cells",
220 name<<
"Dead Cells with No Digis";
225 name<<
"HB HE HF Depth 1 Dead Cells with No Digis for at least 1 Full Luminosity Block";
229 name<<
"HB HE HF Depth 2 Dead Cells with No Digis for at least 1 Full Luminosity Block";
233 name<<
"HE Depth 3 Dead Cells with No Digis for at least 1 Full Luminosity Block";
237 name<<
"HO Depth 4 Dead Cells with No Digis for at least 1 Full Luminosity Block";
242 name<<
"Total Number of Hcal Digis Unoccupied for at least 1 Full Luminosity Block";
247 name<<
"Total Number of HB Digis Unoccupied for at least 1 Full LS vs LS;Lumi Section; Dead Cells";
252 name<<
"Total Number of HE Digis Unoccupied for at least 1 Full LS vs LS;Lumi Section; Dead Cells";
257 name<<
"Total Number of HO Digis Unoccupied for at least 1 Full LS vs LS;Lumi Section; Dead Cells";
262 name<<
"Total Number of HF Digis Unoccupied for at least 1 Full LS vs LS;Lumi Section; Dead Cells";
287 units<<
"Cells Above Energy Threshold At Least Once: Depth 3 -- HE >="<<
HEenergyThreshold_<<
" GeV";
290 units<<
"Cells Above Energy Threshold At Least Once: Depth 4 -- HO >="<<
HOenergyThreshold_<<
" GeV";
296 "Total Number of Hcal Rechits with Low Energy;Lumi Section;Dead Cells",
299 name<<
"Total Number of HB RecHits with Energy Never >= "<<
HBenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
304 name<<
"Total Number of HE RecHits with Energy Never >= "<<HEenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
309 name<<
"Total Number of HO RecHits with Energy Never >= "<<HOenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
314 name<<
"Total Number of HF RecHits with Energy Never >= "<<HFenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
328 units<<
"RecHits with Consistent Low Energy Depth 1 -- HB <"<<HBenergyThreshold_<<
" GeV, HE < "<<HEenergyThreshold_<<
", HF <"<<HFenergyThreshold_<<
" GeV";
331 units<<
"RecHits with Consistent Low Energy Depth 2 -- HB <"<<HBenergyThreshold_<<
" GeV, HE < "<<HEenergyThreshold_<<
", HF <"<<HFenergyThreshold_<<
" GeV";
334 units<<
"RecHits with Consistent Low Energy Depth 3 -- HE <"<<HEenergyThreshold_<<
" GeV";
337 units<<
"RecHits with Consistent Low Energy Depth 4 -- HO <"<<HOenergyThreshold_<<
" GeV";
344 name<<
"Total Number of Hcal RecHits with Consistent Low Energy;Lumi Section;Dead Cells";
349 name<<
"Total Number of HB RecHits with Consistent Low Energy < "<<HBenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
354 name<<
"Total Number of HE RecHits with Consistent Low Energy < "<<HEenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
359 name<<
"Total Number of HO RecHits with Consistent Low Energy < "<<HOenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
364 name<<
"Total Number of HF RecHits with Consistent Low Energy < "<<HFenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
391 if (
debug_>1)
std::cout <<
"HcalDeadCellMonitor::bookHistograms"<<std::endl;
408 for (std::vector<DetId>::const_iterator
i = mydetids.begin();
448 for (
int ieta=11;ieta<=15;++ieta)
449 for (
int iphi=1;iphi<=72;++iphi)
452 if (
isSiPM(ieta,iphi,4)==
false)
484 for (
int ieta=11;ieta<=15;++ieta)
485 for (
int iphi=1;iphi<=72;++iphi)
546 for (
unsigned int i=0;
i<156;++
i)
637 if (dcsStatus.
isValid() && dcsStatus->size() != 0)
697 if (
debug_>1)
std::cout <<
"\t<HcalDeadCellMonitor::analyze> Processing good event! event # = "<<
ievt_<<std::endl;
703 processEvent(*hbhe_rechit, *ho_rechit, *hf_rechit, *hbhe_digi, *ho_digi, *hf_digi);
708 for(
int i=71;
i<132;
i++)
714 if(
i >= 72 &&
i < 95 &&
i%2==0)
716 if(
i >=108 &&
i <= 131 &&
i%2==0)
726 for (
unsigned int i=0;
i<132;++
i)
739 int intensity1_ = 101;
740 int intensity2_ = 101;
744 for (
unsigned int i=132;
i<156;++
i)
746 if(intensity1_>100 && intensity2_>100)
754 for (
unsigned int i=0;
i<156;++
i)
760 for (
unsigned int i=0;
i<156;++
i)
775 if (
debug_>1)
std::cout <<
"<HcalDeadCellMonitor::processEvent> Processing event..."<<std::endl;
803 j!=hbhedigi.
end(); ++
j)
810 j!=hodigi.
end(); ++
j)
816 j!=hfdigi.
end(); ++
j)
837 j!=hbHits.
end(); ++
j)
841 k!=hoHits.
end(); ++
k)
845 j!=hfHits.
end(); ++
j)
858 for (
int d=0;
d<4;++
d)
865 if (d==3) ++hopresent;
866 else if (d==2) ++hepresent;
871 if (
abs(ieta)>29) ++hfpresent;
872 else if (
abs(ieta)<17) ++hbpresent;
878 if (
abs(ieta)>29) ++hfpresent;
879 else if (
abs(ieta)<17) ++hbpresent;
909 int ieta=digi.id().ieta();
910 int iphi=digi.id().iphi();
911 int depth=digi.id().depth();
918 std::cout <<
"<HcalDeadCellMonitor::process_Digi> Invalid bin returned, eta_index = " << eta_index << std::endl;
939 template<
class RECHIT>
942 float en = rechit->energy();
944 int ieta =
id.
ieta();
945 int iphi =
id.iphi();
946 int depth =
id.depth();
948 int eta_index =
CalcEtaBin(
id.subdet(),ieta,depth);
952 std::cout <<
"<HcalDeadCellMonitor::process_Digi> Invalid bin returned, eta_index = " << eta_index << std::endl;
1029 std::cout <<
"<HcalDeadCellMonitor::fillNevents_recentdigis> CHECKING FOR RECENT MISSING DIGIS evtcount = "<<
deadevt_<<std::endl;
1049 for (
int subdet=1;subdet<=4;++subdet)
1052 if (ieta==-9999)
continue;
1080 for (
int subdet=1;subdet<=4;++subdet)
1083 if (ieta==-9999)
continue;
1100 ieta<0 ? zside=-1 : zside=+1;
1106 std::cout <<
"DEAD CELL; NO RECENT OCCUPANCY: subdet = "<<subdet<<
", ieta = "<<ieta<<
", iphi = "<<iphi<<
" depth = "<<
depth+1<<std::endl;
1145 std::cout <<
"<HcalDeadCellMonitor::fillNevents_energy> BELOW-ENERGY-THRESHOLD PLOTS"<<std::endl;
1165 for (
int subdet=1;subdet<=4;++subdet)
1168 if (ieta==-9999)
continue;
1196 for (
int subdet=1;subdet<=4;++subdet)
1199 if (ieta==-9999)
continue;
1219 ieta<0 ? zside=-1 : zside=+1;
1223 std::cout <<
"DEAD CELL; BELOW ENERGY THRESHOLD; subdet = "<<subdet<<
" ieta = "<<ieta<<
", phi = "<<iphi<<
" depth = "<<
depth+1<<std::endl;
1243 std::cout <<
"<HcalDeadCellMonitor::fillNevents_problemCells> FILLING PROBLEM CELL PLOTS"<<std::endl;
1264 int knownBadHFLUMI=0;
1270 unsigned int neverpresentHB=0;
1271 unsigned int neverpresentHE=0;
1272 unsigned int neverpresentHO=0;
1273 unsigned int neverpresentHF=0;
1275 unsigned int unoccupiedHB=0;
1276 unsigned int unoccupiedHE=0;
1277 unsigned int unoccupiedHO=0;
1278 unsigned int unoccupiedHF=0;
1280 unsigned int belowenergyHB=0;
1281 unsigned int belowenergyHE=0;
1282 unsigned int belowenergyHO=0;
1283 unsigned int belowenergyHF=0;
1285 unsigned int energyneverpresentHB=0;
1286 unsigned int energyneverpresentHE=0;
1287 unsigned int energyneverpresentHO=0;
1288 unsigned int energyneverpresentHF=0;
1302 unsigned int RBX_loss_HB=0;
1303 unsigned int RBX_loss_HE=0;
1304 unsigned int RBX_loss_HO01=0;
1305 unsigned int RBX_loss_HO2=0;
1306 unsigned int RBX_loss_HF=0;
1308 unsigned int counter_HB = 0;
1309 unsigned int counter_HE = 0;
1310 unsigned int counter_HO01 = 0;
1311 unsigned int counter_HO2 = 0;
1312 unsigned int counter_HF = 0;
1314 for(
int i=0;
i<156;
i++)
1319 { counter_HB ++ ; RBX_loss_HB = 72*(counter_HB); }
1321 { counter_HE ++ ; RBX_loss_HE = 72*(counter_HE); }
1323 { counter_HO01 ++ ; RBX_loss_HO01 = 72*(counter_HO01); }
1325 { counter_HO2 ++ ; RBX_loss_HO2 = 72*(counter_HO2); }
1326 if(
i>=132 &&
i<=155)
1327 { counter_HF ++ ; RBX_loss_HF = 72*(counter_HF); }
1342 NumBadHO+=RBX_loss_HO01+RBX_loss_HO2;
1347 belowenergyHB+=RBX_loss_HB;
1348 belowenergyHE+=RBX_loss_HE;
1349 belowenergyHO+=RBX_loss_HO01+RBX_loss_HO2;
1350 belowenergyHF+=RBX_loss_HF;
1352 unoccupiedHB+=RBX_loss_HB;
1353 unoccupiedHE+=RBX_loss_HE;
1354 unoccupiedHO+=RBX_loss_HO01+RBX_loss_HO2;
1355 unoccupiedHF+=RBX_loss_HF;
1369 for (
int subdet=1;subdet<=4;++subdet)
1372 if (ieta==-9999)
continue;
1423 if (
excludeHO1P02_==
true && ( (ieta>4 && ieta<10) && (iphi<=10 || iphi>70) ) )
1429 if (
abs(ieta)<=10) ++knownBadHO01;
1444 else if (
depth==2 && (
abs(ieta)==35 ||
abs(ieta)==36))
1451 else if (
depth==2 && (
abs(ieta)==35 ||
abs(ieta)==36))
1459 else if (subdet==
HcalEndcap) ++neverpresentHE;
1489 if (subdet==
HcalBarrel) ++energyneverpresentHB;
1490 else if (subdet==
HcalEndcap) ++energyneverpresentHE;
1493 ++energyneverpresentHO;
1495 --energyneverpresentHO;
1497 else if (subdet==
HcalForward) ++energyneverpresentHF;
1503 else if (subdet==
HcalEndcap) ++belowenergyHE;
1540 if( belowenergyHB<RBX_loss_HB )
1541 belowenergyHB+=RBX_loss_HB;
1542 if( belowenergyHE<RBX_loss_HE )
1543 belowenergyHE+=RBX_loss_HE;
1544 if( belowenergyHO<RBX_loss_HO01+RBX_loss_HO2)
1545 belowenergyHO+=RBX_loss_HO01+RBX_loss_HO2;
1546 if( belowenergyHF<RBX_loss_HF )
1547 belowenergyHF+=RBX_loss_HF;
1549 if( unoccupiedHB<RBX_loss_HB )
1550 unoccupiedHB+=RBX_loss_HB;
1551 if( unoccupiedHE<RBX_loss_HE )
1552 unoccupiedHE+=RBX_loss_HE;
1553 if( unoccupiedHO<RBX_loss_HO01+RBX_loss_HO2 )
1554 unoccupiedHO+=RBX_loss_HO01+RBX_loss_HO2;
1555 if( unoccupiedHF<RBX_loss_HF )
1556 unoccupiedHF+=RBX_loss_HF;
1619 for (
unsigned int i=0;
i<85;++
i)
1621 for (
unsigned int j=0;
j<72;++
j)
1623 for (
unsigned int k=0;
k<4;++
k)
1633 for (
unsigned int i=0;
i<156;++
i)
edm::InputTag hfRechitLabel_
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * NumberOfNeverPresentRecHitsHO
bool LumiInOrder(int lumisec)
MonitorElement * NumberOfRecentMissingRecHitsHF
MonitorElement * NumberOfNeverPresentRecHits
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * ProblemsCurrentLB
MonitorElement * NumberOfNeverPresentDigisHB
void analyze(edm::Event const &e, edm::EventSetup const &s)
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * HEDeadVsEvent
MonitorElement * NumberOfRecentMissingRecHits
CaloTopology const * topology(0)
void zeroCounters(bool resetpresent=false)
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool present_digi[85][72][4]
edm::InputTag hbheRechitLabel_
#define DEFINE_FWK_MODULE(type)
bool validDetId(HcalSubdetector subdet, int ieta, int iphi, int depth) const
std::map< unsigned int, int > KnownBadCells_
MonitorElement * NumberOfNeverPresentDigisHE
std::vector< int > AllowedCalibTypes_
void fillNevents_problemCells(const HcalTopology &)
void endRun(const edm::Run &run, const edm::EventSetup &c)
virtual void cleanup(void)
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
MonitorElement * bookInt(Args &&...args)
std::vector< HBHEDataFrame >::const_iterator const_iterator
HcalDeadCellMonitor(const edm::ParameterSet &ps)
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)
edm::LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * NumberOfRecentMissingDigisHB
const Item * getValues(DetId fId, bool throwOnFail=true) const
void update(void)
Mark the object updated.
void process_RecHit(T &rechit)
MonitorElement * ProblemsInLastNLB_HO01_alarm
MonitorElement * NumberOfRecentMissingDigisHE
bool present_rechit[85][72][4]
edm::EDGetTokenT< HORecHitCollection > tok_ho_
LuminosityBlockNumber_t luminosityBlock() const
uint32_t rawId() const
get the raw id
void SetupEtaPhiHists(DQMStore::IBooker &ib, EtaPhiHists &hh, std::string Name, std::string Units)
double HFenergyThreshold_
edm::EDGetTokenT< DcsStatusCollection > tok_dcs_
bool isSiPM(int ieta, int iphi, int depth)
EtaPhiHists RecHitPresentByDepth
MonitorElement * RBX_loss_VS_LB
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
MonitorElement * ProblemsVsLB
bool IsAllowedCalibType()
MonitorElement * NumberOfNeverPresentDigisHF
MonitorElement * ProblemsVsLB_HBHEHF
edm::InputTag hoRechitLabel_
double HEenergyThreshold_
std::vector< DetId > getAllChannels() const
unsigned int occupancy_RBX[156]
HcalLogicalMap * logicalMap_
MonitorElement * NumberOfNeverPresentDigisHO
int ieta() const
get the cell ieta
MonitorElement * book1D(Args &&...args)
MonitorElement * NumberOfNeverPresentRecHitsHB
Abs< T >::type abs(const T &t)
unsigned int recentoccupancy_rechit[85][72][4]
MonitorElement * NumberOfRecentMissingRecHitsHE
MonitorElement * ProblemsVsLB_HF
MonitorElement * NumberOfRecentMissingDigisHO
MonitorElement * NumberOfNeverPresentRecHitsHF
edm::EDGetTokenT< HODigiCollection > tok_hodigi_
void bookHistograms(DQMStore::IBooker &ib, const edm::Run &run, const edm::EventSetup &c)
MonitorElement * ProblemsVsLB_HB
const_iterator end() const
void setup(DQMStore::IBooker &)
const HcalFrontEndId getHcalFrontEndId(const DetId &)
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
unsigned int recentoccupancy_digi[85][72][4]
void processEvent(const HBHERecHitCollection &hbHits, const HORecHitCollection &hoHits, const HFRecHitCollection &hfHits, const HBHEDigiCollection &hbhedigi, const HODigiCollection &hodigi, const HFDigiCollection &hfdigi)
int badChannelStatusMask_
EtaPhiHists RecentMissingDigisByDepth
edm::EDGetTokenT< HFDigiCollection > tok_hfdigi_
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhedigi_
MonitorElement * NumberOfRecentMissingRecHitsHO
T const * product() const
EtaPhiHists DigiPresentByDepth
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
EtaPhiHists RecentMissingRecHitsByDepth
int CalcEtaBin(int subdet, int ieta, int depth)
double HOenergyThreshold_
MonitorElement * HBDeadVsEvent
MonitorElement * NumberOfNeverPresentRecHitsHE
TString units(TString variable, Char_t axis)
MonitorElement * ProblemsVsLB_HE
TProfile * getTProfile(void) const
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
MonitorElement * NumberOfNeverPresentDigis
unsigned int NumBadHFLUMI
double HBenergyThreshold_
MonitorElement * NumberOfRecentMissingDigis
void fillNevents_recentrechits(const HcalTopology &)
void fillNevents_recentdigis(const HcalTopology &)
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * NumberOfRecentMissingDigisHF
void process_Digi(T &digi)
void processEvent_HBHEdigi(HBHEDataFrame digi)
MonitorElement * bookFloat(Args &&...args)
bool deadmon_test_rechits_
MonitorElement * ProblemsInLastNLB_HBHEHF_alarm
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > tok_gtEvm_
MonitorElement * HFDeadVsEvent
void Reset(void)
reset ME (ie. contents, errors, etc)
virtual void setup(DQMStore::IBooker &)
MonitorElement * ProblemsVsLB_HO2
MonitorElement * HODeadVsEvent
const_iterator begin() const
MonitorElement * NumberOfRecentMissingRecHitsHB
MonitorElement * ProblemsVsLB_HO