52 const std::vector<FPGATrackSimTruthTrack>& truthTracks,
53 size_t nLogicalLayers)
64 for (
const auto& road : roads) {
66 unsigned bitmask = road.getHitLayers();
67 for (
size_t l = 0; l < nLogicalLayers; l++) {
68 if (bitmask & (1 << l)) {
80 if (road.getNHits() == 4) {
89 }
else if (road.getNHits() == 5) {
98 if (truthTracks.size() > 0) {
104 const auto& truthTrack = truthTracks.front();
113 Monitored::Group(
m_monTool, mon_eff, mon_truth_pt_zoom, mon_truth_pt, mon_truth_eta, mon_truth_phi, mon_truth_d0, mon_truth_z0 );
120 const std::vector<FPGATrackSimTruthTrack>& truthTracks,
124 float bestChi2 = chi2Cut;
125 float chi2_best = chi2Cut;
126 float chi2Eta_best = chi2Cut;
127 float chi2Phi_best = chi2Cut;
128 float chi2_best_4 = chi2Cut;
129 float chi2Eta_best_4 = chi2Cut;
130 float chi2Phi_best_4 = chi2Cut;
131 float chi2_best_5 = chi2Cut;
132 float chi2Eta_best_5 = chi2Cut;
133 float chi2Phi_best_5 = chi2Cut;
136 auto monitorChi2 = [&](
const std::string& chi2_name,
float chi2_value,
float& best_value,
const std::string& suffix=
"") {
137 if (chi2_value < chi2Cut) {
142 if (chi2_value < best_value) best_value = chi2_value;
156 for (
const auto& track : tracks) {
159 for (
const auto& hit : track->getFPGATrackSimHits()) {
168 float chi2_all = track->getChi2ndof();
169 if (chi2_all < chi2Cut) {
173 if (chi2_all < bestChi2) {
179 monitorChi2(
"chi2", track->getChi2(), chi2_best);
180 monitorChi2(
"chi2Eta", track->getChi2Eta(), chi2Eta_best);
181 monitorChi2(
"chi2Phi", track->getChi2Phi(), chi2Phi_best);
184 if (nValidHits == 4) {
185 monitorChi2(
"chi2", track->getChi2(), chi2_best_4,
"_4");
186 monitorChi2(
"chi2Eta", track->getChi2Eta(), chi2Eta_best_4,
"_4");
187 monitorChi2(
"chi2Phi", track->getChi2Phi(), chi2Phi_best_4,
"_4");
188 }
else if (nValidHits == 5) {
189 monitorChi2(
"chi2", track->getChi2(), chi2_best_5,
"_5");
190 monitorChi2(
"chi2Eta", track->getChi2Eta(), chi2Eta_best_5,
"_5");
191 monitorChi2(
"chi2Phi", track->getChi2Phi(), chi2Phi_best_5,
"_5");
195 if (bestChi2 < chi2Cut) {
201 auto monitorBestChi2 = [&](
const std::string& best_name,
float best_value) {
202 if (best_value < chi2Cut) {
209 monitorBestChi2(
"chi2_best", chi2_best);
210 monitorBestChi2(
"chi2Eta_best", chi2Eta_best);
211 monitorBestChi2(
"chi2Phi_best", chi2Phi_best);
212 monitorBestChi2(
"chi2_best_4", chi2_best_4);
213 monitorBestChi2(
"chi2Eta_best_4", chi2Eta_best_4);
214 monitorBestChi2(
"chi2Phi_best_4", chi2Phi_best_4);
215 monitorBestChi2(
"chi2_best_5", chi2_best_5);
216 monitorBestChi2(
"chi2Eta_best_5", chi2Eta_best_5);
217 monitorBestChi2(
"chi2Phi_best_5", chi2Phi_best_5);
221 if (truthTracks.size() > 0) {
227 const auto& truthTrack = truthTracks.front();
236 Monitored::Group(
m_monTool, mon_eff, mon_truth_pt_zoom, mon_truth_pt, mon_truth_eta, mon_truth_phi, mon_truth_d0, mon_truth_z0 );