12 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
13 prefixME_.append(
"/");
77 std::cout <<
"<HcalDeadCellMonitor::setup> Setting up histograms"<<std::endl;
86 Nevents =
dbe_->
book1D(
"NumberOfDeadCellEvents",
"Number of Events Seen by DeadCellMonitor",2,0,2);
91 "Total Number of Dead Hcal Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
95 "Total Number of Dead HB Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
99 "Total Number of Dead HE Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
102 "Total Number of Dead HO Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
105 "Total Number of Dead HF Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
108 "Total Number of Dead HBHEHF Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
119 "RBX loss vs LS; Lumi Section; Index of lost RBX",
123 "Total Number of Dead HBHEHF Cells in last 10 LS. Last bin contains OverFlow",
130 me=
dbe_->
bookInt(
"Test_DigiMissing_Periodic_Lumi_Check");
135 me=
dbe_->
bookInt(
"Min_Events_Required_Periodic_Lumi_Check");
147 me=
dbe_->
bookInt(
"Test_RecHitsMissing_Periodic_Lumi_Check");
153 std::stringstream units;
154 std::stringstream
name;
160 "Digi Present At Least Once",
"");
163 "Total Number of Never-Present Hcal Cells vs LS;Lumi Section;Dead Cells",
167 "Total Number of Never-Present HB Cells vs LS;Lumi Section;Dead Cells",
171 "Total Number of Never-Present HE Cells vs LS;Lumi Section;Dead Cells",
175 "Total Number of Never-Present HO Cells vs LS;Lumi Section;Dead Cells",
179 "Total Number of Never-Present HF Cells vs LS;Lumi Section;Dead Cells",
193 name<<
"Dead Cells with No Digis";
198 name<<
"HB HE HF Depth 1 Dead Cells with No Digis for at least 1 Full Luminosity Block";
202 name<<
"HB HE HF Depth 2 Dead Cells with No Digis for at least 1 Full Luminosity Block";
206 name<<
"HE Depth 3 Dead Cells with No Digis for at least 1 Full Luminosity Block";
210 name<<
"HO Depth 4 Dead Cells with No Digis for at least 1 Full Luminosity Block";
215 name<<
"Total Number of Hcal Digis Unoccupied for at least 1 Full Luminosity Block";
220 name<<
"Total Number of HB Digis Unoccupied for at least 1 Full LS vs LS;Lumi Section; Dead Cells";
225 name<<
"Total Number of HE Digis Unoccupied for at least 1 Full LS vs LS;Lumi Section; Dead Cells";
230 name<<
"Total Number of HO Digis Unoccupied for at least 1 Full LS vs LS;Lumi Section; Dead Cells";
235 name<<
"Total Number of HF Digis Unoccupied for at least 1 Full LS vs LS;Lumi Section; Dead Cells";
260 units<<
"Cells Above Energy Threshold At Least Once: Depth 3 -- HE >="<<
HEenergyThreshold_<<
" GeV";
263 units<<
"Cells Above Energy Threshold At Least Once: Depth 4 -- HO >="<<
HOenergyThreshold_<<
" GeV";
269 "Total Number of Hcal Rechits with Low Energy;Lumi Section;Dead Cells",
272 name<<
"Total Number of HB RecHits with Energy Never >= "<<
HBenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
277 name<<
"Total Number of HE RecHits with Energy Never >= "<<HEenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
282 name<<
"Total Number of HO RecHits with Energy Never >= "<<HOenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
287 name<<
"Total Number of HF RecHits with Energy Never >= "<<HFenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
301 units<<
"RecHits with Consistent Low Energy Depth 1 -- HB <"<<HBenergyThreshold_<<
" GeV, HE < "<<HEenergyThreshold_<<
", HF <"<<HFenergyThreshold_<<
" GeV";
304 units<<
"RecHits with Consistent Low Energy Depth 2 -- HB <"<<HBenergyThreshold_<<
" GeV, HE < "<<HEenergyThreshold_<<
", HF <"<<HFenergyThreshold_<<
" GeV";
307 units<<
"RecHits with Consistent Low Energy Depth 3 -- HE <"<<HEenergyThreshold_<<
" GeV";
310 units<<
"RecHits with Consistent Low Energy Depth 4 -- HO <"<<HOenergyThreshold_<<
" GeV";
317 name<<
"Total Number of Hcal RecHits with Consistent Low Energy;Lumi Section;Dead Cells";
322 name<<
"Total Number of HB RecHits with Consistent Low Energy < "<<HBenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
327 name<<
"Total Number of HE RecHits with Consistent Low Energy < "<<HEenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
332 name<<
"Total Number of HO RecHits with Consistent Low Energy < "<<HOenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
337 name<<
"Total Number of HF RecHits with Consistent Low Energy < "<<HFenergyThreshold_<<
" GeV;Lumi Section;Dead Cells";
381 for (std::vector<DetId>::const_iterator
i = mydetids.begin();
418 for (
int ieta=11;ieta<=15;++ieta)
419 for (
int iphi=1;iphi<=72;++iphi)
422 if (
isSiPM(ieta,iphi,4)==
false)
454 for (
int ieta=11;ieta<=15;++ieta)
455 for (
int iphi=1;iphi<=72;++iphi)
525 for (
unsigned int i=0;
i<132;++
i)
603 if (dcsStatus.
isValid() && dcsStatus->size() != 0)
655 if (
debug_>1)
std::cout <<
"\t<HcalDeadCellMonitor::analyze> Processing good event! event # = "<<
ievt_<<std::endl;
662 processEvent(*hbhe_rechit, *ho_rechit, *hf_rechit, *hbhe_digi, *ho_digi, *hf_digi);
667 for(
int i=71;
i<132;
i++)
670 if(
i >= 72 &&
i < 85)
672 if(
i >=85 &&
i <= 95 &&
i%2==0)
674 if(
i >=108 &&
i <= 119 &&
i%2==0)
676 if(
i >=120 &&
i <= 131)
684 for (
unsigned int i=0;
i<132;++
i)
693 for (
unsigned int i=0;
i<132;++
i)
699 for (
unsigned int i=0;
i<132;++
i)
714 if (
debug_>1)
std::cout <<
"<HcalDeadCellMonitor::processEvent> Processing event..."<<std::endl;
742 j!=hbhedigi.
end(); ++
j)
749 j!=hodigi.
end(); ++
j)
755 j!=hfdigi.
end(); ++
j)
776 j!=hbHits.
end(); ++
j)
780 k!=hoHits.
end(); ++
k)
784 j!=hfHits.
end(); ++
j)
797 for (
int d=0;d<4;++d)
804 if (d==3) ++hopresent;
805 else if (d==2) ++hepresent;
810 if (
abs(ieta)>29) ++hfpresent;
811 else if (
abs(ieta)<17) ++hbpresent;
817 if (
abs(ieta)>29) ++hfpresent;
818 else if (
abs(ieta)<17) ++hbpresent;
848 int ieta=digi.id().ieta();
849 int iphi=digi.id().iphi();
850 int depth=digi.id().depth();
869 template<
class RECHIT>
872 float en = rechit->energy();
874 int ieta =
id.
ieta();
875 int iphi =
id.iphi();
876 int depth =
id.depth();
948 std::cout <<
"<HcalDeadCellMonitor::fillNevents_recentdigis> CHECKING FOR RECENT MISSING DIGIS evtcount = "<<
deadevt_<<std::endl;
968 for (
int subdet=1;subdet<=4;++subdet)
971 if (ieta==-9999)
continue;
997 for (
int subdet=1;subdet<=4;++subdet)
1000 if (ieta==-9999)
continue;
1017 ieta<0 ? zside=-1 : zside=+1;
1023 std::cout <<
"DEAD CELL; NO RECENT OCCUPANCY: subdet = "<<subdet<<
", ieta = "<<ieta<<
", iphi = "<<iphi<<
" depth = "<<depth+1<<std::endl;
1024 std::cout <<
"\t RAW COORDINATES: eta = "<<
eta<<
" phi = "<<
phi<<
" depth = "<<depth<<std::endl;
1063 std::cout <<
"<HcalDeadCellMonitor::fillNevents_energy> BELOW-ENERGY-THRESHOLD PLOTS"<<std::endl;
1083 for (
int subdet=1;subdet<=4;++subdet)
1086 if (ieta==-9999)
continue;
1114 for (
int subdet=1;subdet<=4;++subdet)
1117 if (ieta==-9999)
continue;
1137 ieta<0 ? zside=-1 : zside=+1;
1141 std::cout <<
"DEAD CELL; BELOW ENERGY THRESHOLD; subdet = "<<subdet<<
" ieta = "<<ieta<<
", phi = "<<iphi<<
" depth = "<<depth+1<<std::endl;
1162 std::cout <<
"<HcalDeadCellMonitor::fillNevents_problemCells> FILLING PROBLEM CELL PLOTS"<<std::endl;
1182 int knownBadHFLUMI=0;
1187 unsigned int neverpresentHB=0;
1188 unsigned int neverpresentHE=0;
1189 unsigned int neverpresentHO=0;
1190 unsigned int neverpresentHF=0;
1192 unsigned int unoccupiedHB=0;
1193 unsigned int unoccupiedHE=0;
1194 unsigned int unoccupiedHO=0;
1195 unsigned int unoccupiedHF=0;
1197 unsigned int belowenergyHB=0;
1198 unsigned int belowenergyHE=0;
1199 unsigned int belowenergyHO=0;
1200 unsigned int belowenergyHF=0;
1202 unsigned int energyneverpresentHB=0;
1203 unsigned int energyneverpresentHE=0;
1204 unsigned int energyneverpresentHO=0;
1205 unsigned int energyneverpresentHF=0;
1219 unsigned int RBX_loss_HB=0;
1220 unsigned int RBX_loss_HE=0;
1221 unsigned int RBX_loss_HO=0;
1223 unsigned int counter_HB = 0;
1224 unsigned int counter_HE = 0;
1225 unsigned int counter_HO = 0;
1227 for(
int i=0;
i<132;
i++)
1232 { counter_HB ++ ; RBX_loss_HB = 72*(counter_HB); }
1234 { counter_HE ++ ; RBX_loss_HE = 72*(counter_HE); }
1236 { counter_HO ++ ; RBX_loss_HO = 72*(counter_HO); }
1254 belowenergyHB+=RBX_loss_HB;
1255 belowenergyHE+=RBX_loss_HE;
1256 belowenergyHO+=RBX_loss_HO;
1258 unoccupiedHB+=RBX_loss_HB;
1259 unoccupiedHE+=RBX_loss_HE;
1260 unoccupiedHO+=RBX_loss_HO;
1274 for (
int subdet=1;subdet<=4;++subdet)
1277 if (ieta==-9999)
continue;
1327 if (
excludeHO1P02_==
true && ( (ieta>4 && ieta<10) && (iphi<=10 || iphi>70) ) )
1333 if (
abs(ieta)<5) ++knownBadHO0;
1334 else ++knownBadHO12;
1346 if (depth==1 && (
abs(ieta)==33 ||
abs(ieta)==34))
1348 else if (depth==2 && (
abs(ieta)==35 ||
abs(ieta)==36))
1353 if (depth==1 && (
abs(ieta)==33 ||
abs(ieta)==34))
1355 else if (depth==2 && (
abs(ieta)==35 ||
abs(ieta)==36))
1363 else if (subdet==
HcalEndcap) ++neverpresentHE;
1393 if (subdet==
HcalBarrel) ++energyneverpresentHB;
1394 else if (subdet==
HcalEndcap) ++energyneverpresentHE;
1397 ++energyneverpresentHO;
1399 --energyneverpresentHO;
1401 else if (subdet==
HcalForward) ++energyneverpresentHF;
1407 else if (subdet==
HcalEndcap) ++belowenergyHE;
1440 if( belowenergyHB<RBX_loss_HB )
1441 belowenergyHB+=RBX_loss_HB;
1442 if( belowenergyHE<RBX_loss_HE )
1443 belowenergyHE+=RBX_loss_HE;
1444 if( belowenergyHO<RBX_loss_HO )
1445 belowenergyHO+=RBX_loss_HO;
1447 if( unoccupiedHB<RBX_loss_HB )
1448 unoccupiedHB+=RBX_loss_HB;
1449 if( unoccupiedHE<RBX_loss_HE )
1450 unoccupiedHE+=RBX_loss_HE;
1451 if( unoccupiedHO<RBX_loss_HO )
1452 unoccupiedHO+=RBX_loss_HO;
1510 for (
unsigned int i=0;
i<85;++
i)
1512 for (
unsigned int j=0;
j<72;++
j)
1514 for (
unsigned int k=0;
k<4;++
k)
1524 for (
unsigned int i=0;
i<132;++
i)
edm::InputTag hfRechitLabel_
void beginRun(const edm::Run &run, const edm::EventSetup &c)
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * NumberOfNeverPresentRecHitsHO
bool LumiInOrder(int lumisec)
void fillNevents_problemCells()
unsigned int occupancy_RBX[132]
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
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void zeroCounters(bool resetpresent=false)
bool present_digi[85][72][4]
edm::InputTag hbheRechitLabel_
#define DEFINE_FWK_MODULE(type)
std::map< unsigned int, int > KnownBadCells_
MonitorElement * NumberOfNeverPresentDigisHE
std::vector< int > AllowedCalibTypes_
void endRun(const edm::Run &run, const edm::EventSetup &c)
std::vector< T >::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
void update(void)
Mark the object updated.
void process_RecHit(T &rechit)
void fillNevents_recentrechits()
MonitorElement * NumberOfRecentMissingDigisHE
bool present_rechit[85][72][4]
MonitorElement * bookFloat(const char *name)
Book float.
LuminosityBlockNumber_t luminosityBlock() const
uint32_t rawId() const
get the raw id
double HFenergyThreshold_
bool isSiPM(int ieta, int iphi, int depth)
EtaPhiHists RecHitPresentByDepth
MonitorElement * RBX_loss_VS_LB
std::vector< MonitorElement * > depth
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
int CalcIeta(int subdet, int eta, int depth)
MonitorElement * ProblemsVsLB
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
bool IsAllowedCalibType()
MonitorElement * NumberOfNeverPresentDigisHF
MonitorElement * ProblemsVsLB_HBHEHF
edm::InputTag hoRechitLabel_
double HEenergyThreshold_
std::vector< DetId > getAllChannels() const
MonitorElement * NumberOfNeverPresentDigisHO
void processEvent_HBHEdigi(const HBHEDataFrame digi)
int ieta() const
get the cell ieta
MonitorElement * NumberOfNeverPresentRecHitsHB
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
unsigned int recentoccupancy_rechit[85][72][4]
MonitorElement * NumberOfRecentMissingRecHitsHE
MonitorElement * ProblemsVsLB_HF
MonitorElement * NumberOfRecentMissingDigisHO
MonitorElement * NumberOfNeverPresentRecHitsHF
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MonitorElement * ProblemsVsLB_HB
const_iterator end() const
const HcalFrontEndId getHcalFrontEndId(const DetId &)
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
MonitorElement * NumberOfRecentMissingRecHitsHO
T const * product() const
EtaPhiHists DigiPresentByDepth
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
EtaPhiHists RecentMissingRecHitsByDepth
int CalcEtaBin(int subdet, int ieta, int depth)
void SetupEtaPhiHists(EtaPhiHists &hh, std::string Name, std::string Units)
double HOenergyThreshold_
MonitorElement * HBDeadVsEvent
MonitorElement * NumberOfNeverPresentRecHitsHE
MonitorElement * ProblemsVsLB_HE
TProfile * getTProfile(void) const
MonitorElement * NumberOfNeverPresentDigis
unsigned int NumBadHFLUMI
double HBenergyThreshold_
MonitorElement * NumberOfRecentMissingDigis
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 fillNevents_recentdigis()
bool deadmon_test_rechits_
MonitorElement * bookInt(const char *name)
Book int.
MonitorElement * ProblemsInLastNLB_HBHEHF_alarm
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
const Item * getValues(DetId fId) const
MonitorElement * HFDeadVsEvent
HcalLogicalMap * logicalMap_
void Reset(void)
reset ME (ie. contents, errors, etc)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * HODeadVsEvent
const_iterator begin() const
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)
MonitorElement * NumberOfRecentMissingRecHitsHB
MonitorElement * ProblemsVsLB_HO