16 : l1tdttffolder_(ps.getUntrackedParameter<
std::
string>(
"l1tSourceFolder",
"L1T/L1TDTTF")),
17 dttfSource_(ps.getParameter<
edm::
InputTag>(
"dttfSource")),
18 online_(ps.getUntrackedParameter<
bool>(
"online",
true)),
19 resetafterlumi_(ps.getUntrackedParameter<
int>(
"resetAfterLumi", 3)),
21 occupancy_r_(nullptr) {
30 edm::LogInfo(
"L1TDTTFClient") <<
"[L1TDTTFClient]: Begin Job";
57 sprintf(hname,
"dttf_02_nTracks");
58 sprintf(mename,
"DTTF Tracks by Wheel");
63 sprintf(hname,
"dttf_03_tracks_occupancy_summary");
64 sprintf(mename,
"DTTF Tracks Occupancy");
72 sprintf(hname,
"dttf_05_bx_occupancy");
73 sprintf(mename,
"DTTF Tracks BX Distribution by Wheel");
79 sprintf(hname,
"dttf_06_bx");
80 sprintf(mename,
"DTTF Tracks BX w.r.t. Tracks with BX=0");
85 sprintf(hname,
"dttf_07_quality");
86 sprintf(mename,
"DTTF Tracks Quality distribution");
91 sprintf(hname,
"dttf_08_quality_occupancy");
92 sprintf(mename,
"DTTF Tracks Quality distribution by Wheel");
99 sprintf(hname,
"dttf_09_highQuality_Tracks");
100 sprintf(mename,
"Fraction of DTTF Tracks with Quality>3");
106 sprintf(hname,
"dttf_10_phi_vs_etaCoarse");
107 sprintf(mename,
"#eta-#phi DTTF Tracks occupancy (coarse #eta only, packed values)");
113 sprintf(hname,
"dttf_11_phi_vs_etaFine");
114 sprintf(mename,
"#eta-#phi DTTF Tracks occupancy (fine #eta only, packed values)");
120 sprintf(hname,
"dttf_12_phi_vs_eta");
121 sprintf(mename,
"#eta-#phi DTTF Tracks occupancy");
127 sprintf(hname,
"dttf_13_eta_fine_fraction");
128 sprintf(mename,
"Fraction of DTTF Tracks with Fine #eta Assignment");
136 sprintf(hname,
"dttf_14_eta");
137 sprintf(mename,
"DTTF Tracks #eta distribution (Packed values)");
142 sprintf(hname,
"dttf_15_phi");
143 sprintf(mename,
"DTTF Tracks Phi distribution (Packed values)");
148 sprintf(hname,
"dttf_16_pt");
149 sprintf(mename,
"DTTF Tracks p_{T} distribution (Packed values)");
153 sprintf(hname,
"dttf_17_charge");
154 sprintf(mename,
"DTTF Tracks Charge distribution");
159 sprintf(hname,
"dttf_18_2ndTrack_occupancy_summary");
160 sprintf(mename,
"DTTF 2nd Tracks occupancy w.r.t. Tracks with BX=0");
168 sprintf(hname,
"dttf_gmt_fract_matching");
169 sprintf(mename,
"Fraction of DTTF tracks matching with GMT tracks");
180 sprintf(hname,
"dttf_01_tracks_occupancy_test_summary");
181 sprintf(mename,
"DTTF Tracks Occupancy");
192 sprintf(hname,
"dttf_01_nTracks_2ndTrack");
193 sprintf(mename,
"DTTF 2nd Tracks per Wheel distribution");
198 sprintf(hname,
"dttf_02_occupancy_summary_2ndTrack");
199 sprintf(mename,
"DTTF 2nd Tracks distribution by Sector and Wheel");
204 sprintf(hname,
"dttf_03_bx_occupancy_2ndTrack");
205 sprintf(mename,
"DTTF 2nd Tracks BX Distribution by Wheel");
211 sprintf(hname,
"dttf_04_bx_2ndTrack");
212 sprintf(mename,
"Fraction of DTTF Tracks BX w.r.t. Tracks with BX=0");
217 sprintf(hname,
"dttf_05_quality_2ndTrack");
218 sprintf(mename,
"DTTF 2nd Tracks Quality distribution");
224 sprintf(hname,
"dttf_06_quality_occupancy_2ndTrack");
225 sprintf(mename,
"DTTF 2nd Tracks Quality distribution by Wheel");
232 sprintf(hname,
"dttf_07_highQuality_Tracks_2ndTrack");
233 sprintf(mename,
"Fraction of DTTF 2nd Tracks with Quality>3");
239 sprintf(hname,
"dttf_08_phi_vs_eta_2ndTrack");
240 sprintf(mename,
"#eta-#phi DTTF Tracks occupancy for 2nd Tracks");
246 sprintf(hname,
"dttf_09_eta_2ndTrack");
247 sprintf(mename,
"DTTF 2nd Tracks #eta distribution (Packed values)");
252 sprintf(hname,
"dttf_10_phi_2ndTrack");
253 sprintf(mename,
"DTTF 2nd Tracks Phi distribution (Packed values)");
258 sprintf(hname,
"dttf_11_pt_2ndTrack");
259 sprintf(mename,
"DTTF 2nd Tracks p_{T} distribution (Packed values)");
264 sprintf(hname,
"dttf_12_charge_2ndTrack");
265 sprintf(mename,
"DTTF 2nd Tracks Charge distribution");
269 for (
unsigned int wh = 0; wh < 6; ++wh) {
273 sprintf(hname,
"dttf_02_nTracks_wh%s",
wheel_[wh].c_str());
274 sprintf(mename,
"Wheel %s - Number of Tracks",
wheel_[wh].c_str());
279 sprintf(hname,
"dttf_03_bx_occupancy_wh%s",
wheel_[wh].c_str());
280 sprintf(mename,
"Wheel %s - DTTF Tracks BX distribution by Sector",
wheel_[wh].c_str());
286 sprintf(hname,
"dttf_04_bx_wh%s",
wheel_[wh].c_str());
287 sprintf(mename,
"Wheel %s - DTTF Tracks BX w.r.t. Tracks with BX=0",
wheel_[wh].c_str());
292 sprintf(hname,
"dttf_05_quality_wh%s",
wheel_[wh].c_str());
293 sprintf(mename,
"Wheel %s - Tracks Quality Distribution",
wheel_[wh].c_str());
299 sprintf(hname,
"dttf_06_quality_summary_wh%s",
wheel_[wh].c_str());
300 sprintf(mename,
"Wheel %s - Tracks Quality Distribution by Sector",
wheel_[wh].c_str());
307 sprintf(hname,
"dttf_09_etaFine_fraction_wh%s",
wheel_[wh].c_str());
308 sprintf(mename,
"Wheel %s - Fraction of DTTF Tracks with fine #eta assignment",
wheel_[wh].c_str());
313 sprintf(hname,
"dttf_10_eta_wh%s",
wheel_[wh].c_str());
314 sprintf(mename,
"Wheel %s - DTTF Tracks #eta distribution (Packed values)",
wheel_[wh].c_str());
319 sprintf(hname,
"dttf_11_phi_wh%s",
wheel_[wh].c_str());
320 sprintf(mename,
"Wheel %s - DTTF Tracks Phi distribution (Packed values)",
wheel_[wh].c_str());
325 sprintf(hname,
"dttf_12_pt_wh%s",
wheel_[wh].c_str());
326 sprintf(mename,
"Wheel %s - DTTF Tracks p_{T} distribution (Packed values)",
wheel_[wh].c_str());
331 sprintf(hname,
"dttf_13_charge_wh%s",
wheel_[wh].c_str());
332 sprintf(mename,
"Wheel %s - DTTF Tracks Charge distribution",
wheel_[wh].c_str());
338 for (
unsigned int wh = 0; wh < 6; ++wh) {
342 sprintf(hname,
"dttf_01_nTracks_wh%s_2ndTrack",
wheel_[wh].c_str());
343 sprintf(mename,
"Wheel %s - DTTF Number of 2nd Tracks with BX=0",
wheel_[wh].c_str());
348 sprintf(hname,
"dttf_02_bx_occupancy_wh%s_2ndTrack",
wheel_[wh].c_str());
349 sprintf(mename,
"Wheel %s - DTTF 2nd Tracks BX distribution by Sector",
wheel_[wh].c_str());
355 sprintf(hname,
"dttf_03_bx_wh%s_2ndTrack",
wheel_[wh].c_str());
356 sprintf(mename,
"Wheel %s - 2nd Tracks BX Distribution",
wheel_[wh].c_str());
379 sprintf(hname,
"%s/dttf_04_tracks_occupancy_by_lumi",
inclusivepath_.c_str());
385 edm::LogInfo(
"L1TDTTFClient::beginLuminosityBlock:RESET") <<
"Reseting plots by lumi!";
421 if (physEntries > 0) {
422 double physScale = 1 / physEntries;
443 if (entries2ndTrack > 0) {
455 double scale2nd = 1 / entries2ndTrack;
479 int wheelSumBx2nd[4];
482 memset(wheelSumBx, 0, 4 *
sizeof(
int));
483 memset(wheelSumBx2nd, 0, 4 *
sizeof(
int));
503 for (
unsigned int wh = 0; wh < 6; ++wh) {
511 double wheelEtaAll = 0;
512 double wheelEtaFine = 0;
513 memset(wheelBx, 0, 4 *
sizeof(
int));
514 memset(wheelBx2nd, 0, 4 *
sizeof(
int));
526 "%s/dttf_07_phi_vs_etaFine_wh%s",
527 "%s/dttf_08_phi_vs_etaCoarse_wh%s",
541 TH1F *bxsector =
getTH1F(igetter, hname);
545 for (
unsigned int bx = 1;
bx < 4; ++
bx) {
546 int bxval = bxsector->GetBinContent(
bx);
557 wheelBx[
bx] += bxval;
566 "%s/BX_BySector/2ND_TRACK_ONLY/dttf_bx_2ndTrack_wh%s_se%d",
571 TH1F *bxsector2nd =
getTH1F(igetter, hname);
575 for (
unsigned int bx = 1;
bx < 4; ++
bx) {
576 int bxval = bxsector2nd->GetBinContent(
bx);
583 wheelBx2nd[
bx] += bxval;
628 double denHighQual = 0;
637 double bincontent =
tmp->GetBinContent(
qual);
639 denHighQual += bincontent;
644 double bincontent =
tmp->GetBinContent(
qual);
647 denHighQual += bincontent;
648 highQual += bincontent;
652 highQual /= denHighQual;
671 "%s/EtaFineFraction/dttf_etaFine_fraction_wh%s_se%d",
679 double fine =
tmp->GetBinContent(1);
680 double coarse =
tmp->GetBinContent(2);
681 double tot = fine + coarse;
683 wheelEtaFine += fine;
693 if (wheelEtaAll > 0) {
706 for (
unsigned int bx = 1;
bx < 4; ++
bx) {
709 wheelSumBx[
bx] += wheelBx[
bx];
713 wheelSumBx2nd[
bx] += wheelBx2nd[
bx];
741 double scale = wheelBx[2];
747 scale = wheelBx2nd[2];
762 sprintf(hname,
"%s/2ND_TRACK_ONLY/dttf_07_eta_wh%s_2ndTrack",
wheelpath_[wh].c_str(),
wheel_[wh].c_str());
774 sprintf(hname,
"%s/2ND_TRACK_ONLY/dttf_08_phi_wh%s_2ndTrack",
wheelpath_[wh].c_str(),
wheel_[wh].c_str());
785 sprintf(hname,
"%s/2ND_TRACK_ONLY/dttf_09_pt_wh%s_2ndTrack",
wheelpath_[wh].c_str(),
wheel_[wh].c_str());
796 sprintf(hname,
"%s/2ND_TRACK_ONLY/dttf_10_charge_wh%s_2ndTrack",
wheelpath_[wh].c_str(),
wheel_[wh].c_str());
807 sprintf(hname,
"%s/2ND_TRACK_ONLY/dttf_04_quality_wh%s_2ndTrack",
wheelpath_[wh].c_str(),
wheel_[wh].c_str());
813 double binqual =
tmp->GetBinContent(
qual);
823 for (
unsigned int bx = 1;
bx < 4; ++
bx) {
831 double scale = wheelSumBx[2];
837 scale = wheelSumBx2nd[2];
847 sprintf(hname,
"%s/dttf_tracks_with_gmt_match",
gmtpath_.c_str());
848 TH2F *gmt_match =
getTH2F(igetter, hname);
854 sprintf(hname,
"%s/dttf_tracks_without_gmt_match",
gmtpath_.c_str());
855 TH2F *gmt_missed =
getTH2F(igetter, hname);
861 sprintf(hname,
"%s/dttf_missing_tracks_in_gmt",
gmtpath_.c_str());
862 TH2F *gmt_ghost =
getTH2F(igetter, hname);
868 int match = gmt_match->Integral();
869 int missed = gmt_missed->Integral();
870 int ghost = gmt_ghost->Integral();
890 return me->getTH1F();
901 return me->getTH2F();
908 TH2F *occupancySummary,
916 for (
unsigned int wh = 0; wh < 6; ++wh) {
923 for (
unsigned int sec = 1;
sec < 13; ++
sec) {
924 double denHighQual = occupancySummary->GetBinContent(wh + 1,
sec);
926 if (denHighQual > 0) {
947 sprintf(hname, path_fine.c_str(),
wheelpath_[wh].c_str(),
wheel_[wh].c_str());
949 TH2F *phi_vs_eta_fine =
getTH2F(igetter, hname);
950 if (!phi_vs_eta_fine) {
954 sprintf(hname, path_coarse.c_str(),
wheelpath_[wh].c_str(),
wheel_[wh].c_str());
955 TH2F *phi_vs_eta_coarse =
getTH2F(igetter, hname);
956 if (!phi_vs_eta_coarse) {
960 if (!phi_vs_eta_fine || !phi_vs_eta_coarse) {
964 for (
unsigned int phi = 1;
phi < 145; ++
phi) {
1001 double valfine = phi_vs_eta_fine->GetBinContent(
eta,
phi) + phi_eta_fine_integ->
getBinContent(setbin,
phi);
1003 double valcoarse = phi_vs_eta_coarse->GetBinContent(
eta,
phi) + phi_eta_coarse_integ->
getBinContent(setbin,
phi);
1042 TH2F *phi_vs_eta =
getTH2F(igetter, hname);
1046 for (
unsigned int phi = 1;
phi < 145; ++
phi) {
1086 double underflow = phi_vs_eta->GetBinContent(0,
phi) + phi_eta_integ->
getBinContent(1,
phi);
1174 me->setAxisTitle(
"Wheel", 1);
1175 me->setBinLabel(1,
"N2", 1);
1176 me->setBinLabel(2,
"N1", 1);
1177 me->setBinLabel(3,
"N0", 1);
1178 me->setBinLabel(4,
"P0", 1);
1179 me->setBinLabel(5,
"P1", 1);
1180 me->setBinLabel(6,
"P2", 1);
1186 me->setAxisTitle(
"Quality", axis);
1187 me->setBinLabel(1,
"T34", axis);
1188 me->setBinLabel(2,
"T23/24", axis);
1189 me->setBinLabel(3,
"T12/13/14", axis);
1190 me->setBinLabel(4,
"T234", axis);
1191 me->setBinLabel(5,
"T134", axis);
1192 me->setBinLabel(6,
"T123/124", axis);
1193 me->setBinLabel(7,
"T1234", axis);
MonitorElement * dttf_bx_integ_2ndTrack
MonitorElement * dttf_gmt_matching
MonitorElement * dttf_occupancySummary
MonitorElement * dttf_quality_summary
L1TDTTFClient(const edm::ParameterSet &ps)
Constructor.
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
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 TH2F * getTH2F() const
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
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)
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)
virtual TH1F * getTH1F() const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
virtual MonitorElement * get(std::string const &fullpath) const
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)
virtual double getBinContent(int binx) const
get content of bin (1-D)
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