9#include "trg/cdc/modules/dqmneuro/CDCTriggerNeuroDQMModule.h"
11#include <framework/dataobjects/EventMetaData.h>
13#include "TDirectory.h"
14#include <tracking/dataobjects/RecoTrack.h>
35 "Switch to supress output for online dqm purposes. ",
38 "The name of the StoreArray of the unpacked CDCTriggerSegmentHits",
39 string(
"CDCTriggerSegmentHits"));
41 "The name of the StoreArray of the unpacked 2D finder tracks",
42 string(
"CDCTrigger2DFinderTracks"));
44 "The name of the StoreArray of the unpacked neurotrigger tracks",
45 string(
"CDCTriggerNeuroTracks"));
47 "The name of the StoreArray of the neurotrigger input 2d tracks",
48 string(
"CDCTriggerNNInput2DFinderTracks"));
50 "The name of the StoreArray of the neurotrigger input segment hits",
51 string(
"CDCTriggerNNInputSegmentHits"));
53 "The name of the StoreArray of the neurotrigger tracks from TSIM",
56 "Name of the directory where histograms will be placed",
59 "StoreArray name for simulated TS hits",
string(
""));
61 "StoreArray name for simulated 2D finder tracks using simulated TS",
string(
""));
63 "StoreArray name for neuro tracks using simulated TS and simulated 2D",
string(
""));
65 "switch to turn on a comparison with the reconstruction, DEPRECATED! Use RecoTracks='RecoTracks' (='') instead!",
68 "Name of the RecoTrack StoreArray. Leave empty for skipping them.",
71 "Select events with a specific RecoTrack track multiplicity. -1 for all events",
74 "Switch to skip events without unpacked TS",
77 "Select only RecoTracks with a maximum z distance to the IP. -1.0 for all tracks",
80 "Select only RecoTracks with a maximum d0 distance to the z axis. -1.0 for all tracks",
83 "Number of identical track segments to be required for matching between HW and SW Neurotrigger",
99 TDirectory* oldDir = gDirectory;
109 "z distribution of unpacked neuro tracks; z [cm]",
112 "cos theta distribution of unpacked neuro tracks; cos(#theta) ",
115 "phi distribution of unpacked neuro tracks; #phi [#circ]",
118 "Inverse Pt distribution of unpacked neuro tracks; p_{T}^{-1} [GeV^{-1}]",
121 "Pt distribution of unpacked neuro tracks; p_{T} [GeV]",
124 "stereo hit pattern of unpacked neuro tracks; pattern",
126 m_neuroHWOutm_time =
new TH1F(
"NeuroHWOutM_time",
"m_time distribution of unpacked neuro tracks; clock cycle",
129 "number of unpacked neuro tracks per event",
132 "sector of unpacked neuro tracks; sector",
137 "Inverse Pt distribution from incoming 2dtrack; p_{T}^{-1} [GeV^{-1}]",
139 m_neuroHWInPhi0 =
new TH1F(
"NeuroHWInPhi0",
"Phi0 of incoming 2dtrack; #phi [#circ]",
141 m_neuroHWInm_time =
new TH1F(
"NeuroHWInM_time",
"m_time distribution from incoming 2dtracks; clock cycle",
146 "number of neuroHWOutTracks - number of 2dinTracks",
148 m_neuroHWInTSID =
new TH1F(
"NeuroHWInTSID",
"ID of incoming track segments",
152 m_neuroHWSelTSID =
new TH1F(
"NeuroHWSelTSID",
"ID of selected track segments",
154 m_neuroHWSelTSCount =
new TH1F(
"NeuroHWSelTSCount",
"number of selected TS per SL; sl", 9, 0, 9);
189 m_2DHWInTSLR_Layer0 =
new TH1F(
"2DHWInTSLR_Layer0",
"Left/Right of track segments in layer 0",
191 m_2DHWInTSLR_Layer2 =
new TH1F(
"2DHWInTSLR_Layer2",
"Left/Right of track segments in layer 2",
193 m_2DHWInTSLR_Layer4 =
new TH1F(
"2DHWInTSLR_Layer4",
"Left/Right of track segments in layer 4",
195 m_2DHWInTSLR_Layer6 =
new TH1F(
"2DHWInTSLR_Layer6",
"Left/Right of track segments in layer 6",
197 m_2DHWInTSLR_Layer8 =
new TH1F(
"2DHWInTSLR_Layer8",
"Left/Right of track segments in layer 8",
203 "z distribution of neuro tracks; z [cm]",
206 "cos theta distribution of neuro tracks; cos(#theta) ",
209 "Pt distribution from unpacker; p_{T}^{-1} [GeV^{-1}]",
212 "phi distribution from unpacker; #phi [#circ]",
216 "z distribution of neuro tracks; z [cm]",
219 "cos theta distribution of neuro tracks; cos(#theta) ",
222 "Pt distribution from unpacker; p_{T}^{-1} [GeV^{-1}]",
225 "phi distribution from unpacker; #phi [#circ]",
229 "z distribution of neuro tracks; z [cm]",
232 "cos theta distribution of neuro tracks; cos(#theta) ",
235 "phi distribution from unpacker; #phi [#circ]",
238 "Pt distribution from unpacker; p_{T}^{-1} [GeV^{-1}]",
242 "z distribution of neuro tracks; z [cm]",
245 "cos theta distribution of neuro tracks; cos(#theta) ",
248 "phi distribution from unpacker; #phi [#circ]",
251 "Pt distribution from unpacker; p_{T}^{-1} [GeV^{-1}]",
255 "z distribution of neuro tracks; z [cm]",
258 "cos theta distribution of neuro tracks; cos(#theta) ",
261 "phi distribution from unpacker; #phi [#circ]",
264 "Pt distribution from unpacker; p_{T}^{-1} [GeV^{-1}]",
361 "First found time of selected TS - found time of Neuro Track in SL 0",
364 "First found time of selected TS - found time of Neuro Track in SL 1",
367 "First found time of selected TS - found time of Neuro Track in SL 2",
370 "First found time of selected TS - found time of Neuro Track in SL 3",
373 "First found time of selected TS - found time of Neuro Track in SL 4",
376 "First found time of selected TS - found time of Neuro Track in SL 5",
379 "First found time of selected TS - found time of Neuro Track in SL 6",
382 "First found time of selected TS - found time of Neuro Track in SL 7",
385 "First found time of selected TS - found time of Neuro Track in SL 8",
428 "unpacked id input in layer 0; id",
431 "unpacked time input in layer 0; time",
434 "unpacked alpha input in layer 0; alpha",
437 "unpacked id input in layer 1; id",
440 "unpacked time input in layer 1; time",
443 "unpacked alpha input in layer 1; alpha",
446 "unpacked id input in layer 2; id",
449 "unpacked time input in layer 2; time",
452 "unpacked alpha input in layer 2; alpha",
455 "unpacked id input in layer 3; id",
458 "unpacked time input in layer 3; time",
461 "unpacked alpha input in layer 3; alpha",
464 "unpacked id input in layer 4; id",
467 "unpacked time input in layer 4; time",
470 "unpacked alpha input in layer 4; alpha",
473 "unpacked id input in layer 5; id",
476 "unpacked time input in layer 5; time",
479 "unpacked alpha input in layer 5; alpha",
482 "unpacked id input in layer 6; id",
485 "unpacked time input in layer 6; time",
488 "unpacked alpha input in layer 6; alpha",
491 "unpacked id input in layer 7; id",
494 "unpacked time input in layer 7; time",
497 "unpacked alpha input in layer 7; alpha",
500 "unpacked id input in layer 8; id",
503 "unpacked time input in layer 8; time",
506 "unpacked alpha input in layer 8; alpha",
511 "Inverse Pt of 2dtracks; p_{T}^{-1} [GeV^{-1}]",
513 m_2DHWOutPhi0 =
new TH1F(
"2DHWOutPhi0",
"Phi0 of 2dtracks; #phi [#circ]",
515 m_2DHWOutm_time =
new TH1F(
"2DHWOutM_time",
"m_time of 2dtracks; clock cycle",
517 m_2DHWOutTrackCount =
new TH1F(
"2DHWOutTrackCount",
"number of 2dtracks per event", 20, 0, 20);
524 "z distribution from simulation, hw TS hw 2D; z [cm]",
527 "cos theta distribution from simulation, hw TS hw 2D; cos(#theta) ",
530 "Inverse Pt distribution from simulation, hw TS hw 2D; p_{T}^{-1} [GeV^{-1}]",
533 "phi distribution from simulation, hw TS hw 2D; #phi [#circ]",
536 "stereo hit pattern of simulated neuro tracks, hw TS hw 2D; pattern",
539 "number of neuro tracks per event from simulation, hw TS hw 2D",
542 "sector of simulated neuro tracks, hw TS hw 2D; sector",
545 m_neuroSWSelTSID =
new TH1F(
"NeuroSWSelTSID",
"ID of selected track segments",
547 m_neuroSWSelTSCount =
new TH1F(
"NeuroSWSelTSCount",
"number of selected TS per SL; sl", 9, 0, 9);
567 "First found time of selected TS - found time of Neuro Track in SL 0",
570 "First found time of selected TS - found time of Neuro Track in SL 1",
573 "First found time of selected TS - found time of Neuro Track in SL 2",
576 "First found time of selected TS - found time of Neuro Track in SL 3",
579 "First found time of selected TS - found time of Neuro Track in SL 4",
582 "First found time of selected TS - found time of Neuro Track in SL 5",
585 "First found time of selected TS - found time of Neuro Track in SL 6",
588 "First found time of selected TS - found time of Neuro Track in SL 7",
591 "First found time of selected TS - found time of Neuro Track in SL 8",
635 "simulated id input in layer 0; id",
638 "simulated time input in layer 0; time",
641 "simulated alpha input in layer 0; alpha",
644 "simulated id input in layer 1; id",
647 "simulated time input in layer 1; time",
650 "simulated alpha input in layer 1; alpha",
653 "simulated id input in layer 2; id",
656 "simulated time input in layer 2; time",
659 "simulated alpha input in layer 2; alpha",
662 "simulated id input in layer 3; id",
665 "simulated time input in layer 3; time",
668 "simulated alpha input in layer 3; alpha",
671 "simulated id input in layer 4; id",
674 "simulated time input in layer 4; time",
677 "simulated alpha input in layer 4; alpha",
680 "simulated id input in layer 5; id",
683 "simulated time input in layer 5; time",
686 "simulated alpha input in layer 5; alpha",
689 "simulated id input in layer 6; id",
692 "simulated time input in layer 6; time",
695 "simulated alpha input in layer 6; alpha",
698 "simulated id input in layer 7; id",
701 "simulated time input in layer 7; time",
704 "simulated alpha input in layer 7; alpha",
707 "simulated id input in layer 8; id",
710 "simulated time input in layer 8; time",
713 "simulated alpha input in layer 8; alpha",
720 "Inverse Pt of 2dtracks from simulation, sw TS sw 2D; p_{T}^{-1} [GeV^{-1}]",
722 m_2DSWOutPhi0 =
new TH1F(
"2DSWOutPhi0",
"Phi0 of 2dtracks from simulation, sw TS sw 2D; #phi [#circ]",
724 m_2DSWOutm_time =
new TH1F(
"2DSWOutM_time",
"m_time of 2dtracks from simulation, sw TS sw 2D; clock cycle",
726 m_2DSWOutTrackCount =
new TH1F(
"2DSWOutTrackCount",
"number of 2dtracks per event from simulation, sw TS sw 2D", 20, 0, 20);
732 "z distribution from simulation, sw TS sw 2D; z [cm]",
735 "cos theta distribution from simulation, sw TS sw 2D; cos(#theta) ",
738 "Inverse Pt distribution from simulation, sw TS sw 2D; p_{T}^{-1} [GeV^{-1}]",
741 "phi distribution from simulation, sw TS sw 2D; #phi [#circ]",
744 "stereo hit pattern of simulated neuro tracks, sw TS sw 2D; pattern",
747 "number of simulated neuro tracks per event, sw TS sw 2D",
750 "sector of simulated neuro tracks, sw TS sw 2D; sector",
775 "First found time of selected TS - found time of Neuro Track in SL 0",
778 "First found time of selected TS - found time of Neuro Track in SL 1",
781 "First found time of selected TS - found time of Neuro Track in SL 2",
784 "First found time of selected TS - found time of Neuro Track in SL 3",
787 "First found time of selected TS - found time of Neuro Track in SL 4",
790 "First found time of selected TS - found time of Neuro Track in SL 5",
793 "First found time of selected TS - found time of Neuro Track in SL 6",
796 "First found time of selected TS - found time of Neuro Track in SL 7",
799 "First found time of selected TS - found time of Neuro Track in SL 8",
866 "First found time of selected TS - found time of Neuro Track in SL 0",
869 "First found time of selected TS - found time of Neuro Track in SL 1",
872 "First found time of selected TS - found time of Neuro Track in SL 2",
875 "First found time of selected TS - found time of Neuro Track in SL 3",
878 "First found time of selected TS - found time of Neuro Track in SL 4",
881 "First found time of selected TS - found time of Neuro Track in SL 5",
884 "First found time of selected TS - found time of Neuro Track in SL 6",
887 "First found time of selected TS - found time of Neuro Track in SL 7",
890 "First found time of selected TS - found time of Neuro Track in SL 8",
933 "simulated id input in layer 0; id",
936 "simulated time input in layer 0; time",
939 "simulated alpha input in layer 0; alpha",
942 "simulated id input in layer 1; id",
945 "simulated time input in layer 1; time",
948 "simulated alpha input in layer 1; alpha",
951 "simulated id input in layer 2; id",
954 "simulated time input in layer 2; time",
957 "simulated alpha input in layer 2; alpha",
960 "simulated id input in layer 3; id",
963 "simulated time input in layer 3; time",
966 "simulated alpha input in layer 3; alpha",
969 "simulated id input in layer 4; id",
972 "simulated time input in layer 4; time",
975 "simulated alpha input in layer 4; alpha",
978 "simulated id input in layer 5; id",
981 "simulated time input in layer 5; time",
984 "simulated alpha input in layer 5; alpha",
987 "simulated id input in layer 6; id",
990 "simulated time input in layer 6; time",
993 "simulated alpha input in layer 6; alpha",
996 "simulated id input in layer 7; id",
999 "simulated time input in layer 7; time",
1002 "simulated alpha input in layer 7; alpha",
1005 "simulated id input in layer 8; id",
1008 "simulated time input in layer 8; time",
1011 "simulated alpha input in layer 8; alpha",
1019 "difference between unpacked and simulated neuro z; #Delta z [cm]",
1022 "difference between unpacked and simulated neuro theta; #Delta #theta [#circ]",
1025 "unpacked z vs TSIM; hw z [cm]; sw z [cm]",
1026 100, -150, 150, 100, -150, 150);
1028 "unpacked theta vs TSIM; hw #theta [#circ]; sw #theta [#circ]",
1029 100, 0, 270, 100, 0, 270);
1032 "difference between unpacked and simulated ID input; #Delta ID",
1035 "difference between unpacked and simulated time input; #Delta t",
1038 "difference between unpacked and simulated alpha input; #Delta alpha",
1041 "difference between unpacked and simulated tsid; #Delta TSID",
1044 "difference between unpacked and simulated sector; #Delta sector",
1047 "number of TS selected in both, unpacked and TSIM tracks",
1050 "number of TS selcted in TSIM but not in unpacker",
1057 "z distribution of reconstructed tracks;z [cm]",
1060 "cos theta distribution of reconstructed tracks; cos(#theta) ",
1063 "Pt distribution of reconstructed tracks; p_{T}^{-1} [GeV^{-1}]",
1066 "phi distribution of reconstructed tracks ; #phi [#circ]",
1069 "d0 distribution of reconstructed tracks ; d_{0} [cm]",
1072 "number of reconstructed tracks per event",
1078 "hw matched z distribution of reconstructed tracks; z [cm]",
1081 "hw matched cos theta distribution of reconstructed tracks; cos(#theta) ",
1084 "hw matched Pt distribution of reconstructed tracks; p_{T}^{-1} [GeV^{-1}]",
1087 "hw matched phi distribution of reconstructed tracks; #phi [#circ]",
1090 "hw matched d0 distribution of reconstructed tracks ; d_{0} [cm]",
1094 "reco matched z distribution of unpacked neuro tracks; z [cm]",
1097 "reco matched cos theta distribution of unpacked neuro tracks; cos(#theta) ",
1100 "reco matched Pt distribution of unpacked neuro tracks; p_{T}^{-1} [GeV^{-1}]",
1103 "reco matched phi distribution of unpacked neuro tracks; #phi [#circ]",
1106 "reco matched stereo hit pattern of unpacked neuro tracks; pattern",
1109 "reco matched number of unpacked neuro tracks per event",
1112 "reco matched sector of unpacked neuro tracks; sector",
1117 "difference between reconstructed and unpacked neuro z; #Delta z [cm]",
1120 "difference between reconstructed and unpacked neuro cos(theta); #Delta cos(#theta)",
1123 "difference between reconstructed and unpacked neuro Pt; #Delta p_{T}^{-1} [GeV^{-1}]",
1126 "difference between reconstructed and unpacked neuro phi; #Delta #phi [#circ]",
1131 "hw matched reconstruction; reco z [cm]; hw z [cm]",
1132 100, -150, 150, 100, -150, 150);
1140 "sw matched z distribution of reconstructed tracks; z [cm]",
1143 "sw matched cos theta distribution of reconstructed tracks; cos(#theta) ",
1146 "sw matched Pt distribution of reconstructed tracks; p_{T}^{-1} [GeV^{-1}]",
1149 "sw matched phi distribution of reconstructed tracks ; #phi [#circ]",
1152 "sw matched d0 distribution of reconstructed tracks ; d_{0} [cm]",
1155 "sw matched reconstruction; reco z [cm]; sw z [cm]",
1156 100, -150, 150, 100, -150, 150);
1161 "reco matched z distribution from simulation; z [cm]",
1164 "reco matched cos theta distribution from simulation; cos(#theta) ",
1167 "reco matched Pt distribution from simulation; p_{T}^{-1} [GeV^{-1}]",
1170 "reco matched phi distribution from simulation; #phi [#circ]",
1173 "reco matched stereo hit pattern from simulation; pattern",
1176 "reco matched number of SW neuro tracks per event",
1179 "reco matched sector from simulation; sector",
1184 "difference between reconstructed and simulated neuro z; #Delta z [cm]",
1187 "difference between reconstructed and simulated neuro cos(theta); #Delta cos(#theta)",
1190 "difference between reconstructed and simulated neuro Pt; #Delta p_{T}^{-1} [GeV^{-1}]",
1193 "difference between reconstructed and simulated neuro phi; #Delta #phi [#circ]",
1201 "sw matched z distribution of reconstructed tracks; z [cm]",
1204 "sw matched cos theta distribution of reconstructed tracks; cos(#theta) ",
1207 "sw matched Pt distribution of reconstructed tracks; p_{T}^{-1} [GeV^{-1}]",
1210 "sw matched phi distribution of reconstructed tracks ; #phi [#circ]",
1213 "sw matched d0 distribution of reconstructed tracks ; d_{0} [cm]",
1216 "sw matched reconstruction; reco z [cm]; sw z [cm]",
1217 100, -150, 150, 100, -150, 150);
1222 "reco matched z distribution from simulation; z [cm]",
1225 "reco matched cos theta distribution from simulation; cos(#theta) ",
1228 "reco matched Pt distribution from simulation; p_{T}^{-1} [GeV^{-1}]",
1231 "reco matched phi distribution from simulation; #phi [#circ]",
1234 "reco matched stereo hit pattern from simulation; pattern",
1237 "reco matched number of SW neuro tracks per event",
1240 "reco matched sector from simulation; sector",
1245 "difference between reconstructed and simulated neuro z; #Delta z [cm]",
1248 "difference between reconstructed and simulated neuro cos(theta); #Delta cos(#theta)",
1251 "difference between reconstructed and simulated neuro Pt; #Delta p_{T}^{-1} [GeV^{-1}]",
1254 "difference between reconstructed and simulated neuro phi;#Delta #phi [#circ]",
1800 B2DEBUG(150,
"No unpacked TS found, skipping event.");
1814 bool foundValidRep =
false;
1819 int nswtssw2dmatched = 0;
1820 double phi0Target = 0;
1821 double invptTarget = 0;
1822 double cosThetaTarget = 0;
1824 double d0Target = 0;
1825 for (genfit::AbsTrackRep* rep : recoTrack.getRepresentations()) {
1826 if (!recoTrack.wasFitSuccessful(rep))
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));
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();
1852 foundValidRep =
true;
1855 if (!foundValidRep) {
1856 B2DEBUG(150,
"No valid representation found for RecoTrack, skipping.");
1860 B2DEBUG(150,
"RecoTrack not close to IP (maxRecoZDist), zReco = " << zTarget);
1864 B2DEBUG(150,
"RecoTrack not close to the z axis (maxRecoD0Dist), d0Reco = " << d0Target);
1876 bool valtrack =
false;
1880 B2WARNING(
"HWTrack doesn't have 'valid bit', get it from relations now... ");
1894 double neuroHWZ = neuroHWTrack->getZ0() ;
1896 double cotTh = neuroHWTrack->getCotTheta() ;
1897 double cosTh = copysign(1.0, cotTh) /
sqrt(1. / (cotTh * cotTh) + 1);
1898 double neuroHWcosTh = cosTh ;
1900 double neuroHWPt = neuroHWTrack->
getPt() ;
1902 phinorm = neuroHWTrack->getPhi0() * 180 / M_PI ;
1903 if (phinorm < 0.) {phinorm = phinorm + 360. ;}
1904 double neuroHWPhi0 = phinorm;
1908 unsigned hwMatchedSector =
1923 bool valtrack =
false;
1927 B2INFO(
"SWTrack doesn't have 'valid bit', get it from relations now... ");
1941 double neuroSWZ = neuroSWTrack->getZ0() ;
1943 double cotTh = neuroSWTrack->getCotTheta() ;
1944 double cosTh = copysign(1.0, cotTh) /
sqrt(1. / (cotTh * cotTh) + 1);
1945 double neuroSWcosTh = cosTh ;
1947 double neuroSWPt = neuroSWTrack->
getPt() ;
1949 phinorm = neuroSWTrack->getPhi0() * 180 / M_PI ;
1950 if (phinorm < 0.) {phinorm = phinorm + 360. ;}
1951 double neuroSWPhi0 = phinorm ;
1955 unsigned swMatchedSector =
1968 if (neuroSWTSSW2DTrack) {
1977 double cotTh = neuroSWTSSW2DTrack->getCotTheta();
1978 double cosTh = copysign(1.0, cotTh) /
sqrt(1. / (cotTh * cotTh) + 1);
1980 phinorm = neuroSWTSSW2DTrack->getPhi0() * 180 / M_PI;
1981 if (phinorm < 0.) {phinorm = phinorm + 360. ;}
1982 double phiNeuro = phinorm ;
1983 double invptNeuro = neuroSWTSSW2DTrack->
getPt() ;
1988 unsigned swtssw2dMatchedSector =
1996 phinorm = neuroSWTSSW2DTrack->getPhi0() * 180. / M_PI ;
1997 if (phinorm < 0.) {phinorm = phinorm + 360. ;}
2021 double cotThSW = neuroswTrack.getCotTheta();
2022 double cosThSW = copysign(1.0, cotThSW) /
sqrt(1. / (cotThSW * cotThSW) + 1);
2024 phinorm = neuroswTrack.getPhi0() * 180. / M_PI ;
2026 phinorm = phinorm + 360. ;
2030 unsigned simSWTSSW2DSector =
2035 unsigned pattern = 0;
2039 unsigned int sl = hit.getISuperLayer();
2041 float neuroTime = neuroswTrack.getTime();
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()) {
2103 if (sl % 2 == 1) pattern |= (1 << ((sl - 1) / 2));
2108 vector<float> nnInput =
2142 bool valtrack =
false;
2144 valtrack = neuroswTrack.getValidStereoBit();
2146 B2INFO(
"HWTrack doesn't have 'valid bit', get it from relations now... ");
2155 double cotThSW = neuroswTrack.getCotTheta();
2156 double cosThSW = copysign(1.0, cotThSW) /
sqrt(1. / (cotThSW * cotThSW) + 1);
2158 phinorm = neuroswTrack.getPhi0() * 180. / M_PI ;
2159 if (phinorm < 0.) {phinorm = phinorm + 360. ;}
2163 unsigned simSector =
2168 unsigned pattern = 0;
2172 unsigned int sl = hit.getISuperLayer();
2174 float neuroTime = neuroswTrack.getTime();
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()) {
2236 if (sl % 2 == 1) pattern |= (1 << ((sl - 1) / 2));
2242 vector<float> nnInput =
2274 int nofintracks = 0;
2276 int nofouttracks = 0;
2277 int nofinsegments = 0;
2280 bool valtrack =
false;
2282 valtrack = neuroTrack.getValidStereoBit();
2284 B2WARNING(
"NeuroTrack doesn't have 'valid bit', get it from relations now... ");
2295 double cotTh = neuroTrack.getCotTheta();
2296 double cosTh = copysign(1.0, cotTh) /
sqrt(1. / (cotTh * cotTh) + 1);
2298 phinorm = neuroTrack.getPhi0() * 180. / M_PI ;
2299 if (phinorm < 0.) {phinorm = phinorm + 360. ;}
2311 switch (neuroTrack.getQuadrant()) {
2315 phinorm = neuroTrack.getPhi0() * 180. / M_PI ;
2316 if (phinorm < 0.) { phinorm = phinorm + 360. ;}
2323 phinorm = neuroTrack.getPhi0() * 180. / M_PI ;
2324 if (phinorm < 0.) { phinorm = phinorm + 360. ;}
2331 phinorm = neuroTrack.getPhi0() * 180. / M_PI ;
2332 if (phinorm < 0.) { phinorm = phinorm + 360. ;}
2339 phinorm = neuroTrack.getPhi0() * 180. / M_PI ;
2340 if (phinorm < 0.) { phinorm = phinorm + 360. ;}
2347 phinorm = neuroTrack.getPhi0() * 180. / M_PI ;
2348 if (phinorm < 0.) { phinorm = phinorm + 360. ;}
2356 unsigned pattern = 0;
2360 unsigned int sl = hit.getISuperLayer();
2362 float neuroTime = neuroTrack.getTime();
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()) {
2425 if (sl % 2 == 1) pattern |= (1 << ((sl - 1) / 2));
2431 vector<float> nnInput =
2469 if (neuroSimTrack) {
2475 unsigned int simsl = simhit.getISuperLayer();
2478 unsigned int sl = hit.getISuperLayer();
2481 if (simhit.getSegmentID() == hit.getSegmentID() &&
2482 simhit.getPriorityPosition() == hit.getPriorityPosition() &&
2483 simhit.getLeftRight() == hit.getLeftRight() &&
2484 simhit.priorityTime() == hit.priorityTime()
2499 if (abs(neuroTrack.getZ0() - neuroSimTrack->getZ0()) > 1) {
2501 neuroTrack.setQualityVector(2);
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;
2509 vector<float> unpackedInput =
2511 vector<float> simInput =
2513 unsigned unpackedSector =
2515 unsigned 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) {
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;}
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);}
2552 phinorm = neuroinput2dtrack.getPhi0() * 180. / M_PI ;
2553 if (phinorm < 0.) { phinorm = phinorm + 360. ;}
2558 if (nofintracks > 0 || nofouttracks > 0) {
2567 unsigned int sl = neuroinputsegment.getISuperLayer();
2617 if (nofinsegments > 0) {
2626 phinorm = sim2dtrack.getPhi0() * 180. / M_PI ;
2627 if (phinorm < 0.) { phinorm = phinorm + 360. ;}
2634 int nof2douttracks = 0;
2637 phinorm = finder2dtrack.getPhi0() * 180. / M_PI ;
2638 if (phinorm < 0.) {phinorm = phinorm + 360. ;}
2643 if (nof2douttracks > 0) {
2650 int nof2dinsegments = 0;
2655 unsigned int sl = hit.getISuperLayer();
2685 if (nof2dinsegments > 0) {
2695 unsigned int sl = hit.getISuperLayer();
2746 static constexpr std::array<int, 9> nWiresInSuperLayer = {
2747 160, 160, 192, 224, 256, 288, 320, 352, 384
2749 unsigned axhwts = 0;
2750 unsigned sthwts = 0;
2751 unsigned axswts = 0;
2752 unsigned stswts = 0;
2754 std::vector<TSLine> hwtsoutput;
2755 std::vector<TSLine> swtsoutput;
2758 if (xhit.getISuperLayer() % 2 == 0) {
2763 int iSL = xhit.getISuperLayer();
2764 int iTS = xhit.getIWire();
2765 int nwires = nWiresInSuperLayer[ iSL ];
2772 int tsIDInTracker = iTS - nwires * xhit.getQuadrant() / 4;
2773 if (tsIDInTracker < 0) {
2774 tsIDInTracker += nwires;
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) +
") | ";
2789 unsigned count2d = 0;
2793 l.strline += std::to_string(count2d);
2799 unsigned counthwn = 0;
2803 if (track.getValidStereoBit()) {
2804 l.strline += std::to_string(counthwn);
2815 unsigned countswn = 0;
2819 l.strline += std::to_string(countswn);
2827 unsigned countreco = 0;
2830 bool related =
false;
2832 if (&ts == &xhit) {related =
true;}
2835 l.strline += std::to_string(countreco);
2845 hwtsoutput.push_back(l);
2849 std::string axhw = std::to_string(axhwts) +
" / " + std::to_string(sthwts);
2852 if (xhit.getISuperLayer() % 2 == 0) {
2857 int iSL = xhit.getISuperLayer();
2858 int iTS = xhit.getIWire();
2859 int nwires = nWiresInSuperLayer[ iSL ];
2866 int tsIDInTracker = iTS - nwires * xhit.getQuadrant() / 4;
2867 if (tsIDInTracker < 0) {
2868 tsIDInTracker += nwires;
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) +
") ";
2882 unsigned count2d = 0;
2886 l.strline += std::to_string(count2d);
2894 unsigned countswn = 0;
2898 l.strline += std::to_string(countswn);
2906 unsigned countreco = 0;
2909 bool related =
false;
2911 if (&ts == &xhit) {related =
true;}
2914 l.strline += std::to_string(countreco);
2924 swtsoutput.push_back(l);
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 | ";
2931 hwtsstring +=
"Reco | ";
2932 swtsstring +=
"Reco | ";
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));
2946 unsigned f2dtrn = 0;
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));
2959 B2DEBUG(10, padright(
"Number of HW NNInput2DFinderTracks: ",
2961 unsigned n2dtrn = 0;
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));
2974 B2DEBUG(10, padright(
"Number of HW NeuroTracks: ",
2976 unsigned hwntrn = 0;
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);
3007 infostr = padright(infostr, 50);
3008 infostr +=
"Drift threshold: ( ";
3009 for (
bool x : ltrack.getDriftThreshold()) {
3010 infostr += std::to_string(x);
3013 infostr += (ltrack.getValidStereoBit()) ?
" valid" :
" NOT valid";
3014 B2DEBUG(15, padright(infostr, 100));
3015 std::string infostr2 =
" std. ETF vld:";
3017 infostr2 +=
", ETFT0: ";
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) +
" ";
3034 info2str +=
", Quality=";
3035 info2str += std::to_string(ltrack.getQualityVector());
3036 B2DEBUG(15, padright(info2str, 100));
3040 vector<float> unpackedInput =
3043 vector<float> simInput =
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) +
")";
3077 B2DEBUG(30, padright(lla, 100));
3078 B2DEBUG(20, padright(llb, 100));
3087 unsigned swntrn = 0;
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();
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));
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));
3117 unsigned sf2dtrn = 0;
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));
3130 B2DEBUG(10, padright(
"Number of SW NeuroSWTSSW2DTracks: ",
3132 unsigned aswntrn = 0;
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 =
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]),
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)),
3162 B2DEBUG(30, padright(lla, 100));
3163 B2DEBUG(20, padright(llb, 100));
3170 B2DEBUG(10, padright(
"Number of RecoTracks: ", 40) << padright(std::to_string(
m_RecoTracks.
getEntries()), 60));
3171 unsigned recotrn = 0;
3173 double phi0Target = 0;
3174 double invptTarget = 0;
3175 double thetaTarget = 0;
3177 double d0Target = 0;
3178 bool foundValidRep =
false;
3179 for (genfit::AbsTrackRep* rep : ltrack.getRepresentations()) {
3180 if (!ltrack.wasFitSuccessful(rep))
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));
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();
3206 foundValidRep =
true;
3209 if (!foundValidRep) {
3210 B2DEBUG(150,
"No valid representation found for RecoTrack, skipping.");
3214 B2DEBUG(150,
"RecoTrack not close to IP (maxRecoZDist), zReco = " << zTarget);
3218 B2DEBUG(150,
"RecoTrack not close to the z axis (maxRecoD0Dist), d0Reco = " << d0Target);
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));
3239 B2DEBUG(10, padright(
" ", 100));
3240 B2DEBUG(10, padright(
" ", 100));
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));
3248 B2DEBUG(15, padright(
" ", 100));
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));
int getBinnedEventT0(const Const::EDetector detector) const
Return the stored binned event t0 for the given detector or 0 if nothing stored.
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_RecoZ
reconstructed z
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_RecoPhi
reconstructed phi
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.
CDCTriggerNeuroDQMModule()
Constructor.
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_neuroDeltaZ
unpacked z - TSIM 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
virtual ~CDCTriggerNeuroDQMModule()
Destructor.
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_RecoD0
reconstructed d0
TH1F * m_2DHWOutPhi0
Phi0 of 2dtracks.
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_2DHWOutm_time
m_time 2dtracks
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...
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
This is the Reconstruction Event-Data Model Track.
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.
int getEntries() const
Get the number of objects in the array.
Type-safe access to single objects in the data store.
bool isValid() const
Check whether the object was created.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.