Skip to content

Commit 7d436f7

Browse files
committed
Merge pull request #905 in B2/basf2 from feature/BII-9272-r61 to release/06-01
* commit 'a08466f780c726fa1ee68a5aef4871f7101416a5': Cleanup the code by removing redundant histograms; Add a suffix to the histograms run on HLT C++ is not python Move a bunch of IP-related plots to ExpressReco only f-strings are so nice Fix the test_analysisdqm_path test Fix the DQM path for the IPDQM module Add a default value to onlineMode; synch the accepted values with the dqm_environment constants used in the online scripts Replace headers to fix compiler errors Run the IPDQM monitor also on HLT, but on dimuon skimmed events
2 parents 50a9d5b + a08466f commit 7d436f7

File tree

15 files changed

+277
-309
lines changed

15 files changed

+277
-309
lines changed

dqm/analysis/modules/src/DQMHistAnalysisHLTModule.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
* See git log for contributors and copyright holders. *
66
* This file is licensed under LGPL-3.0, see LICENSE.md. *
77
**************************************************************************/
8+
89
#include <dqm/analysis/modules/DQMHistAnalysisHLTModule.h>
910
#include <framework/core/ModuleParam.templateDetails.h>
1011
#include <TROOT.h>
1112

12-
#include <hlt/softwaretrigger/modules/dqm/SoftwareTriggerHLTDQMModule.h>
13+
#include <hlt/utilities/Units.h>
1314

1415
using namespace std;
1516
using namespace Belle2;
@@ -79,8 +80,8 @@ void DQMHistAnalysisHLTModule::initialize()
7980
m_hRetentionPerUnit.emplace(filterLine, std::make_pair(
8081
new TCanvas(("HLT/" + filterLine + "_RetentionPerUnit").c_str()),
8182
new TH1F((filterLine + "_RetentionPerUnit").c_str(), ("Retention rate per unit of: " + filterLine).c_str(),
82-
SoftwareTrigger::HLTUnit::max_hlt_units + 1, 0,
83-
SoftwareTrigger::HLTUnit::max_hlt_units + 1)
83+
HLTUnits::max_hlt_units + 1, 0,
84+
HLTUnits::max_hlt_units + 1)
8485
));
8586
}
8687

@@ -345,7 +346,7 @@ void DQMHistAnalysisHLTModule::event()
345346
continue;
346347
}
347348

348-
for (unsigned int i = 1; i <= SoftwareTrigger::HLTUnit::max_hlt_units + 1; i++) {
349+
for (unsigned int i = 1; i <= HLTUnits::max_hlt_units + 1; i++) {
349350
double totalUnitValue = hltUnitNumberHistogram->GetBinContent(i);
350351
if (totalUnitValue == 0) {
351352
histogram->Fill(i, 0);

dqm/analysis/modules/src/DQMHistAnalysisHLTMonObj.cc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88

99
// Own include
1010
#include <dqm/analysis/modules/DQMHistAnalysisHLTMonObj.h>
11-
// software trigger include
12-
#include <hlt/softwaretrigger/modules/dqm/SoftwareTriggerHLTDQMModule.h>
13-
//DQM
14-
#include <dqm/analysis/modules/DQMHistAnalysis.h>
11+
12+
// Belle 2 headers.
13+
#include <hlt/utilities/Units.h>
14+
15+
// C++ headers
16+
#include <regex>
1517

1618
using namespace std;
1719
using namespace Belle2;
@@ -234,7 +236,7 @@ void DQMHistAnalysisHLTMonObjModule::endRun()
234236
TH1* h_budgetUnit = nullptr;
235237
TH1* h_memoryUnit = nullptr;
236238

237-
for (unsigned int index = 1; index <= SoftwareTrigger::HLTUnit::max_hlt_units; index++) {
239+
for (unsigned int index = 1; index <= HLTUnits::max_hlt_units; index++) {
238240
// add budget time per unit
239241
h_budgetUnit = findHist(("timing_statistics/fullTimePerUnitHistogram_HLT" + std::to_string(index)).c_str());
240242
double bgunit = 0.;
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
Import('env')
22

3-
# env['CONTINUE'] = False
4-
5-
env['LIBS'] = ['framework','analysis','mdst_dataobjects', 'analysis_dataobjects', 'analysis_utility']
3+
env['LIBS'] = ['framework','analysis','mdst_dataobjects', 'analysis_dataobjects', 'analysis_utility', 'hlt']
64

75
Return('env')

dqm/modules/PhysicsObjectsDQM/include/IPDQMExpressRecoModule.h renamed to dqm/modules/PhysicsObjectsDQM/include/IPDQMModule.h

Lines changed: 22 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,31 @@
66
* This file is licensed under LGPL-3.0, see LICENSE.md. *
77
**************************************************************************/
88

9+
/* Belle 2 headers. */
910
#include <framework/core/HistoModule.h>
11+
#include <hlt/softwaretrigger/modules/dqm/SoftwareTriggerHLTDQMModule.h>
1012

13+
/* ROOT headers. */
14+
#include <TH1F.h>
15+
16+
/* C++ headers. */
1117
#include <string>
12-
#include "TH1F.h"
18+
#include <vector>
1319

1420
namespace Belle2 {
21+
1522
/**
16-
* This Module, made for ExpressReco, monitors the position
17-
* and the dimension of the beamspot using mu+mu- events
23+
* This Module, made for monitors the position and the size
24+
* of the interaction point using mu+mu- events.
1825
*/
19-
class IPDQMExpressRecoModule : public HistoModule {
26+
class IPDQMModule : public HistoModule {
2027

2128
public:
29+
2230
/**
2331
* Constructor
2432
*/
25-
IPDQMExpressRecoModule();
33+
IPDQMModule();
2634

2735
/**
2836
* Initialize the module
@@ -58,7 +66,6 @@ namespace Belle2 {
5866
*/
5967
void defineHisto() override;
6068

61-
6269
private:
6370

6471
/** x coord*/
@@ -73,52 +80,24 @@ namespace Belle2 {
7380
TH1F* m_h_py = nullptr;
7481
/** z coord momentum in LAB frame*/
7582
TH1F* m_h_pz = nullptr;
76-
/**Energy in LAB frame*/
83+
/** Energy in LAB frame*/
7784
TH1F* m_h_E = nullptr;
78-
/** y pull*/
79-
TH1F* m_h_pull = nullptr;
80-
/** y resolution */
81-
TH1F* m_h_y_risol = nullptr;
82-
/** initial histogram for median calculation*/
83-
TH1F* m_h_temp = nullptr;
84-
/** xx coord*/
85-
TH1F* m_h_xx = nullptr;
86-
/** yy coord*/
87-
TH1F* m_h_yy = nullptr;
88-
/** zz coord*/
89-
TH1F* m_h_zz = nullptr;
90-
/** xz coord*/
91-
TH1F* m_h_xz = nullptr;
92-
/** yz coord*/
93-
TH1F* m_h_yz = nullptr;
94-
/** xy coord*/
95-
TH1F* m_h_xy = nullptr;
96-
97-
/**Var x*/
85+
/** Var x*/
9886
TH1F* m_h_cov_x_x = nullptr;
99-
/**Var y*/
87+
/** Var y*/
10088
TH1F* m_h_cov_y_y = nullptr;
101-
/**Var z*/
89+
/** Var z*/
10290
TH1F* m_h_cov_z_z = nullptr;
103-
/**Cov xz*/
91+
/** Cov xz*/
10492
TH1F* m_h_cov_x_z = nullptr;
105-
/**Cov yz*/
93+
/** Cov yz*/
10694
TH1F* m_h_cov_y_z = nullptr;
107-
/**Cov xy*/
95+
/** Cov xy*/
10896
TH1F* m_h_cov_x_y = nullptr;
109-
/**store the y coordinates for the pull*/
110-
std::vector<float> m_v_y;
111-
/**store the y errors for the pull*/
112-
std::vector<float> m_err_y;
113-
114-
Double_t m_median = 0; /**<The median of y coord*/
115-
Double_t m_quantile = 0.5;/**<The 0.5 quantile for the median*/
116-
Int_t m_r = 0; /**<Counter for sampling*/
117-
Int_t m_size = 200; /**<Size for sampling*/
118-
Int_t m_no_units = 5; /**<Number of units*/
119-
Int_t m_size_per_unit = m_size / m_no_units; /**<Size for sampling per each unit*/
12097
/** Name of the Y4S particle list */
12198
std::string m_Y4SPListName = "";
99+
/** Mode of online processing ("HLT" or "ExpressReco") */
100+
std::string m_onlineMode = "";
122101

123102
};
124103

dqm/modules/PhysicsObjectsDQM/src/IPDQMExpressRecoModule.cc

Lines changed: 0 additions & 213 deletions
This file was deleted.

0 commit comments

Comments
 (0)