20 std::vector<TrajectoryMeasurement> measurements = traj_iterator->measurements();
22 std::vector<TrajectoryMeasurement>::iterator traj_mes_iterator;
26 for (traj_mes_iterator = measurements.begin(); traj_mes_iterator != measurements.end();
27 ++traj_mes_iterator) {
38 pos = ttrh->hit()->localPosition();
40 unsigned int detid = ttrh->hit()->geographicalId().rawId();
46 for (
auto const& thehit :
track->recHits()) {
49 if (thehit->isValid())
50 hitpos = thehit->localPosition();
51 if (thehit->geographicalId().rawId() == detid && (hitpos -
pos).
mag() < 1
e-4) {
53 thehitref =
track->extra()->recHitRef(
i - 1);
88 monofwd = monodet->
toLocal(gtrkdirfwd);
89 monobwd = monodet->
toLocal(gtrkdirbwd);
90 monoup = monodet->
toLocal(gtrkdirup);
91 monoco = monodet->
toLocal(gtrkdirco);
100 stereofwd = stereodet->toLocal(gtrkdirfwd);
101 stereobwd = stereodet->toLocal(gtrkdirbwd);
102 stereoup = stereodet->toLocal(gtrkdirup);
103 stereoco = stereodet->toLocal(gtrkdirco);
108 pstereoco = project(gdet, stereodet, combinedptsod.
parameters().
position(), stereoco);
122 monofwd = det->
toLocal(gtrkdirfwd);
123 monobwd = det->
toLocal(gtrkdirbwd);
124 monoup = det->
toLocal(gtrkdirup);
125 monoco = det->
toLocal(gtrkdirco);
132 stereofwd = det->
toLocal(gtrkdirfwd);
133 stereobwd = det->
toLocal(gtrkdirbwd);
134 stereoup = det->
toLocal(gtrkdirup);
135 stereoco = det->
toLocal(gtrkdirco);
143 if (!forwardPredictedStateTag_.empty())
144 states.insert(std::make_pair(
146 TrackingStateInfo(std::make_pair(monofwd, stereofwd), std::make_pair(pmonofwd, pstereofwd), fwdptsod)));
147 if (!backwardPredictedStateTag_.empty())
148 states.insert(std::make_pair(
150 TrackingStateInfo(std::make_pair(monobwd, stereobwd), std::make_pair(pmonobwd, pstereobwd), bwdptsod)));
151 if (!updatedStateTag_.empty())
152 states.insert(std::make_pair(
154 TrackingStateInfo(std::make_pair(monoup, stereoup), std::make_pair(pmonoup, pstereoup), updatedptsod)));
155 if (!combinedStateTag_.empty())
156 states.insert(std::make_pair(
158 TrackingStateInfo(std::make_pair(monoco, stereoco), std::make_pair(pmonoco, pstereoco), combinedptsod)));
163 trajinfo.insert(std::make_pair(thehitref, tkRecHitInfo));
183 float scale = -projposition.
z() / trackdirection.
z();
185 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