20 std::vector<TrajectoryMeasurement> measurements = traj_iterator->measurements();
22 std::vector<TrajectoryMeasurement>::iterator traj_mes_iterator;
25 for (traj_mes_iterator = measurements.begin(); traj_mes_iterator != measurements.end();
26 ++traj_mes_iterator) {
37 pos = ttrh->hit()->localPosition();
38 unsigned int detid = ttrh->hit()->geographicalId().rawId();
44 for (
auto const& thehit :
track->recHits()) {
47 if (thehit->isValid())
48 hitpos = thehit->localPosition();
49 if (thehit->geographicalId().rawId() ==
detid && (hitpos -
pos).
mag() < 1
e-4) {
51 thehitref =
track->extra()->recHitRef(
i - 1);
86 monofwd = monodet->
toLocal(gtrkdirfwd);
87 monobwd = monodet->
toLocal(gtrkdirbwd);
88 monoup = monodet->
toLocal(gtrkdirup);
89 monoco = monodet->
toLocal(gtrkdirco);
98 stereofwd = stereodet->toLocal(gtrkdirfwd);
99 stereobwd = stereodet->toLocal(gtrkdirbwd);
100 stereoup = stereodet->toLocal(gtrkdirup);
101 stereoco = stereodet->toLocal(gtrkdirco);
106 pstereoco = project(gdet, stereodet, combinedptsod.
parameters().
position(), stereoco);
120 monofwd = det->
toLocal(gtrkdirfwd);
121 monobwd = det->
toLocal(gtrkdirbwd);
122 monoup = det->
toLocal(gtrkdirup);
123 monoco = det->
toLocal(gtrkdirco);
130 stereofwd = det->
toLocal(gtrkdirfwd);
131 stereobwd = det->
toLocal(gtrkdirbwd);
132 stereoup = det->
toLocal(gtrkdirup);
133 stereoco = det->
toLocal(gtrkdirco);
141 if (!forwardPredictedStateTag_.empty())
142 states.insert(std::make_pair(
144 TrackingStateInfo(std::make_pair(monofwd, stereofwd), std::make_pair(pmonofwd, pstereofwd), fwdptsod)));
145 if (!backwardPredictedStateTag_.empty())
146 states.insert(std::make_pair(
148 TrackingStateInfo(std::make_pair(monobwd, stereobwd), std::make_pair(pmonobwd, pstereobwd), bwdptsod)));
149 if (!updatedStateTag_.empty())
150 states.insert(std::make_pair(
152 TrackingStateInfo(std::make_pair(monoup, stereoup), std::make_pair(pmonoup, pstereoup), updatedptsod)));
153 if (!combinedStateTag_.empty())
154 states.insert(std::make_pair(
156 TrackingStateInfo(std::make_pair(monoco, stereoco), std::make_pair(pmonoco, pstereoco), combinedptsod)));
161 trajinfo.insert(std::make_pair(thehitref, tkRecHitInfo));
179 float scale = -projposition.
z() / trackdirection.
z();
181 projposition +=
scale * trackdirection;
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
LocalPoint project(const GeomDet *det, const GeomDet *projdet, LocalPoint position, LocalVector trackdirection) const
std::map< StateType, TrackingStateInfo > TrackingStates
LocalVector momentum() const
Momentum vector in the local frame.
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
const LocalTrajectoryParameters & parameters() const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
const GeomDetUnit * monoDet() const
const Plane & surface() const
The nominal surface of the GeomDet.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
DetId geographicalId() const
constexpr uint32_t rawId() const
get the raw id
const GeomDetUnit * stereoDet() const
std::map< TrackingRecHitRef, TrackingRecHitInfo > TrajectoryInfo
default constructor
SiStripRecHit2D originalHit() const
static int position[264][3]
void run(const edm::Ref< std::vector< Trajectory > > traj_iterator, reco::TrackRef track, reco::TrackInfo &output, const TrackerGeometry *tracker)
LocalPoint position() const
Local x and y position coordinates.
TSOS combine(const TSOS &pTsos1, const TSOS &pTsos2) const