13 #include <trg/grl/modules/TRGGRLDQM/TRGGRLDQMModule.h>
15 #include <framework/datastore/StoreObjPtr.h>
17 #include "trg/grl/dataobjects/TRGGRLUnpackerStore.h"
19 #include <TDirectory.h>
43 h_N_track =
new TH1I(
"h_N_track",
"CDCTRG 2D N_track", 8, 0, 8);
44 h_N_track->GetXaxis()->SetTitle(
"CDCTRG 2D N_track");
46 h_phi_i =
new TH1F(
"h_phi_i",
"phi_i CDCTRG 2D [10 degrees]", 36, 0, 360);
47 h_phi_i->GetXaxis()->SetTitle(
"#phi_{i} CDCTRG 2D [10 degrees]");
48 h_phi_CDC =
new TH1F(
"h_phi_CDC",
"phi_CDC CDCTRG 2D [10 degrees]", 36, 0, 360);
49 h_phi_CDC->GetXaxis()->SetTitle(
"#phi_{CDC} CDCTRG 2D [10 degrees]");
50 h_sector_CDC =
new TH1F(
"h_sector_CDC",
"Sector_CDC CDCTRG 2D [45 degrees]", 8, -22.5, 337.5);
51 h_sector_CDC->GetXaxis()->SetTitle(
"Sector_{CDC} CDCTRG 2D [45 degrees]");
52 h_sector_KLM =
new TH1F(
"h_sector_KLM",
"Sector_KLM [45 degrees]", 8, -22.5, 337.5);
53 h_sector_KLM->GetXaxis()->SetTitle(
"Sector_{KLM} [45 degrees]");
54 h_slot_CDC =
new TH1F(
"h_slot_CDC",
"Slot_CDC CDCTRG 2D [22.5 degrees]", 16, 0, 360);
55 h_slot_CDC->GetXaxis()->SetTitle(
"Slot_{CDC} CDCTRG 2D [22.5 degrees]");
56 h_slot_TOP =
new TH1F(
"h_slot_TOP",
"Slot_TOP [22.5 degrees]", 16, 0, 360);
57 h_slot_TOP->GetXaxis()->SetTitle(
"Slot_{TOP} [22.5 degrees]");
59 h_E_ECL =
new TH1F(
"h_E_ECL",
"ECL cluster energy [5 MeV]", 2048, 0, 10.24);
60 h_E_ECL->GetXaxis()->SetTitle(
"ECL cluster energy [5 MeV]");
61 h_theta_ECL =
new TH1F(
"h_theta_ECL",
"ECL cluster theta [1.4 degrees]", 128, 0, 180);
62 h_theta_ECL->GetXaxis()->SetTitle(
"ECL cluster #theta [1.4 degrees]");
63 h_phi_ECL =
new TH1F(
"h_phi_ECL",
"ECL cluster phi [1.4 degrees]", 256, 0, 360);
64 h_phi_ECL->GetXaxis()->SetTitle(
"ECL cluster #phi [1.4 degrees]");
66 h_CDCL1 =
new TH1F(
"h_CDCL1",
"CDCTRG 2D -> L1 trg [ns]", 320, -320 * 7.8, 0);
67 h_CDCL1->GetXaxis()->SetTitle(
"CDCTRG 2D -> L1 trg [ns]");
68 h_ECLL1 =
new TH1F(
"h_ECLL1",
"ECLTRG -> L1 trg [ns]", 320, -320 * 7.8, 0);
69 h_ECLL1->GetXaxis()->SetTitle(
"ECLTRG -> L1 trg [ns]");
70 h_TOPL1 =
new TH1F(
"h_TOPL1",
"TOPTRG -> L1 trg [ns]", 320, -320 * 7.8, 0);
71 h_TOPL1->GetXaxis()->SetTitle(
"TOPTRG -> L1 trg [ns]");
72 h_KLML1 =
new TH1F(
"h_KLML1",
"KLMTRG -> L1 trg [ns]", 320, -320 * 7.8, 0);
73 h_KLML1->GetXaxis()->SetTitle(
"KLMTRG -> L1 trg [ns]");
74 h_ECLL1_2nd =
new TH1F(
"h_ECLL1_2nd",
"ECLTRG 2nd input-> L1 trg [ns]", 320, -320 * 7.8, 0);
75 h_ECLL1_2nd->GetXaxis()->SetTitle(
"ECLTRG 2nd input -> L1 trg [ns]");
76 h_CDC3DL1 =
new TH1F(
"h_CDC3DL1",
"CDCTRG 3D -> L1 trg [ns]", 320, -320 * 7.8, 0);
77 h_CDC3DL1->GetXaxis()->SetTitle(
"CDCTRG 3D -> L1 trg [ns]");
78 h_CDCNNL1 =
new TH1F(
"h_CDCNNL1",
"CDCTRG NN -> L1 trg [ns]", 320, -320 * 7.8, 0);
79 h_CDCNNL1->GetXaxis()->SetTitle(
"CDCTRG NN -> L1 trg [ns]");
80 h_TSFL1 =
new TH1F(
"h_TSFL1",
"CDCTRG TSF -> L1 trg [ns]", 320, -320 * 7.8, 0);
81 h_TSFL1->GetXaxis()->SetTitle(
"CDCTRG TSF -> L1 trg [ns]");
82 h_B2LL1 =
new TH1F(
"h_B2LL1",
"B2L window -> L1 trg [ns]", 320, -320 * 7.8, 0);
83 h_B2LL1->GetXaxis()->SetTitle(
"B2L window -> L1 trg [ns]");
85 h_map_ST =
new TH1F(
"h_map_ST",
"CDCTRG short track map [5.625 degrees]", 64, 0, 360);
86 h_map_ST->GetXaxis()->SetTitle(
"CDCTRG short track map [5.625 degrees]");
87 h_map_ST2 =
new TH1F(
"h_map_ST2",
"CDCTRG short track map [5.625 degrees]", 64, 0, 360);
88 h_map_ST2->GetXaxis()->SetTitle(
"CDCTRG short track map [5.625 degrees]");
89 h_map_veto =
new TH1F(
"h_map_veto",
"CDCTRG 2D veto map [5.625 degrees]", 64, 0, 360);
90 h_map_veto->GetXaxis()->SetTitle(
"CDCTRG 2D veto map [5.625 degrees]");
91 h_map_TSF0 =
new TH1F(
"h_map_TSF0",
"CDCTRG TSF0 map [5.625 degrees]", 64, 0, 360);
92 h_map_TSF0->GetXaxis()->SetTitle(
"CDCTRG TSF0 map [5.625 degrees]");
93 h_map_TSF2 =
new TH1F(
"h_map_TSF2",
"CDCTRG TSF2 map [5.625 degrees]", 64, 0, 360);
94 h_map_TSF2->GetXaxis()->SetTitle(
"CDCTRG TSF2 map [5.625 degrees]");
95 h_map_TSF4 =
new TH1F(
"h_map_TSF4",
"CDCTRG TSF4 map [5.625 degrees]", 64, 0, 360);
96 h_map_TSF4->GetXaxis()->SetTitle(
"CDCTRG TSF4 map [5.625 degrees]");
97 h_map_TSF1 =
new TH1F(
"h_map_TSF1",
"CDCTRG TSF1 map [5.625 degrees]", 64, 0, 360);
98 h_map_TSF1->GetXaxis()->SetTitle(
"CDCTRG TSF1 map [5.625 degrees]");
99 h_map_TSF3 =
new TH1F(
"h_map_TSF3",
"CDCTRG TSF3 map [5.625 degrees]", 64, 0, 360);
100 h_map_TSF3->GetXaxis()->SetTitle(
"CDCTRG TSF3 map [5.625 degrees]");
153 if (!evtinfo)
return;
155 int N_track = evtinfo->m_N_track;
156 int bin =
h_N_track->GetBinContent(N_track + 1);
157 h_N_track->SetBinContent(N_track + 1, bin + 1);
159 for (
int i = 0; i < 36; i++) {
160 if (evtinfo->m_phi_i[i]) {
163 if (evtinfo->m_phi_CDC[i]) {
167 for (
int i = 0; i < 8; i++) {
168 if (evtinfo->m_sector_CDC[i]) {
171 if (evtinfo->m_sector_KLM[i]) {
175 for (
int i = 0; i < 16; i++) {
176 if (evtinfo->m_slot_CDC[i]) {
179 if (evtinfo->m_slot_TOP[i]) {
184 int N_cluster = evtinfo->m_N_cluster;
185 for (
int i = 0; i < N_cluster; i++) {
186 h_E_ECL->Fill(evtinfo->m_E_ECL[i] * 0.005 + 0.0025);
187 h_theta_ECL->Fill(evtinfo->m_theta_ECL[i] * 1.40625 + 1.40625 * 0.5);
188 h_phi_ECL->Fill(evtinfo->m_phi_ECL[i] * 1.40625 + 1.40625 * 0.5);
191 int timeL1 = evtinfo->m_coml1 - evtinfo->m_revoclk;
193 if (evtinfo->m_CDCL1_count != 0) {
194 h_CDCL1->Fill((evtinfo->m_CDCL1_count + timeL1 - 0.5) * (-7.8));
196 if (evtinfo->m_ECLL1_count != 0) {
197 h_ECLL1->Fill((evtinfo->m_ECLL1_count + timeL1 - 0.5) * (-7.8));
199 if (evtinfo->m_ECLL1_count != 0 && evtinfo->m_N_cluster_1 != 0) {
200 h_ECLL1_2nd->Fill((evtinfo->m_ECLL1_count + timeL1 - 0.5) * (-7.8) + 7.8 * 16);
202 if (evtinfo->m_TOPL1_count != 0) {
203 h_TOPL1->Fill((evtinfo->m_TOPL1_count + timeL1 - 0.5) * (-7.8));
205 if (evtinfo->m_KLML1_count != 0) {
206 h_KLML1->Fill((evtinfo->m_KLML1_count + timeL1 - 0.5) * (-7.8));
208 if (evtinfo->m_CDC3DL1_count != 0) {
209 h_CDC3DL1->Fill((evtinfo->m_CDC3DL1_count + timeL1 - 0.5) * (-7.8));
211 if (evtinfo->m_CDCNNL1_count != 0) {
212 h_CDCNNL1->Fill((evtinfo->m_CDCNNL1_count + timeL1 - 0.5) * (-7.8));
214 if (evtinfo->m_TSFL1_count != 0) {
215 h_TSFL1->Fill((evtinfo->m_TSFL1_count + timeL1 - 0.5) * (-7.8));
218 h_B2LL1->Fill((timeL1 - 0.5) * (-7.8));
221 for (
int i = 0; i < 64; i++) {
222 if (evtinfo->m_map_ST[i]) {
223 h_map_ST->Fill(2.8 + i * 360.0 / 64.0);
225 if (evtinfo->m_map_ST2[i]) {
228 if (evtinfo->m_map_veto[i]) {
231 if (evtinfo->m_map_TSF0[i]) {
234 if (evtinfo->m_map_TSF2[i]) {
237 if (evtinfo->m_map_TSF4[i]) {
240 if (evtinfo->m_map_TSF1[i]) {
243 if (evtinfo->m_map_TSF3[i]) {