Belle II Software  release-08-01-10
SoftwareTriggerHLTDQMModule.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #pragma once
9 
10 #include <framework/core/HistoModule.h>
11 
12 #include <TH1F.h>
13 #include <TH1D.h>
14 
15 #include <mdst/dataobjects/SoftwareTriggerResult.h>
16 #include <mdst/dataobjects/TRGSummary.h>
17 #include <framework/dataobjects/EventMetaData.h>
18 #include <mdst/dbobjects/TRGGDLDBFTDLBits.h>
19 #include <hlt/softwaretrigger/dataobjects/SoftwareTriggerVariables.h>
20 
21 #include <framework/datastore/StoreObjPtr.h>
22 #include <framework/database/DBObjPtr.h>
23 
24 #include <string>
25 #include <vector>
26 #include <map>
27 
28 namespace Belle2 {
33  namespace SoftwareTrigger {
35 
39  public:
42 
44  void initialize() override;
45 
47  void event() override;
48 
50  void defineHisto() override;
51 
53  void beginRun() override;
54 
55  private:
56  // Parameters
58  std::map<std::string, std::map<std::string, std::vector<std::string>>> m_param_cutResultIdentifiers;
59 
61  std::map<std::string, std::vector<std::string>> m_param_cutResultIdentifiersIgnored;
62 
64  std::vector<std::string> m_param_cutResultIdentifiersPerUnit;
65 
67  std::vector<std::string> m_param_l1Identifiers;
68 
70  std::vector<std::string> m_param_additionalL1Identifiers;
71 
74 
77 
80 
83 
85  std::vector<std::string> m_param_variableIdentifiers;
86 
88  std::string m_param_histogramDirectoryName = "softwaretrigger";
89 
91  std::string m_param_pathLocation = "after filter";
92 
94  int m_hlt_unit = 0;
95 
96  // Histograms
98  std::map<std::string, TH1F*> m_cutResultHistograms;
99 
101  std::map<std::string, TH1F*> m_cutResultPerUnitHistograms;
102 
104  std::map<std::string, TH1F*> m_triggerVariablesHistograms;
105 
107  std::map<std::string, TH1F*> m_l1Histograms;
108 
110  std::map<std::string, TH1D*> m_runInfoHistograms;
111 
112  // Datastore members
115 
118 
121 
124 
127  };
128  }
130 }
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
std::map< std::string, TH1D * > m_runInfoHistograms
histograms with the run information
std::map< std::string, std::map< std::string, std::vector< std::string > > > m_param_cutResultIdentifiers
Which cuts should be reported? Please remember to include the total_result also, if wanted.
std::map< std::string, TH1F * > m_l1Histograms
histogram with the L1 information
void initialize() override
Module functions to be called from main process.
void event() override
Module functions to be called from event process.
StoreObjPtr< SoftwareTriggerResult > m_triggerResult
STM cut results.
std::vector< std::string > m_param_l1Identifiers
Which L1 cuts should be reported?
std::map< std::string, TH1F * > m_cutResultPerUnitHistograms
histograms for the final sw trigger decisions for each base identifier per unit
std::map< std::string, TH1F * > m_triggerVariablesHistograms
histograms for the software trigger variables in all calculators (although maybe not filled)
std::map< std::string, std::vector< std::string > > m_param_cutResultIdentifiersIgnored
Which cuts should be ignored? This can be used to clear trigger lines from e.g. bhabha contamination.
std::string m_param_pathLocation
Location of the module in the path: before filter or after filter.
void beginRun() override
Reset all histogram entries for a new run.
std::map< std::string, TH1F * > m_cutResultHistograms
histograms for the final sw trigger decisions for each base identifier
bool m_param_create_error_flag_histograms
Create error flag histograms?
std::vector< std::string > m_param_additionalL1Identifiers
Which additional L1 cuts should be added to the L1 total result plot?
bool m_param_create_hlt_unit_histograms
Create HLT unit number histograms?
StoreObjPtr< TRGSummary > m_l1TriggerResult
L1 cut results.
std::vector< std::string > m_param_cutResultIdentifiersPerUnit
Which cuts should be reported per unit?
bool m_param_create_total_result_histograms
Create total result histogram?
std::vector< std::string > m_param_variableIdentifiers
Which variables should be reported?
bool m_param_create_exp_run_event_histograms
Create exp/run/event number histograms?
std::string m_param_histogramDirectoryName
Directory to put the generated histograms.
StoreObjPtr< SoftwareTriggerVariables > m_variables
STM cut variables.
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.