81 std::vector<double> vMinX(nSt);
82 std::vector<double> vMaxX(nSt);
83 std::vector<double> vMinY(nSt);
84 std::vector<double> vMaxY(nSt);
89 for (
int iSt = 0; iSt < nSt; ++iSt) {
91 vMaxX[iSt] = station.GetXmax<
double>();
92 vMinX[iSt] = station.GetXmin<
double>();
93 vMaxY[iSt] = station.GetYmax<
double>();
94 vMinY[iSt] = station.GetYmin<
double>();
95 double dy = (vMaxY[iSt] - vMinY[iSt]) *
kXYZMargin;
96 double dx = (vMaxX[iSt] - vMinX[iSt]) *
kXYZMargin;
103 double xMinA = *std::min_element(vMinX.begin(), vMinX.end());
104 double xMaxA = *std::max_element(vMaxX.begin(), vMaxX.end());
105 double yMinA = *std::min_element(vMinY.begin(), vMinY.end());
106 double yMaxA = *std::max_element(vMaxY.begin(), vMaxY.end());
107 double zMinA =
fpParameters->GetStation(0).GetZ<
double>();
108 double zMaxA =
fpParameters->GetStation(nSt - 1).GetZ<
double>();
114 for (
int iSt = 0; iSt < nSt; ++iSt) {
116 auto [detID, iStLoc] =
fpParameters->GetGeoToLocalIdMap()[iStGeo];
121 auto name = format(
"hit_{}_occup_xy_sta_{}", setNm, iSt);
122 auto titl = format(
"{} hit occupancy in XY plane for station {} ({}{});x [cm];y [cm]", setTl, iSt,
125 fQaData.
MakeObj<H2D>(name, titl, nBinsXY, vMinX[iSt], vMaxX[iSt], nBinsXY, vMinY[iSt], vMaxY[iSt]);
128 auto name = format(
"hit_{}_occup_zx_sta_{}", setNm, iSt);
129 auto titl = format(
"{} hit occupancy in ZX plane for station {} ({}{});z [cm];x [cm]", setTl, iSt,
134 auto name = format(
"hit_{}_occup_zy_sta_{}", setNm, iSt);
135 auto titl = format(
"{} hit occupancy in ZY plane for station {} ({}{});z [cm];y [cm]", setTl, iSt,
141 auto name = format(
"hit_usage_xy_sta_{}", iSt);
142 auto titl = format(
"Hit usage in XY plane for station {} ({}{});x [cm];y [cm]", iSt,
kDetName[detID], iStLoc);
144 fQaData.
MakeObj<Prof2D>(name, titl, nBinsXY, vMinX[iSt], vMaxX[iSt], nBinsXY, vMinY[iSt], vMaxY[iSt], 0., 1.);
149 constexpr int NBins = 1000000;
153 auto name = format(
"hit_{}_front_key_index", setNm);
154 auto titl = format(
"{} hit front key index;ID_{{key}}/N_{{keys}};Count", setTl);
158 auto name = format(
"hit_{}_back_key_index", setNm);
159 auto titl = format(
"{} hit back key index;ID_{{key}}/N_{{keys}};Count", setTl);
168 for (
int iSt = 0; iSt < nSt + 1; ++iSt) {
169 auto staNm = iSt == nSt ?
"" : format(
"_sta_{}", iSt);
170 auto staTl = iSt == nSt ?
"" : format(
" in station {}", iSt);
174 auto name = format(
"hit_{}_rel_time{}", setNm, staNm);
175 auto titl = format(
"{} hit relative time{}; #delta t_{{hit}};Count", setTl, staTl);
184 std::vector<std::string> vsPointName = {
"first",
"last"};
190 auto sName = format(
"track_{}_theta", vsPointName[i]);
191 auto sTitl = format(
"#theta at {} hit; #theta", vsPointName[i]);
195 auto sName = format(
"track_{}_phi", vsPointName[i]);
196 auto sTitl = format(
"#phi at {} hit; #phi", vsPointName[i]);
200 auto sName = format(
"track_{}_thata_phi", vsPointName[i]);
201 auto sTitl = format(
"#theta vs #phi at {} hit; #phi; #theta", vsPointName[i]);
205 auto sName = format(
"track_{}_chi2_ndf", vsPointName[i]);
206 auto sTitl = format(
"#chi^{{2}}/NDF at {} hit; #chi^{{2}}/NDF", vsPointName[i]);
213 double xMax = double(
knStaMax) - 0.5;
215 auto sName =
"track_fst_lst_sta";
216 auto sTitl =
"First vs. last station index;ID^{last}_{station};ID^{first}_{station}";
230 auto name = format(
"ca_hit_{}_occupancy_xy", setNm);
231 auto titl = format(
"{} hit occupancy in different stations in XY plane", setNm);
233 for (
int iSt = 0; iSt < nSt; ++iSt) {
234 auto pad = PadConfig();
236 canv.AddPadConfig(pad);
241 auto name = format(
"ca_hit_{}_occupancy_zx_zy", setNm);
242 auto titl = format(
"{} hit occupancy in different stations in ZX and ZY planes", setTl);
245 auto pad = PadConfig();
246 for (
int iSt = 0; iSt < nSt; ++iSt) {
247 pad.RegisterHistogram(
fvphHitOccupZX[iSt][hitSet], (iSt == 0 ?
"colz" :
"cols same"));
249 canv.AddPadConfig(pad);
252 auto pad = PadConfig();
253 for (
int iSt = 0; iSt < nSt; ++iSt) {
254 pad.RegisterHistogram(
fvphHitOccupZY[iSt][hitSet], (iSt == 0 ?
"colz" :
"cols same"));
256 canv.AddPadConfig(pad);
262 auto name = format(
"ca_hit_usage_xy");
263 auto titl = format(
"Hit usage in different stations in XY plane");
265 for (
int iSt = 0; iSt < nSt; ++iSt) {
266 auto pad = PadConfig();
268 canv.AddPadConfig(pad);
276 auto canv =
CanvasConfig(
"ca_tracks",
"Tracking output QA");
278 auto pad = PadConfig(
true,
true,
false,
false,
true);
280 canv.AddPadConfig(pad);
283 auto pad = PadConfig(
true,
true,
false,
true,
false);
285 canv.AddPadConfig(pad);
288 auto pad = PadConfig(
true,
true,
false,
true,
false);
290 canv.AddPadConfig(pad);
293 auto pad = PadConfig(
true,
true,
false,
false,
true);
295 canv.AddPadConfig(pad);