CMS 3D CMS Logo

PrintoutHelper.cc
Go to the documentation of this file.
2 
7 
14 
18 
20 
21 std::string PrintoutHelper::dumpMeasurements(const std::vector<TrajectoryMeasurement>& v) {
22  std::stringstream buffer;
23  buffer << v.size() << " total measurements\n";
24  std::vector<TrajectoryMeasurement>::const_iterator it = v.begin();
25  for (; it != v.end(); ++it) {
26  buffer << dumpMeasurement(*it);
27  buffer << "\n";
28  }
29  return buffer.str();
30 }
32  std::stringstream buffer;
33  buffer << v.size() << " total measurements\n";
35  for (; it != v.rend(); --it) {
36  buffer << dumpMeasurement(*it);
37  buffer << "\n";
38  }
39  return buffer.str();
40 }
42  std::stringstream buffer;
43  buffer << "layer pointer: " << tm.layer() << "\n"
44  << "estimate: " << tm.estimate() << "\n";
45  if (tm.updatedState().isValid())
46  buffer << "updated state: \n"
47  << "x: " << tm.updatedState().globalPosition() << "\n"
48  << "p: " << tm.updatedState().globalMomentum() << "\n";
49  else if (tm.forwardPredictedState().isValid())
50  buffer << "forward predicted state: \n"
51  << "x: " << tm.forwardPredictedState().globalPosition() << "\n"
52  << "p: " << tm.forwardPredictedState().globalMomentum() << "\n";
53  else if (tm.predictedState().isValid())
54  buffer << "predicted state: \n"
55  << "x: " << tm.predictedState().globalPosition() << "\n"
56  << "p: " << tm.predictedState().globalMomentum() << "\n";
57  else
58  buffer << "no valid state\n";
59  buffer
60  // <<"geomdet pointer from rechit: "<<tm.recHit()->det()<<"\n"
61  << "detId: " << tm.recHit()->geographicalId().rawId();
62  if (tm.recHit()->isValid()) {
63  buffer << "\n hit global x: " << tm.recHit()->globalPosition()
64  << "\n hit global error: " << tm.recHit()->globalPositionError().matrix()
65  << "\n hit local x:" << tm.recHit()->localPosition() << "\n hit local error"
66  << tm.recHit()->localPositionError();
67  } else
68  buffer << "\n (-,-,-)";
69  buffer << "\n fwdPred " << tm.forwardPredictedState().isValid() << "\n bwdPred "
70  << tm.backwardPredictedState().isValid() << "\n upPred " << tm.updatedState().isValid();
71  //SimIdPrinter()(tm.recHit());
72  return buffer.str();
73 }
74 
75 std::string PrintoutHelper::regressionTest(const TrackerGeometry& tracker, std::vector<Trajectory>& unsmoothedResult) {
76  std::stringstream buffer;
77 
78  /*
79  for(iseed=theSeedColl.begin();iseed!=theSeedColl.end();iseed++){
80  DetId tmpId = DetId( iseed->startingState().detId());
81  const GeomDet* tmpDet = tracker->idToDet( tmpId );
82  GlobalVector gv = tmpDet->surface().toGlobal( iseed->startingState().parameters().momentum() );
83 
84  LogTrace("TrackingRegressionTest") << "seed perp,phi,eta : "
85  << gv.perp() << " , "
86  << gv.phi() << " , "
87  << gv.eta() ;
88  }
89  */
90 
91  buffer << "number of finalTrajectories: " << unsmoothedResult.size() << std::endl;
92  for (std::vector<Trajectory>::const_iterator it = unsmoothedResult.begin(); it != unsmoothedResult.end(); it++) {
93  if (it->lastMeasurement().updatedState().isValid()) {
94  buffer << "candidate's n valid and invalid hit, chi2, pt, eta : " << it->foundHits() << " , " << it->lostHits()
95  << " , " << it->chiSquared() << " , " << it->lastMeasurement().updatedState().globalMomentum().perp()
96  << " , " << it->lastMeasurement().updatedState().globalMomentum().eta() << std::endl;
97  } else if (it->lastMeasurement().predictedState().isValid()) {
98  buffer << "candidate's n valid and invalid hit, chi2, pt, eta : " << it->foundHits() << " , " << it->lostHits()
99  << " , " << it->chiSquared() << " , " << it->lastMeasurement().predictedState().globalMomentum().perp()
100  << " , " << it->lastMeasurement().predictedState().globalMomentum().eta() << std::endl;
101  } else
102  buffer << "candidate with invalid last measurement state!" << std::endl;
103  }
104  buffer << "=================================================";
105  return buffer.str();
106 }
Chi2MeasurementEstimatorBase.h
Propagator.h
MessageLogger.h
TrajectoryFilter.h
PrintoutHelper::regressionTest
static std::string regressionTest(const TrackerGeometry &tracker, std::vector< Trajectory > &unsmoothedResult)
Definition: PrintoutHelper.cc:75
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
TrajectoryMeasurement::updatedState
TrajectoryStateOnSurface const & updatedState() const
Definition: TrajectoryMeasurement.h:184
findQualityFiles.v
v
Definition: findQualityFiles.py:179
TrajectoryStateUpdator.h
TkTransientTrackingRecHitBuilder.h
PrintoutHelper::dumpMeasurement
static std::string dumpMeasurement(const TrajectoryMeasurement &tm)
Definition: PrintoutHelper.cc:41
edmScanValgrind.buffer
buffer
Definition: edmScanValgrind.py:171
GeometricSearchTracker.h
TrajectoryMeasurement::predictedState
TrajectoryStateOnSurface const & predictedState() const
Definition: TrajectoryMeasurement.h:174
PrintoutHelper::dumpMeasurements
static std::string dumpMeasurements(const std::vector< TrajectoryMeasurement > &v)
Definition: PrintoutHelper.cc:21
TrajectoryMeasurement::backwardPredictedState
TrajectoryStateOnSurface const & backwardPredictedState() const
Access to backward predicted state (from smoother)
Definition: TrajectoryMeasurement.h:179
LayerMeasurements.h
TrajectoryMeasurement::forwardPredictedState
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
Definition: TrajectoryMeasurement.h:177
cmsutils::bqueue< TrajectoryMeasurement >
TrajectorySeed.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
cmsutils::_bqueue_itr
Definition: bqueue.h:39
BasicSingleTrajectoryState.h
TrajectoryMeasurement::recHit
ConstRecHitPointer const & recHit() const
Definition: TrajectoryMeasurement.h:190
Trajectory.h
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition: TrajectoryStateOnSurface.h:66
TrajectoryMeasurement::estimate
float estimate() const
Definition: TrajectoryMeasurement.h:192
BaseCkfTrajectoryBuilder.h
TrajectoryStateTransform.h
TrajectoryMeasurement::layer
const DetLayer * layer() const
Definition: TrajectoryMeasurement.h:194
TrajectoryMeasurement
Definition: TrajectoryMeasurement.h:25
TempTrajectory.h
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
MeasurementTracker.h
TrackerGeometry
Definition: TrackerGeometry.h:14