14 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
15 prefixME_.append(
"/");
119 std::cout <<
"<HcalHotCellMonitor::setup> Setting up histograms"<<std::endl;
130 "Total Number of Hot Hcal Cells vs lumi section",
134 "Total Number of Hot HB Cells vs lumi section",
137 "Total Number of Hot HE Cells vs lumi section",
140 "Total Number of Hot HO Cells vs lumi section",
143 "Total Number of Hot HF Cells vs lumi section",
146 "Total Number of Hot HBHEHF Cells vs lumi section",
157 std::stringstream
units;
160 me=
dbe_->
bookInt(
"HotCellAboveThresholdTestEnabled");
167 "Hot Cells Above Energy Threshold",
"");
189 "Hot Cells Above ET Threshold",
"");
197 units<<
"Hot Cells: Depth 2 -- HB > "<<
HBETThreshold_<<
" GeV (ET), HE > "<<
HEETThreshold_<<
" GeV (ET), HF > "<<HFETThreshold_<<
" GeV (ET)";
200 units<<
"Hot Cells: Depth 3 -- HE > "<<
HEETThreshold_<<
" GeV (ET)";
219 "Hot Cells Persistently Above Energy Threshold",
"");
240 "Hot Cells Persistently Above ET Threshold",
"");
402 if (
debug_>1)
std::cout <<
"\t<HcalHotCellMonitor::analyze> Processing good event! event # = "<<
ievt_<<std::endl;
420 if (
debug_>1)
std::cout <<
"<HcalHotCellMonitor::processEvent> Processing event..."<<std::endl;
443 if (
debug_>1)
std::cout <<
"<HcalHotCellMonitor::processEvent_rechitenergy> Processing rechits..."<<std::endl;
448 float en = HBHEiter->energy();
452 int ieta =
id.
ieta();
453 int iphi =
id.iphi();
454 int depth =
id.depth();
456 float et = en/cosh(fEta);
491 float en = HOiter->energy();
494 int ieta =
id.
ieta();
495 int iphi =
id.iphi();
496 int depth =
id.depth();
498 float et = en/cosh(fEta);
503 if (
isSiPM(ieta,iphi,depth))
538 float en = HFiter->energy();
543 int ieta =
id.
ieta();
544 int iphi =
id.iphi();
545 int depth =
id.depth();
547 float et = en/cosh(fEta);
563 if (en>=threshold_pers)
589 template <
class RECHIT,
class RECHITCOLLECTION>
591 RECHITCOLLECTION&
coll,
600 int ieta, iphi, depth;
603 int neighborsfound=0;
606 en = rechit->energy();
618 float et = en/cosh(fEta);
645 if (
abs(ieta)>39) mydeltaphi*=4;
646 else if (
abs(ieta)>20) mydeltaphi*=2;
650 for (
int nP =-1*mydeltaphi;nP<=mydeltaphi;++nP)
654 if (nD==0 && nE==0 && nP==0)
656 int myphi=(nP+iphi)%72;
659 if (part==coll.end())
664 enNeighbor+=part->energy();
676 int myval=(int)(enNeighbor/en*50);
677 if (myval<0) myval=0;
678 if (myval>499) myval=499;
679 if (enNeighbor/en<0 || enNeighbor/en>=10)
return;
685 if ((1.*enNeighbor/en)>params.
HotEnergyFrac && en>0 && enNeighbor>0)
705 std::cout <<
"<HcalHotCellMonitor::fillNevents_persistentenergy> FILLING PERSISTENT ENERGY PLOTS"<<std::endl;
727 for (
int subdet=1;subdet<=4;++subdet)
730 if (ieta==-9999)
continue;
734 ieta<0 ? ieta-- : ieta++;
742 if (
debug_>0)
std::cout <<
"HOT CELL; PERSISTENT ENERGY at subdet = "<<subdet<<
", eta = "<<ieta<<
", phi = "<<iphi<<
" depth = "<<depth<<std::endl;
773 for (
int subdet=1;subdet<=4;++subdet)
776 if (ieta==-9999)
continue;
780 ieta<0 ? ieta-- : ieta++;
788 if (
debug_>0)
std::cout <<
"HOT CELL; PERSISTENT ENERGY at subdet = "<<subdet<<
", eta = "<<ieta<<
", phi = "<<iphi<<
" depth = "<<depth<<std::endl;
813 std::cout <<
"<HcalHotCellMonitor::fillNevents_energy> ABOVE-ENERGY-THRESHOLD PLOTS"<<std::endl;
830 unsigned int maxdepth=0;
836 for (
unsigned int depth=0;depth<maxdepth;++depth)
853 for (
int subdet=1;subdet<=4;++subdet)
856 if (ieta==-9999)
continue;
860 ieta<0 ? ieta-- : ieta++;
867 std::cout <<
"HOT CELL; ABOVE ENERGY THRESHOLD at subdet = "<<subdet<<
", eta = "<<ieta<<
", phi = "<<iphi<<
" depth = "<<depth+1<<
" ABOVE THRESHOLD IN "<<
aboveenergy[
eta][
phi][depth]<<
" EVENTS"<<std::endl;
877 std::cout <<
"HOT CELL; ABOVE ET THRESHOLD at subdet = "<<subdet<<
", eta = "<<ieta<<
", phi = "<<iphi<<
" depth = "<<depth+1<<
" ABOVE THRESHOLD IN "<<
aboveet[
eta][
phi][depth]<<
" EVENTS"<<std::endl;
907 std::cout <<
"<HcalHotCellMonitor::fillNevents_neighbor> FILLING ABOVE-NEIGHBOR-ENERGY PLOTS"<<std::endl;
927 for (
int subdet=1;subdet<=4;++subdet)
930 if (ieta==-9999)
continue;
934 ieta<0 ? ieta-- : ieta++;
938 if (
debug_>2)
std::cout <<
"HOT CELL; ABOVE NEIGHBORS at eta = "<<ieta<<
", phi = "<<iphi<<
" depth = "<<(depth>4 ? depth+1 : depth-3)<<std::endl;
950 for (
int i=0;
i<500;++
i)
974 std::cout <<
"<HcalHotCellMonitor::fillNevents_problemCells> FILLING PROBLEM CELL PLOTS"<<std::endl;
976 if (
ievt_==0)
return;
981 bool problemvalue=
false;
992 unsigned int DEPTH = 0;
1005 if (DEPTH==0)
return;
1007 for (
unsigned int depth=0;depth<DEPTH;++depth)
1035 if (
test_et_ && (etabins==0 || phibins==0))
1044 if (ieta==-9999)
continue;
1047 if (
abs(ieta)>20 &&
phi%2==1)
continue;
1048 else if (
abs(ieta)>39 && (
phi+1)%4!=3)
continue;
1061 if (problemvalue==
false)
continue;
1062 if (
isHB(
eta,depth+1)) ++NumBadHB;
1068 if (
abs(ieta)<5) ++NumBadHO0;
1074 if (depth+1==1 && (
abs(ieta)==33 ||
abs(ieta)==34)) ++NumBadHFLUMI;
1075 else if (depth+1==2 && (
abs(ieta)==35 ||
abs(ieta)==36)) ++NumBadHFLUMI;
1081 if (
debug_>2)
std::cout <<
"<HcalHotCellMonitor::fillNevents_problemCells> Num Bad HB = "<<NumBadHB<<
" Num Bad HE = "<<NumBadHE<<
" Num Bad HO = "<<NumBadHO<<
" Num Bad HF = "<<NumBadHF<<
" CURRENT LS = "<<
currentLS<<std::endl;
1106 for (
int i=0;
i<85;++
i)
1108 for (
int j=0;
j<72;++
j)
1110 for (
int k=0;
k<4;++
k)
1122 for (
int i=0;
i<500;++
i)
bool isHO(int etabin, int depth)
int abovepersistent[85][72][4]
T getUntrackedParameter(std::string const &, T const &) const
EtaPhiHists AboveEnergyThresholdCellsByDepth
bool LumiInOrder(int lumisec)
void beginRun(const edm::Run &run, const edm::EventSetup &c)
MonitorElement * ProblemsCurrentLB
int aboveneighbors[85][72][4]
edm::InputTag hoRechitLabel_
hotNeighborParams HONeighborParams_
double HFpersistentETThreshold_
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
void processEvent(const HBHERecHitCollection &hbHits, const HORecHitCollection &hoHits, const HFRecHitCollection &hfHits)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void processHit_rechitNeighbors(R &rechititer, C &collection, hotNeighborParams ¶ms)
MonitorElement * ProblemsVsLB_HF
#define DEFINE_FWK_MODULE(type)
double HEpersistentThreshold_
std::vector< int > AllowedCalibTypes_
int abovepersistentET[85][72][4]
int rechit_occupancy_sum[85][72][4]
std::vector< T >::const_iterator const_iterator
edm::LuminosityBlockNumber_t luminosityBlock() const
EtaPhiHists AbovePersistentThresholdCellsByDepth
int aboveenergy[85][72][4]
EtaPhiHists AbovePersistentETThresholdCellsByDepth
bool isHE(int etabin, int depth)
void fillNevents_problemCells()
MonitorElement * bookFloat(const char *name)
Book float.
LuminosityBlockNumber_t luminosityBlock() const
HcalHotCellMonitor(const edm::ParameterSet &ps)
bool isSiPM(int ieta, int iphi, int depth)
std::vector< MonitorElement * > depth
MonitorElement * d_HFenergyVsNeighbor
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
int CalcIeta(int subdet, int eta, int depth)
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
bool IsAllowedCalibType()
MonitorElement * ProblemsVsLB_HBHEHF
double persistentThreshold_
double HOpersistentThreshold_
MonitorElement * ProblemsVsLB_HB
double HBenergyThreshold_
double HOpersistentETThreshold_
void analyze(edm::Event const &e, edm::EventSetup const &s)
EtaPhiHists AboveETThresholdCellsByDepth
int ieta() const
get the cell ieta
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
hotNeighborParams HBHENeighborParams_
void fillNevents_neighbor()
double persistentETThreshold_
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
void fillNevents_energy()
bool isHB(int etabin, int depth)
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void processEvent_rechitenergy(const HBHERecHitCollection &hbheHits, const HORecHitCollection &hoHits, const HFRecHitCollection &hfHits)
MonitorElement * d_HBenergyVsNeighbor
const_iterator end() const
void endRun(const edm::Run &run, const edm::EventSetup &c)
edm::InputTag hbheRechitLabel_
bool isHF(int etabin, int depth)
double HFenergyThreshold_
static const double theHFEtaBounds[]
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
double HBpersistentThreshold_
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
void fillNevents_persistentenergy()
double HFpersistentThreshold_
MonitorElement * ProblemsVsLB_HE
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
int CalcEtaBin(int subdet, int ieta, int depth)
void SetupEtaPhiHists(EtaPhiHists &hh, std::string Name, std::string Units)
edm::InputTag hfRechitLabel_
MonitorElement * d_HOenergyVsNeighbor
EtaPhiHists AboveNeighborsHotCellsByDepth
TProfile * getTProfile(void) const
MonitorElement * ProblemsVsLB_HO
double HOenergyThreshold_
MonitorElement * ProblemsVsLB
MonitorElement * bookInt(const char *name)
Book int.
double HEpersistentETThreshold_
double HBpersistentETThreshold_
static const double theHBHEEtaBounds[]
hotNeighborParams HFNeighborParams_
void Reset(void)
reset ME (ie. contents, errors, etc)
double HEenergyThreshold_
void setCurrentFolder(const std::string &fullpath)
const_iterator begin() const
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)
MonitorElement * d_HEenergyVsNeighbor