18#ifndef TRGGRLDQMMODULE_h
19#define TRGGRLDQMMODULE_h
21#include <framework/core/HistoModule.h>
23#include <trg/gdl/dataobjects/TRGGDLUnpackerStore.h>
24#include <trg/gdl/modules/trggdlUnpacker/trggdlUnpackerModule.h>
25#include <trg/gdl/TrgBit.h>
26#include <framework/database/DBObjPtr.h>
27#include <trg/gdl/dbobjects/TRGGDLDBUnpacker.h>
28#include <mdst/dbobjects/TRGGDLDBInputBits.h>
29#include <mdst/dbobjects/TRGGDLDBFTDLBits.h>
31#include "trg/grl/dataobjects/TRGGRLUnpackerStore.h"
33#include "trg/ecl/dataobjects/TRGECLUnpackerStore.h"
34#include "trg/ecl/TrgEclMapping.h"
36#include "trg/top/dataobjects/TRGTOPUnpackerStore.h"
37#include "trg/top/dataobjects/TRGTOPSlotTiming.h"
64 static constexpr double clk127To1ns = 7.8;
71 virtual void event()
override;
73 virtual void endRun()
override;
86 static const int nskim_topdqm = 11;
89 static const int nHistClasses = 3;
90 int m_nHistClassesActual = 3;
95 int start_skim_topdqm = 0;
96 int end_skim_topdqm = 0;
99 TH2I* h_top_nt0decisions_vs_hist_class[nskim_topdqm] = {
nullptr};
101 TH1I* h_top_gdl_match_decision_number[nskim_topdqm] = {
nullptr};
109 TH1I* h_topSlotNHits[nskim_topdqm][16] = {{
nullptr}};
110 TH1I* h_topSlotLogL[nskim_topdqm][16] = {{
nullptr}};
111 TH1I* h_topSlotT0[nskim_topdqm][16] = {{
nullptr}};
113 TH1I* h_topSlotAll[nskim_topdqm] = {
nullptr};
114 TH1I* h_topSegmentAll[nskim_topdqm] = {
nullptr};
115 TH1I* h_topNHitsAll[nskim_topdqm] = {
nullptr};
116 TH1I* h_topLogLAll[nskim_topdqm] = {
nullptr};
117 TH1I* h_topT0All[nskim_topdqm] = {
nullptr};
119 TH2I* h_topSlotVsSegment[nskim_topdqm] = {
nullptr};
121 TH2I* h_topSlotVsNHits[nskim_topdqm] = {
nullptr};
122 TH2I* h_topSlotVsLogL[nskim_topdqm] = {
nullptr};
123 TH2I* h_topSlotVsT0[nskim_topdqm] = {
nullptr};
125 TH2I* h_topSegmentVsNHits[nskim_topdqm] = {
nullptr};
126 TH2I* h_topSegmentVsLogL[nskim_topdqm] = {
nullptr};
127 TH2I* h_topSegmentVsT0[nskim_topdqm] = {
nullptr};
129 TH2I* h_topNHitsVsLogL[nskim_topdqm] = {
nullptr};
130 TH2I* h_topNHitsVsT0[nskim_topdqm] = {
nullptr};
131 TH2I* h_topLogLVsT0[nskim_topdqm] = {
nullptr};
133 TH1I* h_ecl_gdl_top_timing_diff_both[nskim_topdqm] = {
nullptr};
134 TH1I* h_ecl_top_top_timing_diff_both[nskim_topdqm] = {
nullptr};
136 TH2I* h_decisionNumberVsNumberDecisionsGood[nskim_topdqm] = {
nullptr};
137 TH2I* h_decisionNumberVsNumberDecisionsBad[nskim_topdqm] = {
nullptr};
139 TH1I* h_ecl_gdl_top_timing_diff_good[nskim_topdqm] = {
nullptr};
140 TH1I* h_ecl_top_top_timing_diff_good[nskim_topdqm] = {
nullptr};
142 TH2I* h_top_ecltop_timing_diff_vs_toptop_good[nskim_topdqm] = {
nullptr};
143 TH2I* h_gdl_ecltop_timing_diff_vs_toptop_good[nskim_topdqm] = {
nullptr};
144 TH2I* h_gdl_ecltop_timing_diff_vs_ecltop_good[nskim_topdqm] = {
nullptr};
146 TH1I* h_topCombinedTimingTopGood[nskim_topdqm] = {
nullptr};
147 TH1I* h_topNSlotsCombinedTimingTopGood[nskim_topdqm] = {
nullptr};
148 TH1I* h_topNHitSumGood[nskim_topdqm] = {
nullptr};
149 TH1I* h_topLogLSumGood[nskim_topdqm] = {
nullptr};
151 TH1I* h_topCombinedTimingTopAll[nskim_topdqm] = {
nullptr};
152 TH1I* h_topNSlotsCombinedTimingTopAll[nskim_topdqm] = {
nullptr};
153 TH1I* h_topNHitSumAll[nskim_topdqm] = {
nullptr};
154 TH1I* h_topLogLSumAll[nskim_topdqm] = {
nullptr};
156 TH2I* h_topNSlotsCombinedTimingVsNHitsTopAll[nskim_topdqm] = {
nullptr};
158 TH2I* h_topNHitVsNhit[nskim_topdqm][nHistClasses] = {{
nullptr}};
159 TH2I* h_topSlotVsSlot[nskim_topdqm][nHistClasses] = {{
nullptr}};
160 TH2I* h_topT0VsT0[nskim_topdqm][nHistClasses] = {{
nullptr}};
161 TH2I* h_topSegmentVsSegment[nskim_topdqm][nHistClasses] = {{
nullptr}};
162 TH2I* h_topLogLVsLogL[nskim_topdqm][nHistClasses] = {{
nullptr}};
164 TH1I* h_topTrigType[nskim_topdqm] = {
nullptr};
165 TH1I* h_topTimingResiduals[nskim_topdqm] = {
nullptr};
166 TH1I* h_topTimingVariance[nskim_topdqm] = {
nullptr};
168 TH1I* h_topRvcDiff1All[nskim_topdqm] = {
nullptr};
169 TH1I* h_topRvcDiff2All[nskim_topdqm] = {
nullptr};
170 TH1I* h_topRvcDiff3All[nskim_topdqm] = {
nullptr};
171 TH1I* h_topRvcDiff4All[nskim_topdqm] = {
nullptr};
173 TH1I* h_topGdlRvcDiff1All[nskim_topdqm] = {
nullptr};
174 TH1I* h_topGdlRvcDiff2All[nskim_topdqm] = {
nullptr};
175 TH1I* h_topGdlRvcDiff3All[nskim_topdqm] = {
nullptr};
177 TH1I* h_topRvcDiff1Good[nskim_topdqm] = {
nullptr};
178 TH1I* h_topRvcDiff2Good[nskim_topdqm] = {
nullptr};
179 TH1I* h_topRvcDiff3Good[nskim_topdqm] = {
nullptr};
180 TH1I* h_topRvcDiff4Good[nskim_topdqm] = {
nullptr};
182 TH1I* h_topGdlRvcDiff1Good[nskim_topdqm] = {
nullptr};
183 TH1I* h_topGdlRvcDiff2Good[nskim_topdqm] = {
nullptr};
184 TH1I* h_topGdlRvcDiff3Good[nskim_topdqm] = {
nullptr};
186 TH1I* h_ecl_gdl_top_timing_diff_bad[nskim_topdqm] = {
nullptr};
187 TH1I* h_ecl_top_top_timing_diff_bad[nskim_topdqm] = {
nullptr};
189 TH2I* h_top_ecltop_timing_diff_vs_toptop_bad[nskim_topdqm] = {
nullptr};
190 TH2I* h_gdl_ecltop_timing_diff_vs_toptop_bad[nskim_topdqm] = {
nullptr};
191 TH2I* h_gdl_ecltop_timing_diff_vs_ecltop_bad[nskim_topdqm] = {
nullptr};
193 TH1I* h_topCombinedTimingTopBad[nskim_topdqm] = {
nullptr};
194 TH1I* h_topNSlotsCombinedTimingTopBad[nskim_topdqm] = {
nullptr};
195 TH1I* h_topNHitSumBad[nskim_topdqm] = {
nullptr};
196 TH1I* h_topLogLSumBad[nskim_topdqm] = {
nullptr};
198 TH1I* h_topRvcDiff1Bad[nskim_topdqm] = {
nullptr};
199 TH1I* h_topRvcDiff2Bad[nskim_topdqm] = {
nullptr};
200 TH1I* h_topRvcDiff3Bad[nskim_topdqm] = {
nullptr};
201 TH1I* h_topRvcDiff4Bad[nskim_topdqm] = {
nullptr};
203 TH1I* h_topGdlRvcDiff1Bad[nskim_topdqm] = {
nullptr};
204 TH1I* h_topGdlRvcDiff2Bad[nskim_topdqm] = {
nullptr};
205 TH1I* h_topGdlRvcDiff3Bad[nskim_topdqm] = {
nullptr};
207 TH1I* h_topCombinedTimingTop[nskim_topdqm][nHistClasses] = {{
nullptr}};
208 TH1I* h_topNSlotsCombinedTimingTop[nskim_topdqm][nHistClasses] = {{
nullptr}};
209 TH1I* h_topNHitSum[nskim_topdqm][nHistClasses] = {{
nullptr}};
210 TH1I* h_topNHitBestSlot[nskim_topdqm][nHistClasses] = {{
nullptr}};
212 TH1I* h_topLogLSum[nskim_topdqm][nHistClasses] = {{
nullptr}};
214 TH1I* h_gdl_ecltop_timing_diff_5ns[nskim_topdqm] = {
nullptr};
215 TH1I* h_gdl_cdctop_timing_diff_5ns[nskim_topdqm] = {
nullptr};
217 TH1I* h_gdl_ecltop_timing_diff_2ns[nskim_topdqm] = {
nullptr};
218 TH1I* h_gdl_ecltop_timing_diff_grl_matched_2ns[nskim_topdqm] = {
nullptr};
219 TH1I* h_gdl_ecltop_timing_diff_no_grl_matched_2ns[nskim_topdqm] = {
nullptr};
220 TH1I* h_gdl_ecltop_timing_diff_no_grl_at_all_2ns[nskim_topdqm] = {
nullptr};
221 TH2I* h_gdl_ecltop_timing_diff_vs_nslots_2ns[nskim_topdqm] = {
nullptr};
222 TH1I* h_top_ecltop_timing_diff_combined_2ns[nskim_topdqm] = {
nullptr};
223 TH1I* h_top_ecltop_timing_diff_best_slot_2ns[nskim_topdqm] = {
nullptr};
224 TH1I* h_gdl_cdctop_timing_diff_2ns[nskim_topdqm] = {
nullptr};
226 TH1I* h_top_ecltop_timing_diff_2ns[nskim_topdqm][nHistClasses] = {{
nullptr}};
227 TH1I* h_top_ecltop_timing_combined_diff_2ns[nskim_topdqm][nHistClasses] = {{
nullptr}};
228 TH1I* h_top_ecltop_timing_best_slot_diff_2ns[nskim_topdqm][nHistClasses] = {{
nullptr}};
230 TH2I* h_top_ecltop_timing_diff_vs_toptop[nskim_topdqm][nHistClasses] = {{
nullptr}};
231 TH2I* h_gdl_ecltop_timing_diff_vs_toptop[nskim_topdqm][nHistClasses] = {{
nullptr}};
232 TH2I* h_gdl_ecltop_timing_diff_vs_ecltop[nskim_topdqm][nHistClasses] = {{
nullptr}};
233 TH2I* h_gdl_ecltop_timing_diff_vs_ecltop_best_slot[nskim_topdqm][nHistClasses] = {{
nullptr}};
235 TH2I* h_gdl_top_rvc_vs_top_timing[nskim_topdqm] = {
nullptr};
237 TH1I* h_gdl_ecltop_rvc_diff[nskim_topdqm] = {
nullptr};
238 TH1I* h_gdl_cdctop_rvc_diff[nskim_topdqm] = {
nullptr};
240 TH1I* h_gdl_gdltop_rvc_diff_all[nskim_topdqm] = {
nullptr};
241 TH1I* h_gdl_comtop_rvc_diff_all[nskim_topdqm] = {
nullptr};
243 TH1I* h_gdl_gdltop_rvc_diff_good[nskim_topdqm] = {
nullptr};
244 TH1I* h_gdl_comtop_rvc_diff_good[nskim_topdqm] = {
nullptr};
246 TH1I* h_gdl_gdltop_rvc_diff_bad[nskim_topdqm] = {
nullptr};
247 TH1I* h_gdl_comtop_rvc_diff_bad[nskim_topdqm] = {
nullptr};
249 TH2I* h_gdl_ecltop_timing_diff_vs_slot[nskim_topdqm] = {
nullptr};
250 TH2I* h_gdl_ecltop_timing_diff_vs_segment[nskim_topdqm] = {
nullptr};
251 TH2I* h_gdl_ecltop_timing_diff_vs_nhits[nskim_topdqm] = {
nullptr};
252 TH2I* h_gdl_ecltop_timing_diff_vs_logl[nskim_topdqm] = {
nullptr};
254 TH2I* h_gdl_ecltop_timing_diff_vs_slot_2ns[nskim_topdqm][nHistClasses] = {{
nullptr}};
255 TH2I* h_gdl_ecltop_timing_diff_vs_segment_2ns[nskim_topdqm][nHistClasses] = {{
nullptr}};
256 TH2I* h_gdl_ecltop_timing_diff_vs_nhits_2ns[nskim_topdqm][nHistClasses] = {{
nullptr}};
257 TH2I* h_gdl_ecltop_timing_diff_vs_logl_2ns[nskim_topdqm][nHistClasses] = {{
nullptr}};
259 TH2I* h_topTC2IdVsTC1IdAll[nskim_topdqm] = {
nullptr};
260 TH2I* h_topTC2EnergyVsTC1EnergyAll[nskim_topdqm] = {
nullptr};
261 TH2I* h_topTC2ThetaIdVsTC1ThetaIdAll[nskim_topdqm] = {
nullptr};
262 TH2I* h_topTC2PhiIdVsTC1PhiIdAll[nskim_topdqm] = {
nullptr};
263 TH3I* h_topTCPhiIdVsTCThetaIdAll[nskim_topdqm] = {
nullptr};
265 TH2I* h_topTC2IdVsTC1IdGRLAll[nskim_topdqm] = {
nullptr};
266 TH2I* h_topTC2EnergyVsTC1EnergyGRLAll[nskim_topdqm] = {
nullptr};
267 TH2I* h_topTC2ThetaIdVsTC1ThetaIdGRLAll[nskim_topdqm] = {
nullptr};
268 TH2I* h_topTC2PhiIdVsTC1PhiIdGRLAll[nskim_topdqm] = {
nullptr};
269 TH3I* h_topTCPhiIdVsTCThetaIdGRLAll[nskim_topdqm] = {
nullptr};
271 TH2I* h_topTC2IdVsTC1Id[nskim_topdqm] = {
nullptr};
272 TH2I* h_topTC2EnergyVsTC1Energy[nskim_topdqm] = {
nullptr};
273 TH2I* h_topTC2ThetaIdVsTC1ThetaId[nskim_topdqm] = {
nullptr};
274 TH2I* h_topTC2PhiIdVsTC1PhiId[nskim_topdqm] = {
nullptr};
275 TH3I* h_topTCPhiIdVsTCThetaId[nskim_topdqm] = {
nullptr};
277 TH2I* h_topTC2IdVsTC1IdGRL[nskim_topdqm] = {
nullptr};
278 TH2I* h_topTC2EnergyVsTC1EnergyGRL[nskim_topdqm] = {
nullptr};
279 TH2I* h_topTC2ThetaIdVsTC1ThetaIdGRL[nskim_topdqm] = {
nullptr};
280 TH2I* h_topTC2PhiIdVsTC1PhiIdGRL[nskim_topdqm] = {
nullptr};
281 TH3I* h_topTCPhiIdVsTCThetaIdGRL[nskim_topdqm] = {
nullptr};
283 TH2I* h_gdl_ecltop_timing_diff_vs_grl_top_l1[nskim_topdqm] = {
nullptr};
284 TH2I* h_gdl_top_l1_vs_grl_top_l1[nskim_topdqm] = {
nullptr};
286 TH2I* h_grl_ntopslots_vs_ncdcslots[nskim_topdqm] = {
nullptr};
287 TH1I* h_grl_ncdctopslots_matched[nskim_topdqm] = {
nullptr};
288 TH2I* h_grl_topslots_vs_cdcslots_match[nskim_topdqm] = {
nullptr};
291 DBObjPtr<TRGGDLDBUnpacker> m_gdlUnpacker;
293 int gdlLeafBitMap[320] = {0};
294 char gdlLeafNames[320][100] = {{0}};
296 int gdl_e_timtype = 0;
297 int gdl_e_gdll1rvc = 0;
298 int gdl_e_coml1rvc = 0;
299 int gdl_e_toptiming = 0;
300 int gdl_e_ecltiming = 0;
301 int gdl_e_cdctiming = 0;
302 int gdl_e_toprvc = 0;
303 int gdl_e_eclrvc = 0;
304 int gdl_e_cdcrvc = 0;
309 unsigned m_evtno = 0;
313 std::vector<int> skim;
327 std::vector<tcEcl> tcEclList;
330 inline bool operator()(
tcEcl const& a,
tcEcl const& b)
332 double i = a.tcEnergy;
333 double j = b.tcEnergy;
348 std::vector<slotDecision> slotDecisionList;
361 bool m_generatePostscriptFile;
362 std::string m_postScriptFileName;
364 bool m_doECLCorrelations;
365 bool m_doGDLCorrelations;
366 bool m_doGRLCorrelations;
368 bool m_requireEclBarrel;
369 bool m_requireEclBarrelB2B;
371 bool m_requireCDC2DTrack;
374 std::string skim_menu[nskim_topdqm] = {
376 "software_trigger_cut&skim&accept_hadron",
377 "software_trigger_cut&skim&accept_tau_tau",
378 "software_trigger_cut&skim&accept_mumu_1trk",
379 "software_trigger_cut&skim&accept_mumu_2trk",
380 "software_trigger_cut&skim&accept_gamma_gamma",
381 "software_trigger_cut&skim&accept_bhabha",
382 "software_trigger_cut&skim&accept_hadronb",
383 "software_trigger_cut&skim&accept_hadronb1",
384 "software_trigger_cut&skim&accept_hadronb2",
385 "software_trigger_cut&skim&accept_mumutight"
389 std::string skim_smap[nskim_topdqm] = {
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Accessor to arrays stored in the data store.
virtual void terminate() override
terminate
virtual void initialize() override
initialize
StoreArray< TRGECLUnpackerStore > trgeclHitArray
Trg ECL Unpacker TC output.
TDirectory * oldDir
TDirectory.
virtual void event() override
Event.
virtual void endRun() override
End Run.
TH1I * h_topSlotSegment[nskim_topdqm][16]
Combined t0 decisions: all, the earliest and second best.
virtual ~TRGTOPDQMModule()
Destructor.
TH1I * h_N_decision[nskim_topdqm][nHistClasses]
Number of TOP L1 decisions.
virtual void beginRun() override
begin Run
TRGTOPDQMModule()
Costructor.
TDirectory * dirDQM
TDirectory.
virtual void defineHisto() override
Define Histogram.
Abstract base class for different kinds of events.