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();traj_mes_iterator++){
36 if (ttrh->isValid())pos=ttrh->hit()->localPosition() ;
38 unsigned int detid=ttrh->hit()->geographicalId().rawId();
44 for (thehit=track->recHitsBegin();thehit!=track->recHitsEnd();thehit++){
47 if ((*thehit)->isValid())hitpos=(*thehit)->localPosition();
48 if((*thehit)->geographicalId().rawId()==detid&&
49 (hitpos - pos).
mag() < 1
e-4)
63 const ProjectedSiStripRecHit2D* phit=
dynamic_cast<const ProjectedSiStripRecHit2D*
>( &*(thehitref));
64 const SiStripMatchedRecHit2D* matchedhit=
dynamic_cast<const SiStripMatchedRecHit2D*
>( &*(thehitref));
89 monofwd=monodet->
toLocal(gtrkdirfwd);
90 monobwd=monodet->
toLocal(gtrkdirbwd);
91 monoup=monodet->
toLocal(gtrkdirup);
92 monoco=monodet->
toLocal(gtrkdirco);
102 stereofwd=stereodet->toLocal(gtrkdirfwd);
103 stereobwd=stereodet->toLocal(gtrkdirbwd);
104 stereoup=stereodet->toLocal(gtrkdirup);
105 stereoco=stereodet->toLocal(gtrkdirco);
122 const SiStripRecHit2D& originalhit=phit->originalHit();
126 monofwd= det->
toLocal(gtrkdirfwd);
127 monobwd= det->
toLocal(gtrkdirbwd);
128 monoup= det->
toLocal(gtrkdirup);
129 monoco= det->
toLocal(gtrkdirco);
137 stereofwd= det->
toLocal(gtrkdirfwd);
138 stereobwd= det->
toLocal(gtrkdirbwd);
139 stereoup= det->
toLocal(gtrkdirup);
140 stereoco= det->
toLocal(gtrkdirco);
148 if(forwardPredictedStateTag_!=
"") states.insert(std::make_pair(
FwPredicted,
TrackingStateInfo(std::make_pair(monofwd,stereofwd), std::make_pair(pmonofwd,pstereofwd), fwdptsod)));
149 if(backwardPredictedStateTag_!=
"")states.insert(std::make_pair(
BwPredicted,
TrackingStateInfo(std::make_pair(monobwd,stereobwd), std::make_pair(pmonobwd,pstereobwd), bwdptsod)));
150 if(updatedStateTag_!=
"")states.insert(std::make_pair(
Updated,
TrackingStateInfo(std::make_pair(monoup,stereoup), std::make_pair(pmonoup,pstereoup), updatedptsod)));
151 if(combinedStateTag_!=
"")states.insert(std::make_pair(
Combined,
TrackingStateInfo(std::make_pair(monoco,stereoco), std::make_pair(pmonoco,pstereoco), combinedptsod)));
158 trajinfo.insert(std::make_pair(thehitref,tkRecHitInfo));
164 output=
TrackInfo((traj_iterator->seed()),trajinfo);
178 float scale=-projposition.
z()/trackdirection.
z();
180 projposition+= scale*trackdirection;
const GeomDetUnit * monoDet() const
TSOS combine(const TSOS &pTsos1, const TSOS &pTsos2) const
LocalPoint position() const
Local x and y position coordinates.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
const Plane & surface() const
The nominal surface of the GeomDet.
static int position[TOTALCHAMBERS][3]
std::map< StateType, TrackingStateInfo > TrackingStates
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
LocalVector momentum() const
Momentum vector in the local frame.
virtual const GeomDet * idToDet(DetId) const
void run(const edm::Ref< std::vector< Trajectory > > traj_iterator, reco::TrackRef track, reco::TrackInfo &output, const TrackerGeometry *tracker)
LocalPoint project(const GeomDet *det, const GeomDet *projdet, LocalPoint position, LocalVector trackdirection) const
const GeomDetUnit * stereoDet() const
const LocalTrajectoryParameters & parameters() const
std::map< TrackingRecHitRef, TrackingRecHitInfo > TrajectoryInfo
default constructor