|
|
Go to the documentation of this file. 1 #ifndef Traj2TrackHits_H
2 #define Traj2TrackHits_H
22 using TrajParams = std::vector<LocalTrajectoryParameters>;
26 float tc = std::round(5.
f *
chi2);
42 hits.reserve(splitting ? 2 * meas.size() : meas.size());
45 copy(meas.begin(), meas.end(),
hits);
47 copy(meas.rbegin(), meas.rend(),
hits);
51 split(meas.begin(), meas.end(),
hits, along);
53 split(meas.rbegin(), meas.rend(),
hits, along);
64 trajParams.reserve(meas.size());
65 chi2s.reserve(meas.size());
67 copy(meas.begin(), meas.end(),
hits, trajParams, chi2s);
69 copy(meas.rbegin(), meas.rend(),
hits, trajParams, chi2s);
73 template <
typename HI>
75 for (; itm !=
e; ++itm)
76 if ((!
removeNoDet) | ((*itm).recHitR().det() !=
nullptr)) {
77 hits.push_back((*itm).recHitR().cloneHit());
78 trajParams.push_back((*itm).updatedState().localParameters());
79 chi2s.push_back(
toChi2x5((*itm).estimate()));
83 template <
typename HI>
85 for (; itm !=
e; ++itm)
86 if ((!
removeNoDet) | ((*itm).recHitR().det() !=
nullptr))
87 hits.push_back((*itm).recHitR().cloneHit());
90 template <
typename HI>
92 for (; itm !=
e; ++itm) {
93 auto const &
hit = *(*itm).recHit()->hit();
94 if ((
removeNoDet) & ((*itm).recHitR().det() ==
nullptr))
100 auto const &thit = static_cast<BaseTrackerRecHit const &>(
hit);
101 auto const &clus = thit.firstClusterRef();
104 else if (clus.isPhase2())
106 else if (thit.isMatched()) {
107 auto zdir = itm->updatedState().localDirection().z();
110 split(*itm, static_cast<SiStripMatchedRecHit2D const &>(thit),
hits, zdir);
111 }
else if (thit.isProjected()) {
112 auto detU = static_cast<ProjectedSiStripRecHit2D const &>(thit).originalDet();
120 auto const &detU = *hit2D.
detUnit();
122 bool endcap = detU.type().isEndcap();
124 return hit2D.
clone();
145 const GluedGeomDet *gdet = static_cast<const GluedGeomDet *>(mhit.
det());
153 LocalVector Delta = secondLocalPos - firstLocalPos;
154 float scalar = Delta.
z() * zdir;
157 hits.push_back(hitS);
158 hits.push_back(hitM);
160 hits.push_back(hitM);
161 hits.push_back(hitS);
const Surface::PositionType & position() const
The position (origin of the R.F.)
std::vector< unsigned char > Chi2sFive
void copy(HI itm, HI e, TrackingRecHitCollection &hits) const
PropagationDirection const & direction() const
static unsigned char toChi2x5(float chi2)
virtual const GeomDetType & type() const
const GeomDet * det() const
const GeomDetUnit * monoDet() const
bool isUndef(TrackingRecHit const &hit)
Traj2TrackHits(const TransientTrackingRecHitBuilder *builder, bool ikeepOrder, bool noNoDet=true)
TrajectoryStateOnSurface const & updatedState() const
bool isNotFromCluster(TrackingRecHit const &hit)
void operator()(Trajectory const &traj, TrackingRecHitCollection &hits, TrajParams &trajParams, Chi2sFive &chi2s) const
TrackingRecHit * clone(BaseTrackerRecHit const &hit2D) const
SiStripCluster const & stripCluster() const
double scalar(const CLHEP::HepGenMatrix &m)
Return the matrix as a scalar. Raise an assertion if the matris is not .
void operator()(Trajectory const &traj, TrackingRecHitCollection &hits, bool splitting) const
LocalError localPositionError() const override
OmniClusterRef const & stereoClusterRef() const
void split(HI itm, HI e, TrackingRecHitCollection &hits, bool along) const
BaseTrackerRecHit * build(GeomDetUnit const &idet, OmniClusterRef const &clus) const
virtual OmniClusterRef const & firstClusterRef() const =0
virtual void localParameters(AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters <p) const
OmniClusterRef const & monoClusterRef() const
virtual TrackingRecHit * clone() const =0
DataContainer const & measurements() const
const GeomDetUnit * stereoDet() const
std::vector< LocalTrajectoryParameters > TrajParams
LocalPoint localPosition() const override
const StripClusterParameterEstimator * theCPE
LocalPoint toLocal(const GlobalPoint &gp) const
const SurfaceType & surface() const
void split(TrajectoryMeasurement const &itm, SiStripMatchedRecHit2D const &mhit, TrackingRecHitCollection &hits, float zdir) const
virtual const GeomDetUnit * detUnit() const
void copy(HI itm, HI e, TrackingRecHitCollection &hits, TrajParams &trajParams, Chi2sFive &chi2s) const