9 #include <trg/grl/modules/TRGGRLDQM/TRGGRLDQMModule.h>
11 #include <framework/datastore/StoreObjPtr.h>
13 #include "trg/grl/dataobjects/TRGGRLUnpackerStore.h"
15 #include <TDirectory.h>
39 h_N_track =
new TH1I(
"h_N_track",
"CDCTRG 2D N_track", 8, 0, 8);
40 h_N_track->GetXaxis()->SetTitle(
"CDCTRG 2D N_track");
42 h_phi_i =
new TH1F(
"h_phi_i",
"phi_i CDCTRG 2D [10 degrees]", 36, 0, 360);
43 h_phi_i->GetXaxis()->SetTitle(
"#phi_{i} CDCTRG 2D [10 degrees]");
44 h_phi_CDC =
new TH1F(
"h_phi_CDC",
"phi_CDC CDCTRG 2D [10 degrees]", 36, 0, 360);
45 h_phi_CDC->GetXaxis()->SetTitle(
"#phi_{CDC} CDCTRG 2D [10 degrees]");
46 h_sector_CDC =
new TH1F(
"h_sector_CDC",
"Sector_CDC CDCTRG 2D [45 degrees]", 8, -22.5, 337.5);
47 h_sector_CDC->GetXaxis()->SetTitle(
"Sector_{CDC} CDCTRG 2D [45 degrees]");
48 h_sector_KLM =
new TH1F(
"h_sector_KLM",
"Sector_KLM [45 degrees]", 8, -22.5, 337.5);
49 h_sector_KLM->GetXaxis()->SetTitle(
"Sector_{KLM} [45 degrees]");
50 h_slot_CDC =
new TH1F(
"h_slot_CDC",
"Slot_CDC CDCTRG 2D [22.5 degrees]", 16, 0, 360);
51 h_slot_CDC->GetXaxis()->SetTitle(
"Slot_{CDC} CDCTRG 2D [22.5 degrees]");
52 h_slot_TOP =
new TH1F(
"h_slot_TOP",
"Slot_TOP [22.5 degrees]", 16, 0, 360);
53 h_slot_TOP->GetXaxis()->SetTitle(
"Slot_{TOP} [22.5 degrees]");
55 h_E_ECL =
new TH1F(
"h_E_ECL",
"ECL cluster energy [5 MeV]", 2048, 0, 10.24);
56 h_E_ECL->GetXaxis()->SetTitle(
"ECL cluster energy [5 MeV]");
57 h_theta_ECL =
new TH1F(
"h_theta_ECL",
"ECL cluster theta [1.4 degrees]", 128, 0, 180);
58 h_theta_ECL->GetXaxis()->SetTitle(
"ECL cluster #theta [1.4 degrees]");
59 h_phi_ECL =
new TH1F(
"h_phi_ECL",
"ECL cluster phi [1.4 degrees]", 256, 0, 360);
60 h_phi_ECL->GetXaxis()->SetTitle(
"ECL cluster #phi [1.4 degrees]");
62 h_CDCL1 =
new TH1F(
"h_CDCL1",
"CDCTRG 2D -> L1 trg [ns]", 320, -320 * 7.8, 0);
63 h_CDCL1->GetXaxis()->SetTitle(
"CDCTRG 2D -> L1 trg [ns]");
64 h_ECLL1 =
new TH1F(
"h_ECLL1",
"ECLTRG -> L1 trg [ns]", 320, -320 * 7.8, 0);
65 h_ECLL1->GetXaxis()->SetTitle(
"ECLTRG -> L1 trg [ns]");
66 h_TOPL1 =
new TH1F(
"h_TOPL1",
"TOPTRG -> L1 trg [ns]", 320, -320 * 7.8, 0);
67 h_TOPL1->GetXaxis()->SetTitle(
"TOPTRG -> L1 trg [ns]");
68 h_KLML1 =
new TH1F(
"h_KLML1",
"KLMTRG -> L1 trg [ns]", 320, -320 * 7.8, 0);
69 h_KLML1->GetXaxis()->SetTitle(
"KLMTRG -> L1 trg [ns]");
70 h_ECLL1_2nd =
new TH1F(
"h_ECLL1_2nd",
"ECLTRG 2nd input-> L1 trg [ns]", 320, -320 * 7.8, 0);
71 h_ECLL1_2nd->GetXaxis()->SetTitle(
"ECLTRG 2nd input -> L1 trg [ns]");
72 h_CDC3DL1 =
new TH1F(
"h_CDC3DL1",
"CDCTRG 3D -> L1 trg [ns]", 320, -320 * 7.8, 0);
73 h_CDC3DL1->GetXaxis()->SetTitle(
"CDCTRG 3D -> L1 trg [ns]");
74 h_CDCNNL1 =
new TH1F(
"h_CDCNNL1",
"CDCTRG NN -> L1 trg [ns]", 320, -320 * 7.8, 0);
75 h_CDCNNL1->GetXaxis()->SetTitle(
"CDCTRG NN -> L1 trg [ns]");
76 h_TSFL1 =
new TH1F(
"h_TSFL1",
"CDCTRG TSF -> L1 trg [ns]", 320, -320 * 7.8, 0);
77 h_TSFL1->GetXaxis()->SetTitle(
"CDCTRG TSF -> L1 trg [ns]");
78 h_B2LL1 =
new TH1F(
"h_B2LL1",
"B2L window -> L1 trg [ns]", 320, -320 * 7.8, 0);
79 h_B2LL1->GetXaxis()->SetTitle(
"B2L window -> L1 trg [ns]");
81 h_map_ST =
new TH1F(
"h_map_ST",
"CDCTRG short track map [5.625 degrees]", 64, 0, 360);
82 h_map_ST->GetXaxis()->SetTitle(
"CDCTRG short track map [5.625 degrees]");
83 h_map_ST2 =
new TH1F(
"h_map_ST2",
"CDCTRG short track map [5.625 degrees]", 64, 0, 360);
84 h_map_ST2->GetXaxis()->SetTitle(
"CDCTRG short track map [5.625 degrees]");
85 h_map_veto =
new TH1F(
"h_map_veto",
"CDCTRG 2D veto map [5.625 degrees]", 64, 0, 360);
86 h_map_veto->GetXaxis()->SetTitle(
"CDCTRG 2D veto map [5.625 degrees]");
87 h_map_TSF0 =
new TH1F(
"h_map_TSF0",
"CDCTRG TSF0 map [5.625 degrees]", 64, 0, 360);
88 h_map_TSF0->GetXaxis()->SetTitle(
"CDCTRG TSF0 map [5.625 degrees]");
89 h_map_TSF2 =
new TH1F(
"h_map_TSF2",
"CDCTRG TSF2 map [5.625 degrees]", 64, 0, 360);
90 h_map_TSF2->GetXaxis()->SetTitle(
"CDCTRG TSF2 map [5.625 degrees]");
91 h_map_TSF4 =
new TH1F(
"h_map_TSF4",
"CDCTRG TSF4 map [5.625 degrees]", 64, 0, 360);
92 h_map_TSF4->GetXaxis()->SetTitle(
"CDCTRG TSF4 map [5.625 degrees]");
93 h_map_TSF1 =
new TH1F(
"h_map_TSF1",
"CDCTRG TSF1 map [5.625 degrees]", 64, 0, 360);
94 h_map_TSF1->GetXaxis()->SetTitle(
"CDCTRG TSF1 map [5.625 degrees]");
95 h_map_TSF3 =
new TH1F(
"h_map_TSF3",
"CDCTRG TSF3 map [5.625 degrees]", 64, 0, 360);
96 h_map_TSF3->GetXaxis()->SetTitle(
"CDCTRG TSF3 map [5.625 degrees]");
149 if (!evtinfo)
return;
151 int N_track = evtinfo->m_N_track;
152 int bin =
h_N_track->GetBinContent(N_track + 1);
153 h_N_track->SetBinContent(N_track + 1, bin + 1);
155 for (
int i = 0; i < 36; i++) {
156 if (evtinfo->m_phi_i[i]) {
159 if (evtinfo->m_phi_CDC[i]) {
163 for (
int i = 0; i < 8; i++) {
164 if (evtinfo->m_sector_CDC[i]) {
167 if (evtinfo->m_sector_KLM[i]) {
171 for (
int i = 0; i < 16; i++) {
172 if (evtinfo->m_slot_CDC[i]) {
175 if (evtinfo->m_slot_TOP[i]) {
180 int N_cluster = evtinfo->m_N_cluster;
181 for (
int i = 0; i < N_cluster; i++) {
182 h_E_ECL->Fill(evtinfo->m_E_ECL[i] * 0.005 + 0.0025);
183 h_theta_ECL->Fill(evtinfo->m_theta_ECL[i] * 1.40625 + 1.40625 * 0.5);
184 h_phi_ECL->Fill(evtinfo->m_phi_ECL[i] * 1.40625 + 1.40625 * 0.5);
187 int timeL1 = evtinfo->m_coml1 - evtinfo->m_revoclk;
189 if (evtinfo->m_CDCL1_count != 0) {
190 h_CDCL1->Fill((evtinfo->m_CDCL1_count + timeL1 - 0.5) * (-7.8));
192 if (evtinfo->m_ECLL1_count != 0) {
193 h_ECLL1->Fill((evtinfo->m_ECLL1_count + timeL1 - 0.5) * (-7.8));
195 if (evtinfo->m_ECLL1_count != 0 && evtinfo->m_N_cluster_1 != 0) {
196 h_ECLL1_2nd->Fill((evtinfo->m_ECLL1_count + timeL1 - 0.5) * (-7.8) + 7.8 * 16);
198 if (evtinfo->m_TOPL1_count != 0) {
199 h_TOPL1->Fill((evtinfo->m_TOPL1_count + timeL1 - 0.5) * (-7.8));
201 if (evtinfo->m_KLML1_count != 0) {
202 h_KLML1->Fill((evtinfo->m_KLML1_count + timeL1 - 0.5) * (-7.8));
204 if (evtinfo->m_CDC3DL1_count != 0) {
205 h_CDC3DL1->Fill((evtinfo->m_CDC3DL1_count + timeL1 - 0.5) * (-7.8));
207 if (evtinfo->m_CDCNNL1_count != 0) {
208 h_CDCNNL1->Fill((evtinfo->m_CDCNNL1_count + timeL1 - 0.5) * (-7.8));
210 if (evtinfo->m_TSFL1_count != 0) {
211 h_TSFL1->Fill((evtinfo->m_TSFL1_count + timeL1 - 0.5) * (-7.8));
214 h_B2LL1->Fill((timeL1 - 0.5) * (-7.8));
217 for (
int i = 0; i < 64; i++) {
218 if (evtinfo->m_map_ST[i]) {
219 h_map_ST->Fill(2.8 + i * 360.0 / 64.0);
221 if (evtinfo->m_map_ST2[i]) {
224 if (evtinfo->m_map_veto[i]) {
227 if (evtinfo->m_map_TSF0[i]) {
230 if (evtinfo->m_map_TSF2[i]) {
233 if (evtinfo->m_map_TSF4[i]) {
236 if (evtinfo->m_map_TSF1[i]) {
239 if (evtinfo->m_map_TSF3[i]) {
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...
Type-safe access to single objects in the data store.
TH1F * h_phi_CDC
phi_CDC, extrapolated phi at ECL of CDC 2D tracks
TH1F * h_map_TSF3
TSF3 map.
TH1F * h_map_TSF4
TSF4 map.
virtual void initialize() override
initialize
TH1F * h_map_TSF1
TSF1 map.
TDirectory * oldDir
TDirectory.
virtual void event() override
Event.
TH1F * h_CDC3DL1
Jitter of CDC 3D -> L1.
TH1F * h_KLML1
Jitter of KLM -> L1.
TH1F * h_phi_i
phi_i of CDC 2D tracks
TH1F * h_E_ECL
ECL cluster energy.
virtual void endRun() override
End Run.
TH1F * h_map_TSF0
TSF0 map.
TH1F * h_ECLL1
Jitter of ECL -> L1.
TH1F * h_TOPL1
Jitter of TOP -> L1.
TH1F * h_CDCNNL1
Jitter of CDC NN -> L1.
TH1F * h_B2LL1
Jitter of B2L window -> L1.
TH1F * h_map_ST2
Short track map.
TH1I * h_N_track
Number of tracks.
TH1F * h_map_TSF2
TSF2 map.
TH1F * h_CDCL1
Jitter of CDC 2D -> L1.
TH1F * h_phi_ECL
ECL cluster phi.
virtual void beginRun() override
begin Run
TH1F * h_ECLL1_2nd
Jitter of ECl 2nd input -> L1.
TH1F * h_TSFL1
Jitter of Short track -> L1.
TH1F * h_sector_KLM
sector map of KLM
TH1F * h_theta_ECL
ECL cluster theta.
TH1F * h_slot_CDC
slot_CDC, extrapolated phi at TOP of CDC 2D tracks
TDirectory * dirDQM
TDirectory.
TH1F * h_sector_CDC
sector_CDC, extrapolated phi at KLM of CDC 2D tracks
TH1F * h_map_veto
Full track veto map.
TH1F * h_slot_TOP
slot map of TOP
TH1F * h_map_ST
Short track map.
virtual void defineHisto() override
Define Histogram.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.