1 #ifndef RecoTracker_CkfPattern_PrintoutHelper_h
2 #define RecoTracker_CkfPattern_PrintoutHelper_h
19 template<
class Cand
idate>
23 LogDebug(
"PrintoutHelperError")<<
"switching on error printout"<<(showErrors=
true);
25 std::stringstream buffer;
26 if (!traj.measurements().empty()){
29 buffer<<
"with: "<<traj.measurements().size()<<
" measurements."<< traj.lostHits() <<
" lost, " << traj.foundHits()<<
" found, "
30 << traj.trailingFoundHits() <<
" trailing, " << traj.cccBadHits() <<
" badCC, "
31 <<
"chi2="<<traj.chiSquared() <<
' '
32 << int(traj.nLoops())<<
" loops\n";
36 buffer <<
"Last [Updated] state\n : "<<tsos<<
"\n";
38 buffer <<
"Last [Updated] state\n x: "<<tsos.
globalPosition()<<
"\n p: "<<tsos.globalMomentum()<<
"\n";
42 buffer <<
"Last [fwdPredicted] state\n : "<<tsos<<
"\n";
44 buffer <<
"Last [fwdPredicted] state\n x: "<<tsos.
globalPosition()<<
"\n p: "<<tsos.globalMomentum()<<
"\n";
48 buffer <<
"Last [Predicted] state\n : "<<tsos<<
"\n";
50 buffer <<
"Last [Predicted] state\n x: "<<tsos.
globalPosition()<<
"\n p: "<<tsos.globalMomentum()<<
"\n";
52 buffer <<
" hit is: "<<(last.
recHit()->isValid()?
"valid":
"invalid")<<
"\n";
53 if (last.
recHit()->isValid()) {
54 buffer <<
"on detId: "<<last.
recHit()->geographicalId().rawId()<<
"\n";
55 buffer <<
"gp: "<<last.
recHit()->globalPosition()<<
"\n";
59 buffer<<
" no measurement. \n";}
64 template<
class collection >
66 std::stringstream buffer;
67 buffer <<
"\n____________________________\n";
69 for (
auto const & traj : candidates) {
70 buffer<<ic++<<
"] " << (traj.isValid() ?
"valid " :
"invalid ");
73 buffer <<
"\n____________________________\n";
static std::string dumpCandidates(collection &candidates)
TrajectoryStateOnSurface const & predictedState() const
ConstRecHitPointer const & recHit() const
GlobalPoint globalPosition() const
static std::string dumpMeasurement(const TrajectoryMeasurement &tm)
static std::string dumpMeasurements(const std::vector< TrajectoryMeasurement > &v)
static std::string regressionTest(const TrackerGeometry &tracker, std::vector< Trajectory > &unsmoothedResult)
static std::string dumpCandidate(const Candidate &candidate, bool showErrors=false)
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
TrajectoryStateOnSurface const & updatedState() const