14 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
15 prefixME_.append(
"/");
116 std::cout <<
"<HcalHotCellMonitor::setup> Setting up histograms"<<std::endl;
127 "Total Number of Hot Hcal Cells vs lumi section",
131 "Total Number of Hot HB Cells vs lumi section",
134 "Total Number of Hot HE Cells vs lumi section",
137 "Total Number of Hot HO Cells vs lumi section",
140 "Total Number of Hot HF Cells vs lumi section",
143 "Total Number of Hot HBHEHF Cells vs lumi section",
154 std::stringstream
units;
157 me=
dbe_->
bookInt(
"HotCellAboveThresholdTestEnabled");
164 "Hot Cells Above Energy Threshold",
"");
186 "Hot Cells Above ET Threshold",
"");
194 units<<
"Hot Cells: Depth 2 -- HB > "<<
HBETThreshold_<<
" GeV (ET), HE > "<<
HEETThreshold_<<
" GeV (ET), HF > "<<HFETThreshold_<<
" GeV (ET)";
197 units<<
"Hot Cells: Depth 3 -- HE > "<<
HEETThreshold_<<
" GeV (ET)";
216 "Hot Cells Persistently Above Energy Threshold",
"");
237 "Hot Cells Persistently Above ET Threshold",
"");
399 if (
debug_>1)
std::cout <<
"\t<HcalHotCellMonitor::analyze> Processing good event! event # = "<<
ievt_<<std::endl;
417 if (
debug_>1)
std::cout <<
"<HcalHotCellMonitor::processEvent> Processing event..."<<std::endl;
440 if (
debug_>1)
std::cout <<
"<HcalHotCellMonitor::processEvent_rechitenergy> Processing rechits..."<<std::endl;
445 float en = HBHEiter->energy();
449 int ieta =
id.ieta();
450 int iphi =
id.iphi();
451 int depth =
id.depth();
453 float et = en/cosh(fEta);
488 float en = HOiter->energy();
491 int ieta =
id.ieta();
492 int iphi =
id.iphi();
493 int depth =
id.depth();
495 float et = en/cosh(fEta);
500 if (
isSiPM(ieta,iphi,depth))
535 float en = HFiter->energy();
540 int ieta =
id.ieta();
541 int iphi =
id.iphi();
542 int depth =
id.depth();
544 float et = en/cosh(fEta);
560 if (en>=threshold_pers)
586 template <
class RECHIT,
class RECHITCOLLECTION>
588 RECHITCOLLECTION&
coll,
597 int ieta, iphi, depth;
600 int neighborsfound=0;
603 en = rechit->energy();
615 float et = en/cosh(fEta);
642 if (
abs(ieta)>39) mydeltaphi*=4;
643 else if (
abs(ieta)>20) mydeltaphi*=2;
647 for (
int nP =-1*mydeltaphi;nP<=mydeltaphi;++nP)
651 if (nD==0 && nE==0 && nP==0)
653 int myphi=(nP+iphi)%72;
656 if (part==coll.end())
661 enNeighbor+=part->energy();
673 int myval=(int)(enNeighbor/en*50);
674 if (myval<0) myval=0;
675 if (myval>499) myval=499;
676 if (enNeighbor/en<0 || enNeighbor/en>=10)
return;
682 if ((1.*enNeighbor/en)>params.
HotEnergyFrac && en>0 && enNeighbor>0)
702 std::cout <<
"<HcalHotCellMonitor::fillNevents_persistentenergy> FILLING PERSISTENT ENERGY PLOTS"<<std::endl;
724 for (
int subdet=1;subdet<=4;++subdet)
727 if (ieta==-9999)
continue;
731 ieta<0 ? ieta-- : ieta++;
739 if (
debug_>0)
std::cout <<
"HOT CELL; PERSISTENT ENERGY at subdet = "<<subdet<<
", eta = "<<ieta<<
", phi = "<<iphi<<
" depth = "<<depth<<std::endl;
770 for (
int subdet=1;subdet<=4;++subdet)
773 if (ieta==-9999)
continue;
777 ieta<0 ? ieta-- : ieta++;
785 if (
debug_>0)
std::cout <<
"HOT CELL; PERSISTENT ENERGY at subdet = "<<subdet<<
", eta = "<<ieta<<
", phi = "<<iphi<<
" depth = "<<depth<<std::endl;
810 std::cout <<
"<HcalHotCellMonitor::fillNevents_energy> ABOVE-ENERGY-THRESHOLD PLOTS"<<std::endl;
827 unsigned int maxdepth=0;
833 for (
unsigned int depth=0;depth<maxdepth;++depth)
850 for (
int subdet=1;subdet<=4;++subdet)
853 if (ieta==-9999)
continue;
857 ieta<0 ? ieta-- : ieta++;
864 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;
874 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;
904 std::cout <<
"<HcalHotCellMonitor::fillNevents_neighbor> FILLING ABOVE-NEIGHBOR-ENERGY PLOTS"<<std::endl;
924 for (
int subdet=1;subdet<=4;++subdet)
927 if (ieta==-9999)
continue;
931 ieta<0 ? ieta-- : ieta++;
935 if (
debug_>2)
std::cout <<
"HOT CELL; ABOVE NEIGHBORS at eta = "<<ieta<<
", phi = "<<iphi<<
" depth = "<<(depth>4 ? depth+1 : depth-3)<<std::endl;
947 for (
int i=0;
i<500;++
i)
971 std::cout <<
"<HcalHotCellMonitor::fillNevents_problemCells> FILLING PROBLEM CELL PLOTS"<<std::endl;
973 if (
ievt_==0)
return;
978 bool problemvalue=
false;
989 unsigned int DEPTH = 0;
1002 if (DEPTH==0)
return;
1004 for (
unsigned int depth=0;depth<DEPTH;++depth)
1032 if (
test_et_ && (etabins==0 || phibins==0))
1041 if (ieta==-9999)
continue;
1044 if (
abs(ieta)>20 &&
phi%2==1)
continue;
1045 else if (
abs(ieta)>39 && (
phi+1)%4!=3)
continue;
1058 if (problemvalue==
false)
continue;
1059 if (
isHB(
eta,depth+1)) ++NumBadHB;
1065 if (
abs(ieta)<5) ++NumBadHO0;
1071 if (depth+1==1 && (
abs(ieta)==33 ||
abs(ieta)==34)) ++NumBadHFLUMI;
1072 else if (depth+1==2 && (
abs(ieta)==35 ||
abs(ieta)==36)) ++NumBadHFLUMI;
1078 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;
1103 for (
int i=0;
i<85;++
i)
1105 for (
int j=0;
j<72;++
j)
1107 for (
int k=0;
k<4;++
k)
1119 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
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