Belle II Software development
CDCTriggerNeuroDQMModule.cc
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
9#include "trg/cdc/modules/dqmneuro/CDCTriggerNeuroDQMModule.h"
10
11#include <framework/dataobjects/EventMetaData.h>
12
13#include "TDirectory.h"
14#include <tracking/dataobjects/RecoTrack.h>
15
16using namespace std;
17using namespace Belle2;
18
19//-----------------------------------------------------------------
20// Register the Module
21//-----------------------------------------------------------------
22REG_MODULE(CDCTriggerNeuroDQM);
23
24
25//-----------------------------------------------------------------
26// Implementation
27//-----------------------------------------------------------------
28
30{
31 //Set module properties
32 setDescription("CDC Trigger DQM module");
33 setPropertyFlags(c_ParallelProcessingCertified); // specify this flag if you need parallel processing
34 addParam("limitedoutput", m_limitedoutput,
35 "Switch to supress output for online dqm purposes. ",
36 true);
37 addParam("unpackedSegmentHitsName", m_unpackedSegmentHitsName,
38 "The name of the StoreArray of the unpacked CDCTriggerSegmentHits",
39 string("CDCTriggerSegmentHits"));
40 addParam("unpacked2DTracksName", m_unpacked2DTracksName,
41 "The name of the StoreArray of the unpacked 2D finder tracks",
42 string("CDCTrigger2DFinderTracks"));
43 addParam("unpackedNeuroTracksName", m_unpackedNeuroTracksName,
44 "The name of the StoreArray of the unpacked neurotrigger tracks",
45 string("CDCTriggerNeuroTracks"));
46 addParam("unpackedNeuroInput2dTracksName", m_unpackedNeuroInput2DTracksName,
47 "The name of the StoreArray of the neurotrigger input 2d tracks",
48 string("CDCTriggerNNInput2DFinderTracks"));
49 addParam("unpackedNeuroInputSegmentHits", m_unpackedNeuroInputSegmentsName,
50 "The name of the StoreArray of the neurotrigger input segment hits",
51 string("CDCTriggerNNInputSegmentHits"));
52 addParam("simNeuroTracksName", m_simNeuroTracksName,
53 "The name of the StoreArray of the neurotrigger tracks from TSIM",
54 string(""));
55 addParam("histogramDirectoryName", m_histogramDirectoryName,
56 "Name of the directory where histograms will be placed",
57 string("TRGCDCTNN"));
58 addParam("simSegmentHitsName", m_simSegmentHitsName,
59 "StoreArray name for simulated TS hits", string(""));
60 addParam("sim2DTracksSWTSName", m_sim2DTracksSWTSName,
61 "StoreArray name for simulated 2D finder tracks using simulated TS", string(""));
62 addParam("simNeuroTracksSWTSSW2DName", m_simNeuroTracksSWTSSW2DName,
63 "StoreArray name for neuro tracks using simulated TS and simulated 2D", string(""));
64 addParam("showRecoTracks", m_showRecoTracks,
65 "switch to turn on a comparison with the reconstruction, DEPRECATED! Use RecoTracks='RecoTracks' (='') instead!",
66 false);
67 addParam("RecoTracks", m_recoTracksName,
68 "Name of the RecoTrack StoreArray. Leave empty for skipping them.",
69 string(""));
70 addParam("recoTrackMultiplicity", m_recoTrackMultiplicity,
71 "Select events with a specific RecoTrack track multiplicity. -1 for all events",
72 -1);
73 addParam("skipWithoutHWTS", m_skipWithoutHWTS,
74 "Switch to skip events without unpacked TS",
75 true);
76 addParam("maxRecoZDist", m_maxRecoZDist,
77 "Select only RecoTracks with a maximum z distance to the IP. -1.0 for all tracks",
78 (double)(- 1.0));
79 addParam("maxRecoD0Dist", m_maxRecoD0Dist,
80 "Select only RecoTracks with a maximum d0 distance to the z axis. -1.0 for all tracks",
81 (double)(- 1.0));
82 addParam("nSameTS", m_nsamets,
83 "Number of identical track segments to be required for matching between HW and SW Neurotrigger",
84 (int)(0));
85}
86
87
89{
90}
91
92//------------------------------------------------------------------
93// Function to define histograms
94//-----------------------------------------------------------------
95
97{
98 // Create a separate histogram directory and cd into it.
99 TDirectory* oldDir = gDirectory;
100 if (m_histogramDirectoryName != "") {
101 oldDir->mkdir(m_histogramDirectoryName.c_str());
102 oldDir->cd(m_histogramDirectoryName.c_str());
103 }
104 //----------------------------------------------------------------
105
106 // define neurotrigger histograms
107 if (m_unpackedNeuroTracksName != "") {
108 m_neuroHWOutZ = new TH1F("NeuroHWOutZ",
109 "z distribution of unpacked neuro tracks; z [cm]",
110 100, -100, 100);
111 m_neuroHWOutCosTheta = new TH1F("NeuroHWOutCosTheta",
112 "cos theta distribution of unpacked neuro tracks; cos(#theta) ",
113 100, -1, 1);
114 m_neuroHWOutPhi0 = new TH1F("NeuroHWOutPhi0",
115 "phi distribution of unpacked neuro tracks; #phi [#circ]",
116 80, 0, 360); // shift to reduce the binning error
117 m_neuroHWOutInvPt = new TH1F("NeuroHWOutInvPt",
118 "Inverse Pt distribution of unpacked neuro tracks; p_{T}^{-1} [GeV^{-1}]",
119 50, 0, 5);
120 m_neuroHWOutPt = new TH1F("NeuroHWOutPt",
121 "Pt distribution of unpacked neuro tracks; p_{T} [GeV]",
122 340, 0, 11);
123 m_neuroHWOutHitPattern = new TH1F("NeuroUnpackedHitPattern",
124 "stereo hit pattern of unpacked neuro tracks; pattern",
125 16, 0, 16); // 4 stereo layers -> 2**4 possible patterns
126 m_neuroHWOutm_time = new TH1F("NeuroHWOutM_time", "m_time distribution of unpacked neuro tracks; clock cycle",
127 48, 0, 48);
128 m_neuroHWOutTrackCount = new TH1F("NeuroHWOutTrackCount",
129 "number of unpacked neuro tracks per event",
130 20, 0, 20);
131 m_neuroHWSector = new TH1F("NeuroHWSector",
132 "sector of unpacked neuro tracks; sector",
133 10, 0, 10);
134
135
136 m_neuroHWInInvPt = new TH1F("NeuroHWInInvPt",
137 "Inverse Pt distribution from incoming 2dtrack; p_{T}^{-1} [GeV^{-1}]",
138 50, 0, 5);
139 m_neuroHWInPhi0 = new TH1F("NeuroHWInPhi0", "Phi0 of incoming 2dtrack; #phi [#circ]",
140 80, 0, 360);
141 m_neuroHWInm_time = new TH1F("NeuroHWInM_time", "m_time distribution from incoming 2dtracks; clock cycle",
142 48, 0, 48);
143 m_neuroHWInTrackCount = new TH1F("NeuroHWInTrackCount", "number of neuro input 2dtracks per event",
144 20, 0, 20);
145 m_neuroHWOutVsInTrackCount = new TH1F("NeuroHWOutVsInTrackCount",
146 "number of neuroHWOutTracks - number of 2dinTracks",
147 20, -10, 10);
148 m_neuroHWInTSID = new TH1F("NeuroHWInTSID", "ID of incoming track segments",
149 2336, 0, 2335);
150 m_neuroHWInTSCount = new TH1F("NeuroHWInTSCount", " number of TS per event",
151 200, 0, 200);
152 m_neuroHWSelTSID = new TH1F("NeuroHWSelTSID", "ID of selected track segments",
153 2336, 0, 2335);
154 m_neuroHWSelTSCount = new TH1F("NeuroHWSelTSCount", "number of selected TS per SL; sl", 9, 0, 9);
155 }
157 m_2DHWInTSPrioT_Layer0 = new TH1F("2DHWInTSPrioT_Layer0", "Priority time of track segments in layer 0",
158 512, 0, 511);
159 m_2DHWInTSPrioT_Layer2 = new TH1F("2DHWInTSPrioT_Layer2", "Priority time of track segments in layer 2",
160 512, 0, 511);
161 m_2DHWInTSPrioT_Layer4 = new TH1F("2DHWInTSPrioT_Layer4", "Priority time of track segments in layer 4",
162 512, 0, 511);
163 m_2DHWInTSPrioT_Layer6 = new TH1F("2DHWInTSPrioT_Layer6", "Priority time of track segments in layer 6",
164 512, 0, 511);
165 m_2DHWInTSPrioT_Layer8 = new TH1F("2DHWInTSPrioT_Layer8", "Priority time of track segments in layer 8",
166 512, 0, 511);
167 m_2DHWInTSFoundT_Layer0 = new TH1F("2DHWInTSFoundT_Layer0", "Found time of track segments in layer 0",
168 96, -48, 48);
169 m_2DHWInTSFoundT_Layer2 = new TH1F("2DHWInTSFoundT_Layer2", "Found time of track segments in layer 2",
170 96, -48, 48);
171 m_2DHWInTSFoundT_Layer4 = new TH1F("2DHWInTSFoundT_Layer4", "Found time of track segments in layer 4",
172 96, -48, 48);
173 m_2DHWInTSFoundT_Layer6 = new TH1F("2DHWInTSFoundT_Layer6", "Found time of track segments in layer 6",
174 96, -48, 48);
175 m_2DHWInTSFoundT_Layer8 = new TH1F("2DHWInTSFoundT_Layer8", "Found time of track segments in layer 8",
176 96, -48, 48);
177
178
179 m_2DHWInTSPrioB_Layer0 = new TH1F("2DHWInTSPrioB_Layer0", "Priority bits of track segments in layer 0",
180 4, 0, 4);
181 m_2DHWInTSPrioB_Layer2 = new TH1F("2DHWInTSPrioB_Layer2", "Priority bits of track segments in layer 2",
182 4, 0, 4);
183 m_2DHWInTSPrioB_Layer4 = new TH1F("2DHWInTSPrioB_Layer4", "Priority bits of track segments in layer 4",
184 4, 0, 4);
185 m_2DHWInTSPrioB_Layer6 = new TH1F("2DHWInTSPrioB_Layer6", "Priority bits of track segments in layer 6",
186 4, 0, 4);
187 m_2DHWInTSPrioB_Layer8 = new TH1F("2DHWInTSPrioB_Layer8", "Priority bits of track segments in layer 8",
188 4, 0, 4);
189 m_2DHWInTSLR_Layer0 = new TH1F("2DHWInTSLR_Layer0", "Left/Right of track segments in layer 0",
190 4, 0, 4);
191 m_2DHWInTSLR_Layer2 = new TH1F("2DHWInTSLR_Layer2", "Left/Right of track segments in layer 2",
192 4, 0, 4);
193 m_2DHWInTSLR_Layer4 = new TH1F("2DHWInTSLR_Layer4", "Left/Right of track segments in layer 4",
194 4, 0, 4);
195 m_2DHWInTSLR_Layer6 = new TH1F("2DHWInTSLR_Layer6", "Left/Right of track segments in layer 6",
196 4, 0, 4);
197 m_2DHWInTSLR_Layer8 = new TH1F("2DHWInTSLR_Layer8", "Left/Right of track segments in layer 8",
198 4, 0, 4);
199 }
201
202 m_neuroHWOutQuad5Z = new TH1F("NeuroHWOutQuad5Z",
203 "z distribution of neuro tracks; z [cm]",
204 100, -100, 100);
205 m_neuroHWOutQuad5CosTheta = new TH1F("NeuroHWOutQuad5CosTheta",
206 "cos theta distribution of neuro tracks; cos(#theta) ",
207 100, -1, 1);
208 m_neuroHWOutQuad5InvPt = new TH1F("NeuroHWOutQuad5InvPt",
209 "Pt distribution from unpacker; p_{T}^{-1} [GeV^{-1}]",
210 50, 0, 5);
211 m_neuroHWOutQuad5Phi0 = new TH1F("NeuroHWOutQuad5Phi0",
212 "phi distribution from unpacker; #phi [#circ]",
213 80, 0, 360);
214
215 m_neuroHWOutQuad0Z = new TH1F("NeuroHWOutQuad0Z",
216 "z distribution of neuro tracks; z [cm]",
217 100, -100, 100);
218 m_neuroHWOutQuad0CosTheta = new TH1F("NeuroHWOutQuad0CosTheta",
219 "cos theta distribution of neuro tracks; cos(#theta) ",
220 100, -1, 1);
221 m_neuroHWOutQuad0InvPt = new TH1F("NeuroHWOutQuad0InvPt",
222 "Pt distribution from unpacker; p_{T}^{-1} [GeV^{-1}]",
223 50, 0, 5);
224 m_neuroHWOutQuad0Phi0 = new TH1F("NeuroHWOutQuad0Phi0",
225 "phi distribution from unpacker; #phi [#circ]",
226 80, 0, 360);
227
228 m_neuroHWOutQuad1Z = new TH1F("NeuroHWOutQuad1Z",
229 "z distribution of neuro tracks; z [cm]",
230 100, -100, 100);
231 m_neuroHWOutQuad1CosTheta = new TH1F("NeuroHWOutQuad1CosTheta",
232 "cos theta distribution of neuro tracks; cos(#theta) ",
233 100, -1, 1);
234 m_neuroHWOutQuad1Phi0 = new TH1F("NeuroHWOutQuad1Phi0",
235 "phi distribution from unpacker; #phi [#circ]",
236 80, 0, 360);
237 m_neuroHWOutQuad1InvPt = new TH1F("NeuroHWOutQuad1InvPt",
238 "Pt distribution from unpacker; p_{T}^{-1} [GeV^{-1}]",
239 50, 0, 5);
240
241 m_neuroHWOutQuad2Z = new TH1F("NeuroHWOutQuad2Z",
242 "z distribution of neuro tracks; z [cm]",
243 100, -100, 100);
244 m_neuroHWOutQuad2CosTheta = new TH1F("NeuroHWOutQuad2CosTheta",
245 "cos theta distribution of neuro tracks; cos(#theta) ",
246 100, -1, 1);
247 m_neuroHWOutQuad2Phi0 = new TH1F("NeuroHWOutQuad2Phi0",
248 "phi distribution from unpacker; #phi [#circ]",
249 80, 0, 360);
250 m_neuroHWOutQuad2InvPt = new TH1F("NeuroHWOutQuad2InvPt",
251 "Pt distribution from unpacker; p_{T}^{-1} [GeV^{-1}]",
252 50, 0, 5);
253
254 m_neuroHWOutQuad3Z = new TH1F("NeuroHWOutQuad3Z",
255 "z distribution of neuro tracks; z [cm]",
256 100, -100, 100);
257 m_neuroHWOutQuad3CosTheta = new TH1F("NeuroHWOutQuad3CosTheta",
258 "cos theta distribution of neuro tracks; cos(#theta) ",
259 100, -1, 1);
260 m_neuroHWOutQuad3Phi0 = new TH1F("NeuroHWOutQuad3Phi0",
261 "phi distribution from unpacker; #phi [#circ]",
262 80, 0, 360);
263 m_neuroHWOutQuad3InvPt = new TH1F("NeuroHWOutQuad3InvPt",
264 "Pt distribution from unpacker; p_{T}^{-1} [GeV^{-1}]",
265 50, 0, 5);
266 m_neuroHWInTSPrioT_Layer0 = new TH1F("NeuroHWInTSPrioT_Layer0", "Priority time of track segments in layer 0",
267 512, 0, 511);
268 m_neuroHWInTSPrioT_Layer1 = new TH1F("NeuroHWInTSPrioT_Layer1", "Priority time of track segments in layer 1",
269 512, 0, 511);
270 m_neuroHWInTSPrioT_Layer2 = new TH1F("NeuroHWInTSPrioT_Layer2", "Priority time of track segments in layer 2",
271 512, 0, 511);
272 m_neuroHWInTSPrioT_Layer3 = new TH1F("NeuroHWInTSPrioT_Layer3", "Priority time of track segments in layer 3",
273 512, 0, 511);
274 m_neuroHWInTSPrioT_Layer4 = new TH1F("NeuroHWInTSPrioT_Layer4", "Priority time of track segments in layer 4",
275 512, 0, 511);
276 m_neuroHWInTSPrioT_Layer5 = new TH1F("NeuroHWInTSPrioT_Layer5", "Priority time of track segments in layer 5",
277 512, 0, 511);
278 m_neuroHWInTSPrioT_Layer6 = new TH1F("NeuroHWInTSPrioT_Layer6", "Priority time of track segments in layer 6",
279 512, 0, 511);
280 m_neuroHWInTSPrioT_Layer7 = new TH1F("NeuroHWInTSPrioT_Layer7", "Priority time of track segments in layer 7",
281 512, 0, 511);
282 m_neuroHWInTSPrioT_Layer8 = new TH1F("NeuroHWInTSPrioT_Layer8", "Priority time of track segments in layer 8",
283 512, 0, 511);
284 m_neuroHWInTSFoundT_Layer0 = new TH1F("NeuroHWInTSFoundT_Layer0", "Found time of track segments in layer 0",
285 48, 0, 48);
286 m_neuroHWInTSFoundT_Layer1 = new TH1F("NeuroHWInTSFoundT_Layer1", "Found time of track segments in layer 1",
287 48, 0, 48);
288 m_neuroHWInTSFoundT_Layer2 = new TH1F("NeuroHWInTSFoundT_Layer2", "Found time of track segments in layer 2",
289 48, 0, 48);
290 m_neuroHWInTSFoundT_Layer3 = new TH1F("NeuroHWInTSFoundT_Layer3", "Found time of track segments in layer 3",
291 48, 0, 48);
292 m_neuroHWInTSFoundT_Layer4 = new TH1F("NeuroHWInTSFoundT_Layer4", "Found time of track segments in layer 4",
293 48, 0, 48);
294 m_neuroHWInTSFoundT_Layer5 = new TH1F("NeuroHWInTSFoundT_Layer5", "Found time of track segments in layer 5",
295 48, 0, 48);
296 m_neuroHWInTSFoundT_Layer6 = new TH1F("NeuroHWInTSFoundT_Layer6", "Found time of track segments in layer 6",
297 48, 0, 48);
298 m_neuroHWInTSFoundT_Layer7 = new TH1F("NeuroHWInTSFoundT_Layer7", "Found time of track segments in layer 7",
299 48, 0, 48);
300 m_neuroHWInTSFoundT_Layer8 = new TH1F("NeuroHWInTSFoundT_Layer8", "Found time of track segments in layer 8",
301 48, 0, 48);
302
303
304 m_neuroHWInTSPrioB_Layer0 = new TH1F("NeuroHWInTSPrioB_Layer0", "Priority bits of track segments in layer 0",
305 4, 0, 4);
306 m_neuroHWInTSPrioB_Layer1 = new TH1F("NeuroHWInTSPrioB_Layer1", "Priority bits of track segments in layer 1",
307 4, 0, 4);
308 m_neuroHWInTSPrioB_Layer2 = new TH1F("NeuroHWInTSPrioB_Layer2", "Priority bits of track segments in layer 2",
309 4, 0, 4);
310 m_neuroHWInTSPrioB_Layer3 = new TH1F("NeuroHWInTSPrioB_Layer3", "Priority bits of track segments in layer 3",
311 4, 0, 4);
312 m_neuroHWInTSPrioB_Layer4 = new TH1F("NeuroHWInTSPrioB_Layer4", "Priority bits of track segments in layer 4",
313 4, 0, 4);
314 m_neuroHWInTSPrioB_Layer5 = new TH1F("NeuroHWInTSPrioB_Layer5", "Priority bits of track segments in layer 5",
315 4, 0, 4);
316 m_neuroHWInTSPrioB_Layer6 = new TH1F("NeuroHWInTSPrioB_Layer6", "Priority bits of track segments in layer 6",
317 4, 0, 4);
318 m_neuroHWInTSPrioB_Layer7 = new TH1F("NeuroHWInTSPrioB_Layer7", "Priority bits of track segments in layer 7",
319 4, 0, 4);
320 m_neuroHWInTSPrioB_Layer8 = new TH1F("NeuroHWInTSPrioB_Layer8", "Priority bits of track segments in layer 8",
321 4, 0, 4);
322
323
324 m_neuroHWInTSLR_Layer0 = new TH1F("NeuroHWInTSLR_Layer0", "Left/Right of track segments in layer 0",
325 4, 0, 4);
326 m_neuroHWInTSLR_Layer1 = new TH1F("NeuroHWInTSLR_Layer1", "Left/Right of track segments in layer 1",
327 4, 0, 4);
328 m_neuroHWInTSLR_Layer2 = new TH1F("NeuroHWInTSLR_Layer2", "Left/Right of track segments in layer 2",
329 4, 0, 4);
330 m_neuroHWInTSLR_Layer3 = new TH1F("NeuroHWInTSLR_Layer3", "Left/Right of track segments in layer 3",
331 4, 0, 4);
332 m_neuroHWInTSLR_Layer4 = new TH1F("NeuroHWInTSLR_Layer4", "Left/Right of track segments in layer 4",
333 4, 0, 4);
334 m_neuroHWInTSLR_Layer5 = new TH1F("NeuroHWInTSLR_Layer5", "Left/Right of track segments in layer 5",
335 4, 0, 4);
336 m_neuroHWInTSLR_Layer6 = new TH1F("NeuroHWInTSLR_Layer6", "Left/Right of track segments in layer 6",
337 4, 0, 4);
338 m_neuroHWInTSLR_Layer7 = new TH1F("NeuroHWInTSLR_Layer7", "Left/Right of track segments in layer 7",
339 4, 0, 4);
340 m_neuroHWInTSLR_Layer8 = new TH1F("NeuroHWInTSLR_Layer8", "Left/Right of track segments in layer 8",
341 4, 0, 4);
342 m_neuroHWSelTSPrioT_Layer0 = new TH1F("NeuroHWSelTSPrioT_Layer0", "Priority time of track segments in layer 0",
343 512, 0, 511);
344 m_neuroHWSelTSPrioT_Layer1 = new TH1F("NeuroHWSelTSPrioT_Layer1", "Priority time of track segments in layer 1",
345 512, 0, 511);
346 m_neuroHWSelTSPrioT_Layer2 = new TH1F("NeuroHWSelTSPrioT_Layer2", "Priority time of track segments in layer 2",
347 512, 0, 511);
348 m_neuroHWSelTSPrioT_Layer3 = new TH1F("NeuroHWSelTSPrioT_Layer3", "Priority time of track segments in layer 3",
349 512, 0, 511);
350 m_neuroHWSelTSPrioT_Layer4 = new TH1F("NeuroHWSelTSPrioT_Layer4", "Priority time of track segments in layer 4",
351 512, 0, 511);
352 m_neuroHWSelTSPrioT_Layer5 = new TH1F("NeuroHWSelTSPrioT_Layer5", "Priority time of track segments in layer 5",
353 512, 0, 511);
354 m_neuroHWSelTSPrioT_Layer6 = new TH1F("NeuroHWSelTSPrioT_Layer6", "Priority time of track segments in layer 6",
355 512, 0, 511);
356 m_neuroHWSelTSPrioT_Layer7 = new TH1F("NeuroHWSelTSPrioT_Layer7", "Priority time of track segments in layer 7",
357 512, 0, 511);
358 m_neuroHWSelTSPrioT_Layer8 = new TH1F("NeuroHWSelTSPrioT_Layer8", "Priority time of track segments in layer 8",
359 512, 0, 511);
360 m_neuroHWSelTSFoundT_Layer0 = new TH1F("NeuroHWSelTSFoundT_Layer0",
361 "First found time of selected TS - found time of Neuro Track in SL 0",
362 96, -47.99, 48.01);
363 m_neuroHWSelTSFoundT_Layer1 = new TH1F("NeuroHWSelTSFoundT_Layer1",
364 "First found time of selected TS - found time of Neuro Track in SL 1",
365 96, -47.99, 48.01);
366 m_neuroHWSelTSFoundT_Layer2 = new TH1F("NeuroHWSelTSFoundT_Layer2",
367 "First found time of selected TS - found time of Neuro Track in SL 2",
368 96, -47.99, 48.01);
369 m_neuroHWSelTSFoundT_Layer3 = new TH1F("NeuroHWSelTSFoundT_Layer3",
370 "First found time of selected TS - found time of Neuro Track in SL 3",
371 96, -47.99, 48.01);
372 m_neuroHWSelTSFoundT_Layer4 = new TH1F("NeuroHWSelTSFoundT_Layer4",
373 "First found time of selected TS - found time of Neuro Track in SL 4",
374 96, -47.99, 48.01);
375 m_neuroHWSelTSFoundT_Layer5 = new TH1F("NeuroHWSelTSFoundT_Layer5",
376 "First found time of selected TS - found time of Neuro Track in SL 5",
377 96, -47.99, 48.01);
378 m_neuroHWSelTSFoundT_Layer6 = new TH1F("NeuroHWSelTSFoundT_Layer6",
379 "First found time of selected TS - found time of Neuro Track in SL 6",
380 96, -47.99, 48.01);
381 m_neuroHWSelTSFoundT_Layer7 = new TH1F("NeuroHWSelTSFoundT_Layer7",
382 "First found time of selected TS - found time of Neuro Track in SL 7",
383 96, -47.99, 48.01);
384 m_neuroHWSelTSFoundT_Layer8 = new TH1F("NeuroHWSelTSFoundT_Layer8",
385 "First found time of selected TS - found time of Neuro Track in SL 8",
386 96, -47.99, 48.01);
387
388
389 m_neuroHWSelTSPrioB_Layer0 = new TH1F("NeuroHWSelTSPrioB_Layer0", "Priority bits of track segments in layer 0",
390 4, 0, 4);
391 m_neuroHWSelTSPrioB_Layer1 = new TH1F("NeuroHWSelTSPrioB_Layer1", "Priority bits of track segments in layer 1",
392 4, 0, 4);
393 m_neuroHWSelTSPrioB_Layer2 = new TH1F("NeuroHWSelTSPrioB_Layer2", "Priority bits of track segments in layer 2",
394 4, 0, 4);
395 m_neuroHWSelTSPrioB_Layer3 = new TH1F("NeuroHWSelTSPrioB_Layer3", "Priority bits of track segments in layer 3",
396 4, 0, 4);
397 m_neuroHWSelTSPrioB_Layer4 = new TH1F("NeuroHWSelTSPrioB_Layer4", "Priority bits of track segments in layer 4",
398 4, 0, 4);
399 m_neuroHWSelTSPrioB_Layer5 = new TH1F("NeuroHWSelTSPrioB_Layer5", "Priority bits of track segments in layer 5",
400 4, 0, 4);
401 m_neuroHWSelTSPrioB_Layer6 = new TH1F("NeuroHWSelTSPrioB_Layer6", "Priority bits of track segments in layer 6",
402 4, 0, 4);
403 m_neuroHWSelTSPrioB_Layer7 = new TH1F("NeuroHWSelTSPrioB_Layer7", "Priority bits of track segments in layer 7",
404 4, 0, 4);
405 m_neuroHWSelTSPrioB_Layer8 = new TH1F("NeuroHWSelTSPrioB_Layer8", "Priority bits of track segments in layer 8",
406 4, 0, 4);
407
408
409 m_neuroHWSelTSLR_Layer0 = new TH1F("NeuroHWSelTSLR_Layer0", "Left/Right of track segments in layer 0",
410 4, 0, 4);
411 m_neuroHWSelTSLR_Layer1 = new TH1F("NeuroHWSelTSLR_Layer1", "Left/Right of track segments in layer 1",
412 4, 0, 4);
413 m_neuroHWSelTSLR_Layer2 = new TH1F("NeuroHWSelTSLR_Layer2", "Left/Right of track segments in layer 2",
414 4, 0, 4);
415 m_neuroHWSelTSLR_Layer3 = new TH1F("NeuroHWSelTSLR_Layer3", "Left/Right of track segments in layer 3",
416 4, 0, 4);
417 m_neuroHWSelTSLR_Layer4 = new TH1F("NeuroHWSelTSLR_Layer4", "Left/Right of track segments in layer 4",
418 4, 0, 4);
419 m_neuroHWSelTSLR_Layer5 = new TH1F("NeuroHWSelTSLR_Layer5", "Left/Right of track segments in layer 5",
420 4, 0, 4);
421 m_neuroHWSelTSLR_Layer6 = new TH1F("NeuroHWSelTSLR_Layer6", "Left/Right of track segments in layer 6",
422 4, 0, 4);
423 m_neuroHWSelTSLR_Layer7 = new TH1F("NeuroHWSelTSLR_Layer7", "Left/Right of track segments in layer 7",
424 4, 0, 4);
425 m_neuroHWSelTSLR_Layer8 = new TH1F("NeuroHWSelTSLR_Layer8", "Left/Right of track segments in layer 8",
426 4, 0, 4);
427 m_neuroHWInputID_Layer0 = new TH1F("NeuroHWInputID_Layer0",
428 "unpacked id input in layer 0; id",
429 100, -1, 1);
430 m_neuroHWInputT_Layer0 = new TH1F("NeuroHWInputT_Layer0",
431 "unpacked time input in layer 0; time",
432 100, -1, 1);
433 m_neuroHWInputAlpha_Layer0 = new TH1F("NeuroHWInputAlpha_Layer0",
434 "unpacked alpha input in layer 0; alpha",
435 100, -1, 1);
436 m_neuroHWInputID_Layer1 = new TH1F("NeuroHWInputID_Layer1",
437 "unpacked id input in layer 1; id",
438 100, -1, 1);
439 m_neuroHWInputT_Layer1 = new TH1F("NeuroHWInputT_Layer1",
440 "unpacked time input in layer 1; time",
441 100, -1, 1);
442 m_neuroHWInputAlpha_Layer1 = new TH1F("NeuroHWInputAlpha_Layer1",
443 "unpacked alpha input in layer 1; alpha",
444 100, -1, 1);
445 m_neuroHWInputID_Layer2 = new TH1F("NeuroHWInputID_Layer2",
446 "unpacked id input in layer 2; id",
447 100, -1, 1);
448 m_neuroHWInputT_Layer2 = new TH1F("NeuroHWInputT_Layer2",
449 "unpacked time input in layer 2; time",
450 100, -1, 1);
451 m_neuroHWInputAlpha_Layer2 = new TH1F("NeuroHWInputAlpha_Layer2",
452 "unpacked alpha input in layer 2; alpha",
453 100, -1, 1);
454 m_neuroHWInputID_Layer3 = new TH1F("NeuroHWInputID_Layer3",
455 "unpacked id input in layer 3; id",
456 100, -1, 1);
457 m_neuroHWInputT_Layer3 = new TH1F("NeuroHWInputT_Layer3",
458 "unpacked time input in layer 3; time",
459 100, -1, 1);
460 m_neuroHWInputAlpha_Layer3 = new TH1F("NeuroHWInputAlpha_Layer3",
461 "unpacked alpha input in layer 3; alpha",
462 100, -1, 1);
463 m_neuroHWInputID_Layer4 = new TH1F("NeuroHWInputID_Layer4",
464 "unpacked id input in layer 4; id",
465 100, -1, 1);
466 m_neuroHWInputT_Layer4 = new TH1F("NeuroHWInputT_Layer4",
467 "unpacked time input in layer 4; time",
468 100, -1, 1);
469 m_neuroHWInputAlpha_Layer4 = new TH1F("NeuroHWInputAlpha_Layer4",
470 "unpacked alpha input in layer 4; alpha",
471 100, -1, 1);
472 m_neuroHWInputID_Layer5 = new TH1F("NeuroHWInputID_Layer5",
473 "unpacked id input in layer 5; id",
474 100, -1, 1);
475 m_neuroHWInputT_Layer5 = new TH1F("NeuroHWInputT_Layer5",
476 "unpacked time input in layer 5; time",
477 100, -1, 1);
478 m_neuroHWInputAlpha_Layer5 = new TH1F("NeuroHWInputAlpha_Layer5",
479 "unpacked alpha input in layer 5; alpha",
480 100, -1, 1);
481 m_neuroHWInputID_Layer6 = new TH1F("NeuroHWInputID_Layer6",
482 "unpacked id input in layer 6; id",
483 100, -1, 1);
484 m_neuroHWInputT_Layer6 = new TH1F("NeuroHWInputT_Layer6",
485 "unpacked time input in layer 6; time",
486 100, -1, 1);
487 m_neuroHWInputAlpha_Layer6 = new TH1F("NeuroHWInputAlpha_Layer6",
488 "unpacked alpha input in layer 6; alpha",
489 100, -1, 1);
490 m_neuroHWInputID_Layer7 = new TH1F("NeuroHWInputID_Layer7",
491 "unpacked id input in layer 7; id",
492 100, -1, 1);
493 m_neuroHWInputT_Layer7 = new TH1F("NeuroHWInputT_Layer7",
494 "unpacked time input in layer 7; time",
495 100, -1, 1);
496 m_neuroHWInputAlpha_Layer7 = new TH1F("NeuroHWInputAlpha_Layer7",
497 "unpacked alpha input in layer 7; alpha",
498 100, -1, 1);
499 m_neuroHWInputID_Layer8 = new TH1F("NeuroHWInputID_Layer8",
500 "unpacked id input in layer 8; id",
501 100, -1, 1);
502 m_neuroHWInputT_Layer8 = new TH1F("NeuroHWInputT_Layer8",
503 "unpacked time input in layer 8; time",
504 100, -1, 1);
505 m_neuroHWInputAlpha_Layer8 = new TH1F("NeuroHWInputAlpha_Layer8",
506 "unpacked alpha input in layer 8; alpha",
507 100, -1, 1);
508 }
509 if (m_unpacked2DTracksName != "") {
510 m_2DHWOutInvPt = new TH1F("2DHWOutInvPt",
511 "Inverse Pt of 2dtracks; p_{T}^{-1} [GeV^{-1}]",
512 50, 0, 5);
513 m_2DHWOutPhi0 = new TH1F("2DHWOutPhi0", "Phi0 of 2dtracks; #phi [#circ]",
514 80, 0, 360);
515 m_2DHWOutm_time = new TH1F("2DHWOutM_time", "m_time of 2dtracks; clock cycle",
516 96, -48, 48);
517 m_2DHWOutTrackCount = new TH1F("2DHWOutTrackCount", "number of 2dtracks per event", 20, 0, 20);
518 m_neuroHWInVs2DOutTrackCount = new TH1F("NeuroHWInVs2DOutTrackCount", "neuro in tracks - 2d out tracks",
519 20, -10, 10);
520 }
521
523 m_neuroSWOutZ = new TH1F("NeuroSWOutZ",
524 "z distribution from simulation, hw TS hw 2D; z [cm]",
525 100, -100, 100);
526 m_neuroSWOutCosTheta = new TH1F("NeuroSWOutCosTheta",
527 "cos theta distribution from simulation, hw TS hw 2D; cos(#theta) ",
528 100, -1, 1);
529 m_neuroSWOutInvPt = new TH1F("NeuroSWOutInvPt",
530 "Inverse Pt distribution from simulation, hw TS hw 2D; p_{T}^{-1} [GeV^{-1}]",
531 50, 0, 5);
532 m_neuroSWOutPhi0 = new TH1F("NeuroSWOutPhi0",
533 "phi distribution from simulation, hw TS hw 2D; #phi [#circ]",
534 80, 0, 360); // shift to reduce the binning error
535 m_neuroSWOutHitPattern = new TH1F("NeuroSWOutHitPattern",
536 "stereo hit pattern of simulated neuro tracks, hw TS hw 2D; pattern",
537 16, 0, 16); // 4 stereo layers -> 2**4 possible patterns
538 m_neuroSWOutTrackCount = new TH1F("NeuroSWOutTrackCount",
539 "number of neuro tracks per event from simulation, hw TS hw 2D",
540 20, 0, 20);
541 m_neuroSWSector = new TH1F("NeuroSWSector",
542 "sector of simulated neuro tracks, hw TS hw 2D; sector",
543 10, 0, 10);
544 // hw TS selected by sw NN
545 m_neuroSWSelTSID = new TH1F("NeuroSWSelTSID", "ID of selected track segments",
546 2336, 0, 2335);
547 m_neuroSWSelTSCount = new TH1F("NeuroSWSelTSCount", "number of selected TS per SL; sl", 9, 0, 9);
548 m_neuroSWSelTSPrioT_Layer0 = new TH1F("NeuroSWSelTSPrioT_Layer0", "Priority time of track segments in layer 0",
549 512, 0, 511);
550 m_neuroSWSelTSPrioT_Layer1 = new TH1F("NeuroSWSelTSPrioT_Layer1", "Priority time of track segments in layer 1",
551 512, 0, 511);
552 m_neuroSWSelTSPrioT_Layer2 = new TH1F("NeuroSWSelTSPrioT_Layer2", "Priority time of track segments in layer 2",
553 512, 0, 511);
554 m_neuroSWSelTSPrioT_Layer3 = new TH1F("NeuroSWSelTSPrioT_Layer3", "Priority time of track segments in layer 3",
555 512, 0, 511);
556 m_neuroSWSelTSPrioT_Layer4 = new TH1F("NeuroSWSelTSPrioT_Layer4", "Priority time of track segments in layer 4",
557 512, 0, 511);
558 m_neuroSWSelTSPrioT_Layer5 = new TH1F("NeuroSWSelTSPrioT_Layer5", "Priority time of track segments in layer 5",
559 512, 0, 511);
560 m_neuroSWSelTSPrioT_Layer6 = new TH1F("NeuroSWSelTSPrioT_Layer6", "Priority time of track segments in layer 6",
561 512, 0, 511);
562 m_neuroSWSelTSPrioT_Layer7 = new TH1F("NeuroSWSelTSPrioT_Layer7", "Priority time of track segments in layer 7",
563 512, 0, 511);
564 m_neuroSWSelTSPrioT_Layer8 = new TH1F("NeuroSWSelTSPrioT_Layer8", "Priority time of track segments in layer 8",
565 512, 0, 511);
566 m_neuroSWSelTSFoundT_Layer0 = new TH1F("NeuroSWSelTSFoundT_Layer0",
567 "First found time of selected TS - found time of Neuro Track in SL 0",
568 96, -47.99, 48.01);
569 m_neuroSWSelTSFoundT_Layer1 = new TH1F("NeuroSWSelTSFoundT_Layer1",
570 "First found time of selected TS - found time of Neuro Track in SL 1",
571 96, -47.99, 48.01);
572 m_neuroSWSelTSFoundT_Layer2 = new TH1F("NeuroSWSelTSFoundT_Layer2",
573 "First found time of selected TS - found time of Neuro Track in SL 2",
574 96, -47.99, 48.01);
575 m_neuroSWSelTSFoundT_Layer3 = new TH1F("NeuroSWSelTSFoundT_Layer3",
576 "First found time of selected TS - found time of Neuro Track in SL 3",
577 96, -47.99, 48.01);
578 m_neuroSWSelTSFoundT_Layer4 = new TH1F("NeuroSWSelTSFoundT_Layer4",
579 "First found time of selected TS - found time of Neuro Track in SL 4",
580 96, -47.99, 48.01);
581 m_neuroSWSelTSFoundT_Layer5 = new TH1F("NeuroSWSelTSFoundT_Layer5",
582 "First found time of selected TS - found time of Neuro Track in SL 5",
583 96, -47.99, 48.01);
584 m_neuroSWSelTSFoundT_Layer6 = new TH1F("NeuroSWSelTSFoundT_Layer6",
585 "First found time of selected TS - found time of Neuro Track in SL 6",
586 96, -47.99, 48.01);
587 m_neuroSWSelTSFoundT_Layer7 = new TH1F("NeuroSWSelTSFoundT_Layer7",
588 "First found time of selected TS - found time of Neuro Track in SL 7",
589 96, -47.99, 48.01);
590 m_neuroSWSelTSFoundT_Layer8 = new TH1F("NeuroSWSelTSFoundT_Layer8",
591 "First found time of selected TS - found time of Neuro Track in SL 8",
592 96, -47.99, 48.01);
593
594
595 m_neuroSWSelTSPrioB_Layer0 = new TH1F("NeuroSWSelTSPrioB_Layer0", "Priority bits of track segments in layer 0",
596 4, 0, 4);
597 m_neuroSWSelTSPrioB_Layer1 = new TH1F("NeuroSWSelTSPrioB_Layer1", "Priority bits of track segments in layer 1",
598 4, 0, 4);
599 m_neuroSWSelTSPrioB_Layer2 = new TH1F("NeuroSWSelTSPrioB_Layer2", "Priority bits of track segments in layer 2",
600 4, 0, 4);
601 m_neuroSWSelTSPrioB_Layer3 = new TH1F("NeuroSWSelTSPrioB_Layer3", "Priority bits of track segments in layer 3",
602 4, 0, 4);
603 m_neuroSWSelTSPrioB_Layer4 = new TH1F("NeuroSWSelTSPrioB_Layer4", "Priority bits of track segments in layer 4",
604 4, 0, 4);
605 m_neuroSWSelTSPrioB_Layer5 = new TH1F("NeuroSWSelTSPrioB_Layer5", "Priority bits of track segments in layer 5",
606 4, 0, 4);
607 m_neuroSWSelTSPrioB_Layer6 = new TH1F("NeuroSWSelTSPrioB_Layer6", "Priority bits of track segments in layer 6",
608 4, 0, 4);
609 m_neuroSWSelTSPrioB_Layer7 = new TH1F("NeuroSWSelTSPrioB_Layer7", "Priority bits of track segments in layer 7",
610 4, 0, 4);
611 m_neuroSWSelTSPrioB_Layer8 = new TH1F("NeuroSWSelTSPrioB_Layer8", "Priority bits of track segments in layer 8",
612 4, 0, 4);
613
614
615 m_neuroSWSelTSLR_Layer0 = new TH1F("NeuroSWSelTSLR_Layer0", "Left/Right of track segments in layer 0",
616 4, 0, 4);
617 m_neuroSWSelTSLR_Layer1 = new TH1F("NeuroSWSelTSLR_Layer1", "Left/Right of track segments in layer 1",
618 4, 0, 4);
619 m_neuroSWSelTSLR_Layer2 = new TH1F("NeuroSWSelTSLR_Layer2", "Left/Right of track segments in layer 2",
620 4, 0, 4);
621 m_neuroSWSelTSLR_Layer3 = new TH1F("NeuroSWSelTSLR_Layer3", "Left/Right of track segments in layer 3",
622 4, 0, 4);
623 m_neuroSWSelTSLR_Layer4 = new TH1F("NeuroSWSelTSLR_Layer4", "Left/Right of track segments in layer 4",
624 4, 0, 4);
625 m_neuroSWSelTSLR_Layer5 = new TH1F("NeuroSWSelTSLR_Layer5", "Left/Right of track segments in layer 5",
626 4, 0, 4);
627 m_neuroSWSelTSLR_Layer6 = new TH1F("NeuroSWSelTSLR_Layer6", "Left/Right of track segments in layer 6",
628 4, 0, 4);
629 m_neuroSWSelTSLR_Layer7 = new TH1F("NeuroSWSelTSLR_Layer7", "Left/Right of track segments in layer 7",
630 4, 0, 4);
631 m_neuroSWSelTSLR_Layer8 = new TH1F("NeuroSWSelTSLR_Layer8", "Left/Right of track segments in layer 8",
632 4, 0, 4);
633
634 m_neuroSWInputID_Layer0 = new TH1F("NeuroSWInputID_Layer0",
635 "simulated id input in layer 0; id",
636 100, -1, 1);
637 m_neuroSWInputT_Layer0 = new TH1F("NeuroSWInputT_Layer0",
638 "simulated time input in layer 0; time",
639 100, -1, 1);
640 m_neuroSWInputAlpha_Layer0 = new TH1F("NeuroSWInputAlpha_Layer0",
641 "simulated alpha input in layer 0; alpha",
642 100, -1, 1);
643 m_neuroSWInputID_Layer1 = new TH1F("NeuroSWInputID_Layer1",
644 "simulated id input in layer 1; id",
645 100, -1, 1);
646 m_neuroSWInputT_Layer1 = new TH1F("NeuroSWInputT_Layer1",
647 "simulated time input in layer 1; time",
648 100, -1, 1);
649 m_neuroSWInputAlpha_Layer1 = new TH1F("NeuroSWInputAlpha_Layer1",
650 "simulated alpha input in layer 1; alpha",
651 100, -1, 1);
652 m_neuroSWInputID_Layer2 = new TH1F("NeuroSWInputID_Layer2",
653 "simulated id input in layer 2; id",
654 100, -1, 1);
655 m_neuroSWInputT_Layer2 = new TH1F("NeuroSWInputT_Layer2",
656 "simulated time input in layer 2; time",
657 100, -1, 1);
658 m_neuroSWInputAlpha_Layer2 = new TH1F("NeuroSWInputAlpha_Layer2",
659 "simulated alpha input in layer 2; alpha",
660 100, -1, 1);
661 m_neuroSWInputID_Layer3 = new TH1F("NeuroSWInputID_Layer3",
662 "simulated id input in layer 3; id",
663 100, -1, 1);
664 m_neuroSWInputT_Layer3 = new TH1F("NeuroSWInputT_Layer3",
665 "simulated time input in layer 3; time",
666 100, -1, 1);
667 m_neuroSWInputAlpha_Layer3 = new TH1F("NeuroSWInputAlpha_Layer3",
668 "simulated alpha input in layer 3; alpha",
669 100, -1, 1);
670 m_neuroSWInputID_Layer4 = new TH1F("NeuroSWInputID_Layer4",
671 "simulated id input in layer 4; id",
672 100, -1, 1);
673 m_neuroSWInputT_Layer4 = new TH1F("NeuroSWInputT_Layer4",
674 "simulated time input in layer 4; time",
675 100, -1, 1);
676 m_neuroSWInputAlpha_Layer4 = new TH1F("NeuroSWInputAlpha_Layer4",
677 "simulated alpha input in layer 4; alpha",
678 100, -1, 1);
679 m_neuroSWInputID_Layer5 = new TH1F("NeuroSWInputID_Layer5",
680 "simulated id input in layer 5; id",
681 100, -1, 1);
682 m_neuroSWInputT_Layer5 = new TH1F("NeuroSWInputT_Layer5",
683 "simulated time input in layer 5; time",
684 100, -1, 1);
685 m_neuroSWInputAlpha_Layer5 = new TH1F("NeuroSWInputAlpha_Layer5",
686 "simulated alpha input in layer 5; alpha",
687 100, -1, 1);
688 m_neuroSWInputID_Layer6 = new TH1F("NeuroSWInputID_Layer6",
689 "simulated id input in layer 6; id",
690 100, -1, 1);
691 m_neuroSWInputT_Layer6 = new TH1F("NeuroSWInputT_Layer6",
692 "simulated time input in layer 6; time",
693 100, -1, 1);
694 m_neuroSWInputAlpha_Layer6 = new TH1F("NeuroSWInputAlpha_Layer6",
695 "simulated alpha input in layer 6; alpha",
696 100, -1, 1);
697 m_neuroSWInputID_Layer7 = new TH1F("NeuroSWInputID_Layer7",
698 "simulated id input in layer 7; id",
699 100, -1, 1);
700 m_neuroSWInputT_Layer7 = new TH1F("NeuroSWInputT_Layer7",
701 "simulated time input in layer 7; time",
702 100, -1, 1);
703 m_neuroSWInputAlpha_Layer7 = new TH1F("NeuroSWInputAlpha_Layer7",
704 "simulated alpha input in layer 7; alpha",
705 100, -1, 1);
706 m_neuroSWInputID_Layer8 = new TH1F("NeuroSWInputID_Layer8",
707 "simulated id input in layer 8; id",
708 100, -1, 1);
709 m_neuroSWInputT_Layer8 = new TH1F("NeuroSWInputT_Layer8",
710 "simulated time input in layer 8; time",
711 100, -1, 1);
712 m_neuroSWInputAlpha_Layer8 = new TH1F("NeuroSWInputAlpha_Layer8",
713 "simulated alpha input in layer 8; alpha",
714 100, -1, 1);
715 }
716
718
719 m_2DSWOutInvPt = new TH1F("2DSWOutInvPt",
720 "Inverse Pt of 2dtracks from simulation, sw TS sw 2D; p_{T}^{-1} [GeV^{-1}]",
721 50, 0, 5);
722 m_2DSWOutPhi0 = new TH1F("2DSWOutPhi0", "Phi0 of 2dtracks from simulation, sw TS sw 2D; #phi [#circ]",
723 80, 0, 360);
724 m_2DSWOutm_time = new TH1F("2DSWOutM_time", "m_time of 2dtracks from simulation, sw TS sw 2D; clock cycle",
725 96, -48, 48);
726 m_2DSWOutTrackCount = new TH1F("2DSWOutTrackCount", "number of 2dtracks per event from simulation, sw TS sw 2D", 20, 0, 20);
727
728 }
730
731 m_neuroSWTSSW2DOutZ = new TH1F("NeuroSWTSSW2DOutZ",
732 "z distribution from simulation, sw TS sw 2D; z [cm]",
733 100, -100, 100);
734 m_neuroSWTSSW2DOutCosTheta = new TH1F("NeuroSWTSSW2DOutCosTheta",
735 "cos theta distribution from simulation, sw TS sw 2D; cos(#theta) ",
736 100, -1, 1);
737 m_neuroSWTSSW2DOutInvPt = new TH1F("NeuroSWTSSW2DOutInvPt",
738 "Inverse Pt distribution from simulation, sw TS sw 2D; p_{T}^{-1} [GeV^{-1}]",
739 50, 0, 5);
740 m_neuroSWTSSW2DOutPhi0 = new TH1F("NeuroSWTSSW2DOutPhi0",
741 "phi distribution from simulation, sw TS sw 2D; #phi [#circ]",
742 80, 0, 360);
743 m_neuroSWTSSW2DOutHitPattern = new TH1F("NeuroSWTSSW2DOutHitPattern",
744 "stereo hit pattern of simulated neuro tracks, sw TS sw 2D; pattern",
745 16, 0, 16); // 4 stereo layers -> 2**4 possible patterns
746 m_neuroSWTSSW2DOutTrackCount = new TH1F("NeuroSWTSSW2DOutTrackCount",
747 "number of simulated neuro tracks per event, sw TS sw 2D",
748 20, 0, 20);
749 m_neuroSWTSSW2DSector = new TH1F("NeuroSWTSSW2DSector",
750 "sector of simulated neuro tracks, sw TS sw 2D; sector",
751 10, 0, 10);
752 // sw TS incoming
753 m_neuroSWTSSW2DInTSID = new TH1F("NeuroSWTSSW2DInTSID", "ID of simulated track segments",
754 2336, 0, 2335);
755 m_neuroSWTSSW2DInTSCount = new TH1F("NeuroSWTSSW2DInTSCount", "number of simulated TS per event", 200, 0, 800);
756 m_neuroSWTSSW2DInTSPrioT_Layer0 = new TH1F("NeuroSWTSSW2DInTSPrioT_Layer0", "Priority time of track segments in layer 0",
757 512, 0, 511);
758 m_neuroSWTSSW2DInTSPrioT_Layer1 = new TH1F("NeuroSWTSSW2DInTSPrioT_Layer1", "Priority time of track segments in layer 1",
759 512, 0, 511);
760 m_neuroSWTSSW2DInTSPrioT_Layer2 = new TH1F("NeuroSWTSSW2DInTSPrioT_Layer2", "Priority time of track segments in layer 2",
761 512, 0, 511);
762 m_neuroSWTSSW2DInTSPrioT_Layer3 = new TH1F("NeuroSWTSSW2DInTSPrioT_Layer3", "Priority time of track segments in layer 3",
763 512, 0, 511);
764 m_neuroSWTSSW2DInTSPrioT_Layer4 = new TH1F("NeuroSWTSSW2DInTSPrioT_Layer4", "Priority time of track segments in layer 4",
765 512, 0, 511);
766 m_neuroSWTSSW2DInTSPrioT_Layer5 = new TH1F("NeuroSWTSSW2DInTSPrioT_Layer5", "Priority time of track segments in layer 5",
767 512, 0, 511);
768 m_neuroSWTSSW2DInTSPrioT_Layer6 = new TH1F("NeuroSWTSSW2DInTSPrioT_Layer6", "Priority time of track segments in layer 6",
769 512, 0, 511);
770 m_neuroSWTSSW2DInTSPrioT_Layer7 = new TH1F("NeuroSWTSSW2DInTSPrioT_Layer7", "Priority time of track segments in layer 7",
771 512, 0, 511);
772 m_neuroSWTSSW2DInTSPrioT_Layer8 = new TH1F("NeuroSWTSSW2DInTSPrioT_Layer8", "Priority time of track segments in layer 8",
773 512, 0, 511);
774 m_neuroSWTSSW2DInTSFoundT_Layer0 = new TH1F("NeuroSWTSSW2DInTSFoundT_Layer0",
775 "First found time of selected TS - found time of Neuro Track in SL 0",
776 96, -47.99, 48.01);
777 m_neuroSWTSSW2DInTSFoundT_Layer1 = new TH1F("NeuroSWTSSW2DInTSFoundT_Layer1",
778 "First found time of selected TS - found time of Neuro Track in SL 1",
779 96, -47.99, 48.01);
780 m_neuroSWTSSW2DInTSFoundT_Layer2 = new TH1F("NeuroSWTSSW2DInTSFoundT_Layer2",
781 "First found time of selected TS - found time of Neuro Track in SL 2",
782 96, -47.99, 48.01);
783 m_neuroSWTSSW2DInTSFoundT_Layer3 = new TH1F("NeuroSWTSSW2DInTSFoundT_Layer3",
784 "First found time of selected TS - found time of Neuro Track in SL 3",
785 96, -47.99, 48.01);
786 m_neuroSWTSSW2DInTSFoundT_Layer4 = new TH1F("NeuroSWTSSW2DInTSFoundT_Layer4",
787 "First found time of selected TS - found time of Neuro Track in SL 4",
788 96, -47.99, 48.01);
789 m_neuroSWTSSW2DInTSFoundT_Layer5 = new TH1F("NeuroSWTSSW2DInTSFoundT_Layer5",
790 "First found time of selected TS - found time of Neuro Track in SL 5",
791 96, -47.99, 48.01);
792 m_neuroSWTSSW2DInTSFoundT_Layer6 = new TH1F("NeuroSWTSSW2DInTSFoundT_Layer6",
793 "First found time of selected TS - found time of Neuro Track in SL 6",
794 96, -47.99, 48.01);
795 m_neuroSWTSSW2DInTSFoundT_Layer7 = new TH1F("NeuroSWTSSW2DInTSFoundT_Layer7",
796 "First found time of selected TS - found time of Neuro Track in SL 7",
797 96, -47.99, 48.01);
798 m_neuroSWTSSW2DInTSFoundT_Layer8 = new TH1F("NeuroSWTSSW2DInTSFoundT_Layer8",
799 "First found time of selected TS - found time of Neuro Track in SL 8",
800 96, -47.99, 48.01);
801
802
803 m_neuroSWTSSW2DInTSPrioB_Layer0 = new TH1F("NeuroSWTSSW2DInTSPrioB_Layer0", "Priority bits of track segments in layer 0",
804 4, 0, 4);
805 m_neuroSWTSSW2DInTSPrioB_Layer1 = new TH1F("NeuroSWTSSW2DInTSPrioB_Layer1", "Priority bits of track segments in layer 1",
806 4, 0, 4);
807 m_neuroSWTSSW2DInTSPrioB_Layer2 = new TH1F("NeuroSWTSSW2DInTSPrioB_Layer2", "Priority bits of track segments in layer 2",
808 4, 0, 4);
809 m_neuroSWTSSW2DInTSPrioB_Layer3 = new TH1F("NeuroSWTSSW2DInTSPrioB_Layer3", "Priority bits of track segments in layer 3",
810 4, 0, 4);
811 m_neuroSWTSSW2DInTSPrioB_Layer4 = new TH1F("NeuroSWTSSW2DInTSPrioB_Layer4", "Priority bits of track segments in layer 4",
812 4, 0, 4);
813 m_neuroSWTSSW2DInTSPrioB_Layer5 = new TH1F("NeuroSWTSSW2DInTSPrioB_Layer5", "Priority bits of track segments in layer 5",
814 4, 0, 4);
815 m_neuroSWTSSW2DInTSPrioB_Layer6 = new TH1F("NeuroSWTSSW2DInTSPrioB_Layer6", "Priority bits of track segments in layer 6",
816 4, 0, 4);
817 m_neuroSWTSSW2DInTSPrioB_Layer7 = new TH1F("NeuroSWTSSW2DInTSPrioB_Layer7", "Priority bits of track segments in layer 7",
818 4, 0, 4);
819 m_neuroSWTSSW2DInTSPrioB_Layer8 = new TH1F("NeuroSWTSSW2DInTSPrioB_Layer8", "Priority bits of track segments in layer 8",
820 4, 0, 4);
821
822
823 m_neuroSWTSSW2DInTSLR_Layer0 = new TH1F("NeuroSWTSSW2DInTSLR_Layer0", "Left/Right of track segments in layer 0",
824 4, 0, 4);
825 m_neuroSWTSSW2DInTSLR_Layer1 = new TH1F("NeuroSWTSSW2DInTSLR_Layer1", "Left/Right of track segments in layer 1",
826 4, 0, 4);
827 m_neuroSWTSSW2DInTSLR_Layer2 = new TH1F("NeuroSWTSSW2DInTSLR_Layer2", "Left/Right of track segments in layer 2",
828 4, 0, 4);
829 m_neuroSWTSSW2DInTSLR_Layer3 = new TH1F("NeuroSWTSSW2DInTSLR_Layer3", "Left/Right of track segments in layer 3",
830 4, 0, 4);
831 m_neuroSWTSSW2DInTSLR_Layer4 = new TH1F("NeuroSWTSSW2DInTSLR_Layer4", "Left/Right of track segments in layer 4",
832 4, 0, 4);
833 m_neuroSWTSSW2DInTSLR_Layer5 = new TH1F("NeuroSWTSSW2DInTSLR_Layer5", "Left/Right of track segments in layer 5",
834 4, 0, 4);
835 m_neuroSWTSSW2DInTSLR_Layer6 = new TH1F("NeuroSWTSSW2DInTSLR_Layer6", "Left/Right of track segments in layer 6",
836 4, 0, 4);
837 m_neuroSWTSSW2DInTSLR_Layer7 = new TH1F("NeuroSWTSSW2DInTSLR_Layer7", "Left/Right of track segments in layer 7",
838 4, 0, 4);
839 m_neuroSWTSSW2DInTSLR_Layer8 = new TH1F("NeuroSWTSSW2DInTSLR_Layer8", "Left/Right of track segments in layer 8",
840 4, 0, 4);
841
842
843 // sw TS selected
844 m_neuroSWTSSW2DSelTSID = new TH1F("NeuroSWTSSW2DSelTSID", "ID of selected track segments",
845 2336, 0, 2335);
846 m_neuroSWTSSW2DSelTSCount = new TH1F("NeuroSWTSSW2DSelTSCount", "number of selected TS per SL; sl", 9, 0, 9);
847 m_neuroSWTSSW2DSelTSPrioT_Layer0 = new TH1F("NeuroSWTSSW2DSelTSPrioT_Layer0", "Priority time of track segments in layer 0",
848 512, 0, 511);
849 m_neuroSWTSSW2DSelTSPrioT_Layer1 = new TH1F("NeuroSWTSSW2DSelTSPrioT_Layer1", "Priority time of track segments in layer 1",
850 512, 0, 511);
851 m_neuroSWTSSW2DSelTSPrioT_Layer2 = new TH1F("NeuroSWTSSW2DSelTSPrioT_Layer2", "Priority time of track segments in layer 2",
852 512, 0, 511);
853 m_neuroSWTSSW2DSelTSPrioT_Layer3 = new TH1F("NeuroSWTSSW2DSelTSPrioT_Layer3", "Priority time of track segments in layer 3",
854 512, 0, 511);
855 m_neuroSWTSSW2DSelTSPrioT_Layer4 = new TH1F("NeuroSWTSSW2DSelTSPrioT_Layer4", "Priority time of track segments in layer 4",
856 512, 0, 511);
857 m_neuroSWTSSW2DSelTSPrioT_Layer5 = new TH1F("NeuroSWTSSW2DSelTSPrioT_Layer5", "Priority time of track segments in layer 5",
858 512, 0, 511);
859 m_neuroSWTSSW2DSelTSPrioT_Layer6 = new TH1F("NeuroSWTSSW2DSelTSPrioT_Layer6", "Priority time of track segments in layer 6",
860 512, 0, 511);
861 m_neuroSWTSSW2DSelTSPrioT_Layer7 = new TH1F("NeuroSWTSSW2DSelTSPrioT_Layer7", "Priority time of track segments in layer 7",
862 512, 0, 511);
863 m_neuroSWTSSW2DSelTSPrioT_Layer8 = new TH1F("NeuroSWTSSW2DSelTSPrioT_Layer8", "Priority time of track segments in layer 8",
864 512, 0, 511);
865 m_neuroSWTSSW2DSelTSFoundT_Layer0 = new TH1F("NeuroSWTSSW2DSelTSFoundT_Layer0",
866 "First found time of selected TS - found time of Neuro Track in SL 0",
867 96, -47.99, 48.01);
868 m_neuroSWTSSW2DSelTSFoundT_Layer1 = new TH1F("NeuroSWTSSW2DSelTSFoundT_Layer1",
869 "First found time of selected TS - found time of Neuro Track in SL 1",
870 96, -47.99, 48.01);
871 m_neuroSWTSSW2DSelTSFoundT_Layer2 = new TH1F("NeuroSWTSSW2DSelTSFoundT_Layer2",
872 "First found time of selected TS - found time of Neuro Track in SL 2",
873 96, -47.99, 48.01);
874 m_neuroSWTSSW2DSelTSFoundT_Layer3 = new TH1F("NeuroSWTSSW2DSelTSFoundT_Layer3",
875 "First found time of selected TS - found time of Neuro Track in SL 3",
876 96, -47.99, 48.01);
877 m_neuroSWTSSW2DSelTSFoundT_Layer4 = new TH1F("NeuroSWTSSW2DSelTSFoundT_Layer4",
878 "First found time of selected TS - found time of Neuro Track in SL 4",
879 96, -47.99, 48.01);
880 m_neuroSWTSSW2DSelTSFoundT_Layer5 = new TH1F("NeuroSWTSSW2DSelTSFoundT_Layer5",
881 "First found time of selected TS - found time of Neuro Track in SL 5",
882 96, -47.99, 48.01);
883 m_neuroSWTSSW2DSelTSFoundT_Layer6 = new TH1F("NeuroSWTSSW2DSelTSFoundT_Layer6",
884 "First found time of selected TS - found time of Neuro Track in SL 6",
885 96, -47.99, 48.01);
886 m_neuroSWTSSW2DSelTSFoundT_Layer7 = new TH1F("NeuroSWTSSW2DSelTSFoundT_Layer7",
887 "First found time of selected TS - found time of Neuro Track in SL 7",
888 96, -47.99, 48.01);
889 m_neuroSWTSSW2DSelTSFoundT_Layer8 = new TH1F("NeuroSWTSSW2DSelTSFoundT_Layer8",
890 "First found time of selected TS - found time of Neuro Track in SL 8",
891 96, -47.99, 48.01);
892
893
894 m_neuroSWTSSW2DSelTSPrioB_Layer0 = new TH1F("NeuroSWTSSW2DSelTSPrioB_Layer0", "Priority bits of track segments in layer 0",
895 4, 0, 4);
896 m_neuroSWTSSW2DSelTSPrioB_Layer1 = new TH1F("NeuroSWTSSW2DSelTSPrioB_Layer1", "Priority bits of track segments in layer 1",
897 4, 0, 4);
898 m_neuroSWTSSW2DSelTSPrioB_Layer2 = new TH1F("NeuroSWTSSW2DSelTSPrioB_Layer2", "Priority bits of track segments in layer 2",
899 4, 0, 4);
900 m_neuroSWTSSW2DSelTSPrioB_Layer3 = new TH1F("NeuroSWTSSW2DSelTSPrioB_Layer3", "Priority bits of track segments in layer 3",
901 4, 0, 4);
902 m_neuroSWTSSW2DSelTSPrioB_Layer4 = new TH1F("NeuroSWTSSW2DSelTSPrioB_Layer4", "Priority bits of track segments in layer 4",
903 4, 0, 4);
904 m_neuroSWTSSW2DSelTSPrioB_Layer5 = new TH1F("NeuroSWTSSW2DSelTSPrioB_Layer5", "Priority bits of track segments in layer 5",
905 4, 0, 4);
906 m_neuroSWTSSW2DSelTSPrioB_Layer6 = new TH1F("NeuroSWTSSW2DSelTSPrioB_Layer6", "Priority bits of track segments in layer 6",
907 4, 0, 4);
908 m_neuroSWTSSW2DSelTSPrioB_Layer7 = new TH1F("NeuroSWTSSW2DSelTSPrioB_Layer7", "Priority bits of track segments in layer 7",
909 4, 0, 4);
910 m_neuroSWTSSW2DSelTSPrioB_Layer8 = new TH1F("NeuroSWTSSW2DSelTSPrioB_Layer8", "Priority bits of track segments in layer 8",
911 4, 0, 4);
912
913
914 m_neuroSWTSSW2DSelTSLR_Layer0 = new TH1F("NeuroSWTSSW2DSelTSLR_Layer0", "Left/Right of track segments in layer 0",
915 4, 0, 4);
916 m_neuroSWTSSW2DSelTSLR_Layer1 = new TH1F("NeuroSWTSSW2DSelTSLR_Layer1", "Left/Right of track segments in layer 1",
917 4, 0, 4);
918 m_neuroSWTSSW2DSelTSLR_Layer2 = new TH1F("NeuroSWTSSW2DSelTSLR_Layer2", "Left/Right of track segments in layer 2",
919 4, 0, 4);
920 m_neuroSWTSSW2DSelTSLR_Layer3 = new TH1F("NeuroSWTSSW2DSelTSLR_Layer3", "Left/Right of track segments in layer 3",
921 4, 0, 4);
922 m_neuroSWTSSW2DSelTSLR_Layer4 = new TH1F("NeuroSWTSSW2DSelTSLR_Layer4", "Left/Right of track segments in layer 4",
923 4, 0, 4);
924 m_neuroSWTSSW2DSelTSLR_Layer5 = new TH1F("NeuroSWTSSW2DSelTSLR_Layer5", "Left/Right of track segments in layer 5",
925 4, 0, 4);
926 m_neuroSWTSSW2DSelTSLR_Layer6 = new TH1F("NeuroSWTSSW2DSelTSLR_Layer6", "Left/Right of track segments in layer 6",
927 4, 0, 4);
928 m_neuroSWTSSW2DSelTSLR_Layer7 = new TH1F("NeuroSWTSSW2DSelTSLR_Layer7", "Left/Right of track segments in layer 7",
929 4, 0, 4);
930 m_neuroSWTSSW2DSelTSLR_Layer8 = new TH1F("NeuroSWTSSW2DSelTSLR_Layer8", "Left/Right of track segments in layer 8",
931 4, 0, 4);
932 m_neuroSWTSSW2DInputID_Layer0 = new TH1F("NeuroSWTSSW2DInputID_Layer0",
933 "simulated id input in layer 0; id",
934 100, -1, 1);
935 m_neuroSWTSSW2DInputT_Layer0 = new TH1F("NeuroSWTSSW2DInputT_Layer0",
936 "simulated time input in layer 0; time",
937 100, -1, 1);
938 m_neuroSWTSSW2DInputAlpha_Layer0 = new TH1F("NeuroSWTSSW2DInputAlpha_Layer0",
939 "simulated alpha input in layer 0; alpha",
940 100, -1, 1);
941 m_neuroSWTSSW2DInputID_Layer1 = new TH1F("NeuroSWTSSW2DInputID_Layer1",
942 "simulated id input in layer 1; id",
943 100, -1, 1);
944 m_neuroSWTSSW2DInputT_Layer1 = new TH1F("NeuroSWTSSW2DInputT_Layer1",
945 "simulated time input in layer 1; time",
946 100, -1, 1);
947 m_neuroSWTSSW2DInputAlpha_Layer1 = new TH1F("NeuroSWTSSW2DInputAlpha_Layer1",
948 "simulated alpha input in layer 1; alpha",
949 100, -1, 1);
950 m_neuroSWTSSW2DInputID_Layer2 = new TH1F("NeuroSWTSSW2DInputID_Layer2",
951 "simulated id input in layer 2; id",
952 100, -1, 1);
953 m_neuroSWTSSW2DInputT_Layer2 = new TH1F("NeuroSWTSSW2DInputT_Layer2",
954 "simulated time input in layer 2; time",
955 100, -1, 1);
956 m_neuroSWTSSW2DInputAlpha_Layer2 = new TH1F("NeuroSWTSSW2DInputAlpha_Layer2",
957 "simulated alpha input in layer 2; alpha",
958 100, -1, 1);
959 m_neuroSWTSSW2DInputID_Layer3 = new TH1F("NeuroSWTSSW2DInputID_Layer3",
960 "simulated id input in layer 3; id",
961 100, -1, 1);
962 m_neuroSWTSSW2DInputT_Layer3 = new TH1F("NeuroSWTSSW2DInputT_Layer3",
963 "simulated time input in layer 3; time",
964 100, -1, 1);
965 m_neuroSWTSSW2DInputAlpha_Layer3 = new TH1F("NeuroSWTSSW2DInputAlpha_Layer3",
966 "simulated alpha input in layer 3; alpha",
967 100, -1, 1);
968 m_neuroSWTSSW2DInputID_Layer4 = new TH1F("NeuroSWTSSW2DInputID_Layer4",
969 "simulated id input in layer 4; id",
970 100, -1, 1);
971 m_neuroSWTSSW2DInputT_Layer4 = new TH1F("NeuroSWTSSW2DInputT_Layer4",
972 "simulated time input in layer 4; time",
973 100, -1, 1);
974 m_neuroSWTSSW2DInputAlpha_Layer4 = new TH1F("NeuroSWTSSW2DInputAlpha_Layer4",
975 "simulated alpha input in layer 4; alpha",
976 100, -1, 1);
977 m_neuroSWTSSW2DInputID_Layer5 = new TH1F("NeuroSWTSSW2DInputID_Layer5",
978 "simulated id input in layer 5; id",
979 100, -1, 1);
980 m_neuroSWTSSW2DInputT_Layer5 = new TH1F("NeuroSWTSSW2DInputT_Layer5",
981 "simulated time input in layer 5; time",
982 100, -1, 1);
983 m_neuroSWTSSW2DInputAlpha_Layer5 = new TH1F("NeuroSWTSSW2DInputAlpha_Layer5",
984 "simulated alpha input in layer 5; alpha",
985 100, -1, 1);
986 m_neuroSWTSSW2DInputID_Layer6 = new TH1F("NeuroSWTSSW2DInputID_Layer6",
987 "simulated id input in layer 6; id",
988 100, -1, 1);
989 m_neuroSWTSSW2DInputT_Layer6 = new TH1F("NeuroSWTSSW2DInputT_Layer6",
990 "simulated time input in layer 6; time",
991 100, -1, 1);
992 m_neuroSWTSSW2DInputAlpha_Layer6 = new TH1F("NeuroSWTSSW2DInputAlpha_Layer6",
993 "simulated alpha input in layer 6; alpha",
994 100, -1, 1);
995 m_neuroSWTSSW2DInputID_Layer7 = new TH1F("NeuroSWTSSW2DInputID_Layer7",
996 "simulated id input in layer 7; id",
997 100, -1, 1);
998 m_neuroSWTSSW2DInputT_Layer7 = new TH1F("NeuroSWTSSW2DInputT_Layer7",
999 "simulated time input in layer 7; time",
1000 100, -1, 1);
1001 m_neuroSWTSSW2DInputAlpha_Layer7 = new TH1F("NeuroSWTSSW2DInputAlpha_Layer7",
1002 "simulated alpha input in layer 7; alpha",
1003 100, -1, 1);
1004 m_neuroSWTSSW2DInputID_Layer8 = new TH1F("NeuroSWTSSW2DInputID_Layer8",
1005 "simulated id input in layer 8; id",
1006 100, -1, 1);
1007 m_neuroSWTSSW2DInputT_Layer8 = new TH1F("NeuroSWTSSW2DInputT_Layer8",
1008 "simulated time input in layer 8; time",
1009 100, -1, 1);
1010 m_neuroSWTSSW2DInputAlpha_Layer8 = new TH1F("NeuroSWTSSW2DInputAlpha_Layer8",
1011 "simulated alpha input in layer 8; alpha",
1012 100, -1, 1);
1013 }
1014
1015
1016
1018 m_neuroDeltaZ = new TH1F("NeuroDeltaZ",
1019 "difference between unpacked and simulated neuro z; #Delta z [cm]",
1020 100, -100, 100); // should be bit-precise, so look at very small range
1021 m_neuroDeltaTheta = new TH1F("NeuroDeltaTheta",
1022 "difference between unpacked and simulated neuro theta; #Delta #theta [#circ]",
1023 100, -180, 180); // should be bit-precise, so look at very small range
1024 m_neuroScatterZ = new TH2F("NeuroScatterZ",
1025 "unpacked z vs TSIM; hw z [cm]; sw z [cm]",
1026 100, -150, 150, 100, -150, 150);
1027 m_neuroScatterTheta = new TH2F("NeuroScatterTheta",
1028 "unpacked theta vs TSIM; hw #theta [#circ]; sw #theta [#circ]",
1029 100, 0, 270, 100, 0, 270);
1030
1031 m_neuroDeltaInputID = new TH1F("NeuroDeltaInputID",
1032 "difference between unpacked and simulated ID input; #Delta ID",
1033 100, -0.5, 0.5); // should be bit-precise, so look at very small range
1034 m_neuroDeltaInputT = new TH1F("NeuroDeltaInputT",
1035 "difference between unpacked and simulated time input; #Delta t",
1036 100, -0.5, 0.5); // should be bit-precise, so look at very small range
1037 m_neuroDeltaInputAlpha = new TH1F("NeuroDeltaInputAlpha",
1038 "difference between unpacked and simulated alpha input; #Delta alpha",
1039 100, -0.1, 0.1); // should be bit-precise, so look at very small range
1040 m_neuroDeltaTSID = new TH1F("NeuroDeltaTSID",
1041 "difference between unpacked and simulated tsid; #Delta TSID",
1042 100, -50, 50);
1043 m_neuroDeltaSector = new TH1F("NeuroDeltaSector",
1044 "difference between unpacked and simulated sector; #Delta sector",
1045 20, -10, 10);
1046 m_simSameTS = new TH1F("NeuroSimSameTS",
1047 "number of TS selected in both, unpacked and TSIM tracks",
1048 20, 0, 20);
1049 m_simDiffTS = new TH1F("NeuroSimDiffTS",
1050 "number of TS selcted in TSIM but not in unpacker",
1051 20, 0, 20);
1052 }
1053
1054 if (m_recoTracksName != "") {
1055 //RecoTracks
1056 m_RecoZ = new TH1F("RecoZ",
1057 "z distribution of reconstructed tracks;z [cm]",
1058 100, -150, 150);
1059 m_RecoCosTheta = new TH1F("RecoCosTheta",
1060 "cos theta distribution of reconstructed tracks; cos(#theta) ",
1061 100, -1, 1);
1062 m_RecoInvPt = new TH1F("RecoInvPt",
1063 "Pt distribution of reconstructed tracks; p_{T}^{-1} [GeV^{-1}]",
1064 50, 0, 5);
1065 m_RecoPhi = new TH1F("RecoPhi",
1066 "phi distribution of reconstructed tracks ; #phi [#circ]",
1067 80, 0, 360);
1068 m_RecoD0 = new TH1F("RecoD0",
1069 "d0 distribution of reconstructed tracks ; d_{0} [cm]",
1070 100, 0, 10);
1071 m_RecoTrackCount = new TH1F("RecoTrackCount",
1072 "number of reconstructed tracks per event",
1073 20, 0, 20);
1074 }
1075 if (m_recoTracksName != "" && m_unpackedNeuroTracksName != "") {
1076 //RecoTracks matched to unpacked neuro tracks
1077 m_RecoHWZ = new TH1F("RecoHWZ",
1078 "hw matched z distribution of reconstructed tracks; z [cm]",
1079 100, -150, 150);
1080 m_RecoHWCosTheta = new TH1F("RecoHWCosTheta",
1081 "hw matched cos theta distribution of reconstructed tracks; cos(#theta) ",
1082 100, -1, 1);
1083 m_RecoHWInvPt = new TH1F("RecoHWInvPt",
1084 "hw matched Pt distribution of reconstructed tracks; p_{T}^{-1} [GeV^{-1}]",
1085 50, 0, 5);
1086 m_RecoHWPhi = new TH1F("RecoHWPhi",
1087 "hw matched phi distribution of reconstructed tracks; #phi [#circ]",
1088 80, 0, 360);
1089 m_RecoHWD0 = new TH1F("RecoHWD0",
1090 "hw matched d0 distribution of reconstructed tracks ; d_{0} [cm]",
1091 100, 0, 10);
1092 // hw neuro values for tracks matched to reco tracks
1093 m_neuroRecoHWOutZ = new TH1F("NeuroRecoHWOutZ",
1094 "reco matched z distribution of unpacked neuro tracks; z [cm]",
1095 100, -100, 100);
1096 m_neuroRecoHWOutCosTheta = new TH1F("NeuroRecoHWOutCosTheta",
1097 "reco matched cos theta distribution of unpacked neuro tracks; cos(#theta) ",
1098 100, -1, 1);
1099 m_neuroRecoHWOutInvPt = new TH1F("NeuroRecoHWOutInvPt",
1100 "reco matched Pt distribution of unpacked neuro tracks; p_{T}^{-1} [GeV^{-1}]",
1101 50, 0, 5);
1102 m_neuroRecoHWOutPhi0 = new TH1F("NeuroRecoHWOutPhi0",
1103 "reco matched phi distribution of unpacked neuro tracks; #phi [#circ]",
1104 80, 0, 360); // shift to reduce the binning error
1105 m_neuroRecoHWOutHitPattern = new TH1F("NeuroRecoUnpackedHitPattern",
1106 "reco matched stereo hit pattern of unpacked neuro tracks; pattern",
1107 16, 0, 16); // 4 stereo layers -> 2**4 possible patterns
1108 m_neuroRecoHWOutTrackCount = new TH1F("NeuroRecoHWOutTrackCount",
1109 "reco matched number of unpacked neuro tracks per event",
1110 20, 0, 20);
1111 m_neuroRecoHWSector = new TH1F("NeuroRecoHWSector",
1112 "reco matched sector of unpacked neuro tracks; sector",
1113 10, 0, 10);
1114
1115
1116 m_DeltaRecoHWZ = new TH1F("DeltaRecoHWZ",
1117 "difference between reconstructed and unpacked neuro z; #Delta z [cm]",
1118 100, -100, 100);
1119 m_DeltaRecoHWCosTheta = new TH1F("DeltaRecoHWCosTheta",
1120 "difference between reconstructed and unpacked neuro cos(theta); #Delta cos(#theta)",
1121 100, -1, 1);
1122 m_DeltaRecoHWInvPt = new TH1F("DeltaRecoHWInvPt",
1123 "difference between reconstructed and unpacked neuro Pt; #Delta p_{T}^{-1} [GeV^{-1}]",
1124 100, -10, 10);
1125 m_DeltaRecoHWPhi = new TH1F("DeltaRecoHWPhi",
1126 "difference between reconstructed and unpacked neuro phi; #Delta #phi [#circ]",
1127 80, -180, 180);
1128 }
1130 m_RecoHWZScatter = new TH2F("RecoHWZScatter",
1131 "hw matched reconstruction; reco z [cm]; hw z [cm]",
1132 100, -150, 150, 100, -150, 150);
1133 }
1134
1135
1136
1137 if (!m_limitedoutput && m_simNeuroTracksName != "") {
1138 //RecoTracks matched to simulated neuro tracks (hw TS hw 2D sw NN)
1139 m_RecoSWZ = new TH1F("RecoSWZ",
1140 "sw matched z distribution of reconstructed tracks; z [cm]",
1141 100, -150, 150); // 1cm bins from -50cm to 50cm
1142 m_RecoSWCosTheta = new TH1F("RecoSWCosTheta",
1143 "sw matched cos theta distribution of reconstructed tracks; cos(#theta) ",
1144 100, -1, 1);
1145 m_RecoSWInvPt = new TH1F("RecoSWInvPt",
1146 "sw matched Pt distribution of reconstructed tracks; p_{T}^{-1} [GeV^{-1}]",
1147 50, 0, 5);
1148 m_RecoSWPhi = new TH1F("RecoSWPhi",
1149 "sw matched phi distribution of reconstructed tracks ; #phi [#circ]",
1150 80, 0, 360);
1151 m_RecoSWD0 = new TH1F("RecoSWD0",
1152 "sw matched d0 distribution of reconstructed tracks ; d_{0} [cm]",
1153 100, 0, 10);
1154 m_RecoSWZScatter = new TH2F("RecoSWZScatter",
1155 "sw matched reconstruction; reco z [cm]; sw z [cm]",
1156 100, -150, 150, 100, -150, 150);
1157
1158
1159 // sw neuro values for tracks matched to reco tracks
1160 m_neuroRecoSWOutZ = new TH1F("NeuroRecoSWOutZ",
1161 "reco matched z distribution from simulation; z [cm]",
1162 100, -100, 100);
1163 m_neuroRecoSWOutCosTheta = new TH1F("NeuroRecoSWOutCosTheta",
1164 "reco matched cos theta distribution from simulation; cos(#theta) ",
1165 100, -1, 1);
1166 m_neuroRecoSWOutInvPt = new TH1F("NeuroRecoSWOutInvPt",
1167 "reco matched Pt distribution from simulation; p_{T}^{-1} [GeV^{-1}]",
1168 50, 0, 5);
1169 m_neuroRecoSWOutPhi0 = new TH1F("NeuroRecoSWOutPhi0",
1170 "reco matched phi distribution from simulation; #phi [#circ]",
1171 80, 0, 360); // shift to reduce the binning error
1172 m_neuroRecoSWOutHitPattern = new TH1F("NeuroRecoSWHitPattern",
1173 "reco matched stereo hit pattern from simulation; pattern",
1174 16, 0, 16); // 4 stereo layers -> 2**4 possible patterns
1175 m_neuroRecoSWOutTrackCount = new TH1F("NeuroRecoSWOutTrackCount",
1176 "reco matched number of SW neuro tracks per event",
1177 20, 0, 20);
1178 m_neuroRecoSWSector = new TH1F("NeuroRecoSWSector",
1179 "reco matched sector from simulation; sector",
1180 10, 0, 10);
1181
1182
1183 m_DeltaRecoSWZ = new TH1F("DeltaRecoSWZ",
1184 "difference between reconstructed and simulated neuro z; #Delta z [cm]",
1185 100, -100, 100);
1186 m_DeltaRecoSWCosTheta = new TH1F("DeltaRecoSWCosTheta",
1187 "difference between reconstructed and simulated neuro cos(theta); #Delta cos(#theta)",
1188 100, -1, 1);
1189 m_DeltaRecoSWInvPt = new TH1F("DeltaRecoSWInvPt",
1190 "difference between reconstructed and simulated neuro Pt; #Delta p_{T}^{-1} [GeV^{-1}]",
1191 100, -10, 10);
1192 m_DeltaRecoSWPhi = new TH1F("DeltaRecoSWPhi",
1193 "difference between reconstructed and simulated neuro phi; #Delta #phi [#circ]",
1194 80, -180, 180);
1195 }
1196
1197
1199 //RecoTracks matched to simulated neuro tracks (sw TS sw 2D sw NN)
1200 m_RecoSWTSSW2DZ = new TH1F("RecoSWTSSW2DZ",
1201 "sw matched z distribution of reconstructed tracks; z [cm]",
1202 100, -150, 150); // 1cm bins from -50cm to 50cm
1203 m_RecoSWTSSW2DCosTheta = new TH1F("RecoSWTSSW2DCosTheta",
1204 "sw matched cos theta distribution of reconstructed tracks; cos(#theta) ",
1205 100, -1, 1);
1206 m_RecoSWTSSW2DInvPt = new TH1F("RecoSWTSSW2DInvPt",
1207 "sw matched Pt distribution of reconstructed tracks; p_{T}^{-1} [GeV^{-1}]",
1208 50, 0, 5);
1209 m_RecoSWTSSW2DPhi = new TH1F("RecoSWTSSW2DPhi",
1210 "sw matched phi distribution of reconstructed tracks ; #phi [#circ]",
1211 80, 0, 360);
1212 m_RecoSWTSSW2DD0 = new TH1F("RecoSWTSSW2DD0",
1213 "sw matched d0 distribution of reconstructed tracks ; d_{0} [cm]",
1214 100, 0, 10);
1215 m_RecoSWTSSW2DZScatter = new TH2F("RecoSWTSSW2DZScatter",
1216 "sw matched reconstruction; reco z [cm]; sw z [cm]",
1217 100, -150, 150, 100, -150, 150);
1218
1219
1220 // sw neuro values for tracks matched to reco tracks (sw TS, sw 2D)
1221 m_neuroRecoSWTSSW2DOutZ = new TH1F("NeuroRecoSWTSSW2DOutZ",
1222 "reco matched z distribution from simulation; z [cm]",
1223 100, -100, 100);
1224 m_neuroRecoSWTSSW2DOutCosTheta = new TH1F("NeuroRecoSWTSSW2DOutCosTheta",
1225 "reco matched cos theta distribution from simulation; cos(#theta) ",
1226 100, -1, 1);
1227 m_neuroRecoSWTSSW2DOutInvPt = new TH1F("NeuroRecoSWTSSW2DOutInvPt",
1228 "reco matched Pt distribution from simulation; p_{T}^{-1} [GeV^{-1}]",
1229 50, 0, 5);
1230 m_neuroRecoSWTSSW2DOutPhi0 = new TH1F("NeuroRecoSWTSSW2DOutPhi0",
1231 "reco matched phi distribution from simulation; #phi [#circ]",
1232 80, 0, 360); // shift to reduce the binning error
1233 m_neuroRecoSWTSSW2DOutHitPattern = new TH1F("NeuroRecoSWTSSW2DHitPattern",
1234 "reco matched stereo hit pattern from simulation; pattern",
1235 16, 0, 16); // 4 stereo layers -> 2**4 possible patterns
1236 m_neuroRecoSWTSSW2DOutTrackCount = new TH1F("NeuroRecoSWTSSW2DOutTrackCount",
1237 "reco matched number of SW neuro tracks per event",
1238 20, 0, 20);
1239 m_neuroRecoSWTSSW2DSector = new TH1F("NeuroRecoSWTSSW2DSector",
1240 "reco matched sector from simulation; sector",
1241 10, 0, 10);
1242
1243
1244 m_DeltaRecoSWTSSW2DZ = new TH1F("DeltaRecoSWTSSW2DZ",
1245 "difference between reconstructed and simulated neuro z; #Delta z [cm]",
1246 100, -100, 100);
1247 m_DeltaRecoSWTSSW2DCosTheta = new TH1F("DeltaRecoSWTSSW2DCosTheta",
1248 "difference between reconstructed and simulated neuro cos(theta); #Delta cos(#theta)",
1249 100, -1, 1);
1250 m_DeltaRecoSWTSSW2DInvPt = new TH1F("DeltaRecoSWTSSW2DInvPt",
1251 "difference between reconstructed and simulated neuro Pt; #Delta p_{T}^{-1} [GeV^{-1}]",
1252 100, -10, 10);
1253 m_DeltaRecoSWTSSW2DPhi = new TH1F("DeltaRecoSWTSSW2DPhi",
1254 "difference between reconstructed and simulated neuro phi;#Delta #phi [#circ]",
1255 80, -180, 180);
1256 }
1257
1258 // cd back to root directory
1259 oldDir->cd();
1260}
1261
1262
1264{
1265 // Register histograms (calls back defineHisto)
1266 REG_HISTOGRAM
1267 m_eventTime.isRequired("CDCTriggerNeuroETFT0");
1268 if (m_showRecoTracks && m_recoTracksName == "") {
1269 m_recoTracksName = "RecoTracks";
1270 }
1271 if (m_unpackedSegmentHitsName != "") {
1273 }
1274 if (m_unpacked2DTracksName != "") {
1276 }
1277 if (m_unpackedNeuroTracksName != "") {
1286 }
1287
1288 if (!m_limitedoutput && m_simNeuroTracksName != "") {
1295 }
1305 }
1306 if (m_recoTracksName != "") {
1307 m_RecoTracks.isRequired("RecoTracks");
1309 }
1310 if (!m_limitedoutput && m_recoTracksName != "" && m_simNeuroTracksName != "") {
1312 }
1315 }
1316}
1317
1319{
1320 // Just to make sure, reset all the histograms.
1321 if (m_unpackedNeuroTracksName != "") {
1322
1323 m_neuroHWOutZ->Reset();
1324 m_neuroHWOutCosTheta->Reset();
1325 m_neuroHWOutInvPt->Reset();
1326 m_neuroHWOutPt->Reset();
1327 m_neuroHWOutPhi0->Reset();
1328 m_neuroHWOutHitPattern->Reset();
1329 m_neuroHWOutm_time->Reset();
1330 m_neuroHWOutTrackCount->Reset();
1332 m_neuroHWSector->Reset();
1333
1334 m_neuroHWInInvPt->Reset();
1335 m_neuroHWInPhi0->Reset();
1336 m_neuroHWInm_time->Reset();
1337 m_neuroHWInTrackCount->Reset();
1338
1339 m_neuroHWInTSID->Reset();
1340 m_neuroHWInTSCount->Reset();
1341
1342 m_neuroHWSelTSID->Reset();
1343 m_neuroHWSelTSCount->Reset();
1344 }
1345 if (m_unpacked2DTracksName != "") {
1346 m_2DHWOutInvPt->Reset();
1347 m_2DHWOutPhi0->Reset();
1348 m_2DHWOutm_time->Reset();
1349 m_2DHWOutTrackCount->Reset();
1350
1351 }
1354 }
1356 m_neuroHWOutQuad5Z->Reset();
1358 m_neuroHWOutQuad5InvPt->Reset();
1359 m_neuroHWOutQuad5Phi0->Reset();
1360 m_neuroHWOutQuad0Z->Reset();
1362 m_neuroHWOutQuad0InvPt->Reset();
1363 m_neuroHWOutQuad0Phi0->Reset();
1364 m_neuroHWOutQuad1Z->Reset();
1366 m_neuroHWOutQuad1InvPt->Reset();
1367 m_neuroHWOutQuad1Phi0->Reset();
1368 m_neuroHWOutQuad2Z->Reset();
1370 m_neuroHWOutQuad2InvPt->Reset();
1371 m_neuroHWOutQuad2Phi0->Reset();
1372 m_neuroHWOutQuad3Z->Reset();
1374 m_neuroHWOutQuad3InvPt->Reset();
1375 m_neuroHWOutQuad3Phi0->Reset();
1376
1395
1405 m_neuroHWInTSLR_Layer0->Reset();
1406 m_neuroHWInTSLR_Layer1->Reset();
1407 m_neuroHWInTSLR_Layer2->Reset();
1408 m_neuroHWInTSLR_Layer3->Reset();
1409 m_neuroHWInTSLR_Layer4->Reset();
1410 m_neuroHWInTSLR_Layer5->Reset();
1411 m_neuroHWInTSLR_Layer6->Reset();
1412 m_neuroHWInTSLR_Layer7->Reset();
1413 m_neuroHWInTSLR_Layer8->Reset();
1414
1433
1443 m_neuroHWSelTSLR_Layer0->Reset();
1444 m_neuroHWSelTSLR_Layer1->Reset();
1445 m_neuroHWSelTSLR_Layer2->Reset();
1446 m_neuroHWSelTSLR_Layer3->Reset();
1447 m_neuroHWSelTSLR_Layer4->Reset();
1448 m_neuroHWSelTSLR_Layer5->Reset();
1449 m_neuroHWSelTSLR_Layer6->Reset();
1450 m_neuroHWSelTSLR_Layer7->Reset();
1451 m_neuroHWSelTSLR_Layer8->Reset();
1452
1453 m_neuroHWInputID_Layer0->Reset();
1454 m_neuroHWInputT_Layer0->Reset();
1456 m_neuroHWInputID_Layer1->Reset();
1457 m_neuroHWInputT_Layer1->Reset();
1459 m_neuroHWInputID_Layer2->Reset();
1460 m_neuroHWInputT_Layer2->Reset();
1462 m_neuroHWInputID_Layer3->Reset();
1463 m_neuroHWInputT_Layer3->Reset();
1465 m_neuroHWInputID_Layer4->Reset();
1466 m_neuroHWInputT_Layer4->Reset();
1468 m_neuroHWInputID_Layer5->Reset();
1469 m_neuroHWInputT_Layer5->Reset();
1471 m_neuroHWInputID_Layer6->Reset();
1472 m_neuroHWInputT_Layer6->Reset();
1474 m_neuroHWInputID_Layer7->Reset();
1475 m_neuroHWInputT_Layer7->Reset();
1477 m_neuroHWInputID_Layer8->Reset();
1478 m_neuroHWInputT_Layer8->Reset();
1480 }
1481 if (!m_limitedoutput && m_simNeuroTracksName != "") {
1482 m_neuroSWOutZ->Reset();
1483 m_neuroSWOutCosTheta->Reset();
1484 m_neuroSWOutPhi0->Reset();
1485 m_neuroSWOutInvPt->Reset();
1486 m_neuroSWOutHitPattern->Reset();
1487 m_neuroSWOutTrackCount->Reset();
1488 m_neuroSWSector->Reset();
1489 }
1491 m_2DSWOutInvPt->Reset();
1492 m_2DSWOutPhi0->Reset();
1493 m_2DSWOutm_time->Reset();
1494 m_2DSWOutTrackCount->Reset();
1495
1496 m_neuroSWTSSW2DOutZ->Reset();
1498 m_neuroSWTSSW2DOutInvPt->Reset();
1499 m_neuroSWTSSW2DOutPhi0->Reset();
1502 m_neuroSWTSSW2DSector->Reset();
1503 }
1504 if (!m_limitedoutput && m_simNeuroTracksName != "") {
1505 m_neuroDeltaZ->Reset();
1506 m_neuroDeltaTheta->Reset();
1507 m_neuroScatterZ->Reset();
1508 m_neuroScatterTheta->Reset();
1509
1510 m_neuroDeltaInputID->Reset();
1511 m_neuroDeltaInputT->Reset();
1512 m_neuroDeltaInputAlpha->Reset();
1513 m_neuroDeltaTSID->Reset();
1514 m_neuroDeltaSector->Reset();
1515 m_simSameTS->Reset();
1516 m_simDiffTS->Reset();
1517 }
1519 m_2DHWInTSPrioT_Layer0->Reset();
1520 m_2DHWInTSPrioT_Layer2->Reset();
1521 m_2DHWInTSPrioT_Layer4->Reset();
1522 m_2DHWInTSPrioT_Layer6->Reset();
1523 m_2DHWInTSPrioT_Layer8->Reset();
1524 m_2DHWInTSFoundT_Layer0->Reset();
1525 m_2DHWInTSFoundT_Layer2->Reset();
1526 m_2DHWInTSFoundT_Layer4->Reset();
1527 m_2DHWInTSFoundT_Layer6->Reset();
1528 m_2DHWInTSFoundT_Layer8->Reset();
1529
1530 m_2DHWInTSPrioB_Layer0->Reset();
1531 m_2DHWInTSPrioB_Layer2->Reset();
1532 m_2DHWInTSPrioB_Layer4->Reset();
1533 m_2DHWInTSPrioB_Layer6->Reset();
1534 m_2DHWInTSPrioB_Layer8->Reset();
1535 m_2DHWInTSLR_Layer0->Reset();
1536 m_2DHWInTSLR_Layer2->Reset();
1537 m_2DHWInTSLR_Layer4->Reset();
1538 m_2DHWInTSLR_Layer6->Reset();
1539 m_2DHWInTSLR_Layer8->Reset();
1540 }
1541 if (!m_limitedoutput && m_simNeuroTracksName != "") {
1542 m_neuroSWSelTSID->Reset();
1543 m_neuroSWSelTSCount->Reset();
1562
1572
1573 m_neuroSWSelTSLR_Layer0->Reset();
1574 m_neuroSWSelTSLR_Layer1->Reset();
1575 m_neuroSWSelTSLR_Layer2->Reset();
1576 m_neuroSWSelTSLR_Layer3->Reset();
1577 m_neuroSWSelTSLR_Layer4->Reset();
1578 m_neuroSWSelTSLR_Layer5->Reset();
1579 m_neuroSWSelTSLR_Layer6->Reset();
1580 m_neuroSWSelTSLR_Layer7->Reset();
1581 m_neuroSWSelTSLR_Layer8->Reset();
1582
1583 m_neuroSWInputID_Layer0->Reset();
1584 m_neuroSWInputT_Layer0->Reset();
1586 m_neuroSWInputID_Layer1->Reset();
1587 m_neuroSWInputT_Layer1->Reset();
1589 m_neuroSWInputID_Layer2->Reset();
1590 m_neuroSWInputT_Layer2->Reset();
1592 m_neuroSWInputID_Layer3->Reset();
1593 m_neuroSWInputT_Layer3->Reset();
1595 m_neuroSWInputID_Layer4->Reset();
1596 m_neuroSWInputT_Layer4->Reset();
1598 m_neuroSWInputID_Layer5->Reset();
1599 m_neuroSWInputT_Layer5->Reset();
1601 m_neuroSWInputID_Layer6->Reset();
1602 m_neuroSWInputT_Layer6->Reset();
1604 m_neuroSWInputID_Layer7->Reset();
1605 m_neuroSWInputT_Layer7->Reset();
1607 m_neuroSWInputID_Layer8->Reset();
1608 m_neuroSWInputT_Layer8->Reset();
1610 }
1611
1613 m_neuroSWTSSW2DInTSID->Reset();
1614 m_neuroSWTSSW2DInTSCount->Reset();
1651
1652 m_neuroSWTSSW2DSelTSID->Reset();
1690
1718 }
1719 if (m_recoTracksName != "") {
1720 m_RecoZ->Reset();
1721 m_RecoCosTheta->Reset();
1722 m_RecoInvPt->Reset();
1723 m_RecoPhi->Reset();
1724 m_RecoD0->Reset();
1725 m_RecoTrackCount->Reset();
1726
1727 m_RecoHWZ->Reset();
1728 m_RecoHWCosTheta->Reset();
1729 m_RecoHWInvPt->Reset();
1730 m_RecoHWPhi->Reset();
1731 m_RecoHWD0->Reset();
1732 }
1733 if (!m_limitedoutput && m_recoTracksName != "") {
1734 m_RecoHWZScatter->Reset();
1735 }
1736 if (m_unpackedNeuroTracksName != "" && m_recoTracksName != "") {
1737 m_neuroRecoHWOutZ->Reset();
1738 m_neuroRecoHWOutCosTheta->Reset();
1739 m_neuroRecoHWOutInvPt->Reset();
1740 m_neuroRecoHWOutPhi0->Reset();
1743 m_neuroRecoHWSector->Reset();
1744
1745 m_DeltaRecoHWZ->Reset();
1746 m_DeltaRecoHWCosTheta->Reset();
1747 m_DeltaRecoHWInvPt->Reset();
1748 m_DeltaRecoHWPhi->Reset();
1749 }
1750 if (!m_limitedoutput && m_simNeuroTracksName != "" && m_recoTracksName != "") {
1751 m_RecoSWZ->Reset();
1752 m_RecoSWCosTheta->Reset();
1753 m_RecoSWInvPt->Reset();
1754 m_RecoSWPhi->Reset();
1755 m_RecoSWD0->Reset();
1756 m_RecoSWZScatter->Reset();
1757
1758 m_neuroRecoSWOutZ->Reset();
1759 m_neuroRecoSWOutCosTheta->Reset();
1760 m_neuroRecoSWOutInvPt->Reset();
1761 m_neuroRecoSWOutPhi0->Reset();
1764 m_neuroRecoSWSector->Reset();
1765
1766 m_DeltaRecoSWZ->Reset();
1767 m_DeltaRecoSWCosTheta->Reset();
1768 m_DeltaRecoSWInvPt->Reset();
1769 m_DeltaRecoSWPhi->Reset();
1770 }
1772 m_RecoSWTSSW2DZ->Reset();
1773 m_RecoSWTSSW2DCosTheta->Reset();
1774 m_RecoSWTSSW2DInvPt->Reset();
1775 m_RecoSWTSSW2DPhi->Reset();
1776 m_RecoSWTSSW2DD0->Reset();
1777 m_RecoSWTSSW2DZScatter->Reset();
1778
1779 m_neuroRecoSWTSSW2DOutZ->Reset();
1786
1787 m_DeltaRecoSWTSSW2DZ->Reset();
1789 m_DeltaRecoSWTSSW2DInvPt->Reset();
1790 m_DeltaRecoSWTSSW2DPhi->Reset();
1791 }
1792
1793}
1794
1796{
1797 double phinorm ; /* intermediate name for phi to transfrom zo 0->360 */
1799 //if (m_unpackedNeuroInputSegments.getEntries() == 0) {
1800 B2DEBUG(150, "No unpacked TS found, skipping event.");
1801 return;
1802 }
1804 B2DEBUG(150, "Wrong track multiplicity " << m_RecoTracks.getEntries() << ", skipping event.");
1805 return;
1806 }
1807
1808 StoreObjPtr<EventMetaData> eventMetaData;
1809
1810 if (m_recoTracksName != "") {
1811 // a RecoTrack has multiple representations for different particle hypothesis
1812 // -> just take the first one that does not give errors.
1814 bool foundValidRep = false;
1815
1816 for (RecoTrack& recoTrack : m_RecoTracks) {
1817 int nhwmatched = 0;
1818 int nswmatched = 0;
1819 int nswtssw2dmatched = 0;
1820 double phi0Target = 0;
1821 double invptTarget = 0;
1822 double cosThetaTarget = 0;
1823 double zTarget = 0;
1824 double d0Target = 0;
1825 for (genfit::AbsTrackRep* rep : recoTrack.getRepresentations()) {
1826 if (!recoTrack.wasFitSuccessful(rep))
1827 continue;
1828 // get state (position, momentum etc.) from hit closest to IP and
1829 // extrapolate to z-axis (may throw an exception -> continue to next representation)
1830 try {
1831 genfit::MeasuredStateOnPlane state =
1832 recoTrack.getMeasuredStateOnPlaneClosestTo(ROOT::Math::XYZVector(0, 0, 0), rep);
1833 rep->extrapolateToLine(state, TVector3(0, 0, -1000), TVector3(0, 0, 2000));
1834 // TODO check after matching
1835 // // flip tracks if necessary, such that trigger tracks and reco tracks
1836 // // point in the same direction
1837 // if (state.getMom().Dot(m_tracks[itrack]->getDirection()) < 0) {
1838 // state.setPosMom(state.getPos(), -state.getMom());
1839 // state.setChargeSign(-state.getCharge());
1840 // }
1841 // get track parameters
1842 phi0Target = state.getMom().Phi() * 180. / M_PI ;
1843 if (phi0Target < 0.) {phi0Target = phi0Target + 360. ;}
1844 invptTarget = state.getCharge() * state.getMom().Pt();
1845 cosThetaTarget = state.getMom().CosTheta();
1846 zTarget = state.getPos().Z();
1847 d0Target = state.getPos().Perp();
1848 } catch (...) {
1849 continue;
1850 }
1851 // break loop
1852 foundValidRep = true;
1853 break;
1854 }
1855 if (!foundValidRep) {
1856 B2DEBUG(150, "No valid representation found for RecoTrack, skipping.");
1857 continue;
1858 } else {
1859 if (m_maxRecoZDist != -1.0 and abs(zTarget) > m_maxRecoZDist) {
1860 B2DEBUG(150, "RecoTrack not close to IP (maxRecoZDist), zReco = " << zTarget);
1861 continue;
1862 }
1863 if (m_maxRecoD0Dist != -1.0 and abs(d0Target) > m_maxRecoD0Dist) {
1864 B2DEBUG(150, "RecoTrack not close to the z axis (maxRecoD0Dist), d0Reco = " << d0Target);
1865 continue;
1866 }
1867 m_RecoZ->Fill(zTarget);
1868 m_RecoCosTheta->Fill(cosThetaTarget);
1869 m_RecoPhi->Fill(phi0Target);
1870 m_RecoD0->Fill(d0Target);
1871 m_RecoInvPt->Fill(invptTarget);
1872 if (m_unpackedNeuroTracksName != "") {
1873 CDCTriggerTrack* neuroHWTrack = recoTrack.getRelatedTo<CDCTriggerTrack>(m_unpackedNeuroTracksName);
1874
1875 if (neuroHWTrack) {
1876 bool valtrack = false;
1877 try {
1878 valtrack = neuroHWTrack->getValidStereoBit();
1879 } catch (...) {
1880 B2WARNING("HWTrack doesn't have 'valid bit', get it from relations now... ");
1881 unsigned checkpattern = getPattern(neuroHWTrack, m_unpackedNeuroInputSegmentsName);
1882 valtrack = isValidPattern(checkpattern);
1883 }
1884 if (!valtrack) {
1885 continue;
1886 }
1887
1888 m_RecoHWZ->Fill(zTarget);
1889 m_RecoHWCosTheta->Fill(cosThetaTarget);
1890 m_RecoHWPhi->Fill(phi0Target);
1891 m_RecoHWD0->Fill(d0Target);
1892 m_RecoHWInvPt->Fill(invptTarget);
1893
1894 double neuroHWZ = neuroHWTrack->getZ0() ;
1895 m_neuroRecoHWOutZ->Fill(neuroHWZ);
1896 double cotTh = neuroHWTrack->getCotTheta() ;
1897 double cosTh = copysign(1.0, cotTh) / sqrt(1. / (cotTh * cotTh) + 1);
1898 double neuroHWcosTh = cosTh ;
1899 m_neuroRecoHWOutCosTheta->Fill(neuroHWcosTh);
1900 double neuroHWPt = neuroHWTrack->getPt() ;
1901 m_neuroRecoHWOutInvPt->Fill(neuroHWPt);
1902 phinorm = neuroHWTrack->getPhi0() * 180 / M_PI ;
1903 if (phinorm < 0.) {phinorm = phinorm + 360. ;}
1904 double neuroHWPhi0 = phinorm;
1905 m_neuroRecoHWOutPhi0->Fill(neuroHWPhi0);
1907 nhwmatched++;
1908 unsigned hwMatchedSector =
1909 neuroHWTrack->getRelatedTo<CDCTriggerMLPInput>(m_unpackedNeuroInputVectorName)->getSector();
1910 m_neuroRecoHWSector->Fill(hwMatchedSector);
1911
1912 m_DeltaRecoHWZ->Fill(zTarget - neuroHWZ);
1913 m_DeltaRecoHWCosTheta->Fill(cosThetaTarget - neuroHWcosTh);
1914 m_DeltaRecoHWPhi->Fill(phi0Target - neuroHWPhi0);
1915 m_DeltaRecoHWInvPt->Fill(invptTarget - neuroHWPt);
1916 if (!m_limitedoutput) {
1917 m_RecoHWZScatter->Fill(zTarget, neuroHWZ);
1918 }
1919 }
1920 if (!m_limitedoutput && m_simNeuroTracksName != "") {
1921 CDCTriggerTrack* neuroSWTrack = recoTrack.getRelatedTo<CDCTriggerTrack>(m_simNeuroTracksName);
1922 if (neuroSWTrack) {
1923 bool valtrack = false;
1924 try {
1925 valtrack = neuroSWTrack->getValidStereoBit();
1926 } catch (...) {
1927 B2INFO("SWTrack doesn't have 'valid bit', get it from relations now... ");
1928 unsigned checkpattern = getPattern(neuroSWTrack, m_unpackedNeuroInputSegmentsName);
1929 valtrack = isValidPattern(checkpattern);
1930 }
1931 if (!valtrack) {
1932 continue;
1933 }
1934
1935 m_RecoSWZ->Fill(zTarget);
1936 m_RecoSWCosTheta->Fill(cosThetaTarget);
1937 m_RecoSWPhi->Fill(phi0Target);
1938 m_RecoSWD0->Fill(d0Target);
1939 m_RecoSWInvPt->Fill(invptTarget);
1940
1941 double neuroSWZ = neuroSWTrack->getZ0() ;
1942 m_neuroRecoSWOutZ->Fill(neuroSWZ);
1943 double cotTh = neuroSWTrack->getCotTheta() ;
1944 double cosTh = copysign(1.0, cotTh) / sqrt(1. / (cotTh * cotTh) + 1);
1945 double neuroSWcosTh = cosTh ;
1946 m_neuroRecoSWOutCosTheta->Fill(neuroSWcosTh);
1947 double neuroSWPt = neuroSWTrack->getPt() ;
1948 m_neuroRecoSWOutInvPt->Fill(neuroSWPt);
1949 phinorm = neuroSWTrack->getPhi0() * 180 / M_PI ;
1950 if (phinorm < 0.) {phinorm = phinorm + 360. ;}
1951 double neuroSWPhi0 = phinorm ;
1952 m_neuroRecoSWOutPhi0->Fill(neuroSWPhi0);
1954 nswmatched++;
1955 unsigned swMatchedSector =
1956 neuroSWTrack->getRelatedTo<CDCTriggerMLPInput>(m_simNeuroInputVectorName)->getSector();
1957 m_neuroRecoSWSector->Fill(swMatchedSector);
1958
1959 m_DeltaRecoSWZ->Fill(zTarget - neuroSWZ);
1960 m_DeltaRecoSWCosTheta->Fill(cosThetaTarget - neuroSWcosTh);
1961 m_DeltaRecoSWPhi->Fill(phi0Target - neuroSWPhi0);
1962 m_DeltaRecoSWInvPt->Fill(invptTarget - neuroSWPt);
1963 m_RecoSWZScatter->Fill(zTarget, neuroSWZ);
1964 }
1965 }
1967 CDCTriggerTrack* neuroSWTSSW2DTrack = recoTrack.getRelatedTo<CDCTriggerTrack>(m_simNeuroTracksSWTSSW2DName);
1968 if (neuroSWTSSW2DTrack) {
1969 m_RecoSWTSSW2DZ->Fill(zTarget);
1970 m_RecoSWTSSW2DCosTheta->Fill(cosThetaTarget);
1971 m_RecoSWTSSW2DPhi->Fill(phi0Target);
1972 m_RecoSWTSSW2DD0->Fill(d0Target);
1973 m_RecoSWTSSW2DInvPt->Fill(invptTarget);
1974
1975 m_neuroRecoSWTSSW2DOutZ->Fill(neuroSWTSSW2DTrack->getZ0());
1976
1977 double cotTh = neuroSWTSSW2DTrack->getCotTheta();
1978 double cosTh = copysign(1.0, cotTh) / sqrt(1. / (cotTh * cotTh) + 1);
1979 m_neuroRecoSWTSSW2DOutCosTheta->Fill(cosTh);
1980 phinorm = neuroSWTSSW2DTrack->getPhi0() * 180 / M_PI;
1981 if (phinorm < 0.) {phinorm = phinorm + 360. ;}
1982 double phiNeuro = phinorm ;
1983 double invptNeuro = neuroSWTSSW2DTrack->getPt() ;
1984 m_neuroRecoSWTSSW2DOutInvPt->Fill(invptNeuro);
1985 m_neuroRecoSWTSSW2DOutPhi0->Fill(phiNeuro);
1987 nswtssw2dmatched++;
1988 unsigned swtssw2dMatchedSector =
1989 neuroSWTSSW2DTrack->getRelatedTo<CDCTriggerMLPInput>(m_simNeuroInputVectorSWTSSW2DName)->getSector();
1990 m_neuroRecoSWTSSW2DSector->Fill(swtssw2dMatchedSector);
1991
1992 m_DeltaRecoSWTSSW2DZ->Fill(zTarget - neuroSWTSSW2DTrack->getZ0());
1993
1994
1995 m_DeltaRecoSWTSSW2DCosTheta->Fill(cosThetaTarget - cosTh);
1996 phinorm = neuroSWTSSW2DTrack->getPhi0() * 180. / M_PI ;
1997 if (phinorm < 0.) {phinorm = phinorm + 360. ;}
1998 m_DeltaRecoSWTSSW2DPhi->Fill(phi0Target - phinorm);
1999 m_DeltaRecoSWTSSW2DInvPt->Fill(invptTarget - neuroSWTSSW2DTrack->getPt());
2000 m_RecoSWTSSW2DZScatter->Fill(zTarget, neuroSWTSSW2DTrack->getZ0());
2001 }
2002 }
2003 }
2004 }
2005 if (m_unpackedNeuroTracksName != "") {
2006 m_neuroRecoHWOutTrackCount->Fill(nhwmatched);
2007 if (!m_limitedoutput && m_simNeuroTracksName != "") {
2008 m_neuroRecoSWOutTrackCount->Fill(nswmatched);
2009 }
2011 m_neuroRecoSWTSSW2DOutTrackCount->Fill(nswtssw2dmatched);
2012 }
2013 }
2014 }
2015 }
2016
2019 for (CDCTriggerTrack& neuroswTrack : m_simNeuroTracksSWTSSW2D) {
2020 m_neuroSWTSSW2DOutZ->Fill(neuroswTrack.getZ0());
2021 double cotThSW = neuroswTrack.getCotTheta();
2022 double cosThSW = copysign(1.0, cotThSW) / sqrt(1. / (cotThSW * cotThSW) + 1);
2023 m_neuroSWTSSW2DOutCosTheta->Fill(cosThSW);
2024 phinorm = neuroswTrack.getPhi0() * 180. / M_PI ;
2025 if (phinorm < 0.) {
2026 phinorm = phinorm + 360. ;
2027 }
2028 m_neuroSWTSSW2DOutPhi0->Fill(phinorm);
2029 m_neuroSWTSSW2DOutInvPt->Fill(neuroswTrack.getPt());
2030 unsigned simSWTSSW2DSector =
2031 neuroswTrack.getRelatedTo<CDCTriggerMLPInput>(m_simNeuroInputVectorSWTSSW2DName)->getSector();
2032 m_neuroSWTSSW2DSector->Fill(simSWTSSW2DSector);
2033
2034 // sw NN selected sw ts
2035 unsigned pattern = 0;
2036 for (const CDCTriggerSegmentHit& hit :
2037 neuroswTrack.getRelationsTo<CDCTriggerSegmentHit>(m_simSegmentHitsName)) {
2038 m_neuroSWTSSW2DSelTSID->Fill(hit.getSegmentID());
2039 unsigned int sl = hit.getISuperLayer();
2040 m_neuroSWTSSW2DSelTSCount->Fill(sl);
2041 float neuroTime = neuroswTrack.getTime();
2042
2043 // find first occurence of hit (used to debug the selcted TS field)
2044 CDCTriggerSegmentHit firstHit = hit;
2045 for (CDCTriggerSegmentHit compare : m_simSegmentHits) {
2046 if (compare.getISuperLayer() == hit.getISuperLayer() &&
2047 compare.getIWireCenter() == hit.getIWireCenter() &&
2048 compare.getPriorityPosition() == hit.getPriorityPosition() &&
2049 compare.getLeftRight() == hit.getLeftRight() &&
2050 compare.priorityTime() == hit.priorityTime() &&
2051 compare.foundTime() < firstHit.foundTime()) {
2052 firstHit = compare;
2053 }
2054 }
2055
2056 switch (sl) {
2057 case 0: m_neuroSWTSSW2DSelTSPrioT_Layer0->Fill(hit.priorityTime());
2058 m_neuroSWTSSW2DSelTSFoundT_Layer0->Fill(firstHit.foundTime() - neuroTime);
2059 m_neuroSWTSSW2DSelTSPrioB_Layer0->Fill(hit.getPriorityPosition());
2060 m_neuroSWTSSW2DSelTSLR_Layer0->Fill(hit.getLeftRight());
2061 break;
2062 case 1: m_neuroSWTSSW2DSelTSPrioT_Layer1->Fill(hit.priorityTime());
2063 m_neuroSWTSSW2DSelTSFoundT_Layer1->Fill(firstHit.foundTime() - neuroTime);
2064 m_neuroSWTSSW2DSelTSPrioB_Layer1->Fill(hit.getPriorityPosition());
2065 m_neuroSWTSSW2DSelTSLR_Layer1->Fill(hit.getLeftRight());
2066 break;
2067 case 2: m_neuroSWTSSW2DSelTSPrioT_Layer2->Fill(hit.priorityTime());
2068 m_neuroSWTSSW2DSelTSFoundT_Layer2->Fill(firstHit.foundTime() - neuroTime);
2069 m_neuroSWTSSW2DSelTSPrioB_Layer2->Fill(hit.getPriorityPosition());
2070 m_neuroSWTSSW2DSelTSLR_Layer2->Fill(hit.getLeftRight());
2071 break;
2072 case 3: m_neuroSWTSSW2DSelTSPrioT_Layer3->Fill(hit.priorityTime());
2073 m_neuroSWTSSW2DSelTSFoundT_Layer3->Fill(firstHit.foundTime() - neuroTime);
2074 m_neuroSWTSSW2DSelTSPrioB_Layer3->Fill(hit.getPriorityPosition());
2075 m_neuroSWTSSW2DSelTSLR_Layer3->Fill(hit.getLeftRight());
2076 break;
2077 case 4: m_neuroSWTSSW2DSelTSPrioT_Layer4->Fill(hit.priorityTime());
2078 m_neuroSWTSSW2DSelTSFoundT_Layer4->Fill(firstHit.foundTime() - neuroTime);
2079 m_neuroSWTSSW2DSelTSPrioB_Layer4->Fill(hit.getPriorityPosition());
2080 m_neuroSWTSSW2DSelTSLR_Layer4->Fill(hit.getLeftRight());
2081 break;
2082 case 5: m_neuroSWTSSW2DSelTSPrioT_Layer5->Fill(hit.priorityTime());
2083 m_neuroSWTSSW2DSelTSFoundT_Layer5->Fill(firstHit.foundTime() - neuroTime);
2084 m_neuroSWTSSW2DSelTSPrioB_Layer5->Fill(hit.getPriorityPosition());
2085 m_neuroSWTSSW2DSelTSLR_Layer5->Fill(hit.getLeftRight());
2086 break;
2087 case 6: m_neuroSWTSSW2DSelTSPrioT_Layer6->Fill(hit.priorityTime());
2088 m_neuroSWTSSW2DSelTSFoundT_Layer6->Fill(firstHit.foundTime() - neuroTime);
2089 m_neuroSWTSSW2DSelTSPrioB_Layer6->Fill(hit.getPriorityPosition());
2090 m_neuroSWTSSW2DSelTSLR_Layer6->Fill(hit.getLeftRight());
2091 break;
2092 case 7: m_neuroSWTSSW2DSelTSPrioT_Layer7->Fill(hit.priorityTime());
2093 m_neuroSWTSSW2DSelTSFoundT_Layer7->Fill(firstHit.foundTime() - neuroTime);
2094 m_neuroSWTSSW2DSelTSPrioB_Layer7->Fill(hit.getPriorityPosition());
2095 m_neuroSWTSSW2DSelTSLR_Layer7->Fill(hit.getLeftRight());
2096 break;
2097 case 8: m_neuroSWTSSW2DSelTSPrioT_Layer8->Fill(hit.priorityTime());
2098 m_neuroSWTSSW2DSelTSFoundT_Layer8->Fill(firstHit.foundTime() - neuroTime);
2099 m_neuroSWTSSW2DSelTSPrioB_Layer8->Fill(hit.getPriorityPosition());
2100 m_neuroSWTSSW2DSelTSLR_Layer8->Fill(hit.getLeftRight());
2101 break;
2102 }
2103 if (sl % 2 == 1) pattern |= (1 << ((sl - 1) / 2));
2104 }
2105 m_neuroSWTSSW2DOutHitPattern->Fill(pattern);
2106
2107 // plot input vector
2108 vector<float> nnInput =
2109 neuroswTrack.getRelatedTo<CDCTriggerMLPInput>(m_simNeuroInputVectorSWTSSW2DName)->getInput();
2137 }
2138 }
2139 if (!m_limitedoutput && m_simNeuroTracksName != "") {
2141 for (CDCTriggerTrack& neuroswTrack : m_simNeuroTracks) {
2142 bool valtrack = false;
2143 try {
2144 valtrack = neuroswTrack.getValidStereoBit();
2145 } catch (...) {
2146 B2INFO("HWTrack doesn't have 'valid bit', get it from relations now... ");
2147 unsigned checkpattern = getPattern(&neuroswTrack, m_unpackedNeuroInputSegmentsName);
2148 valtrack = isValidPattern(checkpattern);
2149 }
2150 if (!valtrack) {
2151 continue;
2152 }
2153
2154 m_neuroSWOutZ->Fill(neuroswTrack.getZ0());
2155 double cotThSW = neuroswTrack.getCotTheta();
2156 double cosThSW = copysign(1.0, cotThSW) / sqrt(1. / (cotThSW * cotThSW) + 1);
2157 m_neuroSWOutCosTheta->Fill(cosThSW);
2158 phinorm = neuroswTrack.getPhi0() * 180. / M_PI ;
2159 if (phinorm < 0.) {phinorm = phinorm + 360. ;}
2160 m_neuroSWOutPhi0->Fill(phinorm);
2161 m_neuroSWOutInvPt->Fill(neuroswTrack.getPt());
2162
2163 unsigned simSector =
2164 neuroswTrack.getRelatedTo<CDCTriggerMLPInput>(m_simNeuroInputVectorName)->getSector();
2165 m_neuroSWSector->Fill(simSector);
2166
2167 // sw NN selected sw ts
2168 unsigned pattern = 0;
2169 for (const CDCTriggerSegmentHit& hit :
2170 neuroswTrack.getRelationsTo<CDCTriggerSegmentHit>(m_unpackedNeuroInputSegmentsName)) {
2171 m_neuroSWSelTSID->Fill(hit.getSegmentID());
2172 unsigned int sl = hit.getISuperLayer();
2173 m_neuroSWSelTSCount->Fill(sl);
2174 float neuroTime = neuroswTrack.getTime();
2175
2176 // find first occurence of hit (used to debug the selcted TS field)
2177 CDCTriggerSegmentHit firstHit = hit;
2178 for (CDCTriggerSegmentHit compare : m_simSegmentHits) {
2179 if (compare.getISuperLayer() == hit.getISuperLayer() &&
2180 compare.getIWireCenter() == hit.getIWireCenter() &&
2181 compare.getPriorityPosition() == hit.getPriorityPosition() &&
2182 compare.getLeftRight() == hit.getLeftRight() &&
2183 compare.priorityTime() == hit.priorityTime() &&
2184 compare.foundTime() < firstHit.foundTime()) {
2185 firstHit = compare;
2186 }
2187 }
2188
2189 switch (sl) {
2190 case 0: m_neuroSWSelTSPrioT_Layer0->Fill(hit.priorityTime());
2191 m_neuroSWSelTSFoundT_Layer0->Fill(firstHit.foundTime() - neuroTime);
2192 m_neuroSWSelTSPrioB_Layer0->Fill(hit.getPriorityPosition());
2193 m_neuroSWSelTSLR_Layer0->Fill(hit.getLeftRight());
2194 break;
2195 case 1: m_neuroSWSelTSPrioT_Layer1->Fill(hit.priorityTime());
2196 m_neuroSWSelTSFoundT_Layer1->Fill(firstHit.foundTime() - neuroTime);
2197 m_neuroSWSelTSPrioB_Layer1->Fill(hit.getPriorityPosition());
2198 m_neuroSWSelTSLR_Layer1->Fill(hit.getLeftRight());
2199 break;
2200 case 2: m_neuroSWSelTSPrioT_Layer2->Fill(hit.priorityTime());
2201 m_neuroSWSelTSFoundT_Layer2->Fill(firstHit.foundTime() - neuroTime);
2202 m_neuroSWSelTSPrioB_Layer2->Fill(hit.getPriorityPosition());
2203 m_neuroSWSelTSLR_Layer2->Fill(hit.getLeftRight());
2204 break;
2205 case 3: m_neuroSWSelTSPrioT_Layer3->Fill(hit.priorityTime());
2206 m_neuroSWSelTSFoundT_Layer3->Fill(firstHit.foundTime() - neuroTime);
2207 m_neuroSWSelTSPrioB_Layer3->Fill(hit.getPriorityPosition());
2208 m_neuroSWSelTSLR_Layer3->Fill(hit.getLeftRight());
2209 break;
2210 case 4: m_neuroSWSelTSPrioT_Layer4->Fill(hit.priorityTime());
2211 m_neuroSWSelTSFoundT_Layer4->Fill(firstHit.foundTime() - neuroTime);
2212 m_neuroSWSelTSPrioB_Layer4->Fill(hit.getPriorityPosition());
2213 m_neuroSWSelTSLR_Layer4->Fill(hit.getLeftRight());
2214 break;
2215 case 5: m_neuroSWSelTSPrioT_Layer5->Fill(hit.priorityTime());
2216 m_neuroSWSelTSFoundT_Layer5->Fill(firstHit.foundTime() - neuroTime);
2217 m_neuroSWSelTSPrioB_Layer5->Fill(hit.getPriorityPosition());
2218 m_neuroSWSelTSLR_Layer5->Fill(hit.getLeftRight());
2219 break;
2220 case 6: m_neuroSWSelTSPrioT_Layer6->Fill(hit.priorityTime());
2221 m_neuroSWSelTSFoundT_Layer6->Fill(firstHit.foundTime() - neuroTime);
2222 m_neuroSWSelTSPrioB_Layer6->Fill(hit.getPriorityPosition());
2223 m_neuroSWSelTSLR_Layer6->Fill(hit.getLeftRight());
2224 break;
2225 case 7: m_neuroSWSelTSPrioT_Layer7->Fill(hit.priorityTime());
2226 m_neuroSWSelTSFoundT_Layer7->Fill(firstHit.foundTime() - neuroTime);
2227 m_neuroSWSelTSPrioB_Layer7->Fill(hit.getPriorityPosition());
2228 m_neuroSWSelTSLR_Layer7->Fill(hit.getLeftRight());
2229 break;
2230 case 8: m_neuroSWSelTSPrioT_Layer8->Fill(hit.priorityTime());
2231 m_neuroSWSelTSFoundT_Layer8->Fill(firstHit.foundTime() - neuroTime);
2232 m_neuroSWSelTSPrioB_Layer8->Fill(hit.getPriorityPosition());
2233 m_neuroSWSelTSLR_Layer8->Fill(hit.getLeftRight());
2234 break;
2235 }
2236 if (sl % 2 == 1) pattern |= (1 << ((sl - 1) / 2));
2237 }
2238 m_neuroSWOutHitPattern->Fill(pattern);
2239
2240
2241 // plot input vector
2242 vector<float> nnInput =
2243 neuroswTrack.getRelatedTo<CDCTriggerMLPInput>(m_simNeuroInputVectorName)->getInput();
2244 condFill(m_neuroSWInputID_Layer0, nnInput[0]);
2245 condFill(m_neuroSWInputT_Layer0, nnInput[1]);
2247 condFill(m_neuroSWInputID_Layer1, nnInput[3]);
2248 condFill(m_neuroSWInputT_Layer1, nnInput[4]);
2250 condFill(m_neuroSWInputID_Layer2, nnInput[6]);
2251 condFill(m_neuroSWInputT_Layer2, nnInput[7]);
2253 condFill(m_neuroSWInputID_Layer3, nnInput[9]);
2254 condFill(m_neuroSWInputT_Layer3, nnInput[10]);
2256 condFill(m_neuroSWInputID_Layer4, nnInput[12]);
2257 condFill(m_neuroSWInputT_Layer4, nnInput[13]);
2259 condFill(m_neuroSWInputID_Layer5, nnInput[15]);
2260 condFill(m_neuroSWInputT_Layer5, nnInput[16]);
2262 condFill(m_neuroSWInputID_Layer6, nnInput[18]);
2263 condFill(m_neuroSWInputT_Layer6, nnInput[19]);
2265 condFill(m_neuroSWInputID_Layer7, nnInput[21]);
2266 condFill(m_neuroSWInputT_Layer7, nnInput[22]);
2268 condFill(m_neuroSWInputID_Layer8, nnInput[24]);
2269 condFill(m_neuroSWInputT_Layer8, nnInput[25]);
2271 }
2272 }
2273
2274 int nofintracks = 0;
2275 if (m_unpackedNeuroTracksName != "") {
2276 int nofouttracks = 0;
2277 int nofinsegments = 0;
2278 // fill neurotrigger histograms
2279 for (CDCTriggerTrack& neuroTrack : m_unpackedNeuroTracks) {
2280 bool valtrack = false;
2281 try {
2282 valtrack = neuroTrack.getValidStereoBit();
2283 } catch (...) {
2284 B2WARNING("NeuroTrack doesn't have 'valid bit', get it from relations now... ");
2285 unsigned checkpattern = getPattern(&neuroTrack, m_unpackedNeuroInputSegmentsName);
2286 valtrack = isValidPattern(checkpattern);
2287 }
2288 if (!valtrack) {
2289 continue;
2290 }
2291 // count number of tracks
2292 ++nofouttracks;
2293 // fill raw distributions
2294 m_neuroHWOutZ->Fill(neuroTrack.getZ0());
2295 double cotTh = neuroTrack.getCotTheta();
2296 double cosTh = copysign(1.0, cotTh) / sqrt(1. / (cotTh * cotTh) + 1);
2297 m_neuroHWOutCosTheta->Fill(cosTh);
2298 phinorm = neuroTrack.getPhi0() * 180. / M_PI ;
2299 if (phinorm < 0.) {phinorm = phinorm + 360. ;}
2300 m_neuroHWOutPhi0->Fill(phinorm);
2301 m_neuroHWOutInvPt->Fill(neuroTrack.getPt());
2302 m_neuroHWOutPt->Fill(neuroTrack.getPt());
2303 m_neuroHWOutm_time->Fill(neuroTrack.getTime());
2304
2305 unsigned hwSector =
2306 neuroTrack.getRelatedTo<CDCTriggerMLPInput>(m_unpackedNeuroInputVectorName)->getSector();
2307 m_neuroHWSector->Fill(hwSector);
2308
2309 // fill hists per quadrant
2310 if (!m_limitedoutput) {
2311 switch (neuroTrack.getQuadrant()) {
2312 case -1:
2313 m_neuroHWOutQuad5Z->Fill(neuroTrack.getZ0());
2314 m_neuroHWOutQuad5CosTheta->Fill(cosTh);
2315 phinorm = neuroTrack.getPhi0() * 180. / M_PI ;
2316 if (phinorm < 0.) { phinorm = phinorm + 360. ;}
2317 m_neuroHWOutQuad5Phi0->Fill(phinorm);
2318 m_neuroHWOutQuad5InvPt->Fill(neuroTrack.getPt());
2319 break;
2320 case 0:
2321 m_neuroHWOutQuad0Z->Fill(neuroTrack.getZ0());
2322 m_neuroHWOutQuad0CosTheta->Fill(cosTh);
2323 phinorm = neuroTrack.getPhi0() * 180. / M_PI ;
2324 if (phinorm < 0.) { phinorm = phinorm + 360. ;}
2325 m_neuroHWOutQuad0Phi0->Fill(phinorm);
2326 m_neuroHWOutQuad0InvPt->Fill(neuroTrack.getPt());
2327 break;
2328 case 1:
2329 m_neuroHWOutQuad1Z->Fill(neuroTrack.getZ0());
2330 m_neuroHWOutQuad1CosTheta->Fill(cosTh);
2331 phinorm = neuroTrack.getPhi0() * 180. / M_PI ;
2332 if (phinorm < 0.) { phinorm = phinorm + 360. ;}
2333 m_neuroHWOutQuad1Phi0->Fill(phinorm);
2334 m_neuroHWOutQuad1InvPt->Fill(neuroTrack.getPt());
2335 break;
2336 case 2:
2337 m_neuroHWOutQuad2Z->Fill(neuroTrack.getZ0());
2338 m_neuroHWOutQuad2CosTheta->Fill(cosTh);
2339 phinorm = neuroTrack.getPhi0() * 180. / M_PI ;
2340 if (phinorm < 0.) { phinorm = phinorm + 360. ;}
2341 m_neuroHWOutQuad2Phi0->Fill(phinorm);
2342 m_neuroHWOutQuad2InvPt->Fill(neuroTrack.getPt());
2343 break;
2344 case 3:
2345 m_neuroHWOutQuad3Z->Fill(neuroTrack.getZ0());
2346 m_neuroHWOutQuad3CosTheta->Fill(cosTh);
2347 phinorm = neuroTrack.getPhi0() * 180. / M_PI ;
2348 if (phinorm < 0.) { phinorm = phinorm + 360. ;}
2349 m_neuroHWOutQuad3Phi0->Fill(phinorm);
2350 m_neuroHWOutQuad3InvPt->Fill(neuroTrack.getPt());
2351 break;
2352 }
2353 }
2354
2355 // get related stereo hits
2356 unsigned pattern = 0;
2357 for (const CDCTriggerSegmentHit& hit :
2358 neuroTrack.getRelationsTo<CDCTriggerSegmentHit>(m_unpackedNeuroInputSegmentsName)) {
2359 m_neuroHWSelTSID->Fill(hit.getSegmentID());
2360 unsigned int sl = hit.getISuperLayer();
2361 m_neuroHWSelTSCount->Fill(sl);
2362 float neuroTime = neuroTrack.getTime();
2363 // find first occurence of hit (used to debug the selcted TS field)
2364 CDCTriggerSegmentHit firstHit = hit;
2366 if (compare.getISuperLayer() == hit.getISuperLayer() &&
2367 compare.getIWireCenter() == hit.getIWireCenter() &&
2368 compare.getPriorityPosition() == hit.getPriorityPosition() &&
2369 compare.getLeftRight() == hit.getLeftRight() &&
2370 compare.priorityTime() == hit.priorityTime() &&
2371 compare.foundTime() < firstHit.foundTime()) {
2372 firstHit = compare;
2373 }
2374 }
2375
2376 if (!m_limitedoutput) {
2377 switch (sl) {
2378 case 0: m_neuroHWSelTSPrioT_Layer0->Fill(hit.priorityTime());
2379 m_neuroHWSelTSFoundT_Layer0->Fill(firstHit.foundTime() - neuroTime);
2380 m_neuroHWSelTSPrioB_Layer0->Fill(hit.getPriorityPosition());
2381 m_neuroHWSelTSLR_Layer0->Fill(hit.getLeftRight());
2382 break;
2383 case 1: m_neuroHWSelTSPrioT_Layer1->Fill(hit.priorityTime());
2384 m_neuroHWSelTSFoundT_Layer1->Fill(firstHit.foundTime() - neuroTime);
2385 m_neuroHWSelTSPrioB_Layer1->Fill(hit.getPriorityPosition());
2386 m_neuroHWSelTSLR_Layer1->Fill(hit.getLeftRight());
2387 break;
2388 case 2: m_neuroHWSelTSPrioT_Layer2->Fill(hit.priorityTime());
2389 m_neuroHWSelTSFoundT_Layer2->Fill(firstHit.foundTime() - neuroTime);
2390 m_neuroHWSelTSPrioB_Layer2->Fill(hit.getPriorityPosition());
2391 m_neuroHWSelTSLR_Layer2->Fill(hit.getLeftRight());
2392 break;
2393 case 3: m_neuroHWSelTSPrioT_Layer3->Fill(hit.priorityTime());
2394 m_neuroHWSelTSFoundT_Layer3->Fill(firstHit.foundTime() - neuroTime);
2395 m_neuroHWSelTSPrioB_Layer3->Fill(hit.getPriorityPosition());
2396 m_neuroHWSelTSLR_Layer3->Fill(hit.getLeftRight());
2397 break;
2398 case 4: m_neuroHWSelTSPrioT_Layer4->Fill(hit.priorityTime());
2399 m_neuroHWSelTSFoundT_Layer4->Fill(firstHit.foundTime() - neuroTime);
2400 m_neuroHWSelTSPrioB_Layer4->Fill(hit.getPriorityPosition());
2401 m_neuroHWSelTSLR_Layer4->Fill(hit.getLeftRight());
2402 break;
2403 case 5: m_neuroHWSelTSPrioT_Layer5->Fill(hit.priorityTime());
2404 m_neuroHWSelTSFoundT_Layer5->Fill(firstHit.foundTime() - neuroTime);
2405 m_neuroHWSelTSPrioB_Layer5->Fill(hit.getPriorityPosition());
2406 m_neuroHWSelTSLR_Layer5->Fill(hit.getLeftRight());
2407 break;
2408 case 6: m_neuroHWSelTSPrioT_Layer6->Fill(hit.priorityTime());
2409 m_neuroHWSelTSFoundT_Layer6->Fill(firstHit.foundTime() - neuroTime);
2410 m_neuroHWSelTSPrioB_Layer6->Fill(hit.getPriorityPosition());
2411 m_neuroHWSelTSLR_Layer6->Fill(hit.getLeftRight());
2412 break;
2413 case 7: m_neuroHWSelTSPrioT_Layer7->Fill(hit.priorityTime());
2414 m_neuroHWSelTSFoundT_Layer7->Fill(firstHit.foundTime() - neuroTime);
2415 m_neuroHWSelTSPrioB_Layer7->Fill(hit.getPriorityPosition());
2416 m_neuroHWSelTSLR_Layer7->Fill(hit.getLeftRight());
2417 break;
2418 case 8: m_neuroHWSelTSPrioT_Layer8->Fill(hit.priorityTime());
2419 m_neuroHWSelTSFoundT_Layer8->Fill(firstHit.foundTime() - neuroTime);
2420 m_neuroHWSelTSPrioB_Layer8->Fill(hit.getPriorityPosition());
2421 m_neuroHWSelTSLR_Layer8->Fill(hit.getLeftRight());
2422 break;
2423 }
2424 }
2425 if (sl % 2 == 1) pattern |= (1 << ((sl - 1) / 2));
2426 }
2427 m_neuroHWOutHitPattern->Fill(pattern);
2428
2429 // plot input vector
2430 if (!m_limitedoutput) {
2431 vector<float> nnInput =
2432 neuroTrack.getRelatedTo<CDCTriggerMLPInput>(m_unpackedNeuroInputVectorName)->getInput();
2433 condFill(m_neuroHWInputID_Layer0, nnInput[0]);
2434 condFill(m_neuroHWInputT_Layer0, nnInput[1]);
2436 condFill(m_neuroHWInputID_Layer1, nnInput[3]);
2437 condFill(m_neuroHWInputT_Layer1, nnInput[4]);
2439 condFill(m_neuroHWInputID_Layer2, nnInput[6]);
2440 condFill(m_neuroHWInputT_Layer2, nnInput[7]);
2442 condFill(m_neuroHWInputID_Layer3, nnInput[9]);
2443 condFill(m_neuroHWInputT_Layer3, nnInput[10]);
2445 condFill(m_neuroHWInputID_Layer4, nnInput[12]);
2446 condFill(m_neuroHWInputT_Layer4, nnInput[13]);
2448 condFill(m_neuroHWInputID_Layer5, nnInput[15]);
2449 condFill(m_neuroHWInputT_Layer5, nnInput[16]);
2451 condFill(m_neuroHWInputID_Layer6, nnInput[18]);
2452 condFill(m_neuroHWInputT_Layer6, nnInput[19]);
2454 condFill(m_neuroHWInputID_Layer7, nnInput[21]);
2455 condFill(m_neuroHWInputT_Layer7, nnInput[22]);
2457 condFill(m_neuroHWInputID_Layer8, nnInput[24]);
2458 condFill(m_neuroHWInputT_Layer8, nnInput[25]);
2460
2461
2462 if (m_simNeuroTracksName != "") {
2463 // get related track from TSIM (via 2D finder track)
2464 CDCTriggerTrack* finderTrack =
2465 neuroTrack.getRelatedFrom<CDCTriggerTrack>(m_unpackedNeuroInput2DTracksName);
2466 if (finderTrack) {
2467 CDCTriggerTrack* neuroSimTrack =
2468 finderTrack->getRelatedTo<CDCTriggerTrack>(m_simNeuroTracksName);
2469 if (neuroSimTrack) {
2470 // check if they same TS are selected in the unpacked and TSIM track
2471 int nsameTS = 0;
2472 int ndiffTS = 0;
2473 for (const CDCTriggerSegmentHit& simhit :
2474 neuroSimTrack->getRelationsTo<CDCTriggerSegmentHit>(m_unpackedNeuroInputSegmentsName)) {
2475 unsigned int simsl = simhit.getISuperLayer();
2476 for (const CDCTriggerSegmentHit& hit :
2477 neuroTrack.getRelationsTo<CDCTriggerSegmentHit>(m_unpackedNeuroInputSegmentsName)) {
2478 unsigned int sl = hit.getISuperLayer();
2479 if (sl == simsl) {
2480 m_neuroDeltaTSID->Fill(hit.getSegmentID() - simhit.getSegmentID());
2481 if (simhit.getSegmentID() == hit.getSegmentID() &&
2482 simhit.getPriorityPosition() == hit.getPriorityPosition() &&
2483 simhit.getLeftRight() == hit.getLeftRight() &&
2484 simhit.priorityTime() == hit.priorityTime()
2485 ) {
2486 nsameTS += 1;
2487 } else {
2488 ndiffTS += 1;
2489 }
2490 }
2491 }
2492 }
2493 m_simSameTS->Fill(nsameTS);
2494 m_simDiffTS->Fill(ndiffTS);
2495 // only calculate deltas if the same TS are selected in unpacker and TSIM
2496
2497
2498 if (nsameTS >= m_nsamets) {
2499 if (abs(neuroTrack.getZ0() - neuroSimTrack->getZ0()) > 1) {
2500 neuroSimTrack->setQualityVector(2);
2501 neuroTrack.setQualityVector(2);
2502 }
2503 m_neuroDeltaZ->Fill(neuroTrack.getZ0() - neuroSimTrack->getZ0());
2504 double nnHWtheta = neuroTrack.getDirection().Theta() * 180. / M_PI;
2505 double nnSWtheta = neuroSimTrack->getDirection().Theta() * 180. / M_PI;
2506 m_neuroDeltaTheta->Fill(nnHWtheta - nnSWtheta);
2507 m_neuroScatterZ->Fill(neuroTrack.getZ0(), neuroSimTrack->getZ0());
2508 m_neuroScatterTheta->Fill(nnHWtheta, nnSWtheta);
2509 vector<float> unpackedInput =
2510 neuroTrack.getRelatedTo<CDCTriggerMLPInput>(m_unpackedNeuroInputVectorName)->getInput();
2511 vector<float> simInput =
2512 neuroSimTrack->getRelatedTo<CDCTriggerMLPInput>(m_simNeuroInputVectorName)->getInput();
2513 unsigned unpackedSector =
2514 neuroTrack.getRelatedTo<CDCTriggerMLPInput>(m_unpackedNeuroInputVectorName)->getSector();
2515 unsigned simSector =
2516 neuroSimTrack->getRelatedTo<CDCTriggerMLPInput>(m_simNeuroInputVectorName)->getSector();
2517 m_neuroDeltaSector->Fill(unpackedSector - simSector);
2518 bool sameInputId = true;
2519 bool sameInputAlpha = true;
2520 bool scaleErr = false;
2521 bool missingTS = false;
2522 bool timeErr = false;
2523 for (unsigned ii = 0; ii < unpackedInput.size(); ii += 3) {
2524 m_neuroDeltaInputID->Fill(unpackedInput[ii] - simInput[ii]);
2525 m_neuroDeltaInputT->Fill(unpackedInput[ii + 1] - simInput[ii + 1]);
2526 m_neuroDeltaInputAlpha->Fill(unpackedInput[ii + 2] - simInput[ii + 2]);
2527 bool hwZero = false;
2528 bool hwSimZero = false;
2529 if (unpackedInput[ii] != simInput[ii]) {sameInputId = false;}
2530 if (unpackedInput[ii + 2] != simInput[ii + 2]) {sameInputAlpha = false;}
2531 if (unpackedInput[ii + 1] != simInput[ii + 1]) {timeErr = true;}
2532 if (unpackedInput[ii + 1] == 0 && fabs(simInput[ii + 1] > 0.99)) {scaleErr = true;}
2533 if (simInput[ii + 1] == 0 && fabs(unpackedInput[ii + 1] > 0.99)) {scaleErr = true;}
2534 if (unpackedInput[ii] == 0 && unpackedInput[ii + 1] == 0 && unpackedInput[ii + 2] == 0) {hwZero = true;}
2535 if (simInput[ii] == 0 && simInput[ii + 1] == 0 && simInput[ii + 2] == 0) {hwSimZero = true;}
2536 if (hwZero != hwSimZero) {missingTS = true;}
2537 }
2538 if (!sameInputId) {neuroTrack.setQualityVector(4);}
2539 if (!sameInputAlpha) {neuroTrack.setQualityVector(8);}
2540 if (scaleErr) {neuroTrack.setQualityVector(16);}
2541 if (missingTS) {neuroTrack.setQualityVector(32);}
2542 if (timeErr) {neuroTrack.setQualityVector(64);}
2543
2544 }
2545 }
2546 }
2547 }
2548 }
2549 }
2550 for (CDCTriggerTrack& neuroinput2dtrack : m_unpackedNeuroInput2DTracks) {
2551 nofintracks ++;
2552 phinorm = neuroinput2dtrack.getPhi0() * 180. / M_PI ;
2553 if (phinorm < 0.) { phinorm = phinorm + 360. ;}
2554 m_neuroHWInPhi0->Fill(phinorm);
2555 m_neuroHWInm_time->Fill(neuroinput2dtrack.getTime());
2556 m_neuroHWInInvPt->Fill(neuroinput2dtrack.getPt());
2557 }
2558 if (nofintracks > 0 || nofouttracks > 0) {
2559 m_neuroHWInTrackCount->Fill(nofintracks);
2560 m_neuroHWOutTrackCount->Fill(nofouttracks);
2561 m_neuroHWOutVsInTrackCount->Fill((nofouttracks - nofintracks));
2562 }
2563 for (CDCTriggerSegmentHit& neuroinputsegment : m_unpackedNeuroInputSegments) {
2564 ++nofinsegments;
2565 m_neuroHWInTSID->Fill(neuroinputsegment.getSegmentID());
2566 if (!m_limitedoutput) {
2567 unsigned int sl = neuroinputsegment.getISuperLayer();
2568 switch (sl) {
2569 case 0: m_neuroHWInTSPrioT_Layer0->Fill(neuroinputsegment.priorityTime());
2570 m_neuroHWInTSFoundT_Layer0->Fill(neuroinputsegment.foundTime());
2571 m_neuroHWInTSPrioB_Layer0->Fill(neuroinputsegment.getPriorityPosition());
2572 m_neuroHWInTSLR_Layer0->Fill(neuroinputsegment.getLeftRight());
2573 break;
2574 case 1: m_neuroHWInTSPrioT_Layer1->Fill(neuroinputsegment.priorityTime());
2575 m_neuroHWInTSFoundT_Layer1->Fill(neuroinputsegment.foundTime());
2576 m_neuroHWInTSPrioB_Layer1->Fill(neuroinputsegment.getPriorityPosition());
2577 m_neuroHWInTSLR_Layer1->Fill(neuroinputsegment.getLeftRight());
2578 break;
2579 case 2: m_neuroHWInTSPrioT_Layer2->Fill(neuroinputsegment.priorityTime());
2580 m_neuroHWInTSFoundT_Layer2->Fill(neuroinputsegment.foundTime());
2581 m_neuroHWInTSPrioB_Layer2->Fill(neuroinputsegment.getPriorityPosition());
2582 m_neuroHWInTSLR_Layer2->Fill(neuroinputsegment.getLeftRight());
2583 break;
2584 case 3: m_neuroHWInTSPrioT_Layer3->Fill(neuroinputsegment.priorityTime());
2585 m_neuroHWInTSFoundT_Layer3->Fill(neuroinputsegment.foundTime());
2586 m_neuroHWInTSPrioB_Layer3->Fill(neuroinputsegment.getPriorityPosition());
2587 m_neuroHWInTSLR_Layer3->Fill(neuroinputsegment.getLeftRight());
2588 break;
2589 case 4: m_neuroHWInTSPrioT_Layer4->Fill(neuroinputsegment.priorityTime());
2590 m_neuroHWInTSFoundT_Layer4->Fill(neuroinputsegment.foundTime());
2591 m_neuroHWInTSPrioB_Layer4->Fill(neuroinputsegment.getPriorityPosition());
2592 m_neuroHWInTSLR_Layer4->Fill(neuroinputsegment.getLeftRight());
2593 break;
2594 case 5: m_neuroHWInTSPrioT_Layer5->Fill(neuroinputsegment.priorityTime());
2595 m_neuroHWInTSFoundT_Layer5->Fill(neuroinputsegment.foundTime());
2596 m_neuroHWInTSPrioB_Layer5->Fill(neuroinputsegment.getPriorityPosition());
2597 m_neuroHWInTSLR_Layer5->Fill(neuroinputsegment.getLeftRight());
2598 break;
2599 case 6: m_neuroHWInTSPrioT_Layer6->Fill(neuroinputsegment.priorityTime());
2600 m_neuroHWInTSFoundT_Layer6->Fill(neuroinputsegment.foundTime());
2601 m_neuroHWInTSPrioB_Layer6->Fill(neuroinputsegment.getPriorityPosition());
2602 m_neuroHWInTSLR_Layer6->Fill(neuroinputsegment.getLeftRight());
2603 break;
2604 case 7: m_neuroHWInTSPrioT_Layer7->Fill(neuroinputsegment.priorityTime());
2605 m_neuroHWInTSFoundT_Layer7->Fill(neuroinputsegment.foundTime());
2606 m_neuroHWInTSPrioB_Layer7->Fill(neuroinputsegment.getPriorityPosition());
2607 m_neuroHWInTSLR_Layer7->Fill(neuroinputsegment.getLeftRight());
2608 break;
2609 case 8: m_neuroHWInTSPrioT_Layer8->Fill(neuroinputsegment.priorityTime());
2610 m_neuroHWInTSFoundT_Layer8->Fill(neuroinputsegment.foundTime());
2611 m_neuroHWInTSPrioB_Layer8->Fill(neuroinputsegment.getPriorityPosition());
2612 m_neuroHWInTSLR_Layer8->Fill(neuroinputsegment.getLeftRight());
2613 break;
2614 }
2615 }
2616 }
2617 if (nofinsegments > 0) {
2618 m_neuroHWInTSCount->Fill(nofinsegments);
2619 }
2620 }
2621
2622
2625 for (CDCTriggerTrack& sim2dtrack : m_sim2DTracksSWTS) {
2626 phinorm = sim2dtrack.getPhi0() * 180. / M_PI ;
2627 if (phinorm < 0.) { phinorm = phinorm + 360. ;}
2628 m_2DSWOutPhi0->Fill(phinorm);
2629 m_2DSWOutm_time->Fill(sim2dtrack.getTime());
2630 m_2DSWOutInvPt->Fill(sim2dtrack.getPt());
2631 }
2632 }
2633 if (m_unpacked2DTracksName != "") {
2634 int nof2douttracks = 0;
2635 for (CDCTriggerTrack& finder2dtrack : m_unpacked2DTracks) {
2636 ++nof2douttracks;
2637 phinorm = finder2dtrack.getPhi0() * 180. / M_PI ;
2638 if (phinorm < 0.) {phinorm = phinorm + 360. ;}
2639 m_2DHWOutPhi0->Fill(phinorm);
2640 m_2DHWOutm_time->Fill(finder2dtrack.getTime());
2641 m_2DHWOutInvPt->Fill(finder2dtrack.getPt());
2642 }
2643 if (nof2douttracks > 0) {
2644 m_2DHWOutTrackCount->Fill(nof2douttracks);
2645 if (m_unpackedNeuroTracksName != "") {
2646 m_neuroHWInVs2DOutTrackCount->Fill((nofintracks - nof2douttracks));
2647 }
2648 }
2649
2650 int nof2dinsegments = 0;
2651
2653 ++nof2dinsegments;
2654 if (!m_limitedoutput) {
2655 unsigned int sl = hit.getISuperLayer();
2656 switch (sl) {
2657 case 0: m_2DHWInTSPrioT_Layer0->Fill(hit.priorityTime());
2658 m_2DHWInTSFoundT_Layer0->Fill(hit.foundTime());
2659 m_2DHWInTSPrioB_Layer0->Fill(hit.getPriorityPosition());
2660 m_2DHWInTSLR_Layer0->Fill(hit.getLeftRight());
2661 break;
2662 case 2: m_2DHWInTSPrioT_Layer2->Fill(hit.priorityTime());
2663 m_2DHWInTSFoundT_Layer2->Fill(hit.foundTime());
2664 m_2DHWInTSPrioB_Layer2->Fill(hit.getPriorityPosition());
2665 m_2DHWInTSLR_Layer2->Fill(hit.getLeftRight());
2666 break;
2667 case 4: m_2DHWInTSPrioT_Layer4->Fill(hit.priorityTime());
2668 m_2DHWInTSFoundT_Layer4->Fill(hit.foundTime());
2669 m_2DHWInTSPrioB_Layer4->Fill(hit.getPriorityPosition());
2670 m_2DHWInTSLR_Layer4->Fill(hit.getLeftRight());
2671 break;
2672 case 6: m_2DHWInTSPrioT_Layer6->Fill(hit.priorityTime());
2673 m_2DHWInTSFoundT_Layer6->Fill(hit.foundTime());
2674 m_2DHWInTSPrioB_Layer6->Fill(hit.getPriorityPosition());
2675 m_2DHWInTSLR_Layer6->Fill(hit.getLeftRight());
2676 break;
2677 case 8: m_2DHWInTSPrioT_Layer8->Fill(hit.priorityTime());
2678 m_2DHWInTSFoundT_Layer8->Fill(hit.foundTime());
2679 m_2DHWInTSPrioB_Layer8->Fill(hit.getPriorityPosition());
2680 m_2DHWInTSLR_Layer8->Fill(hit.getLeftRight());
2681 break;
2682 }
2683 }
2684 }
2685 if (nof2dinsegments > 0) {
2686 }
2687 }
2688
2689
2690 // sw TS
2694 m_neuroSWTSSW2DInTSID->Fill(hit.getSegmentID());
2695 unsigned int sl = hit.getISuperLayer();
2696 switch (sl) {
2697 case 0: m_neuroSWTSSW2DInTSPrioT_Layer0->Fill(hit.priorityTime());
2698 m_neuroSWTSSW2DInTSFoundT_Layer0->Fill(hit.foundTime());
2699 m_neuroSWTSSW2DInTSPrioB_Layer0->Fill(hit.getPriorityPosition());
2700 m_neuroSWTSSW2DInTSLR_Layer0->Fill(hit.getLeftRight());
2701 break;
2702 case 1: m_neuroSWTSSW2DInTSPrioT_Layer1->Fill(hit.priorityTime());
2703 m_neuroSWTSSW2DInTSFoundT_Layer1->Fill(hit.foundTime());
2704 m_neuroSWTSSW2DInTSPrioB_Layer1->Fill(hit.getPriorityPosition());
2705 m_neuroSWTSSW2DInTSLR_Layer1->Fill(hit.getLeftRight());
2706 break;
2707 case 2: m_neuroSWTSSW2DInTSPrioT_Layer2->Fill(hit.priorityTime());
2708 m_neuroSWTSSW2DInTSFoundT_Layer2->Fill(hit.foundTime());
2709 m_neuroSWTSSW2DInTSPrioB_Layer2->Fill(hit.getPriorityPosition());
2710 m_neuroSWTSSW2DInTSLR_Layer2->Fill(hit.getLeftRight());
2711 break;
2712 case 3: m_neuroSWTSSW2DInTSPrioT_Layer3->Fill(hit.priorityTime());
2713 m_neuroSWTSSW2DInTSFoundT_Layer3->Fill(hit.foundTime());
2714 m_neuroSWTSSW2DInTSPrioB_Layer3->Fill(hit.getPriorityPosition());
2715 m_neuroSWTSSW2DInTSLR_Layer3->Fill(hit.getLeftRight());
2716 break;
2717 case 4: m_neuroSWTSSW2DInTSPrioT_Layer4->Fill(hit.priorityTime());
2718 m_neuroSWTSSW2DInTSFoundT_Layer4->Fill(hit.foundTime());
2719 m_neuroSWTSSW2DInTSPrioB_Layer4->Fill(hit.getPriorityPosition());
2720 m_neuroSWTSSW2DInTSLR_Layer4->Fill(hit.getLeftRight());
2721 break;
2722 case 5: m_neuroSWTSSW2DInTSPrioT_Layer5->Fill(hit.priorityTime());
2723 m_neuroSWTSSW2DInTSFoundT_Layer5->Fill(hit.foundTime());
2724 m_neuroSWTSSW2DInTSPrioB_Layer5->Fill(hit.getPriorityPosition());
2725 m_neuroSWTSSW2DInTSLR_Layer5->Fill(hit.getLeftRight());
2726 break;
2727 case 6: m_neuroSWTSSW2DInTSPrioT_Layer6->Fill(hit.priorityTime());
2728 m_neuroSWTSSW2DInTSFoundT_Layer6->Fill(hit.foundTime());
2729 m_neuroSWTSSW2DInTSPrioB_Layer6->Fill(hit.getPriorityPosition());
2730 m_neuroSWTSSW2DInTSLR_Layer6->Fill(hit.getLeftRight());
2731 break;
2732 case 7: m_neuroSWTSSW2DInTSPrioT_Layer7->Fill(hit.priorityTime());
2733 m_neuroSWTSSW2DInTSFoundT_Layer7->Fill(hit.foundTime());
2734 m_neuroSWTSSW2DInTSPrioB_Layer7->Fill(hit.getPriorityPosition());
2735 m_neuroSWTSSW2DInTSLR_Layer7->Fill(hit.getLeftRight());
2736 break;
2737 case 8: m_neuroSWTSSW2DInTSPrioT_Layer8->Fill(hit.priorityTime());
2738 m_neuroSWTSSW2DInTSFoundT_Layer8->Fill(hit.foundTime());
2739 m_neuroSWTSSW2DInTSPrioB_Layer8->Fill(hit.getPriorityPosition());
2740 m_neuroSWTSSW2DInTSLR_Layer8->Fill(hit.getLeftRight());
2741 break;
2742 }
2743 }
2744 }
2745
2746 static constexpr std::array<int, 9> nWiresInSuperLayer = {
2747 160, 160, 192, 224, 256, 288, 320, 352, 384
2748 };
2749 unsigned axhwts = 0;
2750 unsigned sthwts = 0;
2751 unsigned axswts = 0;
2752 unsigned stswts = 0;
2753
2754 std::vector<TSLine> hwtsoutput;
2755 std::vector<TSLine> swtsoutput;
2756 if (m_unpackedSegmentHitsName != "") {
2758 if (xhit.getISuperLayer() % 2 == 0) {
2759 axhwts ++;
2760 } else {
2761 sthwts ++;
2762 }
2763 int iSL = xhit.getISuperLayer();
2764 int iTS = xhit.getIWire();
2765 int nwires = nWiresInSuperLayer[ iSL ];
2766 if (iSL == 8) {
2767 iTS += 16;
2768 if (iTS > nwires) {
2769 iTS -= nwires;
2770 }
2771 }
2772 int tsIDInTracker = iTS - nwires * xhit.getQuadrant() / 4;
2773 if (tsIDInTracker < 0) {
2774 tsIDInTracker += nwires;
2775 }
2776 TSLine l(xhit);
2777 l.strline = "("
2778 + padto(std::to_string(xhit.getISuperLayer()), 2) + ", "
2779 + padto(std::to_string(xhit.getQuadrant()), 1) + ", "
2780 + padto(std::to_string(xhit.getSegmentID()), 4) + ", "
2781 + padto(std::to_string(xhit.getIWire()), 5) + ", "
2782 + padto(std::to_string(xhit.getPriorityPosition()), 2) + ", "
2783 + padto(std::to_string(xhit.getLeftRight()), 2) + ", "
2784 + padto(std::to_string(xhit.priorityTime()), 4) + ", "
2785 + padto(std::to_string(xhit.foundTime()), 3) + ", "
2786 + padto(std::to_string(tsIDInTracker), 4) + ") | ";
2787
2788 if (m_unpackedNeuroTracksName != "") {
2789 unsigned count2d = 0;
2791 count2d++;
2792 if (have_relation(track, xhit, m_unpackedNeuroInputSegmentsName)) {
2793 l.strline += std::to_string(count2d);
2794 } else {
2795 l.strline += ".";
2796 }
2797 }
2798 l.strline += " | ";
2799 unsigned counthwn = 0;
2800 for (CDCTriggerTrack& track : m_unpackedNeuroTracks) {
2801 counthwn++;
2802 if (have_relation(track, xhit, m_unpackedNeuroInputSegmentsName)) {
2803 if (track.getValidStereoBit()) {
2804 l.strline += std::to_string(counthwn);
2805 } else {
2806 l.strline += "x";
2807 }
2808 } else {
2809 l.strline += ".";
2810 }
2811 }
2812 l.strline += " | ";
2813 }
2814 if (m_simNeuroTracksName != "") {
2815 unsigned countswn = 0;
2816 for (CDCTriggerTrack& track : m_simNeuroTracks) {
2817 countswn++;
2818 if (have_relation(track, xhit, m_unpackedNeuroInputSegmentsName)) {
2819 l.strline += std::to_string(countswn);
2820 } else {
2821 l.strline += ".";
2822 }
2823 }
2824 l.strline += " | ";
2825 }
2826 if (m_recoTracksName != "") {
2827 unsigned countreco = 0;
2828 for (const auto& track : m_RecoTracks) {
2829 countreco++;
2830 bool related = false;
2831 for (const CDCTriggerSegmentHit& ts : track.getRelationsTo<CDCTriggerSegmentHit>(m_unpackedNeuroInputSegmentsName)) {
2832 if (&ts == &xhit) {related = true;}
2833 }
2834 if (related) {
2835 l.strline += std::to_string(countreco);
2836 } else {
2837 l.strline += ".";
2838 }
2839 }
2840 l.strline += " | ";
2841 }
2842 if (m_unpackedNeuroTracksName != "") {
2844 } else {
2845 hwtsoutput.push_back(l);
2846 }
2847 }
2848 }
2849 std::string axhw = std::to_string(axhwts) + " / " + std::to_string(sthwts);
2850 if (!m_limitedoutput && m_simSegmentHitsName != "") {
2851 for (const CDCTriggerSegmentHit& xhit : m_simSegmentHits) {
2852 if (xhit.getISuperLayer() % 2 == 0) {
2853 axswts ++;
2854 } else {
2855 stswts ++;
2856 }
2857 int iSL = xhit.getISuperLayer();
2858 int iTS = xhit.getIWire();
2859 int nwires = nWiresInSuperLayer[ iSL ];
2860 if (iSL == 8) {
2861 iTS += 16;
2862 if (iTS > nwires) {
2863 iTS -= nwires;
2864 }
2865 }
2866 int tsIDInTracker = iTS - nwires * xhit.getQuadrant() / 4;
2867 if (tsIDInTracker < 0) {
2868 tsIDInTracker += nwires;
2869 }
2870 TSLine l(xhit);
2871 l.strline = "("
2872 + padto(std::to_string(xhit.getISuperLayer()), 2) + ", "
2873 + padto(std::to_string(xhit.getSegmentID()), 4) + ", "
2874 + padto(std::to_string(xhit.getIWire()), 5) + ", "
2875 + padto(std::to_string(xhit.getPriorityPosition()), 2) + ", "
2876 + padto(std::to_string(xhit.getLeftRight()), 2) + ", "
2877 + padto(std::to_string(xhit.priorityTime()), 4) + ", "
2878 + padto(std::to_string(xhit.foundTime()), 3) + ", "
2879 + padto(std::to_string(tsIDInTracker), 4) + ") ";
2880
2881 if (m_sim2DTracksSWTSName != "") {
2882 unsigned count2d = 0;
2883 for (CDCTriggerTrack& track : m_sim2DTracksSWTS) {
2884 count2d++;
2885 if (have_relation(track, xhit, m_simSegmentHitsName)) {
2886 l.strline += std::to_string(count2d);
2887 } else {
2888 l.strline += ".";
2889 }
2890 }
2891 l.strline += " | ";
2892 }
2893 if (m_simNeuroTracksSWTSSW2DName != "") {
2894 unsigned countswn = 0;
2896 countswn++;
2897 if (have_relation(track, xhit, m_simSegmentHitsName)) {
2898 l.strline += std::to_string(countswn);
2899 } else {
2900 l.strline += ".";
2901 }
2902 }
2903 l.strline += " | ";
2904 }
2905 if (m_recoTracksName != "") {
2906 unsigned countreco = 0;
2907 for (const auto& track : m_RecoTracks) {
2908 countreco++;
2909 bool related = false;
2910 for (const CDCTriggerSegmentHit& ts : track.getRelationsTo<CDCTriggerSegmentHit>(m_simSegmentHitsName)) {
2911 if (&ts == &xhit) {related = true;}
2912 }
2913 if (related) {
2914 l.strline += std::to_string(countreco);
2915 } else {
2916 l.strline += ".";
2917 }
2918 }
2919 l.strline += " | ";
2920 }
2921 if (m_simNeuroTracksSWTSSW2DName != "") {
2923 } else {
2924 swtsoutput.push_back(l);
2925 }
2926 }
2927 }
2928 std::string hwtsstring = "(SL, Q, SID , WID , PP, LR, pT , fT , TSID) | HWNNIn2D | HWNeuro | SWNeuro | ";
2929 std::string swtsstring = "(SL, Q, SID , WID , PP, LR, pT , fT , TSID) | SW2D | SWNeuro | ";
2930 if (m_recoTracksName != "") {
2931 hwtsstring += "Reco | ";
2932 swtsstring += "Reco | ";
2933 }
2934 B2DEBUG(10, padright(" ", 100));
2935 B2DEBUG(10, "----------------------------------------------------------------------------------------------------");
2936 B2DEBUG(10, padright(" ", 100));
2937 std::string experimentstring = "Experiment " + std::to_string(eventMetaData->getExperiment()) + " Run " +
2938 std::to_string(eventMetaData->getRun()) + " Event " + std::to_string(eventMetaData->getEvent());
2939 B2DEBUG(10, padright(experimentstring, 100));
2940 B2DEBUG(10, padright(" ", 100));
2941 B2DEBUG(10, padright(" ", 100));
2943 B2DEBUG(10, padright("Number of NN HW TS (Axial/Stereo): ", 40) << padright(axhw, 60));
2944 B2DEBUG(10, padright("Number of HW 2DFinderTracks: ", 40) << padright(std::to_string(m_unpacked2DTracks.getEntries()),
2945 60));
2946 unsigned f2dtrn = 0;
2947 for (CDCTriggerTrack& ltrack : m_unpacked2DTracks) {
2948 f2dtrn++;
2949 std::stringstream strpt;
2950 std::stringstream stromega;
2951 std::stringstream strphi;
2952 strpt << std::fixed << std::setprecision(2) << ltrack.getPt();
2953 stromega << std::fixed << std::setprecision(2) << ltrack.getOmega();
2954 strphi << std::fixed << std::setprecision(2) << (ltrack.getPhi0() * 180. / M_PI);
2955 std::string trs = " HW2DFinderTrack Nr. " + std::to_string(f2dtrn) + " (pt, omega, phi) = ";
2956 trs += padto(strpt.str(), 6) + ", " + padto(stromega.str(), 6) + ", " + padto(strphi.str(), 6) + ")";
2957 B2DEBUG(15, padright(trs, 100));
2958 }
2959 B2DEBUG(10, padright("Number of HW NNInput2DFinderTracks: ",
2960 40) << padright(std::to_string(m_unpackedNeuroInput2DTracks.getEntries()), 60));
2961 unsigned n2dtrn = 0;
2963 n2dtrn++;
2964 std::stringstream strpt;
2965 std::stringstream stromega;
2966 std::stringstream strphi;
2967 strpt << std::fixed << std::setprecision(2) << ltrack.getPt();
2968 stromega << std::fixed << std::setprecision(2) << ltrack.getOmega();
2969 strphi << std::fixed << std::setprecision(2) << (ltrack.getPhi0() * 180. / M_PI);
2970 std::string trs = " HWNeuroInput2DTrack Nr. " + std::to_string(n2dtrn) + " (pt, omega, phi) = ";
2971 trs += padto(strpt.str(), 6) + ", " + padto(stromega.str(), 6) + ", " + padto(strphi.str(), 6) + ", " + ")";
2972 B2DEBUG(15, padright(trs, 100));
2973 }
2974 B2DEBUG(10, padright("Number of HW NeuroTracks: ",
2975 40) << padright(std::to_string(m_unpackedNeuroTracks.getEntries()), 60));
2976 unsigned hwntrn = 0;
2977 for (CDCTriggerTrack& ltrack : m_unpackedNeuroTracks) {
2978 hwntrn++;
2979 std::stringstream strpt;
2980 std::stringstream stromega;
2981 std::stringstream strphi;
2982 std::stringstream strtheta;
2983 std::stringstream strz;
2984 std::stringstream hwomega;
2985 std::stringstream hwphi;
2986 std::stringstream hwtheta;
2987 std::stringstream hwz;
2988 strpt << std::fixed << std::setprecision(2) << ltrack.getPt();
2989 stromega << std::fixed << std::setprecision(2) << ltrack.getOmega();
2990 strphi << std::fixed << std::setprecision(2) << (ltrack.getPhi0() * 180. / M_PI);
2991 strtheta << std::fixed << std::setprecision(2) << (ltrack.getDirection().Theta() * 180. / M_PI);
2992 strz << std::fixed << std::setprecision(2) << ltrack.getZ0();
2993 hwomega << std::fixed << std::setprecision(0) << ltrack.getRawOmega();
2994 hwphi << std::fixed << std::setprecision(0) << ltrack.getRawPhi0();
2995 hwtheta << std::fixed << std::setprecision(0) << ltrack.getRawTheta();
2996 hwz << std::fixed << std::setprecision(0) << ltrack.getRawZ();
2997 std::string trs = " HWNeuroTrack Nr. " + std::to_string(hwntrn) + " (pt,om,phi,theta,z)=(";
2998 trs += padto(strpt.str(), 4) + "," + padto(stromega.str(), 6) + "," + padto(strphi.str(), 6) + "," + padto(strtheta.str(),
2999 6) + "," + padto(strz.str(), 6) + "),(x," + padto(hwomega.str(), 3) + "," + padto(hwphi.str(), 3) + "," + padto(hwtheta.str(),
3000 3) + "," + padto(hwz.str(), 3) + ")";
3001 B2DEBUG(15, padright(trs, 100));
3002 std::string infostr = ", Found old track: ( ";
3003 for (bool x : ltrack.getFoundOldTrack()) {
3004 infostr += std::to_string(x);
3005 }
3006 infostr += "), ";
3007 infostr = padright(infostr, 50);
3008 infostr += "Drift threshold: ( ";
3009 for (bool x : ltrack.getDriftThreshold()) {
3010 infostr += std::to_string(x);
3011 }
3012 infostr += ")";
3013 infostr += (ltrack.getValidStereoBit()) ? " valid" : " NOT valid";
3014 B2DEBUG(15, padright(infostr, 100));
3015 std::string infostr2 = " std. ETF vld:";
3016 infostr2 += std::to_string(m_eventTime.isValid());
3017 infostr2 += ", ETFT0: ";
3018 if (m_eventTime.isValid()) {
3019 infostr2 += std::to_string(m_eventTime->getBinnedEventT0(Const::CDC));
3020 } else {
3021 infostr2 += " ";
3022 }
3023 infostr2 += ", ETF in CC: ";
3024 infostr2 += std::to_string(ltrack.getETF_unpacked());
3025 infostr2 += ", ETF recalculated: ";
3026 infostr2 += std::to_string(ltrack.getETF_recalced());
3027 B2DEBUG(15, padright(infostr2, 100));
3028 std::string info2str = " Expert Network Number: " + std::to_string(ltrack.getExpert());
3029 info2str += ", TSVector: (";
3030 for (unsigned x : ltrack.getTSVector()) {
3031 info2str += std::to_string(x) + " ";
3032 }
3033 info2str += ")";
3034 info2str += ", Quality=";
3035 info2str += std::to_string(ltrack.getQualityVector());
3036 B2DEBUG(15, padright(info2str, 100));
3037 CDCTriggerTrack* ftrack = ltrack.getRelatedFrom<CDCTriggerTrack>(m_unpackedNeuroInput2DTracksName);
3038 CDCTriggerTrack* strack = ftrack->getRelatedTo<CDCTriggerTrack>(m_simNeuroTracksName);
3039 if (strack) {
3040 vector<float> unpackedInput =
3041 ltrack.getRelatedTo<CDCTriggerMLPInput>(m_unpackedNeuroInputVectorName)->getInput();
3042 // vector<float> simInput = ltrack.getRelatedTo<CDCTriggerMLPInput>(m_unpackedNeuroInputVectorName)->getInput();
3043 vector<float> simInput =
3044 strack->getRelatedTo<CDCTriggerMLPInput>(m_simNeuroInputVectorName)->getInput();
3045 B2DEBUG(20, padright(" Input Vector unpacked (id, t, alpha), sim (id, t, alpha), delta (id, t, alpha):", 100));
3046 for (unsigned ii = 0; ii < unpackedInput.size(); ii += 3) {
3047 std::string lla = " " + std::to_string(ii / 3) + ")";
3048 std::string llb = " " + std::to_string(ii / 3) + ")";
3049 lla += "(" + padright(std::to_string(unpackedInput[ii]), 8) + " " + padright(std::to_string(unpackedInput[ii + 1]),
3050 8) + " " + padright(std::to_string(unpackedInput[ii + 2]), 8) + "),(" + padright(std::to_string(simInput[ii]),
3051 8) + " " + padright(std::to_string(simInput[ii + 1]), 8) + " " + padright(std::to_string(simInput[ii + 2]),
3052 8) + "),(" + padright(std::to_string(unpackedInput[ii] - simInput[ii]),
3053 8) + " " + padright(std::to_string(unpackedInput[ii + 1] - simInput[ii + 1]),
3054 8) + " " + padright(std::to_string(unpackedInput[ii + 2] - simInput[ii + 2]), 8) + ")";
3055 llb += " (" + padright(std::to_string(int(unpackedInput[ii] * 4096)),
3056 8) + " " + padright(std::to_string(int(unpackedInput[ii + 1] * 4096)),
3057 8) + " " + padright(std::to_string(int(unpackedInput[ii + 2] * 4096)),
3058 8) + "),(" + padright(std::to_string(int(simInput[ii] * 4096)), 8) + " " + padright(std::to_string(int(simInput[ii + 1] * 4096)),
3059 8) + " " + padright(std::to_string(int(simInput[ii + 2] * 4096)),
3060 8) + "),(" + padright(std::to_string(int(unpackedInput[ii] * 4096 - simInput[ii] * 4096)),
3061 8) + " " + padright(std::to_string(int(unpackedInput[ii + 1] * 4096 - simInput[ii + 1] * 4096)),
3062 8) + " " + padright(std::to_string(int(unpackedInput[ii + 2] * 4096 - simInput[ii + 2] * 4096)), 8) + ")";
3063
3064 // cout << hex;
3065 // cout.setf(ios::showbase);
3066 // cout << " (" << setw(11) << (int)(unpackedInput[ii] * 4096) << ", " << setw(11) << (int)(
3067 // unpackedInput[ii + 1] * 4096) << ", " << setw(11) << (int)(unpackedInput[ii + 2] * 4096) << "), ";
3068 // cout << "(" << setw(11) << (int)(simInput[ii] * 4096) << ", " << setw(11) << (int)(
3069 // simInput[ii + 1] * 4096) << ", " << setw(11) << (int)(simInput[ii + 2] * 4096) << "), ";
3070 // cout << "(" << setw(11) << (int)(unpackedInput[ii] * 4096 - simInput[ii] * 4096) << ", " << setw(11) << (int)(
3071 // unpackedInput[ii + 1] * 4096 - simInput[ii + 1] * 4096) << ", " << setw(11) << (int)(unpackedInput[ii + 2] * 4096 - simInput[ii +
3072 // 2] * 4096) << "), " << endl;
3073 // cout.unsetf(ios::showbase);
3074 // cout << dec;
3075 //std::cout << " (" << simInput[ii] / unpackedInput[ii] << std::endl << ", " << simInput[ii + 1] / unpackedInput[ii + 1] << ", " <<
3076 // simInput[ii + 2] / unpackedInput[ii + 2] << ")" << std::endl;
3077 B2DEBUG(30, padright(lla, 100));
3078 B2DEBUG(20, padright(llb, 100));
3079 }
3080 }
3081 }
3082
3083
3084 }
3085 if (!m_limitedoutput && m_simNeuroTracksName != "") {
3086 B2DEBUG(10, padright("Number of SW NeuroTracks: ", 40) << padright(std::to_string(m_simNeuroTracks.getEntries()), 60));
3087 unsigned swntrn = 0;
3088 for (CDCTriggerTrack& ltrack : m_simNeuroTracks) {
3089 swntrn++;
3090 std::stringstream strpt;
3091 std::stringstream stromega;
3092 std::stringstream strphi;
3093 std::stringstream strtheta;
3094 std::stringstream strz;
3095 std::stringstream strquality;
3096 strpt << std::fixed << std::setprecision(2) << ltrack.getPt();
3097 stromega << std::fixed << std::setprecision(2) << ltrack.getOmega();
3098 strphi << std::fixed << std::setprecision(2) << (ltrack.getPhi0() * 180. / M_PI);
3099 strtheta << std::fixed << std::setprecision(2) << (ltrack.getDirection().Theta() * 180. / M_PI);
3100 strz << std::fixed << std::setprecision(2) << ltrack.getZ0();
3101 strquality << std::fixed << ltrack.getQualityVector();
3102
3103 std::string trs = " SWNeuroTrack Nr. " + std::to_string(swntrn) + " (pt,om,phi,theta,z)=(";
3104 trs += padto(strpt.str(), 5) + "," + padto(stromega.str(), 5) + "," + padto(strphi.str(), 6) + "," + padto(strtheta.str(),
3105 6) + ", " + padto(strz.str(), 6) + ")"
3106 + " Q=" + strquality.str();
3108 B2DEBUG(15, padright(trs, 100));
3109 }
3110 }
3111 if (!m_limitedoutput && m_simSegmentHitsName != "") {
3112 std::string axsw = std::to_string(axswts) + " / " + std::to_string(stswts);
3113 B2DEBUG(10, padright("Number of AllSW TS (Axial/Stereo): ", 40) << padright(axsw, 60));
3115 B2DEBUG(10, padright("Number of SW 2DFinderSWTSTracks: ", 40) << padright(std::to_string(m_sim2DTracksSWTS.getEntries()),
3116 60));
3117 unsigned sf2dtrn = 0;
3118 for (CDCTriggerTrack& ltrack : m_sim2DTracksSWTS) {
3119 sf2dtrn++;
3120 std::stringstream strpt;
3121 std::stringstream stromega;
3122 std::stringstream strphi;
3123 strpt << std::fixed << std::setprecision(2) << ltrack.getPt();
3124 stromega << std::fixed << std::setprecision(2) << ltrack.getOmega();
3125 strphi << std::fixed << std::setprecision(2) << (ltrack.getPhi0() * 180. / M_PI);
3126 std::string trs = " SW2DFinderSWTSTrack Nr. " + std::to_string(sf2dtrn) + " (pt, omega, phi) = ";
3127 trs += padto(strpt.str(), 6) + ", " + padto(stromega.str(), 6) + ", " + padto(strphi.str(), 6) + ")";
3128 B2DEBUG(15, padright(trs, 100));
3129 }
3130 B2DEBUG(10, padright("Number of SW NeuroSWTSSW2DTracks: ",
3131 40) << padright(std::to_string(m_simNeuroTracksSWTSSW2D.getEntries()), 60));
3132 unsigned aswntrn = 0;
3134 aswntrn++;
3135 std::stringstream strpt;
3136 std::stringstream stromega;
3137 std::stringstream strphi;
3138 std::stringstream strtheta;
3139 std::stringstream strz;
3140 strpt << std::fixed << std::setprecision(2) << ltrack.getPt();
3141 stromega << std::fixed << std::setprecision(2) << ltrack.getOmega();
3142 strphi << std::fixed << std::setprecision(2) << (ltrack.getPhi0() * 180. / M_PI);
3143 strtheta << std::fixed << std::setprecision(2) << (ltrack.getDirection().Theta() * 180. / M_PI);
3144 strz << std::fixed << std::setprecision(2) << ltrack.getZ0();
3145 std::string trs = " SWNeuroSWTSSW2DTrack Nr. " + std::to_string(aswntrn) + " (pt, omega, phi, theta, z) = ";
3146 trs += padto(strpt.str(), 6) + ", " + padto(stromega.str(), 6) + ", " + padto(strphi.str(), 6) + ", " + padto(strtheta.str(),
3147 6) + ", " + padto(strz.str(), 6) + ")";
3148 B2DEBUG(15, padright(trs, 100));
3149 vector<float> simInputSWTSSW2D =
3150 ltrack.getRelatedTo<CDCTriggerMLPInput>(m_simNeuroInputVectorSWTSSW2DName)->getInput();
3151 B2DEBUG(20, padright(" Input Vector simulated (id, t, alpha):", 100));
3152 for (unsigned ii = 0; ii < simInputSWTSSW2D.size(); ii += 3) {
3153 std::string lla = " " + std::to_string(ii / 3) + ")";
3154 std::string llb = " " + std::to_string(ii / 3) + ")";
3155 lla += "(" + padright(std::to_string(simInputSWTSSW2D[ii]),
3156 8) + " " + padright(std::to_string(simInputSWTSSW2D[ii + 1]), 8) + " " + padright(std::to_string(simInputSWTSSW2D[ii + 2]),
3157 8) + ")";
3158 llb += " (" + padright(std::to_string(int(simInputSWTSSW2D[ii] * 4096)),
3159 8) + " " + padright(std::to_string(int(simInputSWTSSW2D[ii + 1] * 4096)),
3160 8) + " " + padright(std::to_string(int(simInputSWTSSW2D[ii + 2] * 4096)),
3161 8) + ")";
3162 B2DEBUG(30, padright(lla, 100));
3163 B2DEBUG(20, padright(llb, 100));
3164 }
3165
3166 }
3167 }
3168 }
3169 if (m_recoTracksName != "") {
3170 B2DEBUG(10, padright("Number of RecoTracks: ", 40) << padright(std::to_string(m_RecoTracks.getEntries()), 60));
3171 unsigned recotrn = 0;
3172 for (RecoTrack& ltrack : m_RecoTracks) {
3173 double phi0Target = 0;
3174 double invptTarget = 0;
3175 double thetaTarget = 0;
3176 double zTarget = 0;
3177 double d0Target = 0;
3178 bool foundValidRep = false;
3179 for (genfit::AbsTrackRep* rep : ltrack.getRepresentations()) {
3180 if (!ltrack.wasFitSuccessful(rep))
3181 continue;
3182 // get state (position, momentum etc.) from hit closest to IP and
3183 // extrapolate to z-axis (may throw an exception -> continue to next representation)
3184 try {
3185 genfit::MeasuredStateOnPlane state =
3186 ltrack.getMeasuredStateOnPlaneClosestTo(ROOT::Math::XYZVector(0, 0, 0), rep);
3187 rep->extrapolateToLine(state, TVector3(0, 0, -1000), TVector3(0, 0, 2000));
3188 // TODO check after matching
3189 // // flip tracks if necessary, such that trigger tracks and reco tracks
3190 // // point in the same direction
3191 // if (state.getMom().Dot(m_tracks[itrack]->getDirection()) < 0) {
3192 // state.setPosMom(state.getPos(), -state.getMom());
3193 // state.setChargeSign(-state.getCharge());
3194 // }
3195 // get track parameters
3196 phi0Target = state.getMom().Phi() * 180. / M_PI ;
3197 if (phi0Target < 0.) {phi0Target = phi0Target + 360. ;}
3198 invptTarget = state.getCharge() * state.getMom().Pt();
3199 thetaTarget = acos(state.getMom().CosTheta()) * 180 / M_PI;
3200 zTarget = state.getPos().Z();
3201 d0Target = state.getPos().Perp();
3202 } catch (...) {
3203 continue;
3204 }
3205 // break loop
3206 foundValidRep = true;
3207 break;
3208 }
3209 if (!foundValidRep) {
3210 B2DEBUG(150, "No valid representation found for RecoTrack, skipping.");
3211 continue;
3212 } else {
3213 if (m_maxRecoZDist != -1.0 and abs(zTarget) > m_maxRecoZDist) {
3214 B2DEBUG(150, "RecoTrack not close to IP (maxRecoZDist), zReco = " << zTarget);
3215 continue;
3216 }
3217 if (m_maxRecoD0Dist != -1.0 and abs(d0Target) > m_maxRecoD0Dist) {
3218 B2DEBUG(150, "RecoTrack not close to the z axis (maxRecoD0Dist), d0Reco = " << d0Target);
3219 continue;
3220 }
3221 }
3222 recotrn++;
3223 std::stringstream strpt;
3224 std::stringstream stromega;
3225 std::stringstream strphi;
3226 std::stringstream strtheta;
3227 std::stringstream strz;
3228 strpt << std::fixed << std::setprecision(2) << invptTarget;
3229 stromega << std::fixed << std::setprecision(2) << d0Target;
3230 strphi << std::fixed << std::setprecision(2) << phi0Target;
3231 strtheta << std::fixed << std::setprecision(2) << thetaTarget;
3232 strz << std::fixed << std::setprecision(2) << zTarget;
3233 std::string trs = " RecoTrack Nr. " + std::to_string(recotrn) + " (invpt, d0, phi, theta, z) = ";
3234 trs += padto(strpt.str(), 6) + ", " + padto(stromega.str(), 6) + ", " + padto(strphi.str(), 6) + ", " + padto(strtheta.str(),
3235 6) + ", " + padto(strz.str(), 6) + ")";
3236 B2DEBUG(15, padright(trs, 100));
3237 }
3238 }
3239 B2DEBUG(10, padright(" ", 100));
3240 B2DEBUG(10, padright(" ", 100));
3241 if (m_unpackedSegmentHitsName != "") {
3242 B2DEBUG(15, padright("Detailed information about HW TS ", 100));
3243 B2DEBUG(15, padright(" ", 100));
3244 B2DEBUG(15, padright(hwtsstring, 100));
3245 for (auto x : hwtsoutput) {
3246 B2DEBUG(15, padright(x.strline, 100));
3247 }
3248 B2DEBUG(15, padright(" ", 100));
3249 }
3250 if (!m_limitedoutput && m_simSegmentHitsName != "") {
3251 B2DEBUG(15, padright(" ", 100));
3252 B2DEBUG(15, padright("Detailed information about SW TS ", 100));
3253 B2DEBUG(15, padright(" ", 100));
3254 B2DEBUG(15, padright(swtsstring, 100));
3255 for (auto x : swtsoutput) {
3256 B2DEBUG(15, padright(x.strline, 100));
3257 }
3258 }
3259}
3260
3261
3263{
3264}
3265
3266
3268{
3269}
int getBinnedEventT0(const Const::EDetector detector) const
Return the stored binned event t0 for the given detector or 0 if nothing stored.
Class to hold some intermediate information for the monitoring of the neurotrigger.
StoreArray< CDCTriggerMLPInput > m_simNeuroInputVector
StoreArray for neuro input vector from TSIM.
TH1F * m_neuroSWTSSW2DInputID_Layer6
simulated id input in layer 6
TH1F * m_neuroRecoSWOutInvPt
reco matched Inverse Pt distribution from simulation (hw TS hw 2D sw NN)
TH1F * m_neuroSWTSSW2DSelTSPrioB_Layer8
Priority bits of track segments in layer 8.
TH1F * m_neuroSWTSSW2DSelTSPrioB_Layer4
Priority bits of track segments in layer 4.
TH1F * m_neuroSWTSSW2DInTSPrioB_Layer0
Priority bits of track segments in layer 0.
bool m_limitedoutput
Switch to supress output for dqm online module.
TH1F * m_neuroSWSelTSPrioB_Layer7
Priority bits of track segments in layer 7.
TH1F * m_neuroDeltaInputT
unpacked time input - TSIM time input
StoreArray< CDCTriggerSegmentHit > m_unpackedNeuroInputSegments
StoreArray for neuro input Track segments.
TH1F * m_neuroSWSelTSPrioT_Layer3
Priority time of track segments in layer 3.
TH1F * m_neuroHWInputID_Layer7
unpacked id input in layer 7
TH1F * m_neuroSWSelTSLR_Layer5
Left/Right of track segments in layer 5.
TH1F * m_neuroSWSelTSLR_Layer2
Left/Right of track segments in layer 2.
TH1F * m_neuroSWTSSW2DInputT_Layer6
simulated time input in layer 6
TH1F * m_neuroHWSelTSPrioT_Layer5
Priority time of selected track segments in layer 5.
TH1F * m_neuroSWSelTSPrioT_Layer1
Priority time of track segments in layer 1.
TH1F * m_2DHWInTSPrioB_Layer4
Priority bits of 2D track segments in layer 4.
StoreArray< CDCTriggerTrack > m_unpackedNeuroInput2DTracks
StoreArray for neuro input 2dfinder tracks.
TH1F * m_neuroHWInTSLR_Layer3
Left/Right of track segments in layer 3.
TH1F * m_neuroSWInputAlpha_Layer3
simulated alpha input in layer 3
StoreArray< CDCTriggerTrack > m_unpackedNeuroTracks
StoreArray for neuro tracks from unpacker.
TH1F * m_neuroSWOutInvPt
Inverse Pt distribution from simulation (hw TS hw 2D sw NN)
TH1F * m_neuroSWInputID_Layer7
simulated id input in layer 7
TH1F * m_neuroSWTSSW2DSelTSFoundT_Layer2
Found time of selected track segments in layer 2.
TH1F * m_2DHWOutInvPt
Inverse Pt of 2dtracks.
TH1F * m_neuroSWTSSW2DInputID_Layer2
simulated id input in layer 2
std::string m_unpackedSegmentHitsName
Name for TS hits from unpacker.
TH1F * m_neuroRecoHWOutZ
reco matched z distribution from unpacker
TH1F * m_neuroSWTSSW2DInTSFoundT_Layer1
Found time of track segments in layer 1.
TH1F * m_neuroHWInPhi0
Phi0 of incoming 2dtrack.
TH1F * m_2DHWOutTrackCount
number of 2dtracks per event
TH1F * m_neuroSWSelTSFoundT_Layer3
Found time of track segments in layer 3.
int m_recoTrackMultiplicity
Select events with a specific RecoTrack track multiplicity.
TH1F * m_neuroSWTSSW2DInputAlpha_Layer2
simulated alpha input in layer 2
TH1F * m_neuroHWInTSPrioB_Layer8
Priority bits of track segments in layer 8.
TH1F * m_neuroHWInTSPrioT_Layer5
Priority time of track segments in layer 5.
TH1F * m_neuroSWInputID_Layer6
simulated id input in layer 6
TH1F * m_neuroSWTSSW2DSelTSPrioB_Layer0
Priority bits of track segments in layer 0.
TH1F * m_RecoInvPt
reconstructed inverse Pt
TH1F * m_neuroSWTSSW2DInTSLR_Layer2
Left/Right of track segments in layer 2.
TH1F * m_neuroHWInputAlpha_Layer4
unpacked alpha input in layer 4
TH1F * m_neuroSWTSSW2DSelTSLR_Layer3
Left/Right of track segments in layer 3.
TH1F * m_neuroSWSelTSPrioT_Layer8
Priority time of track segments in layer 8.
TH1F * m_neuroHWInTSFoundT_Layer6
Found time of track segments in layer 6.
TH1F * m_neuroSWTSSW2DSelTSFoundT_Layer8
Found time of selected track segments in layer 8.
TH1F * m_neuroSWTSSW2DSelTSPrioT_Layer7
Priority time of selected track segments in layer 7.
TH1F * m_neuroSWTSSW2DSelTSPrioB_Layer3
Priority bits of track segments in layer 3.
TH1F * m_neuroSWSelTSPrioB_Layer0
Priority bits of track segments in layer 0.
TH1F * m_neuroHWOutQuad1Z
z distribution from unpacker (quadrant 1)
TH1F * m_neuroSWTSSW2DSelTSPrioT_Layer5
Priority time of selected track segments in layer 5.
TH1F * m_neuroSWTSSW2DSelTSFoundT_Layer3
Found time of selected track segments in layer 3.
TH1F * m_neuroSWTSSW2DOutInvPt
Inverse Pt distribution from simulation (sw TS sw 2D sw NN)
TH1F * m_neuroHWInVs2DOutTrackCount
neuroHWInTrackCount - 2DHWOutTrackCountput
TH2F * m_neuroScatterTheta
unpacked theta vs TSIM theta, scatter plot
TH1F * m_neuroSWInputT_Layer5
simulated time input in layer 5
TH1F * m_2DHWInTSFoundT_Layer2
Found time of 2D track segments in layer 2.
TH2F * m_RecoHWZScatter
matched to HW reconstructed z scatter plot
TH1F * m_neuroSWSelTSPrioB_Layer1
Priority bits of track segments in layer 1.
TH1F * m_neuroSWTSSW2DInTSCount
number of TS per event
double m_maxRecoD0Dist
Select only RecoTracks with a maximum d0 distance to the z axis.
TH1F * m_neuroRecoSWTSSW2DOutPhi0
reco matched phi distribution from simulation (sw TS sw 2D sw NN)
TH1F * m_neuroRecoHWOutCosTheta
reco matched cos theta distribution from unpacker
TH1F * m_neuroSWTSSW2DSelTSPrioT_Layer2
Priority time of selected track segments in layer 2.
TH1F * m_neuroHWSelTSCount
number of selected TS per SL
TH1F * m_neuroSWOutPhi0
phi distribution from simulation (hw TS hw 2D sw NN)
TH1F * m_DeltaRecoSWTSSW2DInvPt
matched to SWTSSW2DSWNN reconstructed inverse Pt
TH1F * m_neuroHWInTSLR_Layer2
Left/Right of track segments in layer 2.
TH1F * m_neuroHWInTSPrioT_Layer4
Priority time of track segments in layer 4.
TH1F * m_neuroRecoHWOutHitPattern
reco matched stereo hit pattern from unpacker
TH1F * m_neuroHWInm_time
m_time distribution from incoming 2dtracks
TH1F * m_RecoTrackCount
number of reconstructed tracks per event
TH1F * m_neuroSWSelTSLR_Layer6
Left/Right of track segments in layer 6.
TH1F * m_2DHWInTSFoundT_Layer4
Found time of 2D track segments in layer 4.
bool m_showRecoTracks
Switch to turn on a comparison with the reconstruction.
TH1F * m_neuroDeltaTheta
unpacked theta - TSIM theta
TH1F * m_neuroRecoSWTSSW2DOutInvPt
reco matched Inverse Pt distribution from simulation (sw TS sw 2D sw NN)
TH1F * m_neuroSWSelTSFoundT_Layer5
Found time of track segments in layer 5.
TH1F * m_neuroSWTSSW2DSelTSFoundT_Layer4
Found time of selected track segments in layer 4.
TH1F * m_RecoSWTSSW2DInvPt
matched to SWTSSW2DSWNN reconstructed inverse Pt
TH1F * m_2DHWInTSLR_Layer4
Left/Right of 2D track segments in layer 4.
TH1F * m_2DHWInTSFoundT_Layer0
Found time of 2D track segments in layer 0.
TH1F * m_neuroSWTSSW2DInputT_Layer1
simulated time input in layer 1
TH1F * m_neuroHWOutZ
z distribution of unpacked neuro tracks
TH1F * m_neuroHWInputT_Layer2
unpacked time input in layer 2
TH1F * m_neuroSWTSSW2DInputID_Layer5
simulated id input in layer 5
TH1F * m_DeltaRecoSWTSSW2DCosTheta
matched to SWTSSW2DSWNN reconstructed cos(theta)
virtual void initialize() override
Module functions.
TH1F * m_neuroSWTSSW2DInTSLR_Layer0
Left/Right of track segments in layer 0.
TH1F * m_neuroHWInInvPt
Inverse Pt distribution from incoming 2dtrack.
TH1F * m_neuroRecoHWOutInvPt
reco matched Inverse Pt distribution from unpacker
TH1F * m_neuroHWOutQuad2InvPt
Inverse Pt distribution from unpacker (quadrant 2)
TH1F * m_neuroSWSector
NN sector from simulation (hw TS hw 2D sw NN)
TH1F * m_neuroSWSelTSLR_Layer7
Left/Right of track segments in layer 7.
TH1F * m_neuroHWSelTSFoundT_Layer1
Found time of selected track segments in layer 1.
TH1F * m_neuroSWTSSW2DInTSPrioB_Layer1
Priority bits of track segments in layer 1.
TH1F * m_neuroHWInputAlpha_Layer3
unpacked alpha input in layer 3
TH1F * m_neuroSWTSSW2DInputAlpha_Layer6
simulated alpha input in layer 6
TH1F * m_neuroHWSelTSFoundT_Layer6
Found time of selected track segments in layer 6.
TH1F * m_neuroHWInTSFoundT_Layer2
Found time of track segments in layer 2.
TH1F * m_neuroHWOutQuad0Phi0
phi distribution from unpacker (quadrant 0)
TH1F * m_DeltaRecoHWInvPt
matched to HW reconstructed inverse Pt
TH1F * m_neuroSWInputT_Layer0
simulated time input in layer 0
TH1F * m_neuroHWInTSPrioT_Layer1
Priority time of track segments in layer 1.
TH1F * m_neuroSWTSSW2DInTSPrioT_Layer6
Priority time of track segments in layer 6.
TH1F * m_neuroSWInputAlpha_Layer1
simulated alpha input in layer 1
TH1F * m_neuroSWOutTrackCount
number of simulated tracks per event (hw TS hw 2D sw NN)
TH1F * m_neuroSWTSSW2DOutTrackCount
number of simulated tracks per event (sw TS sw 2D sw NN)
TH1F * m_neuroHWSelTSPrioB_Layer5
Priority bits of track segments in layer 5.
TH1F * m_neuroHWSelTSFoundT_Layer4
Found time of selected track segments in layer 4.
TH1F * m_neuroSWTSSW2DInputAlpha_Layer3
simulated alpha input in layer 3
TH1F * m_neuroSWTSSW2DInTSFoundT_Layer4
Found time of track segments in layer 4.
TH1F * m_2DHWInTSFoundT_Layer8
Found time of 2D track segments in layer 8.
TH1F * m_2DHWInTSPrioT_Layer8
Priority time of 2D track segments in layer 8.
void condFill(TH1F *histo, float value)
Fill a histogram only with non-zero values.
TH1F * m_simSameTS
number of TS selected in both, unpacked and TSIM tracks
TH1F * m_neuroHWInTSFoundT_Layer8
Found time of track segments in layer 8.
TH1F * m_neuroHWSelTSPrioB_Layer3
Priority bits of track segments in layer 3.
TH1F * m_neuroSWInputID_Layer8
simulated id input in layer 8
TH1F * m_2DHWInTSFoundT_Layer6
Found time of 2D track segments in layer 6.
TH1F * m_neuroRecoSWOutTrackCount
reco matched number of simulated tracks per event (hw TS hw 2D sw NN)
TH1F * m_neuroSWInputAlpha_Layer6
simulated alpha input in layer 6
TH1F * m_neuroSWTSSW2DInputT_Layer3
simulated time input in layer 3
TH1F * m_2DHWInTSPrioB_Layer8
Priority bits of 2D track segments in layer 8.
TH1F * m_neuroSWTSSW2DInTSLR_Layer3
Left/Right of track segments in layer 3.
TH1F * m_neuroHWOutQuad1InvPt
Inverse Pt distribution from unpacker (quadrant 1)
TH1F * m_neuroSWSelTSPrioT_Layer0
Priority time of track segments in layer 0.
virtual void event() override
Function to process event record.
TH1F * m_RecoSWPhi
matched to SW reconstructed phi
TH1F * m_RecoSWD0
matched to SW reconstructed d0
TH1F * m_neuroSWTSSW2DInTSFoundT_Layer3
Found time of track segments in layer 3.
TH1F * m_neuroRecoSWTSSW2DOutHitPattern
reco matched stereo hit pattern of simulated neuro tracks (sw TS sw 2D sw NN)
TH1F * m_neuroHWInTSLR_Layer5
Left/Right of track segments in layer 5.
StoreArray< CDCTriggerSegmentHit > m_simSegmentHits
StoreArray for simulated TS hits.
TH1F * m_neuroHWInTSLR_Layer6
Left/Right of track segments in layer 6.
TH1F * m_neuroSWSelTSPrioT_Layer6
Priority time of track segments in layer 6.
TH1F * m_neuroHWInputAlpha_Layer2
unpacked alpha input in layer 2
TH1F * m_RecoHWD0
matched to HW reconstructed d0
TH1F * m_neuroSWSelTSFoundT_Layer0
Found time of track segments in layer 0.
TH1F * m_neuroSWTSSW2DSelTSLR_Layer2
Left/Right of track segments in layer 2.
TH1F * m_neuroHWInTSPrioB_Layer1
Priority bits of track segments in layer 1.
TH1F * m_neuroHWInputID_Layer4
unpacked id input in layer 4
TH1F * m_neuroSWTSSW2DSelTSFoundT_Layer6
Found time of selected track segments in layer 6.
TH1F * m_neuroSWTSSW2DSelTSFoundT_Layer5
Found time of selected track segments in layer 5.
std::string m_simSegmentHitsName
Name for simulated TS hits.
TH1F * m_neuroSWTSSW2DSelTSID
ID of incoming track segments.
TH1F * m_neuroSWInputT_Layer7
simulated time input in layer 7
TH1F * m_neuroHWSelTSPrioB_Layer6
Priority bits of track segments in layer 6.
TH1F * m_neuroSWTSSW2DInTSLR_Layer1
Left/Right of track segments in layer 1.
TH1F * m_neuroSWSelTSID
ID of incoming track segments.
TH1F * m_neuroSWTSSW2DInTSLR_Layer4
Left/Right of track segments in layer 4.
TH1F * m_neuroSWTSSW2DSector
NN sector from simulation (sw TS sw 2D sw NN)
TH1F * m_neuroHWInTSPrioB_Layer5
Priority bits of track segments in layer 5.
TH1F * m_neuroSWTSSW2DInputID_Layer3
simulated id input in layer 3
TH1F * m_neuroSWTSSW2DInTSPrioT_Layer7
Priority time of track segments in layer 7.
TH1F * m_neuroSWSelTSPrioT_Layer4
Priority time of track segments in layer 4.
TH1F * m_neuroSWInputID_Layer0
simulated id input in layer 0
TH1F * m_neuroRecoSWOutHitPattern
reco matched stereo hit pattern of simulated neuro tracks (hw TS hw 2D sw NN)
TH1F * m_neuroSWTSSW2DSelTSLR_Layer8
Left/Right of track segments in layer 8.
std::string m_unpacked2DTracksName
Name for 2D finder tracks from unpacker.
TH1F * m_neuroHWSelTSPrioT_Layer2
Priority time of selected track segments in layer 2.
TH1F * m_neuroHWInTSFoundT_Layer7
Found time of track segments in layer 7.
TH2F * m_RecoSWTSSW2DZScatter
matched to SWTSSW2DSWNN reconstructed z scatter plot
TH1F * m_simDiffTS
number of TS selcted in TSIM but not in unpacked
TH1F * m_neuroSWTSSW2DInTSPrioB_Layer6
Priority bits of track segments in layer 6.
TH1F * m_neuroHWInTSPrioB_Layer4
Priority bits of track segments in layer 4.
TH1F * m_neuroSWOutZ
z distribution from simulation (hw TS hw 2D sw NN)
virtual void endRun() override
Function to process end_run record.
TH1F * m_neuroHWSelTSPrioB_Layer7
Priority bits of track segments in layer 7.
TH1F * m_neuroSWTSSW2DInputAlpha_Layer5
simulated alpha input in layer 5
TH1F * m_2DSWOutInvPt
Inverse Pt of 2dtracks (sw TS sw 2D)
TH1F * m_neuroSWTSSW2DInTSFoundT_Layer7
Found time of track segments in layer 7.
TH1F * m_neuroHWInputT_Layer1
unpacked time input in layer 1
TH1F * m_neuroHWInputID_Layer3
unpacked id input in layer 3
TH1F * m_neuroSWInputAlpha_Layer0
simulated alpha input in layer 0
TH1F * m_neuroSWTSSW2DOutHitPattern
stereo hit pattern of simulated neuro tracks (sw TS sw 2D sw NN)
std::string m_unpackedNeuroInputSegmentsName
Name for neuro input Track segments.
TH1F * m_neuroHWInTSPrioT_Layer2
Priority time of track segments in layer 2.
TH1F * m_neuroSWInputID_Layer4
simulated id input in layer 4
TH1F * m_RecoSWCosTheta
matched to SW reconstructed cos(theta)
TH1F * m_2DSWOutm_time
m_time 2dtracks (sw TS sw 2D)
TH1F * m_2DHWInTSPrioB_Layer0
Priority bits of 2D track segments in layer 0.
TH1F * m_2DSWOutTrackCount
number of 2dtracks per event (sw TS sw 2D)
virtual void terminate() override
Function to terminate module.
TH1F * m_neuroHWSelTSPrioT_Layer7
Priority time of selected track segments in layer 7.
TH1F * m_neuroHWSelTSPrioT_Layer0
Priority time of selected track segments in layer 0.
TH2F * m_RecoSWZScatter
matched to SW reconstructed z scatter plot
std::string m_unpackedNeuroInput2DTracksName
Name for neuro input 2d finder tracks.
TH1F * m_neuroHWInputT_Layer0
unpacked time input in layer 0
TH1F * m_neuroHWInputID_Layer6
unpacked id input in layer 6
TH1F * m_neuroRecoSWTSSW2DOutTrackCount
reco matched number of simulated tracks per event (sw TS sw 2D sw NN)
TH1F * m_neuroHWOutQuad0CosTheta
cos theta distribution from unpacker (quadrant 0)
TH1F * m_neuroSWTSSW2DSelTSLR_Layer4
Left/Right of track segments in layer 4.
TH1F * m_neuroSWSelTSPrioB_Layer8
Priority bits of track segments in layer 8.
TH1F * m_neuroHWInTSFoundT_Layer1
Found time of track segments in layer 1.
TH1F * m_neuroHWOutPt
Pt distribution of unpacked neuro tracks.
TH1F * m_neuroHWSelTSLR_Layer6
Left/Right of track segments in layer 6.
TH1F * m_neuroHWOutQuad3Phi0
phi distribution from unpacker (quadrant 3)
TH1F * m_neuroHWInputAlpha_Layer7
unpacked alpha input in layer 7
TH1F * m_neuroSWInputT_Layer8
simulated time input in layer 8
TH1F * m_neuroHWInTSFoundT_Layer0
Found time of track segments in layer 0.
TH1F * m_neuroHWOutQuad5CosTheta
cos theta distribution from unpacker (no quadrant set)
TH1F * m_2DSWOutPhi0
Phi0 of 2dtracks (sw TS sw 2D)
TH1F * m_neuroSWTSSW2DSelTSPrioT_Layer6
Priority time of selected track segments in layer 6.
StoreArray< CDCTriggerMLPInput > m_unpackedNeuroInputVector
StoreArray for neuro input vector from unpacker.
TH1F * m_neuroSWInputT_Layer6
simulated time input in layer 6
StoreArray< CDCTriggerMLPInput > m_simNeuroInputVectorSWTSSW2D
StoreArray for neuro input vector using simulated TS and simulated 2D.
TH1F * m_DeltaRecoSWInvPt
matched to SW reconstructed inverse Pt
TH1F * m_neuroHWSelTSLR_Layer0
Left/Right of track segments in layer 0.
TH1F * m_neuroSWTSSW2DInTSLR_Layer6
Left/Right of track segments in layer 6.
TH1F * m_neuroSWInputID_Layer1
simulated id input in layer 1
bool m_skipWithoutHWTS
Switch to skip events without unpacked TS.
TH1F * m_neuroSWTSSW2DInputT_Layer0
simulated time input in layer 0
TH1F * m_neuroSWTSSW2DSelTSPrioB_Layer7
Priority bits of track segments in layer 7.
TH1F * m_neuroHWInTSFoundT_Layer3
Found time of track segments in layer 3.
TH1F * m_neuroSWTSSW2DInTSFoundT_Layer6
Found time of track segments in layer 6.
TH1F * m_neuroHWInputT_Layer4
unpacked time input in layer 4
TH1F * m_neuroHWInputAlpha_Layer5
unpacked alpha input in layer 5
TH1F * m_RecoSWTSSW2DPhi
matched to SWTSSW2DSWNN reconstructed phi
TH1F * m_neuroHWInTSLR_Layer0
Left/Right of track segments in layer 0.
TH1F * m_neuroSWTSSW2DSelTSLR_Layer5
Left/Right of track segments in layer 5.
TH1F * m_DeltaRecoHWCosTheta
matched to HW reconstructed cos(theta)
TH1F * m_neuroSWTSSW2DInTSID
ID of incoming track segments.
TH1F * m_neuroHWInputID_Layer1
unpacked id input in layer 1
TH1F * m_RecoSWTSSW2DZ
matched to SWTSSW2DSWNN reconstructed z
TH1F * m_neuroSWTSSW2DInTSPrioB_Layer3
Priority bits of track segments in layer 3.
StoreArray< CDCTriggerTrack > m_simNeuroTracks
StoreArray for neuro tracks from TSIM.
TH1F * m_neuroHWSelTSLR_Layer3
Left/Right of track segments in layer 3.
TH1F * m_neuroHWSelTSFoundT_Layer8
Found time of selected track segments in layer 8.
TH1F * m_neuroSWTSSW2DSelTSLR_Layer6
Left/Right of track segments in layer 6.
TH1F * m_neuroRecoSWTSSW2DOutZ
reco matched z distribution from simulation (sw TS sw 2D sw NN)
std::string m_simNeuroInputVectorName
Name for simulated neuro input vector using HW TS, HW 2D.
TH1F * m_neuroSWTSSW2DInTSPrioB_Layer4
Priority bits of track segments in layer 4.
TH1F * m_2DHWInTSPrioT_Layer2
Priority time of 2D track segments in layer 2.
TH1F * m_neuroHWOutPhi0
phi distribution of unpacked neuro tracks
TH1F * m_neuroHWOutQuad3Z
z distribution from unpacker (quadrant 3)
TH1F * m_neuroHWInTSFoundT_Layer5
Found time of track segments in layer 5.
TH1F * m_neuroHWOutQuad1Phi0
phi distribution from unpacker (quadrant 1)
TH1F * m_neuroHWSector
sector of unpacked neuro tracks
TH1F * m_neuroSWTSSW2DSelTSPrioT_Layer8
Priority time of selected track segments in layer 8.
TH1F * m_neuroHWInTrackCount
number of neuro input 2dtracks per event
TH1F * m_neuroHWSelTSPrioB_Layer2
Priority bits of track segments in layer 2.
TH1F * m_neuroHWInTSLR_Layer4
Left/Right of track segments in layer 4.
TH1F * m_neuroSWOutHitPattern
stereo hit pattern of simulated neuro tracks (hw TS hw 2D sw NN)
TH1F * m_neuroSWTSSW2DSelTSPrioB_Layer6
Priority bits of track segments in layer 6.
TH1F * m_2DHWInTSLR_Layer0
Left/Right of 2D track segments in layer 0.
TH1F * m_neuroSWOutCosTheta
cos theta distribution from simulation (hw TS hw 2D sw NN)
TH1F * m_neuroSWInputT_Layer2
simulated time input in layer 2
TH1F * m_neuroRecoHWSector
reco matched NN sector from unpacker
TH1F * m_neuroSWTSSW2DInputID_Layer0
simulated id input in layer 0
TH1F * m_neuroSWTSSW2DInTSPrioT_Layer2
Priority time of track segments in layer 2.
TH1F * m_neuroHWInTSLR_Layer8
Left/Right of track segments in layer 8.
StoreArray< CDCTriggerSegmentHit > m_unpackedSegmentHits
StoreArray for TS hits from unpacker.
TH1F * m_neuroHWSelTSPrioB_Layer4
Priority bits of track segments in layer 4.
virtual void beginRun() override
Function to process begin_run record.
std::string m_histogramDirectoryName
Name of the histogram directory in ROOT file.
TH1F * m_neuroSWSelTSPrioB_Layer4
Priority bits of track segments in layer 4.
TH1F * m_neuroHWOutQuad0Z
z distribution from unpacker (quadrant 0)
TH1F * m_neuroHWInputAlpha_Layer1
unpacked alpha input in layer 1
TH1F * m_neuroHWInTSPrioB_Layer7
Priority bits of track segments in layer 7.
TH1F * m_neuroSWSelTSFoundT_Layer2
Found time of track segments in layer 2.
TH1F * m_neuroSWSelTSPrioT_Layer2
Priority time of track segments in layer 2.
TH1F * m_2DHWInTSLR_Layer6
Left/Right of 2D track segments in layer 6.
TH1F * m_neuroHWSelTSPrioT_Layer1
Priority time of selected track segments in layer 1.
StoreArray< CDCTriggerTrack > m_sim2DTracksSWTS
StoreArray for simulated 2D finder tracks using simulated TS.
TH1F * m_neuroHWSelTSLR_Layer5
Left/Right of track segments in layer 5.
std::string m_recoTracksName
Name for the RecoTrack array name.
TH1F * m_RecoHWPhi
matched to HW reconstructed phi
TH1F * m_neuroHWOutQuad1CosTheta
cos theta distribution from unpacker (quadrant 1)
TH1F * m_neuroSWInputID_Layer2
simulated id input in layer 2
TH1F * m_neuroHWSelTSFoundT_Layer5
Found time of selected track segments in layer 5.
TH1F * m_neuroHWOutInvPt
Inverse Pt distribution of unpacked neuro tracks.
TH1F * m_neuroSWSelTSLR_Layer3
Left/Right of track segments in layer 3.
TH1F * m_neuroSWTSSW2DInTSLR_Layer5
Left/Right of track segments in layer 5.
TH1F * m_neuroDeltaInputAlpha
unpacked alpha input - TSIM alpha input
TH1F * m_neuroHWInTSPrioT_Layer8
Priority time of track segments in layer 8.
TH1F * m_neuroSWSelTSPrioT_Layer7
Priority time of track segments in layer 7.
TH1F * m_neuroSWInputT_Layer3
simulated time input in layer 3
TH1F * m_neuroSWSelTSFoundT_Layer6
Found time of track segments in layer 6.
TH1F * m_neuroSWSelTSFoundT_Layer4
Found time of track segments in layer 4.
TH1F * m_neuroHWInTSCount
number of TS per track
TH1F * m_neuroRecoSWSector
reco matched NN sector from simulation (hw TS hw 2D sw NN)
TH1F * m_neuroDeltaSector
unpacked sector - TSIM sector
TH1F * m_neuroHWOutm_time
m_time distribution of unpacked neuro tracks
TH1F * m_2DHWInTSLR_Layer8
Left/Right of 2D track segments in layer 8.
TH1F * m_RecoHWCosTheta
matched to HW reconstructed cos(theta)
std::string m_simNeuroInputVectorSWTSSW2DName
Name for neuro input vector using simulated TS and simulated 2D.
TH1F * m_neuroSWSelTSFoundT_Layer1
Found time of track segments in layer 1.
TH1F * m_neuroSWTSSW2DSelTSPrioB_Layer5
Priority bits of track segments in layer 5.
TH1F * m_neuroRecoSWTSSW2DOutCosTheta
reco matched cos theta distribution from simulation (sw TS sw 2D sw NN)
TH1F * m_neuroHWSelTSLR_Layer7
Left/Right of track segments in layer 7.
double m_maxRecoZDist
Select only RecoTracks with a maximum z distance to the IP.
TH1F * m_neuroHWSelTSFoundT_Layer0
Found time of selected track segments in layer 0.
TH1F * m_neuroSWSelTSPrioB_Layer3
Priority bits of track segments in layer 3.
TH1F * m_neuroSWTSSW2DSelTSFoundT_Layer7
Found time of selected track segments in layer 7.
TH1F * m_neuroSWTSSW2DInputT_Layer5
simulated time input in layer 5
int m_nsamets
Number of identical track segments to be required for matching between HW and SW Neurotrigger.
TH1F * m_DeltaRecoSWCosTheta
matched to SW reconstructed cos(theta)
std::string m_simNeuroTracksName
Name for neuro tracks from TSIM using HW TS, HW 2D.
TH1F * m_neuroHWSelTSPrioB_Layer8
Priority bits of track segments in layer 8.
TH1F * m_RecoSWTSSW2DD0
matched to SWTSSW2DSWNN reconstructed d0
TH1F * m_neuroSWTSSW2DInTSFoundT_Layer5
Found time of track segments in layer 5.
TH1F * m_neuroSWTSSW2DInTSFoundT_Layer2
Found time of track segments in layer 2.
TH1F * m_neuroSWTSSW2DInputAlpha_Layer1
simulated alpha input in layer 1
unsigned getPattern(CDCTriggerTrack *track, std::string hitCollectionName)
get pattern of the track
TH1F * m_neuroSWTSSW2DSelTSPrioT_Layer0
Priority time of selected track segments in layer 0.
TH1F * m_neuroSWTSSW2DInputT_Layer7
simulated time input in layer 7
TH1F * m_neuroSWInputID_Layer5
simulated id input in layer 5
TH1F * m_neuroHWInTSPrioB_Layer6
Priority bits of track segments in layer 6.
TH1F * m_neuroSWSelTSLR_Layer0
Left/Right of track segments in layer 0.
TH1F * m_neuroSWTSSW2DSelTSPrioT_Layer4
Priority time of selected track segments in layer 4.
TH1F * m_neuroHWInputID_Layer2
unpacked id input in layer 2
TH1F * m_neuroHWInTSPrioT_Layer0
Priority time of track segments in layer 0.
TH1F * m_neuroRecoSWOutZ
reco matched z distribution from simulation (hw TS hw 2D sw NN)
TH1F * m_neuroSWInputAlpha_Layer4
simulated alpha input in layer 4
TH1F * m_neuroSWTSSW2DSelTSLR_Layer1
Left/Right of track segments in layer 1.
TH1F * m_neuroHWInputID_Layer5
unpacked id input in layer 5
TH1F * m_neuroSWTSSW2DInTSPrioB_Layer8
Priority bits of track segments in layer 8.
TH1F * m_neuroSWSelTSCount
number of TS per SL
TH1F * m_neuroSWTSSW2DInTSPrioB_Layer7
Priority bits of track segments in layer 7.
TH1F * m_neuroSWInputAlpha_Layer5
simulated alpha input in layer 5
std::string m_unpackedNeuroInputVectorName
Name for neuro input vector from unpacker.
TH1F * m_neuroHWSelTSPrioT_Layer3
Priority time of selected track segments in layer 3.
TH1F * m_neuroHWSelTSPrioT_Layer6
Priority time of selected track segments in layer 6.
TH1F * m_neuroSWTSSW2DInputT_Layer2
simulated time input in layer 2
TH1F * m_neuroSWTSSW2DInputID_Layer8
simulated id input in layer 8
std::string m_sim2DTracksSWTSName
Name for simulated 2D finder tracks using simulated TS.
TH1F * m_neuroSWTSSW2DInTSPrioB_Layer5
Priority bits of track segments in layer 5.
TH1F * m_RecoHWZ
matched to HW reconstructed z
TH1F * m_neuroHWSelTSFoundT_Layer7
Found time of selected track segments in layer 7.
TH1F * m_neuroSWTSSW2DInTSPrioT_Layer1
Priority time of track segments in layer 1.
TH2F * m_neuroScatterZ
unpacked z vs TSIM z, scatter plot
TH1F * m_neuroHWOutQuad2Z
z distribution from unpacker (quadrant 2)
TH1F * m_neuroDeltaInputID
unpacked ID input - TSIM ID input
TH1F * m_neuroHWSelTSLR_Layer4
Left/Right of track segments in layer 4.
TH1F * m_neuroHWInTSFoundT_Layer4
Found time of track segments in layer 4.
TH1F * m_neuroHWInTSPrioT_Layer3
Priority time of track segments in layer 3.
TH1F * m_RecoHWInvPt
matched to HW reconstructed inverse Pt
TH1F * m_neuroHWInTSPrioB_Layer2
Priority bits of track segments in layer 2.
TH1F * m_neuroHWInputAlpha_Layer0
unpacked alpha input in layer 0
TH1F * m_neuroHWOutTrackCount
number of unpacked tracks per event
TH1F * m_DeltaRecoSWZ
matched to SW reconstructed z
TH1F * m_neuroSWTSSW2DInputAlpha_Layer7
simulated alpha input in layer 7
TH1F * m_2DHWInTSLR_Layer2
Left/Right of 2D track segments in layer 2.
TH1F * m_neuroSWSelTSLR_Layer4
Left/Right of track segments in layer 4.
TH1F * m_2DHWInTSPrioT_Layer0
Priority time of 2D track segments in layer 0.
TH1F * m_DeltaRecoHWZ
matched to HW reconstructed z
TH1F * m_neuroRecoSWTSSW2DSector
reco matched NN sector from simulation (sw TS sw 2D sw NN)
bool isValidPattern(unsigned pattern)
Validity of the pattern.
TH1F * m_neuroSWTSSW2DInTSPrioT_Layer0
Priority time of track segments in layer 0.
StoreObjPtr< BinnedEventT0 > m_eventTime
storeobjpointer for event time
TH1F * m_neuroRecoHWOutPhi0
reco matched phi distribution from unpacker
TH1F * m_neuroSWTSSW2DOutPhi0
phi distribution from simulation (sw TS sw 2D sw NN)
std::string m_simNeuroTracksSWTSSW2DName
Name for neuro tracks using simulated TS and simulated 2D.
TH1F * m_neuroHWOutCosTheta
cos theta distribution of unpacked neuro tracks
TH1F * m_neuroHWSelTSPrioT_Layer4
Priority time of selected track segments in layer 4.
TH1F * m_neuroSWInputID_Layer3
simulated id input in layer 3
TH1F * m_neuroHWInputID_Layer0
unpacked id input in layer 0
TH1F * m_neuroHWSelTSLR_Layer1
Left/Right of track segments in layer 1.
TH1F * m_neuroSWTSSW2DOutZ
z distribution from simulation (sw TS sw 2D sw NN)
TH1F * m_neuroSWInputAlpha_Layer8
simulated alpha input in layer 8
TH1F * m_neuroHWOutQuad3CosTheta
cos theta distribution from unpacker (quadrant 3)
TH1F * m_neuroHWOutQuad3InvPt
Inverse Pt distribution from unpacker (quadrant 3)
TH1F * m_neuroHWInputT_Layer8
unpacked time input in layer 8
TH1F * m_neuroSWTSSW2DSelTSFoundT_Layer1
Found time of selected track segments in layer 1.
TH1F * m_neuroSWSelTSPrioB_Layer5
Priority bits of track segments in layer 5.
TH1F * m_neuroHWInTSLR_Layer7
Left/Right of track segments in layer 7.
TH1F * m_DeltaRecoSWTSSW2DZ
matched to SWTSSW2DSWNN reconstructed z
TH1F * m_2DHWInTSPrioB_Layer2
Priority bits of 2D track segments in layer 2.
TH1F * m_neuroSWTSSW2DInputID_Layer4
simulated id input in layer 4
TH1F * m_neuroHWInputAlpha_Layer8
unpacked alpha input in layer 8
TH1F * m_neuroSWInputT_Layer4
simulated time input in layer 4
TH1F * m_neuroSWSelTSPrioT_Layer5
Priority time of track segments in layer 5.
TH1F * m_neuroSWTSSW2DOutCosTheta
cos theta distribution from simulation (sw TS sw 2D sw NN)
StoreArray< CDCTriggerTrack > m_unpacked2DTracks
StoreArray for 2D finder tracks from unpacker.
TH1F * m_neuroHWInputT_Layer7
unpacked time input in layer 7
TH1F * m_2DHWInTSPrioT_Layer6
Priority time of 2D track segments in layer 6.
TH1F * m_neuroSWInputAlpha_Layer7
simulated alpha input in layer 7
TH1F * m_neuroSWTSSW2DSelTSFoundT_Layer0
Found time of selected track segments in layer 0.
TH1F * m_neuroSWTSSW2DInputAlpha_Layer4
simulated alpha input in layer 4
TH1F * m_neuroHWOutVsInTrackCount
neuroHWOutTracks - neuroHWInTrackCount
TH1F * m_RecoSWTSSW2DCosTheta
matched to SWTSSW2DSWNN reconstructed cos(theta)
TH1F * m_neuroSWTSSW2DInputID_Layer7
simulated id input in layer 7
TH1F * m_neuroHWInTSPrioB_Layer3
Priority bits of track segments in layer 3.
TH1F * m_neuroSWInputT_Layer1
simulated time input in layer 1
TH1F * m_2DHWInTSPrioB_Layer6
Priority bits of 2D track segments in layer 6.
std::string m_unpackedNeuroTracksName
Name for neuro tracks from unpacker.
TH1F * m_RecoCosTheta
reconstructed cos(theta)
TH1F * m_neuroHWSelTSLR_Layer2
Left/Right of track segments in layer 2.
TH1F * m_neuroSWSelTSLR_Layer8
Left/Right of track segments in layer 8.
TH1F * m_neuroHWOutQuad5Z
z distribution from unpacker (no quadrant set)
TH1F * m_neuroSWTSSW2DInTSPrioT_Layer4
Priority time of track segments in layer 4.
TH1F * m_neuroSWTSSW2DInTSPrioT_Layer8
Priority time of track segments in layer 8.
StoreArray< RecoTrack > m_RecoTracks
StoreArray for RecoTracks.
TH1F * m_neuroHWOutQuad5Phi0
phi distribution from unpacker (no quadrant set)
TH1F * m_neuroSWSelTSLR_Layer1
Left/Right of track segments in layer 1.
TH1F * m_RecoSWZ
matched to SW reconstructed z
TH1F * m_neuroHWSelTSFoundT_Layer2
Found time of selected track segments in layer 2.
TH1F * m_neuroSWSelTSPrioB_Layer6
Priority bits of track segments in layer 6.
TH1F * m_neuroSWSelTSFoundT_Layer8
Found time of track segments in layer 8.
TH1F * m_neuroHWSelTSPrioB_Layer1
Priority bits of track segments in layer 1.
TH1F * m_neuroSWInputAlpha_Layer2
simulated alpha input in layer 2
TH1F * m_neuroSWTSSW2DInputT_Layer8
simulated time input in layer 8
TH1F * m_neuroSWSelTSPrioB_Layer2
Priority bits of track segments in layer 2.
TH1F * m_neuroSWTSSW2DInTSPrioT_Layer5
Priority time of track segments in layer 5.
TH1F * m_neuroSWTSSW2DSelTSLR_Layer0
Left/Right of track segments in layer 0.
TH1F * m_neuroSWTSSW2DInTSLR_Layer7
Left/Right of track segments in layer 7.
TH1F * m_neuroHWOutHitPattern
stereo hit pattern of simulated neuro tracks (hw TS hw 2D sw NN)
TH1F * m_neuroHWOutQuad0InvPt
Inverse Pt distribution from unpacker (quadrant 0)
TH1F * m_DeltaRecoSWTSSW2DPhi
matched to SWTSSW2DSWNN reconstructed phi
TH1F * m_neuroSWTSSW2DSelTSPrioB_Layer1
Priority bits of track segments in layer 1.
TH1F * m_DeltaRecoHWPhi
matched to HW reconstructed phi
TH1F * m_neuroHWInTSPrioT_Layer7
Priority time of track segments in layer 7.
TH1F * m_neuroHWOutQuad2CosTheta
cos theta distribution from unpacker (quadrant 2)
TH1F * m_neuroSWTSSW2DSelTSCount
number of TS per SL
TH1F * m_DeltaRecoSWPhi
matched to SW reconstructed phi
TH1F * m_neuroSWTSSW2DSelTSPrioB_Layer2
Priority bits of track segments in layer 2.
TH1F * m_neuroSWTSSW2DInTSPrioB_Layer2
Priority bits of track segments in layer 2.
TH1F * m_neuroSWTSSW2DSelTSLR_Layer7
Left/Right of track segments in layer 7.
TH1F * m_neuroRecoHWOutTrackCount
reco matched number of unpacked and matched tracks per event
TH1F * m_neuroHWSelTSPrioT_Layer8
Priority time of selected track segments in layer 8.
TH1F * m_neuroDeltaTSID
unpacked selected TSID - TSIM selected TSID
StoreArray< CDCTriggerTrack > m_simNeuroTracksSWTSSW2D
StoreArray for neuro tracks using simulated TS and simulated 2D.
TH1F * m_neuroSWTSSW2DInTSFoundT_Layer8
Found time of track segments in layer 8.
TH1F * m_neuroHWInTSLR_Layer1
Left/Right of track segments in layer 1.
TH1F * m_neuroHWInputAlpha_Layer6
unpacked alpha input in layer 6
TH1F * m_neuroHWOutQuad5InvPt
Inverse Pt distribution from unpacker (no quadrant set)
TH1F * m_neuroHWInputT_Layer3
unpacked time input in layer 3
TH1F * m_neuroRecoSWOutPhi0
reco matched phi distribution from simulation (hw TS hw 2D sw NN)
TH1F * m_neuroHWInputT_Layer5
unpacked time input in layer 5
TH1F * m_neuroHWSelTSPrioB_Layer0
Priority bits of track segments in layer 0.
TH1F * m_neuroSWTSSW2DInputAlpha_Layer0
simulated alpha input in layer 0
TH1F * m_neuroHWInputID_Layer8
unpacked id input in layer 8
TH1F * m_neuroSWTSSW2DInputAlpha_Layer8
simulated alpha input in layer 8
TH1F * m_neuroHWInTSPrioB_Layer0
Priority bits of track segments in layer 0.
TH1F * m_neuroHWInputT_Layer6
unpacked time input in layer 6
TH1F * m_neuroHWInTSPrioT_Layer6
Priority time of track segments in layer 6.
TH1F * m_neuroSWTSSW2DInTSLR_Layer8
Left/Right of track segments in layer 8.
TH1F * m_neuroRecoSWOutCosTheta
reco matched cos theta distribution from simulation (hw TS hw 2D sw NN)
TH1F * m_neuroHWSelTSLR_Layer8
Left/Right of track segments in layer 8.
TH1F * m_2DHWInTSPrioT_Layer4
Priority time of 2D track segments in layer 4.
TH1F * m_neuroSWTSSW2DInTSPrioT_Layer3
Priority time of track segments in layer 3.
TH1F * m_neuroSWSelTSFoundT_Layer7
Found time of track segments in layer 7.
TH1F * m_neuroSWTSSW2DInputT_Layer4
simulated time input in layer 4
TH1F * m_neuroHWSelTSFoundT_Layer3
Found time of selected track segments in layer 3.
TH1F * m_neuroHWOutQuad2Phi0
phi distribution from unpacker (quadrant 2)
TH1F * m_neuroSWTSSW2DInTSFoundT_Layer0
Found time of track segments in layer 0.
TH1F * m_neuroHWInTSID
ID of incoming track segments.
virtual void defineHisto() override
Histogram definitions such as TH1(), TH2(), TNtuple(), TTree()....
TH1F * m_neuroSWTSSW2DSelTSPrioT_Layer1
Priority time of selected track segments in layer 1.
TH1F * m_neuroHWSelTSID
ID of selected track segments.
TH1F * m_neuroSWTSSW2DInputID_Layer1
simulated id input in layer 1
TH1F * m_neuroSWTSSW2DSelTSPrioT_Layer3
Priority time of selected track segments in layer 3.
TH1F * m_RecoSWInvPt
matched to SW reconstructed inverse Pt
Combination of several CDCHits to a track segment hit for the trigger.
short foundTime() const
get time when segment hit was found in trigger clocks
Track created by the CDC trigger.
bool getValidStereoBit() const
returns true, if at least 3 stereo ts were found
void setQualityVector(const unsigned newbits)
setter and getter for the quality vector.
double getPt() const
get the absolute value of the transverse momentum at the perigee assuming d0 = 0
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool requireRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, const std::string &namedRelation="") const
Produce error if no relation from this array to 'toArray' has been registered.
Definition: StoreArray.h:155
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
bool isValid() const
Check whether the object was created.
Definition: StoreObjPtr.h:111
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28
Abstract base class for different kinds of events.
STL namespace.