14 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
15 prefixME_.append(
"/");
124 std::cout <<
"<HcalHotCellMonitor::setup> Setting up histograms"<<std::endl;
135 "Total Number of Hot Hcal Cells vs lumi section",
139 "Total Number of Hot HB Cells vs lumi section",
142 "Total Number of Hot HE Cells vs lumi section",
145 "Total Number of Hot HO Cells vs lumi section",
148 "Total Number of Hot HF Cells vs lumi section",
151 "Total Number of Hot HBHEHF Cells vs lumi section",
162 std::stringstream
units;
165 me=
dbe_->
bookInt(
"HotCellAboveThresholdTestEnabled");
172 "Hot Cells Above Energy Threshold",
"");
194 "Hot Cells Above ET Threshold",
"");
202 units<<
"Hot Cells: Depth 2 -- HB > "<<
HBETThreshold_<<
" GeV (ET), HE > "<<
HEETThreshold_<<
" GeV (ET), HF > "<<HFETThreshold_<<
" GeV (ET)";
205 units<<
"Hot Cells: Depth 3 -- HE > "<<
HEETThreshold_<<
" GeV (ET)";
224 "Hot Cells Persistently Above Energy Threshold",
"");
245 "Hot Cells Persistently Above ET Threshold",
"");
407 if (
debug_>1)
std::cout <<
"\t<HcalHotCellMonitor::analyze> Processing good event! event # = "<<
ievt_<<std::endl;
425 if (
debug_>1)
std::cout <<
"<HcalHotCellMonitor::processEvent> Processing event..."<<std::endl;
448 if (
debug_>1)
std::cout <<
"<HcalHotCellMonitor::processEvent_rechitenergy> Processing rechits..."<<std::endl;
453 float en = HBHEiter->energy();
457 int ieta =
id.
ieta();
458 int iphi =
id.iphi();
459 int depth =
id.depth();
461 float et = en/cosh(fEta);
496 float en = HOiter->energy();
499 int ieta =
id.
ieta();
500 int iphi =
id.iphi();
501 int depth =
id.depth();
503 float et = en/cosh(fEta);
508 if (
isSiPM(ieta,iphi,depth))
543 float en = HFiter->energy();
548 int ieta =
id.
ieta();
549 int iphi =
id.iphi();
550 int depth =
id.depth();
552 float et = en/cosh(fEta);
568 if (en>=threshold_pers)
594 template <
class RECHIT,
class RECHITCOLLECTION>
596 RECHITCOLLECTION& coll,
605 int ieta, iphi, depth;
608 int neighborsfound=0;
611 en = rechit->energy();
623 float et = en/cosh(fEta);
650 if (
abs(ieta)>39) mydeltaphi*=4;
651 else if (
abs(ieta)>20) mydeltaphi*=2;
655 for (
int nP =-1*mydeltaphi;nP<=mydeltaphi;++nP)
659 if (nD==0 && nE==0 && nP==0)
661 int myphi=(nP+iphi)%72;
664 if (part==coll.end())
669 enNeighbor+=part->energy();
681 int myval=(int)(enNeighbor/en*50);
682 if (myval<0) myval=0;
683 if (myval>499) myval=499;
684 if (enNeighbor/en<0 || enNeighbor/en>=10)
return;
690 if ((1.*enNeighbor/en)>params.
HotEnergyFrac && en>0 && enNeighbor>0)
710 std::cout <<
"<HcalHotCellMonitor::fillNevents_persistentenergy> FILLING PERSISTENT ENERGY PLOTS"<<std::endl;
732 for (
int subdet=1;subdet<=4;++subdet)
735 if (ieta==-9999)
continue;
739 ieta<0 ? ieta-- : ieta++;
747 if (
debug_>0)
std::cout <<
"HOT CELL; PERSISTENT ENERGY at subdet = "<<subdet<<
", eta = "<<ieta<<
", phi = "<<iphi<<
" depth = "<<depth<<std::endl;
778 for (
int subdet=1;subdet<=4;++subdet)
781 if (ieta==-9999)
continue;
785 ieta<0 ? ieta-- : ieta++;
793 if (
debug_>0)
std::cout <<
"HOT CELL; PERSISTENT ENERGY at subdet = "<<subdet<<
", eta = "<<ieta<<
", phi = "<<iphi<<
" depth = "<<depth<<std::endl;
818 std::cout <<
"<HcalHotCellMonitor::fillNevents_energy> ABOVE-ENERGY-THRESHOLD PLOTS"<<std::endl;
835 unsigned int maxdepth=0;
841 for (
unsigned int depth=0;depth<maxdepth;++depth)
858 for (
int subdet=1;subdet<=4;++subdet)
861 if (ieta==-9999)
continue;
865 ieta<0 ? ieta-- : ieta++;
872 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;
882 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;
912 std::cout <<
"<HcalHotCellMonitor::fillNevents_neighbor> FILLING ABOVE-NEIGHBOR-ENERGY PLOTS"<<std::endl;
932 for (
int subdet=1;subdet<=4;++subdet)
935 if (ieta==-9999)
continue;
939 ieta<0 ? ieta-- : ieta++;
943 if (
debug_>2)
std::cout <<
"HOT CELL; ABOVE NEIGHBORS at eta = "<<ieta<<
", phi = "<<iphi<<
" depth = "<<(depth>4 ? depth+1 : depth-3)<<std::endl;
955 for (
int i=0;
i<500;++
i)
979 std::cout <<
"<HcalHotCellMonitor::fillNevents_problemCells> FILLING PROBLEM CELL PLOTS"<<std::endl;
981 if (
ievt_==0)
return;
986 bool problemvalue=
false;
997 unsigned int DEPTH = 0;
1010 if (DEPTH==0)
return;
1012 for (
unsigned int depth=0;depth<DEPTH;++depth)
1040 if (
test_et_ && (etabins==0 || phibins==0))
1049 if (ieta==-9999)
continue;
1052 if (
abs(ieta)>20 &&
phi%2==1)
continue;
1053 else if (
abs(ieta)>39 && (
phi+1)%4!=3)
continue;
1066 if (problemvalue==
false)
continue;
1067 if (
isHB(
eta,depth+1)) ++NumBadHB;
1073 if (
abs(ieta)<5) ++NumBadHO0;
1079 if (depth+1==1 && (
abs(ieta)==33 ||
abs(ieta)==34)) ++NumBadHFLUMI;
1080 else if (depth+1==2 && (
abs(ieta)==35 ||
abs(ieta)==36)) ++NumBadHFLUMI;
1086 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;
1111 for (
int i=0;
i<85;++
i)
1113 for (
int j=0;
j<72;++
j)
1115 for (
int k=0;
k<4;++
k)
1127 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)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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< HBHERecHit >::const_iterator const_iterator
edm::LuminosityBlockNumber_t luminosityBlock() const
EtaPhiHists AbovePersistentThresholdCellsByDepth
edm::EDGetTokenT< HORecHitCollection > tok_ho_
int aboveenergy[85][72][4]
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
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()
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
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)
Abs< T >::type abs(const T &t)
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)
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