CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TrackInfo.cc
Go to the documentation of this file.
3 
4 using namespace reco;
5 
7  : seed_(seed), trajstates_(trajstates) {}
8 
9 const TrajectorySeed& TrackInfo::seed() const { return seed_; }
10 
12 
14  TrajectoryInfo::const_iterator states = trajstates_.find(hit);
15  if (states != trajstates_.end())
16  return states->second.type();
17  else
18  edm::LogError("TrackInfo") << "This rechit does not exist";
19  return Null;
20 }
21 
23  TrajectoryInfo::const_iterator states = trajstates_.find(hit);
24  if (states != trajstates_.end())
25  return states->second.stateOnDet(statetype);
26  else
27  edm::LogError("TrackInfo") << "This rechit does not exist";
28  return nullptr;
29 }
30 
32  TrajectoryInfo::const_iterator states = trajstates_.find(hit);
33  if (states != trajstates_.end()) {
34  const PTrajectoryStateOnDet* state = states->second.stateOnDet(statetype);
35  if (state != nullptr)
36  return state->parameters().momentum();
37  } else
38  edm::LogError("TrackInfo") << "This rechit does not exist";
39  return LocalVector(0, 0, 0);
40 }
41 
43  TrajectoryInfo::const_iterator states = trajstates_.find(hit);
44  if (states != trajstates_.end())
45  return states->second.localTrackMomentumOnMono(statetype);
46  else
47  edm::LogError("TrackInfo") << "This rechit does not exist";
48  return LocalVector(0, 0, 0);
49 }
50 
52  TrajectoryInfo::const_iterator states = trajstates_.find(hit);
53  if (states != trajstates_.end())
54  return states->second.localTrackMomentumOnStereo(statetype);
55  return LocalVector(0, 0, 0);
56 }
57 
59  TrajectoryInfo::const_iterator states = trajstates_.find(hit);
60  if (states != trajstates_.end()) {
61  const PTrajectoryStateOnDet* state = states->second.stateOnDet(statetype);
62  if (state != nullptr)
63  return state->parameters().position();
64  } else
65  edm::LogError("TrackInfo") << "This rechit does not exist";
66  return LocalPoint(0, 0, 0);
67 }
68 
70  TrajectoryInfo::const_iterator states = trajstates_.find(hit);
71  if (states != trajstates_.end())
72  return states->second.localTrackPositionOnMono(statetype);
73  else
74  edm::LogError("TrackInfo") << "This rechit does not exist";
75  return LocalPoint(0, 0, 0);
76 }
77 
79  TrajectoryInfo::const_iterator states = trajstates_.find(hit);
80  if (states != trajstates_.end())
81  return states->second.localTrackPositionOnStereo(statetype);
82  else
83  edm::LogError("TrackInfo") << "This rechit does not exist";
84  return LocalPoint(0, 0, 0);
85 }
Local3DVector LocalVector
Definition: LocalVector.h:12
const TrajectorySeed & seed() const
Definition: TrackInfo.cc:9
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
LocalPoint position() const
Local x and y position coordinates.
Log< level::Error, false > LogError
const TrajectoryInfo & trajStateMap() const
Definition: TrackInfo.cc:11
const LocalVector localTrackMomentumOnStereo(StateType, TrackingRecHitRef) const
Definition: TrackInfo.cc:51
const LocalPoint localTrackPositionOnStereo(StateType, TrackingRecHitRef) const
Definition: TrackInfo.cc:78
const RecHitType type(TrackingRecHitRef) const
Definition: TrackInfo.cc:13
const LocalVector localTrackMomentum(StateType, TrackingRecHitRef) const
Definition: TrackInfo.cc:31
const LocalPoint localTrackPosition(StateType, TrackingRecHitRef) const
Definition: TrackInfo.cc:58
LocalVector momentum() const
Momentum vector in the local frame.
const LocalPoint localTrackPositionOnMono(StateType, TrackingRecHitRef) const
Definition: TrackInfo.cc:69
const PTrajectoryStateOnDet * stateOnDet(StateType, TrackingRecHitRef) const
Definition: TrackInfo.cc:22
TrajectoryInfo trajstates_
Definition: TrackInfo.h:59
TrajectorySeed seed_
Definition: TrackInfo.h:58
std::map< TrackingRecHitRef, TrackingRecHitInfo > TrajectoryInfo
default constructor
Definition: TrackInfo.h:26
const LocalVector localTrackMomentumOnMono(StateType, TrackingRecHitRef) const
Definition: TrackInfo.cc:42
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::LocalCoordinateSystemTag > LocalPoint
point in local coordinate system
Definition: Point3D.h:15
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::LocalCoordinateSystemTag > LocalVector
vector in local coordinate system
Definition: Vector3D.h:25
const LocalTrajectoryParameters & parameters() const