17 : l1tdttffolder_(ps.getUntrackedParameter<std::
string>(
"l1tSourceFolder",
"L1T/L1TDTTF")),
18 dttfSource_(ps.getParameter<edm::
InputTag>(
"dttfSource")),
19 online_(ps.getUntrackedParameter<bool>(
"online",
true)),
20 resetafterlumi_(ps.getUntrackedParameter<int>(
"resetAfterLumi", 3)),
22 occupancy_r_(nullptr) {
31 edm::LogInfo(
"L1TDTTFClient") <<
"[L1TDTTFClient]: Begin Job";
58 sprintf(hname,
"dttf_02_nTracks");
59 sprintf(mename,
"DTTF Tracks by Wheel");
64 sprintf(hname,
"dttf_03_tracks_occupancy_summary");
65 sprintf(mename,
"DTTF Tracks Occupancy");
73 sprintf(hname,
"dttf_05_bx_occupancy");
74 sprintf(mename,
"DTTF Tracks BX Distribution by Wheel");
80 sprintf(hname,
"dttf_06_bx");
81 sprintf(mename,
"DTTF Tracks BX w.r.t. Tracks with BX=0");
86 sprintf(hname,
"dttf_07_quality");
87 sprintf(mename,
"DTTF Tracks Quality distribution");
92 sprintf(hname,
"dttf_08_quality_occupancy");
93 sprintf(mename,
"DTTF Tracks Quality distribution by Wheel");
100 sprintf(hname,
"dttf_09_highQuality_Tracks");
101 sprintf(mename,
"Fraction of DTTF Tracks with Quality>3");
107 sprintf(hname,
"dttf_10_phi_vs_etaCoarse");
108 sprintf(mename,
"#eta-#phi DTTF Tracks occupancy (coarse #eta only, packed values)");
114 sprintf(hname,
"dttf_11_phi_vs_etaFine");
115 sprintf(mename,
"#eta-#phi DTTF Tracks occupancy (fine #eta only, packed values)");
121 sprintf(hname,
"dttf_12_phi_vs_eta");
122 sprintf(mename,
"#eta-#phi DTTF Tracks occupancy");
128 sprintf(hname,
"dttf_13_eta_fine_fraction");
129 sprintf(mename,
"Fraction of DTTF Tracks with Fine #eta Assignment");
137 sprintf(hname,
"dttf_14_eta");
138 sprintf(mename,
"DTTF Tracks #eta distribution (Packed values)");
143 sprintf(hname,
"dttf_15_phi");
144 sprintf(mename,
"DTTF Tracks Phi distribution (Packed values)");
149 sprintf(hname,
"dttf_16_pt");
150 sprintf(mename,
"DTTF Tracks p_{T} distribution (Packed values)");
154 sprintf(hname,
"dttf_17_charge");
155 sprintf(mename,
"DTTF Tracks Charge distribution");
160 sprintf(hname,
"dttf_18_2ndTrack_occupancy_summary");
161 sprintf(mename,
"DTTF 2nd Tracks occupancy w.r.t. Tracks with BX=0");
169 sprintf(hname,
"dttf_gmt_fract_matching");
170 sprintf(mename,
"Fraction of DTTF tracks matching with GMT tracks");
181 sprintf(hname,
"dttf_01_tracks_occupancy_test_summary");
182 sprintf(mename,
"DTTF Tracks Occupancy");
193 sprintf(hname,
"dttf_01_nTracks_2ndTrack");
194 sprintf(mename,
"DTTF 2nd Tracks per Wheel distribution");
199 sprintf(hname,
"dttf_02_occupancy_summary_2ndTrack");
200 sprintf(mename,
"DTTF 2nd Tracks distribution by Sector and Wheel");
205 sprintf(hname,
"dttf_03_bx_occupancy_2ndTrack");
206 sprintf(mename,
"DTTF 2nd Tracks BX Distribution by Wheel");
212 sprintf(hname,
"dttf_04_bx_2ndTrack");
213 sprintf(mename,
"Fraction of DTTF Tracks BX w.r.t. Tracks with BX=0");
218 sprintf(hname,
"dttf_05_quality_2ndTrack");
219 sprintf(mename,
"DTTF 2nd Tracks Quality distribution");
225 sprintf(hname,
"dttf_06_quality_occupancy_2ndTrack");
226 sprintf(mename,
"DTTF 2nd Tracks Quality distribution by Wheel");
233 sprintf(hname,
"dttf_07_highQuality_Tracks_2ndTrack");
234 sprintf(mename,
"Fraction of DTTF 2nd Tracks with Quality>3");
240 sprintf(hname,
"dttf_08_phi_vs_eta_2ndTrack");
241 sprintf(mename,
"#eta-#phi DTTF Tracks occupancy for 2nd Tracks");
247 sprintf(hname,
"dttf_09_eta_2ndTrack");
248 sprintf(mename,
"DTTF 2nd Tracks #eta distribution (Packed values)");
253 sprintf(hname,
"dttf_10_phi_2ndTrack");
254 sprintf(mename,
"DTTF 2nd Tracks Phi distribution (Packed values)");
259 sprintf(hname,
"dttf_11_pt_2ndTrack");
260 sprintf(mename,
"DTTF 2nd Tracks p_{T} distribution (Packed values)");
265 sprintf(hname,
"dttf_12_charge_2ndTrack");
266 sprintf(mename,
"DTTF 2nd Tracks Charge distribution");
270 for (
unsigned int wh = 0; wh < 6; ++wh) {
274 sprintf(hname,
"dttf_02_nTracks_wh%s",
wheel_[wh].c_str());
275 sprintf(mename,
"Wheel %s - Number of Tracks",
wheel_[wh].c_str());
280 sprintf(hname,
"dttf_03_bx_occupancy_wh%s",
wheel_[wh].c_str());
281 sprintf(mename,
"Wheel %s - DTTF Tracks BX distribution by Sector",
wheel_[wh].c_str());
287 sprintf(hname,
"dttf_04_bx_wh%s",
wheel_[wh].c_str());
288 sprintf(mename,
"Wheel %s - DTTF Tracks BX w.r.t. Tracks with BX=0",
wheel_[wh].c_str());
293 sprintf(hname,
"dttf_05_quality_wh%s",
wheel_[wh].c_str());
294 sprintf(mename,
"Wheel %s - Tracks Quality Distribution",
wheel_[wh].c_str());
300 sprintf(hname,
"dttf_06_quality_summary_wh%s",
wheel_[wh].c_str());
301 sprintf(mename,
"Wheel %s - Tracks Quality Distribution by Sector",
wheel_[wh].c_str());
308 sprintf(hname,
"dttf_09_etaFine_fraction_wh%s",
wheel_[wh].c_str());
309 sprintf(mename,
"Wheel %s - Fraction of DTTF Tracks with fine #eta assignment",
wheel_[wh].c_str());
314 sprintf(hname,
"dttf_10_eta_wh%s",
wheel_[wh].c_str());
315 sprintf(mename,
"Wheel %s - DTTF Tracks #eta distribution (Packed values)",
wheel_[wh].c_str());
320 sprintf(hname,
"dttf_11_phi_wh%s",
wheel_[wh].c_str());
321 sprintf(mename,
"Wheel %s - DTTF Tracks Phi distribution (Packed values)",
wheel_[wh].c_str());
326 sprintf(hname,
"dttf_12_pt_wh%s",
wheel_[wh].c_str());
327 sprintf(mename,
"Wheel %s - DTTF Tracks p_{T} distribution (Packed values)",
wheel_[wh].c_str());
332 sprintf(hname,
"dttf_13_charge_wh%s",
wheel_[wh].c_str());
333 sprintf(mename,
"Wheel %s - DTTF Tracks Charge distribution",
wheel_[wh].c_str());
339 for (
unsigned int wh = 0; wh < 6; ++wh) {
343 sprintf(hname,
"dttf_01_nTracks_wh%s_2ndTrack",
wheel_[wh].c_str());
344 sprintf(mename,
"Wheel %s - DTTF Number of 2nd Tracks with BX=0",
wheel_[wh].c_str());
349 sprintf(hname,
"dttf_02_bx_occupancy_wh%s_2ndTrack",
wheel_[wh].c_str());
350 sprintf(mename,
"Wheel %s - DTTF 2nd Tracks BX distribution by Sector",
wheel_[wh].c_str());
356 sprintf(hname,
"dttf_03_bx_wh%s_2ndTrack",
wheel_[wh].c_str());
357 sprintf(mename,
"Wheel %s - 2nd Tracks BX Distribution",
wheel_[wh].c_str());
380 sprintf(hname,
"%s/dttf_04_tracks_occupancy_by_lumi",
inclusivepath_.c_str());
386 edm::LogInfo(
"L1TDTTFClient::beginLuminosityBlock:RESET") <<
"Reseting plots by lumi!";
387 occupancy_r_->Reset();
422 if (physEntries > 0) {
423 double physScale = 1 / physEntries;
444 if (entries2ndTrack > 0) {
456 double scale2nd = 1 / entries2ndTrack;
480 int wheelSumBx2nd[4];
483 memset(wheelSumBx, 0, 4 *
sizeof(
int));
484 memset(wheelSumBx2nd, 0, 4 *
sizeof(
int));
504 for (
unsigned int wh = 0; wh < 6; ++wh) {
512 double wheelEtaAll = 0;
513 double wheelEtaFine = 0;
514 memset(wheelBx, 0, 4 *
sizeof(
int));
515 memset(wheelBx2nd, 0, 4 *
sizeof(
int));
518 memset(qualities, 0, 8 *
sizeof(
int));
527 "%s/dttf_07_phi_vs_etaFine_wh%s",
528 "%s/dttf_08_phi_vs_etaCoarse_wh%s",
536 for (
unsigned int sector = 1; sector < 13; ++sector) {
540 sprintf(hname,
"%s/BX_BySector/dttf_bx_wh%s_se%d",
wheelpath_[wh].c_str(),
wheel_[wh].c_str(), sector);
542 TH1F *bxsector =
getTH1F(igetter, hname);
546 for (
unsigned int bx = 1;
bx < 4; ++
bx) {
547 int bxval = bxsector->GetBinContent(
bx);
558 wheelBx[
bx] += bxval;
567 "%s/BX_BySector/2ND_TRACK_ONLY/dttf_bx_2ndTrack_wh%s_se%d",
572 TH1F *bxsector2nd =
getTH1F(igetter, hname);
576 for (
unsigned int bx = 1;
bx < 4; ++
bx) {
577 int bxval = bxsector2nd->GetBinContent(
bx);
584 wheelBx2nd[
bx] += bxval;
592 sprintf(hname,
"%s/Charge/dttf_charge_wh%s_se%d",
wheelpath_[wh].c_str(),
wheel_[wh].c_str(), sector);
604 sprintf(hname,
"%s/PT/dttf_pt_wh%s_se%d",
wheelpath_[wh].c_str(),
wheel_[wh].c_str(), sector);
616 sprintf(hname,
"%s/Phi/dttf_phi_wh%s_se%d",
wheelpath_[wh].c_str(),
wheel_[wh].c_str(), sector);
629 double denHighQual = 0;
630 sprintf(hname,
"%s/Quality/dttf_qual_wh%s_se%d",
wheelpath_[wh].c_str(),
wheel_[wh].c_str(), sector);
637 for (
unsigned int qual = 1; qual < 4; ++qual) {
638 double bincontent = tmp->GetBinContent(qual);
639 qualities[qual] += bincontent;
640 denHighQual += bincontent;
644 for (
unsigned int qual = 4; qual < 8; ++qual) {
645 double bincontent = tmp->GetBinContent(qual);
646 qualities[qual] += bincontent;
648 denHighQual += bincontent;
649 highQual += bincontent;
653 highQual /= denHighQual;
659 sprintf(hname,
"%s/Eta/dttf_eta_wh%s_se%d",
wheelpath_[wh].c_str(),
wheel_[wh].c_str(), sector);
672 "%s/EtaFineFraction/dttf_etaFine_fraction_wh%s_se%d",
680 double fine = tmp->GetBinContent(1);
681 double coarse = tmp->GetBinContent(2);
682 double tot = fine + coarse;
684 wheelEtaFine += fine;
694 if (wheelEtaAll > 0) {
707 for (
unsigned int bx = 1;
bx < 4; ++
bx) {
710 wheelSumBx[
bx] += wheelBx[
bx];
714 wheelSumBx2nd[
bx] += wheelBx2nd[
bx];
720 for (
unsigned int qual = 1; qual < 8; ++qual) {
742 double scale = wheelBx[2];
748 scale = wheelBx2nd[2];
763 sprintf(hname,
"%s/2ND_TRACK_ONLY/dttf_07_eta_wh%s_2ndTrack",
wheelpath_[wh].c_str(),
wheel_[wh].c_str());
775 sprintf(hname,
"%s/2ND_TRACK_ONLY/dttf_08_phi_wh%s_2ndTrack",
wheelpath_[wh].c_str(),
wheel_[wh].c_str());
786 sprintf(hname,
"%s/2ND_TRACK_ONLY/dttf_09_pt_wh%s_2ndTrack",
wheelpath_[wh].c_str(),
wheel_[wh].c_str());
797 sprintf(hname,
"%s/2ND_TRACK_ONLY/dttf_10_charge_wh%s_2ndTrack",
wheelpath_[wh].c_str(),
wheel_[wh].c_str());
808 sprintf(hname,
"%s/2ND_TRACK_ONLY/dttf_04_quality_wh%s_2ndTrack",
wheelpath_[wh].c_str(),
wheel_[wh].c_str());
813 for (
unsigned int qual = 1; qual < 8; ++qual) {
814 double binqual = tmp->GetBinContent(qual);
824 for (
unsigned int bx = 1;
bx < 4; ++
bx) {
832 double scale = wheelSumBx[2];
838 scale = wheelSumBx2nd[2];
848 sprintf(hname,
"%s/dttf_tracks_with_gmt_match",
gmtpath_.c_str());
849 TH2F *gmt_match =
getTH2F(igetter, hname);
855 sprintf(hname,
"%s/dttf_tracks_without_gmt_match",
gmtpath_.c_str());
856 TH2F *gmt_missed =
getTH2F(igetter, hname);
862 sprintf(hname,
"%s/dttf_missing_tracks_in_gmt",
gmtpath_.c_str());
863 TH2F *gmt_ghost =
getTH2F(igetter, hname);
869 int match = gmt_match->Integral();
870 int missed = gmt_missed->Integral();
871 int ghost = gmt_ghost->Integral();
872 float tot = match + missed + ghost;
909 TH2F *occupancySummary,
917 for (
unsigned int wh = 0; wh < 6; ++wh) {
924 for (
unsigned int sec = 1; sec < 13; ++sec) {
925 double denHighQual = occupancySummary->GetBinContent(wh + 1, sec);
927 if (denHighQual > 0) {
928 for (
unsigned int qual = 4; qual < 8; ++qual) {
929 val += quality->GetBinContent(qual, sec);
948 sprintf(hname, path_fine.c_str(),
wheelpath_[wh].c_str(),
wheel_[wh].c_str());
950 TH2F *phi_vs_eta_fine =
getTH2F(igetter, hname);
951 if (!phi_vs_eta_fine) {
955 sprintf(hname, path_coarse.c_str(),
wheelpath_[wh].c_str(),
wheel_[wh].c_str());
956 TH2F *phi_vs_eta_coarse =
getTH2F(igetter, hname);
957 if (!phi_vs_eta_coarse) {
961 if (!phi_vs_eta_fine || !phi_vs_eta_coarse) {
965 for (
unsigned int phi = 1;
phi < 145; ++
phi) {
1002 double valfine = phi_vs_eta_fine->GetBinContent(
eta,
phi) + phi_eta_fine_integ->
getBinContent(setbin,
phi);
1004 double valcoarse = phi_vs_eta_coarse->GetBinContent(
eta,
phi) + phi_eta_coarse_integ->
getBinContent(setbin,
phi);
1043 TH2F *phi_vs_eta =
getTH2F(igetter, hname);
1047 for (
unsigned int phi = 1;
phi < 145; ++
phi) {
1087 double underflow = phi_vs_eta->GetBinContent(0,
phi) + phi_eta_integ->
getBinContent(1,
phi);
1090 double overflow = phi_vs_eta->GetBinContent(nbins + 1,
phi) + phi_eta_integ->
getBinContent(64);
MonitorElement * dttf_bx_integ_2ndTrack
MonitorElement * dttf_gmt_matching
MonitorElement * dttf_occupancySummary
MonitorElement * dttf_quality_summary
virtual TH2F * getTH2F() const
L1TDTTFClient(const edm::ParameterSet &ps)
Constructor.
const edm::EventSetup & c
MonitorElement * dttf_q_wheel[6]
MonitorElement * dttf_eta_integ_2ndTrack
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * dttf_quality_integ_2ndTrack
MonitorElement * dttf_eta_wheel[6]
void buildSummaries(DQMStore::IGetter &igetter)
void dqmEndLuminosityBlock(DQMStore::IBooker &ibooker, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
MonitorElement * dttf_nTracks_integ
MonitorElement * dttf_quality_integ
virtual TH1F * getTH1F() const
TH1F * getTH1F(DQMStore::IGetter &igetter, const char *hname)
std::string wheelpath_[6]
void buildPhiEtaPlotO(DQMStore::IGetter &igetter, MonitorElement *phi_eta_integ, const std::string &path, int wh)
MonitorElement * dttf_bx_wheel_integ_2ndTrack[6]
void buildHighQualityPlot(DQMStore::IGetter &igetter, TH2F *occupancySummary, MonitorElement *highQual_Summary, const std::string &path)
void book(DQMStore::IBooker &ibooker)
MonitorElement * dttf_bx_wheel_summary[6]
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Log< level::Error, false > LogError
MonitorElement * dttf_pt_integ_2ndTrack
MonitorElement * dttf_bx_integ
TH2F * getTH2F(DQMStore::IGetter &igetter, const char *hname)
MonitorElement * dttf_phi_eta_fine_integ
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
MonitorElement * dttf_highQual_Summary_2ndTrack
MonitorElement * dttf_phi_wheel[6]
MonitorElement * dttf_phi_eta_integ
MonitorElement * dttf_quality_summary_wheel[6]
MonitorElement * dttf_pt_integ
MonitorElement * dttf_phi_eta_coarse_integ
TH2F * occupancy_r_
counter
~L1TDTTFClient() override
Destructor.
MonitorElement * dttf_occupancySummary_2ndTrack
virtual MonitorElement * get(std::string const &fullpath) const
MonitorElement * dttf_eta_integ
MonitorElement * dttf_2ndTrack_Summary
MonitorElement * dttf_q_integ_2ndTrack
MonitorElement * dttf_bx_wheel_summary_2ndTrack[6]
virtual 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)
virtual double getBinContent(int binx) const
get content of bin (1-D)
const char * qualities[3]
MonitorElement * dttf_bx_summary
Log< level::Info, false > LogInfo
MonitorElement * dttf_quality_wheel[6]
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
void makeSummary(DQMStore::IGetter &igetter)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * dttf_eta_fine_fraction
std::string l1tdttffolder_
MonitorElement * dttf_occupancySummary_test
MonitorElement * dttf_fine_fraction_wh[6]
void setQualLabel(MonitorElement *me, int axis)
MonitorElement * dttf_nTracks_wheel[6]
MonitorElement * dttf_bx_summary_2ndTrack
MonitorElement * dttf_nTracks_integ_2ndTrack
void buildPhiEtaPlotOFC(DQMStore::IGetter &igetter, MonitorElement *phi_eta_fine_integ, MonitorElement *phi_eta_coarse_integ, MonitorElement *phi_eta_integ, const std::string &path_fine, const std::string &path_coarse, int wh)
void setGMTsummary(DQMStore::IGetter &igetter)
MonitorElement * dttf_phi_integ_2ndTrack
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
MonitorElement * dttf_pt_wheel[6]
MonitorElement * dttf_nTracks_wheel_2ndTrack[6]
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * dttf_phi_integ
MonitorElement * dttf_highQual_Summary
MonitorElement * dttf_q_integ
MonitorElement * dttf_bx_wheel_integ[6]
std::string inclusivepath_
void setWheelLabel(MonitorElement *me)
MonitorElement * dttf_quality_summary_2ndTrack
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * dttf_phi_eta_integ_2ndTrack