1 #ifndef RecoTracker_CkfPattern_PrintoutHelper_h
2 #define RecoTracker_CkfPattern_PrintoutHelper_h
16 template<
class Cand
idate>
static std::string
dumpCandidate(
const Candidate & candidate,
bool showErrors=
false);
17 static std::string
dumpMeasurements(
const std::vector<TrajectoryMeasurement> &
v) ;
23 template<
class Cand
idate>
26 LogDebug(
"PrintoutHelperError")<<
"switching on error printout"<<(showErrors=
true);
28 std::stringstream buffer;
29 if (!traj.measurements().empty()){
32 buffer<<
"with: "<<traj.measurements().size()<<
" measurements."<< traj.lostHits() <<
" lost, " << traj.foundHits()<<
" found, chi2="<<traj.chiSquared()<<
"\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";
57 buffer<<
" no measurement. \n";}
62 template<
class collection >
64 std::stringstream buffer;
66 typename collection::const_iterator traj=candidates.begin();
67 for (;traj!=candidates.end(); traj++) {
static std::string dumpCandidates(collection &candidates)
TrajectoryStateOnSurface forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
GlobalPoint globalPosition() const
ConstRecHitPointer recHit() 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)
TrajectoryStateOnSurface updatedState() const
TrajectoryStateOnSurface predictedState() const
static std::string dumpCandidate(const Candidate &candidate, bool showErrors=false)