22 auto props = this->getProperties();
23 for( Gaudi::Details::PropertyBase* prop : props ) {
24 if (prop->ownerTypeName()==this->type()) {
25 ATH_MSG_DEBUG(
"Property:\t" << prop->name() <<
"\t : \t" << prop->toString());
31 return StatusCode::SUCCESS;
47 double drScale = (rout-rin) / nLayers;
48 ATH_MSG_INFO(
"Hist scales phi: " << phiScale <<
" eta: " << etaScale <<
" dr:" << drScale);
64 "RZ_allhits",
"; Z [mm] ; R [mm] ", 500, -2000, 2000, 500, 0, 500));
67 "phiResidual",
"phi residual [mm]", 1000, -10, 10));
69 "etaResidual",
"eta residual [mm]", 1000, -10, 10));
72 "phiTrueBinShift",
"phi TrueBinShift [mm]", 1000, -10, 10));
74 "etaTrueBinShift",
"eta TrueBinShift [mm]", 1000, -10, 10));
85 400, -phiScale, phiScale, 100, 0, 400));
87 400, -etaScale, etaScale, 100, 0, 400));
111 ";Phi Out Extrap w/ Curve Limit", 2000, -phiScale, phiScale));
113 ";Phi In Extrap w/ Curve Limit", 2000, -phiScale, phiScale));
126 "PairSetMatchPhi",
";PairSet Match Phi [mm]", 500,
127 -1*phiScale / drScale, phiScale / drScale));
130 "PairSetMatchEta",
";PairSet Match Eta [mm]", 500,
131 -1*etaScale / drScale, etaScale / drScale));
134 "DeltaDeltaPhi",
";DeltaDelta Phi [mm]", 500, -1.0*phiScale / drScale,
135 phiScale / drScale));
138 "DeltaDeltaEta",
";DeltaDelta Eta [mm]", 500, -1.0 * etaScale / drScale,
139 1.0 * etaScale / drScale));
142 ";Phi Curvature ", 500,
143 -0.1 * phiScale / drScale / drScale,
144 0.1 * phiScale / drScale / drScale));
147 ";Eta Curvature ", 500,
148 -0.1 * etaScale / drScale / drScale,
149 0.1 * etaScale / drScale / drScale));
152 ";Delta Phi Curvature ", 500,
153 -0.1 * phiScale / drScale / drScale,
154 0.1 * phiScale / drScale / drScale));
157 ";Delta Eta Curvature ", 500,
158 -0.1 * etaScale / drScale / drScale,
159 0.1 * etaScale / drScale / drScale));
162 ";Phi Out Extrap Curved", 2000, -phiScale,
166 ";Phi In Extrap Curved ", 2000, -phiScale,
169 ";PairSet Match Phi vs dRin [mm]", 100, 0, 100, 500,
170 -100.0 * phiScale, 100.0 * phiScale));
172 ";PairSet Match Eta vs dRin [mm]", 100, 0, 100, 500,
173 -100.0 * etaScale, 100.0 * etaScale));
181 return StatusCode::SUCCESS;
213 std::vector<FPGATrackSimGenScanMonitoring::eventDispSet *> allsets(
219 for (
auto&
set : allsets) {
223 return StatusCode::SUCCESS;
229 const std::vector<std::vector<const FPGATrackSimGenScanTool::StoredHit *> > & hitsByLayer)
241 for (
auto& hit :
data.hits) {
249 for (
unsigned lyr = 0; lyr <
m_nLayers; lyr++)
285 bool passedPairFilter) {
291 if (passedPairFilter) {
300 << filteredpairs.
lyrCnt() <<
" "
301 << std::bitset<16>(filteredpairs.
hitLayers));
309 const std::pair<unsigned, unsigned>& rowRange,
const FPGATrackSimHit* hit) {
310 if (rowRange.second > rowRange.first) {
323 const std::vector<std::shared_ptr<const FPGATrackSimHit>> &
hits,
332 if (!validSlice[
val.idx()])
continue;
338 if (!validSliceAndScan[
val.idx()])
continue;
355 if (!validSlice[
val.idx()])
continue;
360 if (!validSliceAndScan[
val.idx()])
continue;
364 if (!validSliceAndScan[
val.idx()])
continue;
372 std::vector<FPGATrackSimTruthTrack>
const * truthtracks,
bool isSingleParticle,
376 <<
" size = " << (truthtracks ? truthtracks->size() : 0));
399 <<
" ?= " << recovered <<
" closure:"
438 std::vector<const FPGATrackSimGenScanTool::StoredHit *>
const *lastlyr,
439 std::vector<const FPGATrackSimGenScanTool::StoredHit *>
const
442 auto size_if_nonzero_ptr =
443 [](std::vector<const FPGATrackSimGenScanTool::StoredHit *>
const *
ptr) {
452 size_if_nonzero_ptr(lastlastlyr));
459 int lyr = pair.first->hitptr->getLayer();
483 int minlyr =
std::min(lastpair.first->layer, lastpair.second->layer);
484 minlyr =
std::min(minlyr, pair.first->layer);
485 minlyr =
std::min(minlyr, pair.second->layer);
488 ((1 << lastpair.first->layer) | (1 << lastpair.second->layer) |
489 (1 << pair.first->layer) | (1 << pair.second->layer));
490 hitbits = hitbits >> minlyr;
492 int hitlyrs = __builtin_popcount(hitbits);
494 assert(hitbits & 0
x1);
500 }
else if (hitlyrs == 3) {
501 if (hitbits == 0b111)
503 if ((lastpair.first->layer == pair.second->layer) ||
504 (pair.first->layer == lastpair.second->layer)) {
509 }
else if ((hitbits == 0b1101) || (hitbits == 0b1011))
519 << lastpair.second->layer <<
" " << pair.first->layer <<
" "
520 << pair.second->layer <<
" : " << minlyr <<
" "
521 << std::bitset<16>(hitbits));
527 std::vector<TH1D *> &histset,
double val,
533 histset[0]->Fill(
val);
534 histset[ppcat]->Fill(
val);
543 const std::vector<FPGATrackSimGenScanTool::HitPairSet> &pairsets,
547 for (
auto pairset : pairsets) {
559 const std::vector<FPGATrackSimGenScanTool::IntermediateState> &
states,
560 unsigned allowed_misses) {
562 for (
unsigned i = 0;
i <
states.size();
i++) {
565 for (
auto& pair :
states[
i].pairsets) {
568 unsigned totalInput =
states[
i].pairsets.size() +
states[
i].unpairedHits.size();
581 TGraph *retv =
new TGraph();
582 retv->SetName(
name.c_str());
588 g->SetPoint(
g->GetN(),
x,
y);
593 unsigned int count = m_rZ.size();
596 if (
count > m_maxEvts)
return;
600 for (
auto & hit:
hits)
602 AddPoint(m_rZ.back(), hit->getZ(), hit->getR());
603 AddPoint(m_xY.back(), hit->getX(), hit->getY());
610 if (m_rZ.size() > m_maxEvts)
return;
613 std::vector<const FPGATrackSimGenScanTool::StoredHit *> ptrvec;
614 for (
auto & hit:
hits)
616 ptrvec.push_back(&hit);
620 return addEvent(ptrvec);
625 unsigned int count = m_rZ.size();
628 if (
count > m_maxEvts)
return;
636 for (
auto & hit :
hits)
638 AddPoint(m_rZ.back(), hit->hitptr->getZ(), hit->hitptr->getR());
639 AddPoint(m_xY.back(), hit->hitptr->getX(), hit->hitptr->getY());
640 AddPoint(m_rEta.back(), hit->etaShift, hit->hitptr->getR());
641 AddPoint(m_rPhi.back(), hit->phiShift, hit->hitptr->getR());
648 std::vector<std::vector<TGraph *> *>({&m_rZ, &m_xY, &m_rPhi, &m_rEta})) {
651 return StatusCode::SUCCESS;