Skip to content

Commit

Permalink
Merge pull request #905 in B2/basf2 from feature/BII-9272-r61 to rele…
Browse files Browse the repository at this point in the history
…ase/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
  • Loading branch information
GiacomoXT committed Apr 10, 2022
2 parents 50a9d5b + a08466f commit 7d436f7
Show file tree
Hide file tree
Showing 15 changed files with 277 additions and 309 deletions.
9 changes: 5 additions & 4 deletions dqm/analysis/modules/src/DQMHistAnalysisHLTModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
* See git log for contributors and copyright holders. *
* This file is licensed under LGPL-3.0, see LICENSE.md. *
**************************************************************************/

#include <dqm/analysis/modules/DQMHistAnalysisHLTModule.h>
#include <framework/core/ModuleParam.templateDetails.h>
#include <TROOT.h>

#include <hlt/softwaretrigger/modules/dqm/SoftwareTriggerHLTDQMModule.h>
#include <hlt/utilities/Units.h>

using namespace std;
using namespace Belle2;
Expand Down Expand Up @@ -79,8 +80,8 @@ void DQMHistAnalysisHLTModule::initialize()
m_hRetentionPerUnit.emplace(filterLine, std::make_pair(
new TCanvas(("HLT/" + filterLine + "_RetentionPerUnit").c_str()),
new TH1F((filterLine + "_RetentionPerUnit").c_str(), ("Retention rate per unit of: " + filterLine).c_str(),
SoftwareTrigger::HLTUnit::max_hlt_units + 1, 0,
SoftwareTrigger::HLTUnit::max_hlt_units + 1)
HLTUnits::max_hlt_units + 1, 0,
HLTUnits::max_hlt_units + 1)
));
}

Expand Down Expand Up @@ -345,7 +346,7 @@ void DQMHistAnalysisHLTModule::event()
continue;
}

for (unsigned int i = 1; i <= SoftwareTrigger::HLTUnit::max_hlt_units + 1; i++) {
for (unsigned int i = 1; i <= HLTUnits::max_hlt_units + 1; i++) {
double totalUnitValue = hltUnitNumberHistogram->GetBinContent(i);
if (totalUnitValue == 0) {
histogram->Fill(i, 0);
Expand Down
12 changes: 7 additions & 5 deletions dqm/analysis/modules/src/DQMHistAnalysisHLTMonObj.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@

// Own include
#include <dqm/analysis/modules/DQMHistAnalysisHLTMonObj.h>
// software trigger include
#include <hlt/softwaretrigger/modules/dqm/SoftwareTriggerHLTDQMModule.h>
//DQM
#include <dqm/analysis/modules/DQMHistAnalysis.h>

// Belle 2 headers.
#include <hlt/utilities/Units.h>

// C++ headers
#include <regex>

using namespace std;
using namespace Belle2;
Expand Down Expand Up @@ -234,7 +236,7 @@ void DQMHistAnalysisHLTMonObjModule::endRun()
TH1* h_budgetUnit = nullptr;
TH1* h_memoryUnit = nullptr;

for (unsigned int index = 1; index <= SoftwareTrigger::HLTUnit::max_hlt_units; index++) {
for (unsigned int index = 1; index <= HLTUnits::max_hlt_units; index++) {
// add budget time per unit
h_budgetUnit = findHist(("timing_statistics/fullTimePerUnitHistogram_HLT" + std::to_string(index)).c_str());
double bgunit = 0.;
Expand Down
4 changes: 1 addition & 3 deletions dqm/modules/PhysicsObjectsDQM/SConscript
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Import('env')

# env['CONTINUE'] = False

env['LIBS'] = ['framework','analysis','mdst_dataobjects', 'analysis_dataobjects', 'analysis_utility']
env['LIBS'] = ['framework','analysis','mdst_dataobjects', 'analysis_dataobjects', 'analysis_utility', 'hlt']

Return('env')
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,31 @@
* This file is licensed under LGPL-3.0, see LICENSE.md. *
**************************************************************************/

/* Belle 2 headers. */
#include <framework/core/HistoModule.h>
#include <hlt/softwaretrigger/modules/dqm/SoftwareTriggerHLTDQMModule.h>

/* ROOT headers. */
#include <TH1F.h>

/* C++ headers. */
#include <string>
#include "TH1F.h"
#include <vector>

namespace Belle2 {

/**
* This Module, made for ExpressReco, monitors the position
* and the dimension of the beamspot using mu+mu- events
* This Module, made for monitors the position and the size
* of the interaction point using mu+mu- events.
*/
class IPDQMExpressRecoModule : public HistoModule {
class IPDQMModule : public HistoModule {

public:

/**
* Constructor
*/
IPDQMExpressRecoModule();
IPDQMModule();

/**
* Initialize the module
Expand Down Expand Up @@ -58,7 +66,6 @@ namespace Belle2 {
*/
void defineHisto() override;


private:

/** x coord*/
Expand All @@ -73,52 +80,24 @@ namespace Belle2 {
TH1F* m_h_py = nullptr;
/** z coord momentum in LAB frame*/
TH1F* m_h_pz = nullptr;
/**Energy in LAB frame*/
/** Energy in LAB frame*/
TH1F* m_h_E = nullptr;
/** y pull*/
TH1F* m_h_pull = nullptr;
/** y resolution */
TH1F* m_h_y_risol = nullptr;
/** initial histogram for median calculation*/
TH1F* m_h_temp = nullptr;
/** xx coord*/
TH1F* m_h_xx = nullptr;
/** yy coord*/
TH1F* m_h_yy = nullptr;
/** zz coord*/
TH1F* m_h_zz = nullptr;
/** xz coord*/
TH1F* m_h_xz = nullptr;
/** yz coord*/
TH1F* m_h_yz = nullptr;
/** xy coord*/
TH1F* m_h_xy = nullptr;

/**Var x*/
/** Var x*/
TH1F* m_h_cov_x_x = nullptr;
/**Var y*/
/** Var y*/
TH1F* m_h_cov_y_y = nullptr;
/**Var z*/
/** Var z*/
TH1F* m_h_cov_z_z = nullptr;
/**Cov xz*/
/** Cov xz*/
TH1F* m_h_cov_x_z = nullptr;
/**Cov yz*/
/** Cov yz*/
TH1F* m_h_cov_y_z = nullptr;
/**Cov xy*/
/** Cov xy*/
TH1F* m_h_cov_x_y = nullptr;
/**store the y coordinates for the pull*/
std::vector<float> m_v_y;
/**store the y errors for the pull*/
std::vector<float> m_err_y;

Double_t m_median = 0; /**<The median of y coord*/
Double_t m_quantile = 0.5;/**<The 0.5 quantile for the median*/
Int_t m_r = 0; /**<Counter for sampling*/
Int_t m_size = 200; /**<Size for sampling*/
Int_t m_no_units = 5; /**<Number of units*/
Int_t m_size_per_unit = m_size / m_no_units; /**<Size for sampling per each unit*/
/** Name of the Y4S particle list */
std::string m_Y4SPListName = "";
/** Mode of online processing ("HLT" or "ExpressReco") */
std::string m_onlineMode = "";

};

Expand Down
213 changes: 0 additions & 213 deletions dqm/modules/PhysicsObjectsDQM/src/IPDQMExpressRecoModule.cc

This file was deleted.

Loading

0 comments on commit 7d436f7

Please sign in to comment.