24 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
25 prefixME_.append(
"/");
97 std::cout <<
"<HcalRecHitMonitor::setup> Setting up histograms"<<std::endl;
102 std::cout <<
"<HcalRecHitMonitor::setup> Creating Histograms"<<std::endl;
113 THR=ib.
bookFloat(
"HB_Rechit_Energy_Threshold");
115 THR=ib.
bookFloat(
"HE_Rechit_Energy_Threshold");
117 THR=ib.
bookFloat(
"HO_Rechit_Energy_Threshold");
119 THR=ib.
bookFloat(
"HF_Rechit_Energy_Threshold");
121 THR=ib.
bookFloat(
"HB_Rechit_ET_Threshold");
123 THR=ib.
bookFloat(
"HE_Rechit_ET_Threshold");
125 THR=ib.
bookFloat(
"HO_Rechit_ET_Threshold");
127 THR=ib.
bookFloat(
"HF_Rechit_ET_Threshold");
129 THR=ib.
bookFloat(
"Maximum_HFM_HFP_time_difference_for_luminosityplots");
144 "Hcal RecHit ieta E>0.5 GeV",
147 "Hcal RecHit iphi E>0.5 GeV",
150 "Hcal RecHit ieta E>1.0 GeV",
153 "Hcal RecHit iphi E>1.0 GeV",
156 "Hcal RecHit ieta E>2.5 GeV",
159 "Hcal RecHit iphi E>2.5 GeV",
162 "Hcal RecHit ieta E>10.0 GeV",
165 "Hcal RecHit iphi E>10.0 GeV",
171 "LS # of all events",
174 "BX # of all events",
177 "Energy-Weighted Time vs Min (HF+,HF-) Scalar Sum ET;min Sum ET(GeV);time(ns)",
181 "Energy-Weighted Time vs HFMinus Scalar Sum ET;Sum ET(GeV);time(ns)",
185 "Energy-Weighted Time vs HFPlus Scalar Sum ET;Sum ET(GeV);time(ns)",
211 "Energy-Weighted time difference between HF+ and HF- passing MinBias (no HT cut)",
214 "Energy-Weighted time difference between HE+ and HE- passing MinBias (no HT cut)",
218 "HFP VS HFM Energy; Total Energy in HFMinus (TeV); Total Energy in HFPlus (TeV)",
219 100,0,100, 100,0,100);
223 "Sum(E_HFPlus - E_HFMinus)/Sum(E_HFPlus + E_HFMinus)",
226 "Sum(E_HEPlus - E_HEMinus)/Sum(E_HEPlus + E_HEMinus)",
230 "Number of MinBias Events vs LS (HT cut and HFM-HFP time cut)",
233 "Number of Events with MinBias vs LS (HFM,HFP HT>1,no time cut)",
237 "HF+ Sum HT vs HF- Sum HT",60,0,30,60,0,30);
239 "HF+ Sum Energy vs HF- Sum Energy",
242 "Energy-weighted time average of HF+ vs HF-",
243 60,-60,60,60,-60,60);
245 "BX # of MinBias events (HFM & HFP HT>1 & HFM-HFP time cut)",
248 "BX # of MinBias events (HFM,HFP HT>1, no time cut)",
253 "Hcal RecHit ieta above energy and ET threshold",
256 "Hcal RecHit iphi above energy and ET threshold",
266 "HB RecHit Time Above Threshold",
269 "HB RecHit Occupancy Above Threshold",260,-0.5,2599.5);
271 "HE RecHit Time Above Threshold",
274 "HE RecHit Occupancy Above Threshold",260,-0.5,2599.5);
276 "HO RecHit Time Above Threshold",
279 "HO RecHit Occupancy Above Threshold",217,-0.5,2169.5);
281 "HF RecHit Time Above Threshold",
284 "HF RecHit Occupancy Above Threshold",
291 "BX # of HcalHLT events (HFM & HFP HT>1 & HFM-HFP time cut)",
294 "BX # of HcalHLT events (HFM,HFP HT>1, no time cut)",
297 "Number of HcalHLT Events vs LS (HT cut and HFM-HFP time cut)",
300 "Number of Events with HcalHLT vs LS (HFM,HFP HT>1,no time cut)",
306 "Energy-Weighted time difference between HF+ and HF- Hcal HLT",
309 "Energy-Weighted time difference between HE+ and HE- Hcal HLT",
312 "Sum(E_HFPlus - E_HFMinus)/Sum(E_HFPlus + E_HFMinus)",
315 "Sum(E_HEPlus - E_HEMinus)/Sum(E_HEPlus + E_HEMinus)",
323 "HFLongShort Flags vs Lumi Section",
326 "HFDigiTime Flags vs Lumi Section",
329 "HBHEHPDMult Flags vs Lumi Section",
332 "HBHEPulseShape Flags vs Lumi Section",
336 "HF LongShort vs. DigiTime flags; DigiTime; LongShort",
337 2,-0.5,1.5,2,-0.5,1.5);
344 "HBHE HpdHitMultiplicity vs. PulseShape flags; PulseShape; HpdHitMultiplicity",
345 2,-0.5,1.5,2,-0.5,1.5);
352 "RBX Map of HBHEHpdHitMultiplicity Flags;RBX;RM",
353 72,-0.5,71.5,4,0.5,4.5);
355 "RBX Map of HBHEPulseShape Flags;RBX;RM",
356 72,-0.5,71.5,4,0.5,4.5);
358 "RBX Map of HFDigiTime Flags;RBX;RM",
359 24,131.5,155.5,4,0.5,4.5);
361 "RBX Map of HFLongShort Flags;RBX;RM",
362 24,131.5,155.5,4,0.5,4.5);
365 "RBX Map of Timing Added Flags;RBX;RM",
366 156,-0.5,155.5,4,0.5,4.5);
368 "RBX Map of Timing Subtracted Flags;RBX;RM",
369 156,-0.5,155.5,4,0.5,4.5);
371 "RBX Map of Timing Error Flags;RBX;RM",
372 156,-0.5,155.5,4,0.5,4.5);
446 h_HBTimeVsEnergy=ib.
book2D(
"HBTimeVsEnergy",
"HB Time Vs Energy (All RecHits);Energy (GeV); time(nS)",100,0,500,40,-100,100);
455 "HB RecHit Occupancy",260,-0.5,2599.5);
460 h_HETimeVsEnergy=ib.
book2D(
"HETimeVsEnergy",
"HE Time Vs Energy (All RecHits);Energy (GeV); time(nS)",100,0,500,40,-100,100);
473 h_HOTimeVsEnergy=ib.
book2D(
"HOTimeVsEnergy",
"HO Time Vs Energy (All RecHits);Energy (GeV); time(nS)",100,0,500,40,-100,100);
482 "HO RecHit Occupancy",217,-0.5,2169.5);
487 h_HFTimeVsEnergy=ib.
book2D(
"HFTimeVsEnergy",
"HF Time Vs Energy (All RecHits);Energy (GeV); time(nS)",100,0,500,40,-100,100);
490 "HF RecHits vs Luminosity Block",
511 if (
tevt_!=0)
return;
519 ib.
bookString(
"HcalHLTriggerRequirements",tnames);
525 ib.
bookString(
"MinBiasHLTriggerRequirements",tnames);
748 if (
debug_>1)
std::cout <<
"<HcalRecHitMonitor::processEvent> Processing event..."<<std::endl;
751 bool passedHcalHLT=
false;
752 bool passedMinBiasHLT=
false;
759 const unsigned int nTrig(triggerNames.
size());
760 for (
unsigned int i=0;
i<nTrig;++
i) {
773 passedMinBiasHLT=
true;
780 if (
debug_>2 && passedHcalHLT)
std::cout <<
"\t<HcalRecHitMonitor::processEvent> Passed Hcal HLT trigger "<<std::endl;
781 if (
debug_>2 && passedMinBiasHLT)
std::cout <<
"\t<HcalRecHitMonitor::processEvent> Passed MinBias HLT trigger "<<std::endl;
799 bool passedMinBiasHLT,
806 if (
debug_>1)
std::cout <<
"<HcalRecHitMonitor::processEvent_rechitenergy> Processing rechits..."<<std::endl;
815 double HtPlus =0, HtMinus=0;
816 double HFePlus=0, HFeMinus=0;
817 double HBePlus=0, HBeMinus=0;
818 double HEePlus=0, HEeMinus=0;
819 double HFtPlus=0, HFtMinus=0;
820 double HBtPlus=0, HBtMinus=0;
821 double HEtPlus=0, HEtMinus=0;
823 int hbpocc=0, hbmocc=0, hepocc=0, hemocc=0, hfpocc=0, hfmocc=0;
825 for (
unsigned int i=0;
i<4;++
i) {
840 float en = HBHEiter->energy();
841 float ti = HBHEiter->time();
843 int ieta =
id.
ieta();
844 int iphi =
id.iphi();
845 int depth =
id.depth();
868 double fEta=fabs(0.5*(etas.first+etas.second));
897 for (
int f=0;
f<32;
f++) {
905 if (HBHEiter->flagField(
f))
909 energy_[calcEta][iphi-1][depth-1]+=en;
911 time_[calcEta][iphi-1][depth-1]+=ti;
920 if (passedMinBiasHLT==
true) {
927 if (ti<RECHITMON_TIME_MIN || ti>RECHITMON_TIME_MAX)
949 for (
int f=0;
f<32;
f++) {
950 if (HBHEiter->flagField(
f))
955 energy_[calcEta][iphi-1][depth-1]+=en;
957 time_[calcEta][iphi-1][depth-1]+=ti;
968 if (passedMinBiasHLT==
true) {
974 if (ti<RECHITMON_TIME_MIN || ti>RECHITMON_TIME_MAX)
996 HEePlus>0 ? HEtPlus/=HEePlus : HEtPlus=10000;
997 HEeMinus>0 ? HEtMinus/=HEeMinus : HEtMinus=-10000;
998 HBePlus>0 ? HBtPlus/=HBePlus : HBtPlus=10000;
999 HBeMinus>0 ? HBtMinus/=HBeMinus : HBtMinus=-10000;
1014 float en = HOiter->energy();
1015 float ti = HOiter->time();
1020 int ieta =
id.
ieta();
1021 int iphi =
id.iphi();
1022 int depth =
id.depth();
1045 double fEta=fabs(0.5*(etas.first+etas.second));
1059 for (
int f=0;
f<32;
f++) {
1060 if (HOiter->flagField(
f))
1065 energy_[calcEta][iphi-1][depth-1]+=en;
1067 time_[calcEta][iphi-1][depth-1]+=ti;
1084 if (ti<RECHITMON_TIME_MIN || ti>RECHITMON_TIME_MAX)
1097 HtPlus=0; HtMinus=0;
1102 float en = HFiter->energy();
1103 float ti = HFiter->time();
1108 int ieta =
id.
ieta();
1109 int iphi =
id.iphi();
1110 int depth =
id.depth();
1130 double fEta=fabs(0.5*(etas.first+etas.second));
1153 for (
int f=0;
f<32;
f++) {
1154 if (HFiter->flagField(
f))
1160 energy_[calcEta][iphi-1][depth-1]+=en;
1162 time_[calcEta][iphi-1][depth-1]+=ti;
1169 ieta>0 ? HtPlus+=en/cosh(fEta) : HtMinus+=en/cosh(fEta);
1173 if (passedMinBiasHLT) {
1180 if (ti<RECHITMON_TIME_MIN || ti>RECHITMON_TIME_MAX)
1190 }
else if (ieta<0) {
1205 HFePlus>0 ? HFtPlus/=HFePlus : HFtPlus = 10000;
1206 HFeMinus>0 ? HFtMinus/=HFeMinus : HFtMinus = -10000;
1209 double minHT=
std::min(HtMinus,HtPlus);
1210 minHT==HtMinus ? mintime=HFtMinus : mintime = HFtPlus;
1218 if (passedMinBiasHLT==
true) {
1223 if (HtMinus>1 && HtPlus > 1) {
1235 if (hepocc>0 && hemocc>0) {
1239 if (hfpocc>0 && hfmocc>0) {
1254 if (
debug_>1)
std::cout <<
"\t<HcalRecHitMonitor:: HF averages> TPLUS = "<<HFtPlus<<
" EPLUS = "<<HFePlus<<
" TMINUS = "<<HFtMinus<<
" EMINUS = "<<HFeMinus<<
" Weighted Time Diff = "<<((HFtPlus)-(HFtMinus))<<std::endl;
1259 if (passedHcalHLT && HtMinus>1 && HtPlus> 1 ) {
1260 if (hfpocc>0 && hfmocc>0) {
1264 if (hepocc>0 && hemocc>0){
1299 for (
int k = 0;
k < 32;
k++){
1300 std::cout <<
"<HcalRecHitMonitor::fill_Nevents> HF Flag counter: Bin #" <<
k+1 <<
" = "<<
HFflagcounter_[
k] << std::endl;
1304 for (
int i=0;
i<32;
i++)
1320 for (
int mydepth=0;mydepth<4;++mydepth)
1401 for (
int i=0;
i<260;++
i)
1421 for (
int i=0;
i<217;++
i)
1433 for (
int i=0;
i<173;++
i)
1448 std::cout <<
"<HcalRecHitMonitor::fill_Nevents> FILLED REC HIT CELL PLOTS"<<std::endl;
1457 for (
int i=0;
i<32;++
i)
1466 for (
int i=0;
i<85;++
i)
1468 for (
int j=0;
j<72;++
j)
1470 for (
int k=0;
k<4;++
k)
1486 for (
int i=0;
i<200;++
i)
1512 for (
int i=0;
i<865;++
i)
double HFenergyShort_[200]
MonitorElement * h_rechitieta_100
double HB_occupancy_[260]
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * h_HOThreshTime
bool LumiInOrder(int lumisec)
MonitorElement * h_HFP_weightedTime
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
MonitorElement * h_HFLongShort_vs_LS
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * h_HFtimedifference
MonitorElement * h_LumiPlot_timeHT_HFP
MonitorElement * h_HBHE_FlagCorr
MonitorElement * h_HBsizeVsLS
MonitorElement * h_LumiPlot_MinTime_vs_MinHT
double HFshort_occupancy_[865]
EtaPhiHists OccupancyThreshByDepth
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
double HFtime_thresh_[250--250]
double HOtime_thresh_[250--250]
MonitorElement * h_HF_HcalHLT_weightedtimedifference
double HBtime_thresh_[250--250]
CaloTopology const * topology(0)
double HF_occupancy_thresh_[174]
MonitorElement * h_HBThreshTime
MonitorElement * bookProfile(Args &&...args)
double HFenergyLong_[200]
MonitorElement * h_FlagMap_PULSESHAPE
double HFshort_occupancy_thresh_[865]
MonitorElement * h_HBHEPulseShape_vs_LS
MonitorElement * h_HF_FlagCorr
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * h_HOflagcounter
#define DEFINE_FWK_MODULE(type)
MonitorElement * h_rechitiphi_05
std::vector< int > AllowedCalibTypes_
MonitorElement * h_rechitieta_10
double HO_occupancy_thresh_[218]
MonitorElement * h_LumiPlot_timeHFPlus_vs_timeHFMinus
MonitorElement * h_HFThreshTime
MonitorElement * h_rechitieta_25
virtual void cleanup(void)
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
std::vector< HBHERecHit >::const_iterator const_iterator
MonitorElement * h_rechitiphi_10
int bunchCrossing() const
MonitorElement * bookString(Args &&...args)
MonitorElement * h_HFTime
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)
MonitorElement * h_HFThreshOccupancy
MonitorElement * h_FlagMap_TIMEADD
edm::LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * h_LumiPlot_LS_MinBiasEvents
void processEvent(const HBHERecHitCollection &hbHits, const HORecHitCollection &hoHits, const HFRecHitCollection &hfHits, int BCN, const edm::Event &iEvent, const HcalTopology &topology)
double HEtime_thresh_[250--250]
MonitorElement * h_rechitieta
MonitorElement * h_LumiPlot_SumEnergy_HFPlus_vs_HFMinus
double HF_occupancy_[174]
MonitorElement * h_HFflagcounter
double HBenergyThreshold_
Strings::size_type size() const
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
MonitorElement * h_HFM_weightedTime
void update(void)
Mark the object updated.
MonitorElement * h_HBTimeVsEnergy
void getLogicalMap(const edm::EventSetup &c)
edm::InputTag hfRechitLabel_
MonitorElement * h_HEOccupancy
MonitorElement * h_LumiPlot_LS_allevents
void processEvent_rechit(const HBHERecHitCollection &hbheHits, const HORecHitCollection &hoHits, const HFRecHitCollection &hfHits, bool passedHcalHLT, bool passedMinBiasHLT, int BCN, const HcalTopology &topology)
MonitorElement * h_HEtimedifference
MonitorElement * h_HEM_weightedTime
MonitorElement * h_HE_HcalHLT_weightedtimedifference
double HFtimeShort_thresh_[250--250]
double HFtimeLong_[250--250]
MonitorElement * h_FlagMap_TIMEERROR
MonitorElement * h_HF_HcalHLT_energydifference
EtaPhiHists SumEnergyByDepth
double HFenergyThreshold_
MonitorElement * h_HOThreshOccupancy
void bookHistograms(DQMStore::IBooker &ib, const edm::Run &run, const edm::EventSetup &c)
double HE_occupancy_thresh_[260]
unsigned int occupancy_[85][72][4]
MonitorElement * h_rechitiphi_100
MonitorElement * h_HETime
MonitorElement * h_rechitieta_thresh
LuminosityBlockNumber_t luminosityBlock() const
EtaPhiHists OccupancyByDepth
MonitorElement * h_HOOccupancy
MonitorElement * h_HFenergydifference
double time_thresh_[85][72][4]
MonitorElement * h_HEsizeVsLS
MonitorElement * h_LumiPlot_BX_MinBiasEvents_notimecut
void SetupEtaPhiHists(DQMStore::IBooker &ib, EtaPhiHists &hh, std::string Name, std::string Units)
EtaPhiHists SumTimeThreshByDepth
MonitorElement * h_HOsizeVsLS
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
MonitorElement * h_LumiPlot_BX_HcalHLTEvents_notimecut
EtaPhiHists SqrtSumEnergy2ThreshByDepth
EtaPhiHists SumTimeByDepth
bool IsAllowedCalibType()
unsigned int occupancy_thresh_[85][72][4]
double HFtimeLong_thresh_[250--250]
HcalLogicalMap * logicalMap_
MonitorElement * h_HETimeVsEnergy
MonitorElement * h_HEenergydifference
MonitorElement * h_HFTimeVsEnergy
int ieta() const
get the cell ieta
MonitorElement * book1D(Args &&...args)
MonitorElement * h_LumiPlot_BX_HcalHLTEvents
Abs< T >::type abs(const T &t)
double HFlong_occupancy_thresh_[865]
void setup(DQMStore::IBooker &)
MonitorElement * h_HBM_weightedTime
std::vector< std::string > HcalHLTBits_
MonitorElement * h_HFsizeVsLS
EtaPhiHists SqrtSumEnergy2ByDepth
MonitorElement * h_HBOccupancy
MonitorElement * h_HFDigiTime_vs_LS
void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * h_HBHEHPDMult_vs_LS
double energy2_[85][72][4]
double HFtimeShort_[250--250]
MonitorElement * h_HOTime
const_iterator end() const
MonitorElement * h_rechitiphi_25
MonitorElement * h_FlagMap_TIMESUBTRACT
const HcalFrontEndId getHcalFrontEndId(const DetId &)
double energy2_thresh_[85][72][4]
MonitorElement * h_HEP_weightedTime
MonitorElement * h_FlagMap_LONGSHORT
MonitorElement * h_LumiPlot_BX_allevents
edm::InputTag hltresultsLabel_
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
double energy_thresh_[85][72][4]
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
std::vector< std::string > MinBiasHLTBits_
MonitorElement * h_HBThreshOccupancy
std::string const & triggerName(unsigned int index) const
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
void endRun(const edm::Run &run, const edm::EventSetup &c)
double HEenergyThreshold_
edm::EDGetTokenT< HORecHitCollection > tok_ho_
TH1F * getTH1F(void) const
MonitorElement * h_HE_HcalHLT_energydifference
MonitorElement * h_rechitiphi
edm::EDGetTokenT< edm::TriggerResults > tok_trigger_
MonitorElement * h_LumiPlot_LS_MinBiasEvents_notimecut
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
MonitorElement * h_HFOccupancy
int CalcEtaBin(int subdet, int ieta, int depth)
MonitorElement * h_rechitieta_05
#define RECHITMON_TIME_MIN
MonitorElement * h_HEflagcounter
edm::InputTag hbheRechitLabel_
MonitorElement * h_HBTime
MonitorElement * h_rechitiphi_thresh
edm::InputTag hoRechitLabel_
std::pair< double, double > etaRange(HcalSubdetector subdet, int ieta) const
MonitorElement * h_HBP_weightedTime
double HB_occupancy_thresh_[260]
MonitorElement * h_LumiPlot_BX_MinBiasEvents
MonitorElement * h_FlagMap_HPDMULT
double HOenergyThreshold_
#define RECHITMON_TIME_MAX
MonitorElement * h_HOTimeVsEnergy
MonitorElement * h_HEThreshTime
HcalRecHitMonitor(const edm::ParameterSet &ps)
EtaPhiHists SumEnergyThreshByDepth
MonitorElement * bookFloat(Args &&...args)
MonitorElement * h_HEThreshOccupancy
double HE_occupancy_[260]
MonitorElement * h_LumiPlot_LS_HcalHLTEvents_notimecut
double HFlong_occupancy_[865]
MonitorElement * h_LumiPlot_LS_HcalHLTEvents
void Reset(void)
reset ME (ie. contents, errors, etc)
virtual void setup(DQMStore::IBooker &)
MonitorElement * HFP_HFM_Energy
double HO_occupancy_[218]
MonitorElement * h_FlagMap_DIGITIME
MonitorElement * h_LumiPlot_timeHT_HFM
double HFenergyShort_thresh_[200]
Power< A, B >::type pow(const A &a, const B &b)
double HFenergyLong_thresh_[200]
MonitorElement * h_HBflagcounter
const_iterator begin() const
MonitorElement * h_TriggeredEvents
MonitorElement * h_LumiPlot_SumHT_HFPlus_vs_HFMinus
double energy_[85][72][4]