10#include <trg/gdl/modules/trggdlDQM/TRGEFFDQMModule.h>
14#include <Math/Vector3D.h>
16#include <TDirectory.h>
19#include <mdst/dataobjects/HitPatternCDC.h>
43 TDirectory* oldDir = gDirectory;
44 oldDir->mkdir(
"TRGEFF");
47 m_hPhi =
new TH1F(
"hPhi",
"", 36, -180.0, 180.0);
48 m_hPhi_psnecl =
new TH1F(
"hPhi_psnecl",
"", 36, -180.0, 180.0);
51 m_hPt =
new TH1F(
"hPt",
"", 50, 0, 5);
52 m_hPt_psnecl =
new TH1F(
"hPt_psnecl",
"", 50, 0, 5);
53 m_hPt_psnecl_ftdf =
new TH1F(
"hPt_psnecl_ftdf",
"", 50, 0, 5);
55 m_nobha_hPt =
new TH1F(
"nobha_hPt",
"", 50, 0, 5);
56 m_nobha_hPt_psnecl =
new TH1F(
"nobha_hPt_psnecl",
"", 50, 0, 5);
57 m_nobha_hPt_psnecl_ftdf =
new TH1F(
"nobha_hPt_psnecl_ftdf",
"", 50, 0, 5);
59 m_hP3_y =
new TH1F(
"hP3_y",
"", 50, 0, 5);
60 m_hP3_y_psnecl =
new TH1F(
"hP3_y_psnecl",
"", 50, 0, 5);
61 m_hP3_y_psnecl_ftdf =
new TH1F(
"hP3_y_psnecl_ftdf",
"", 50, 0, 5);
63 m_hP3_z =
new TH1F(
"hP3_z",
"", 50, 0, 5);
64 m_hP3_z_psnecl =
new TH1F(
"hP3_z_psnecl",
"", 50, 0, 5);
65 m_hP3_z_psnecl_ftdf =
new TH1F(
"hP3_z_psnecl_ftdf",
"", 50, 0, 5);
67 m_nobha_hP3_y =
new TH1F(
"nobha_hP3_y",
"", 50, 0, 5);
68 m_nobha_hP3_y_psnecl =
new TH1F(
"nobha_hP3_y_psnecl",
"", 50, 0, 5);
69 m_nobha_hP3_y_psnecl_ftdf =
new TH1F(
"nobha_hP3_y_psnecl_ftdf",
"", 50, 0, 5);
71 m_nobha_hP3_z =
new TH1F(
"nobha_hP3_z",
"", 50, 0, 5);
72 m_nobha_hP3_z_psnecl =
new TH1F(
"nobha_hP3_z_psnecl",
"", 50, 0, 5);
73 m_nobha_hP3_z_psnecl_ftdf =
new TH1F(
"nobha_hP3_z_psnecl_ftdf",
"", 50, 0, 5);
75 m_fyo_dphi =
new TH1F(
"fyo_dphi",
"", 18, 0., 180.);
76 m_fyo_dphi_psnecl =
new TH1F(
"fyo_dphi_psnecl",
"", 18, 0., 180.);
77 m_fyo_dphi_psnecl_ftdf =
new TH1F(
"fyo_dphi_psnecl_ftdf",
"", 18, 0., 180.);
79 m_nobha_fyo_dphi =
new TH1F(
"nobha_fyo_dphi",
"", 18, 0., 180.);
80 m_nobha_fyo_dphi_psnecl =
new TH1F(
"nobha_fyo_dphi_psnecl",
"", 18, 0., 180.);
81 m_nobha_fyo_dphi_psnecl_ftdf =
new TH1F(
"nobha_fyo_dphi_psnecl_ftdf",
"", 18, 0., 180.);
83 m_stt_phi =
new TH1F(
"stt_phi",
"", 36, -180., 180.);
84 m_stt_phi_psnecl =
new TH1F(
"stt_phi_psnecl",
"", 36, -180., 180.);
85 m_stt_phi_psnecl_ftdf =
new TH1F(
"stt_phi_psnecl_ftdf",
"", 36, -180., 180.);
87 m_stt_P3 =
new TH1F(
"stt_P3",
"", 50, 0, 5);
88 m_stt_P3_psnecl =
new TH1F(
"stt_P3_psnecl",
"", 50, 0, 5);
89 m_stt_P3_psnecl_ftdf =
new TH1F(
"stt_P3_psnecl_ftdf",
"", 50, 0, 5);
91 m_stt_theta =
new TH1F(
"stt_theta",
"", 18, 0, 180);
92 m_stt_theta_psnecl =
new TH1F(
"stt_theta_psnecl",
"", 18, 0, 180);
93 m_stt_theta_psnecl_ftdf =
new TH1F(
"stt_theta_psnecl_ftdf",
"", 18, 0, 180);
95 m_nobha_stt_phi =
new TH1F(
"nobha_stt_phi",
"", 36, -180., 180.);
96 m_nobha_stt_phi_psnecl =
new TH1F(
"nobha_stt_phi_psnecl",
"", 36, -180., 180.);
97 m_nobha_stt_phi_psnecl_ftdf =
new TH1F(
"nobha_stt_phi_psnecl_ftdf",
"", 36, -180., 180.);
99 m_nobha_stt_P3 =
new TH1F(
"nobha_stt_P3",
"", 50, 0, 5);
100 m_nobha_stt_P3_psnecl =
new TH1F(
"nobha_stt_P3_psnecl",
"", 50, 0, 5);
101 m_nobha_stt_P3_psnecl_ftdf =
new TH1F(
"nobha_stt_P3_psnecl_ftdf",
"", 50, 0, 5);
103 m_nobha_stt_theta =
new TH1F(
"nobha_stt_theta",
"", 18, 0, 180);
104 m_nobha_stt_theta_psnecl =
new TH1F(
"nobha_stt_theta_psnecl",
"", 18, 0, 180);
105 m_nobha_stt_theta_psnecl_ftdf =
new TH1F(
"nobha_stt_theta_psnecl_ftdf",
"", 18, 0, 180);
107 m_hie_E =
new TH1F(
"hie_E",
"", 60, 0, 12);
108 m_hie_E_psnecl =
new TH1F(
"hie_E_psnecl",
"", 60, 0, 12);
109 m_hie_E_psnecl_ftdf =
new TH1F(
"hie_E_psnecl_ftdf",
"", 60, 0, 12);
111 m_nobha_hie_E =
new TH1F(
"nobha_hie_E",
"", 60, 0, 12);
112 m_nobha_hie_E_psnecl =
new TH1F(
"nobha_hie_E_psnecl",
"", 60, 0, 12);
113 m_nobha_hie_E_psnecl_ftdf =
new TH1F(
"nobha_hie_E_psnecl_ftdf",
"", 60, 0, 12);
115 m_ecltiming_E =
new TH1F(
"ecltiming_E",
"", 60, 0, 12);
116 m_ecltiming_E_psnecl =
new TH1F(
"ecltiming_E_psnecl",
"", 60, 0, 12);
117 m_ecltiming_E_psnecl_ftdf =
new TH1F(
"ecltiming_E_psnecl_ftdf",
"", 60, 0, 12);
119 m_ecltiming_theta =
new TH1F(
"ecltiming_theta",
"", 18, 0, 180);
120 m_ecltiming_theta_psnecl =
new TH1F(
"ecltiming_theta_psnecl",
"", 18, 0, 180);
121 m_ecltiming_theta_psnecl_ftdf =
new TH1F(
"ecltiming_theta_psnecl_ftdf",
"", 18, 0, 180);
123 m_ecltiming_phi =
new TH1F(
"ecltiming_phi",
"", 36, -180., 180.);
124 m_ecltiming_phi_psnecl =
new TH1F(
"ecltiming_phi_psnecl",
"", 36, -180., 180.);
125 m_ecltiming_phi_psnecl_ftdf =
new TH1F(
"ecltiming_phi_psnecl_ftdf",
"", 36, -180., 180.);
127 m_klmhit_phi =
new TH1F(
"klmhit_phi",
"", 18, -180., 180.);
128 m_klmhit_phi_psnecl =
new TH1F(
"klmhit_phi_psnecl",
"", 18, -180., 180.);
129 m_klmhit_phi_psnecl_ftdf =
new TH1F(
"klmhit_phi_psnecl_ftdf",
"", 18, -180., 180.);
131 m_klmhit_theta =
new TH1F(
"klmhit_theta",
"", 18, 0, 180);
132 m_klmhit_theta_psnecl =
new TH1F(
"klmhit_theta_psnecl",
"", 18, 0, 180);
133 m_klmhit_theta_psnecl_ftdf =
new TH1F(
"klmhit_theta_psnecl_ftdf",
"", 18, 0, 180);
135 m_eklmhit_phi =
new TH1F(
"eklmhit_phi",
"", 18, -180., 180.);
136 m_eklmhit_phi_psnecl =
new TH1F(
"eklmhit_phi_psnecl",
"", 18, -180., 180.);
137 m_eklmhit_phi_psnecl_ftdf =
new TH1F(
"eklmhit_phi_psnecl_ftdf",
"", 18, -180., 180.);
139 m_eklmhit_theta =
new TH1F(
"eklmhit_theta",
"", 18, 0, 180);
140 m_eklmhit_theta_psnecl =
new TH1F(
"eklmhit_theta_psnecl",
"", 18, 0, 180);
141 m_eklmhit_theta_psnecl_ftdf =
new TH1F(
"eklmhit_theta_psnecl_ftdf",
"", 18, 0, 180);
157 B2WARNING(
"Missing Tracks array");
161 B2WARNING(
"Missing ECLCLuster array");
165 B2WARNING(
"Missing KLMCLuster array");
169 B2WARNING(
"Missing TRGSummary");
177 B2DEBUG(22,
"Missing recoTracks array in beginRun() ");
189 B2WARNING(
"TRGSummary object not available but require to estimate trg efficiency");
194 B2WARNING(
"SoftwareTriggerResult object not available but require to select bhabha/mumu/hadron events skim");
198 const std::map<std::string, int>& fresults =
m_TrgResult->getResults();
199 if ((fresults.find(
"software_trigger_cut&skim&accept_bhabha") == fresults.end())
200 || (fresults.find(
"software_trigger_cut&skim&accept_hadron") == fresults.end())) {
201 B2WARNING(
"TRGEFFDQMModule: Can't find required bhabha or mumu or hadron trigger identifier");
305 int nlayer = b2klmcluster.getLayers();
312 double theta = b2klmcluster.getMomentum().Theta() /
Unit::deg;
313 double phiDegree = b2klmcluster.getMomentum().Phi() /
Unit::deg;
323 m_klmhit_phi->Fill(phiDegree);
324 m_klmhit_theta->Fill(theta);
325 m_eklmhit_phi->Fill(phiDegree);
326 m_eklmhit_theta->Fill(theta);
329 m_klmhit_phi_psnecl->Fill(phiDegree);
330 m_klmhit_theta_psnecl->Fill(theta);
331 m_eklmhit_phi_psnecl->Fill(phiDegree);
332 m_eklmhit_theta_psnecl->Fill(theta);
334 if (trg_KLMecl && trg_klmhit) {
335 m_klmhit_phi_psnecl_ftdf->Fill(phiDegree);
336 m_klmhit_theta_psnecl_ftdf->Fill(theta);
338 if (trg_KLMecl && trg_eklmhit) {
339 m_eklmhit_phi_psnecl_ftdf->Fill(phiDegree);
340 m_eklmhit_theta_psnecl_ftdf->Fill(theta);
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
bool isOptional(const std::string &name="")
Tell the DataStore about an optional input.
void initialize() override
Initialize the Module.
TH1F * m_hPhi_psnecl_ftdf
Histogram of cdc phi of IP tracks with ecl and f bit.
virtual ~TRGEFFDQMModule()
Destructor.
void event() override
Event processor.
StoreObjPtr< TRGSummary > m_trgSummary
Trigger summary.
TH1F * m_hPhi_psnecl
Histogram of cdc phi of IP tracks with ecl bit.
void beginRun() override
Called when entering a new run.
StoreArray< ECLCluster > m_ECLClusters
ECL Clusters.
TH1F * m_hPhi
Histogram of cdc phi of IP tracks.
StoreArray< KLMCluster > m_KLMClusters
KLM Clusters.
StoreArray< RecoTrack > m_RecoTracks
RecoTracks.
StoreArray< Track > m_Tracks
Tracks.
TRGEFFDQMModule()
Constructor.
StoreObjPtr< SoftwareTriggerResult > m_TrgResult
Store array for Trigger selection.
void defineHisto() override
Histogram definitions.
static const double deg
degree to radians
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
@ c_accept
Accept this event.
Abstract base class for different kinds of events.