#include <PrintoutHelper.h>
Definition at line 12 of file PrintoutHelper.h.
◆ dumpCandidate()
template<class Candidate >
std::string PrintoutHelper::dumpCandidate |
( |
const Candidate & |
candidate, |
|
|
bool |
showErrors = false |
|
) |
| |
|
static |
Definition at line 25 of file PrintoutHelper.h.
References edmScanValgrind::buffer, createfilelist::int, dqmdumpme::last, and LogDebug.
Referenced by BaseCkfTrajectoryBuilder::createStartingTrajectory(), and dumpCandidates().
27 LogDebug(
"PrintoutHelperError") <<
"switching on error printout" << (showErrors =
true);
30 if (!traj.measurements().empty()) {
33 buffer <<
"with: " << traj.measurements().size() <<
" measurements." << traj.lostHits() <<
" lost, " 34 << traj.foundHits() <<
" found, " << traj.trailingFoundHits() <<
" trailing, " << traj.cccBadHits()
36 <<
"chi2=" << traj.chiSquared() <<
' ' <<
int(traj.nLoops()) <<
" loops\n";
37 if (
last.updatedState().isValid()) {
40 buffer <<
"Last [Updated] state\n : " << tsos <<
"\n";
42 buffer <<
"Last [Updated] state\n x: " << tsos.globalPosition() <<
"\n p: " << tsos.globalMomentum() <<
"\n";
43 }
else if (
last.forwardPredictedState().isValid()) {
46 buffer <<
"Last [fwdPredicted] state\n : " << tsos <<
"\n";
48 buffer <<
"Last [fwdPredicted] state\n x: " << tsos.globalPosition() <<
"\n p: " << tsos.globalMomentum()
50 }
else if (
last.predictedState().isValid()) {
53 buffer <<
"Last [Predicted] state\n : " << tsos <<
"\n";
55 buffer <<
"Last [Predicted] state\n x: " << tsos.globalPosition() <<
"\n p: " << tsos.globalMomentum() <<
"\n";
57 buffer <<
" hit is: " << (
last.recHit()->isValid() ?
"valid" :
"invalid") <<
"\n";
58 if (
last.recHit()->isValid()) {
59 buffer <<
"on detId: " <<
last.recHit()->geographicalId().rawId() <<
"\n";
60 buffer <<
"gp: " <<
last.recHit()->globalPosition() <<
"\n";
63 buffer <<
" no measurement. \n";
◆ dumpCandidates()
template<class collection >
std::string PrintoutHelper::dumpCandidates |
( |
collection & |
candidates | ) |
|
|
static |
◆ dumpMeasurement()
Definition at line 41 of file PrintoutHelper.cc.
References TrajectoryMeasurement::backwardPredictedState(), edmScanValgrind::buffer, TrajectoryMeasurement::estimate(), TrajectoryMeasurement::forwardPredictedState(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), TrajectoryMeasurement::layer(), TrajectoryMeasurement::predictedState(), TrajectoryMeasurement::recHit(), and TrajectoryMeasurement::updatedState().
Referenced by GroupedCkfTrajectoryBuilder::backwardFit(), and dumpMeasurements().
44 <<
"estimate: " << tm.
estimate() <<
"\n";
46 buffer <<
"updated state: \n" 50 buffer <<
"forward predicted state: \n" 54 buffer <<
"predicted state: \n" 58 buffer <<
"no valid state\n";
59 buffer <<
"detId: " << tm.
recHit()->geographicalId().rawId();
60 if (tm.
recHit()->isValid()) {
61 buffer <<
"\n hit global x: " << tm.
recHit()->globalPosition()
62 <<
"\n hit global error: " << tm.
recHit()->globalPositionError().matrix()
63 <<
"\n hit local x:" << tm.
recHit()->localPosition() <<
"\n hit local error" 64 << tm.
recHit()->localPositionError();
TrajectoryStateOnSurface const & predictedState() const
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
GlobalPoint globalPosition() const
TrajectoryStateOnSurface const & backwardPredictedState() const
Access to backward predicted state (from smoother)
GlobalVector globalMomentum() const
TrajectoryStateOnSurface const & updatedState() const
const DetLayer * layer() const
ConstRecHitPointer const & recHit() const
◆ dumpMeasurements() [1/2]
◆ dumpMeasurements() [2/2]
◆ regressionTest()
Definition at line 73 of file PrintoutHelper.cc.
References edmScanValgrind::buffer.
Referenced by cms::CkfTrackCandidateMakerBase::produceBase().
76 buffer <<
"number of finalTrajectories: " << unsmoothedResult.size() << std::endl;
77 for (std::vector<Trajectory>::const_iterator it = unsmoothedResult.begin(); it != unsmoothedResult.end(); it++) {
78 if (it->lastMeasurement().updatedState().isValid()) {
79 buffer <<
"candidate's n valid and invalid hit, chi2, pt, eta : " << it->foundHits() <<
" , " << it->lostHits()
80 <<
" , " << it->chiSquared() <<
" , " << it->lastMeasurement().updatedState().globalMomentum().perp()
81 <<
" , " << it->lastMeasurement().updatedState().globalMomentum().eta() << std::endl;
82 }
else if (it->lastMeasurement().predictedState().isValid()) {
83 buffer <<
"candidate's n valid and invalid hit, chi2, pt, eta : " << it->foundHits() <<
" , " << it->lostHits()
84 <<
" , " << it->chiSquared() <<
" , " << it->lastMeasurement().predictedState().globalMomentum().perp()
85 <<
" , " << it->lastMeasurement().predictedState().globalMomentum().eta() << std::endl;
87 buffer <<
"candidate with invalid last measurement state!" << std::endl;
89 buffer <<
"=================================================";
90 buffer <<
"=========== Traj in details =====================\n";
91 for (
const auto& it : unsmoothedResult) {
92 for (
const auto&
hit : it.measurements()) {
93 buffer <<
"measurement : " <<
hit.recHit()->geographicalId().rawId() << std::endl;
95 buffer <<
"================\n";