1 #ifndef Traj2TrackHits_H
2 #define Traj2TrackHits_H
26 theCPE(static_cast<TkTransientTrackingRecHitBuilder
const *>(builder)->stripClusterParameterEstimator()),
36 else copy(meas.rbegin(),meas.rend(),hits);
40 else split(meas.rbegin(),meas.rend(),hits,along);
46 for(;itm!=
e;++itm)
if( (!
removeNoDet) | ((*itm).recHitR().det()!=
nullptr)) hits.
push_back((*itm).recHitR().clone());
52 auto const &
hit = *(*itm).recHit()->hit();
53 if( (
removeNoDet) & ((*itm).recHitR().det()==
nullptr))
continue;
59 auto const & clus = thit.firstClusterRef();
61 else if (thit.isMatched()) {
62 auto zdir = itm->updatedState().localDirection().z();
64 split(*itm,static_cast<SiStripMatchedRecHit2D const&>(thit),hits,zdir);
65 }
else if (thit.isProjected()) {
66 auto detU =
static_cast<ProjectedSiStripRecHit2D
const&
>(thit).originalDet();
73 auto const & detU = *hit2D.
detUnit();
75 bool endcap = detU.type().isEndcap();
76 if (endcap)
return hit2D.
clone();
89 if (endcap)
return new SiStripRecHit2D(lv.first,lv.second,idet,clus);
98 mhit.monoClusterRef());
100 mhit.stereoClusterRef());
107 LocalVector Delta = secondLocalPos - firstLocalPos;
108 float scalar = Delta.
z() * zdir;
virtual LocalValues localParameters(const SiStripCluster &, const GeomDetUnit &) const
const GeomDetUnit * monoDet() const
Traj2TrackHits(const TransientTrackingRecHitBuilder *builder, bool ikeepOrder, bool noNoDet=true)
void copy(HI itm, HI e, TrackingRecHitCollection &hits) const
void split(HI itm, HI e, TrackingRecHitCollection &hits, bool along) const
PropagationDirection const & direction() const
DataContainer const & measurements() const
SiStripCluster const & stripCluster() const
TrackingRecHit * clone(BaseTrackerRecHit const &hit2D) const
const SurfaceType & surface() const
const Surface::PositionType & position() const
The position (origin of the R.F.)
virtual LocalError localPositionError() const GCC11_FINAL
const T & max(const T &a, const T &b)
const GeomDet * det() const
LocalPoint toLocal(const GlobalPoint &gp) const
virtual const GeomDetType & type() const =0
virtual TrackingRecHit * clone() const =0
void operator()(Trajectory const &traj, TrackingRecHitCollection &hits, bool splitting) const
const StripClusterParameterEstimator * theCPE
virtual OmniClusterRef const & firstClusterRef() const =0
virtual const GeomDetUnit * detUnit() const
bool isUndef(TrackingRecHit const &hit)
TrajectoryStateOnSurface const & updatedState() const
BaseTrackerRecHit * build(GeomDetUnit const &idet, OmniClusterRef const &clus) const
virtual LocalPoint localPosition() const GCC11_FINAL
const GeomDetUnit * stereoDet() const
void split(TrajectoryMeasurement const &itm, SiStripMatchedRecHit2D const &mhit, TrackingRecHitCollection &hits, float zdir) const
double scalar(const CLHEP::HepGenMatrix &m)
Return the matrix as a scalar. Raise an assertion if the matris is not .