CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TkClonerImpl Class Referencefinal

#include <TkClonerImpl.h>

Inheritance diagram for TkClonerImpl:
TkCloner

Public Member Functions

TrackingRecHit::ConstRecHitPointer makeShared (SiPixelRecHit const &hit, TrajectoryStateOnSurface const &tsos) const override
 
TrackingRecHit::ConstRecHitPointer makeShared (SiStripRecHit2D const &hit, TrajectoryStateOnSurface const &tsos) const override
 
TrackingRecHit::ConstRecHitPointer makeShared (SiStripRecHit1D const &hit, TrajectoryStateOnSurface const &tsos) const override
 
TrackingRecHit::ConstRecHitPointer makeShared (SiStripMatchedRecHit2D const &hit, TrajectoryStateOnSurface const &tsos) const override
 
TrackingRecHit::ConstRecHitPointer makeShared (ProjectedSiStripRecHit2D const &hit, TrajectoryStateOnSurface const &tsos) const override
 
TrackingRecHit::ConstRecHitPointer makeShared (Phase2TrackerRecHit1D const &hit, TrajectoryStateOnSurface const &tsos) const override
 
std::unique_ptr< SiPixelRecHitoperator() (SiPixelRecHit const &hit, TrajectoryStateOnSurface const &tsos) const override
 
std::unique_ptr< SiStripRecHit2Doperator() (SiStripRecHit2D const &hit, TrajectoryStateOnSurface const &tsos) const override
 
std::unique_ptr< SiStripRecHit1Doperator() (SiStripRecHit1D const &hit, TrajectoryStateOnSurface const &tsos) const override
 
std::unique_ptr< SiStripMatchedRecHit2Doperator() (SiStripMatchedRecHit2D const &hit, TrajectoryStateOnSurface const &tsos) const override
 
std::unique_ptr< ProjectedSiStripRecHit2Doperator() (ProjectedSiStripRecHit2D const &hit, TrajectoryStateOnSurface const &tsos) const override
 
std::unique_ptr< Phase2TrackerRecHit1Doperator() (Phase2TrackerRecHit1D const &hit, TrajectoryStateOnSurface const &tsos) const override
 
std::unique_ptr< ProjectedSiStripRecHit2Dproject (SiStripMatchedRecHit2D const &hit, bool mono, TrajectoryStateOnSurface const &tsos) const
 
 TkClonerImpl ()
 
 TkClonerImpl (const PixelClusterParameterEstimator *ipixelCPE, const StripClusterParameterEstimator *istripCPE, const SiStripRecHitMatcher *iMatcher)
 
 TkClonerImpl (const PixelClusterParameterEstimator *ipixelCPE, const ClusterParameterEstimator< Phase2TrackerCluster1D > *iPhase2OTCPE)
 
- Public Member Functions inherited from TkCloner
TrackingRecHit::ConstRecHitPointer makeShared (TrackingRecHit::ConstRecHitPointer const &hit, TrajectoryStateOnSurface const &tsos) const
 
TrackingRecHitoperator ()[[cms
 

Private Attributes

const ClusterParameterEstimator< Phase2TrackerCluster1D > * phase2TrackerCPE
 
const PixelClusterParameterEstimatorpixelCPE
 
const StripClusterParameterEstimatorstripCPE
 
const SiStripRecHitMatchertheMatcher
 

Detailed Description

Definition at line 12 of file TkClonerImpl.h.

Constructor & Destructor Documentation

TkClonerImpl::TkClonerImpl ( )
inline

Definition at line 14 of file TkClonerImpl.h.

14 {}
TkClonerImpl::TkClonerImpl ( const PixelClusterParameterEstimator ipixelCPE,
const StripClusterParameterEstimator istripCPE,
const SiStripRecHitMatcher iMatcher 
)
inline

Definition at line 15 of file TkClonerImpl.h.

18  : pixelCPE(ipixelCPE), stripCPE(istripCPE), theMatcher(iMatcher), phase2TrackerCPE(nullptr) {}
const PixelClusterParameterEstimator * pixelCPE
Definition: TkClonerImpl.h:57
const StripClusterParameterEstimator * stripCPE
Definition: TkClonerImpl.h:58
const ClusterParameterEstimator< Phase2TrackerCluster1D > * phase2TrackerCPE
Definition: TkClonerImpl.h:60
const SiStripRecHitMatcher * theMatcher
Definition: TkClonerImpl.h:59
TkClonerImpl::TkClonerImpl ( const PixelClusterParameterEstimator ipixelCPE,
const ClusterParameterEstimator< Phase2TrackerCluster1D > *  iPhase2OTCPE 
)
inline

Definition at line 19 of file TkClonerImpl.h.

References TkCloner::makeShared(), makeShared(), TkCloner::operator(), operator()(), and project().

21  : pixelCPE(ipixelCPE), stripCPE(nullptr), theMatcher(nullptr), phase2TrackerCPE(iPhase2OTCPE) {}
const PixelClusterParameterEstimator * pixelCPE
Definition: TkClonerImpl.h:57
const StripClusterParameterEstimator * stripCPE
Definition: TkClonerImpl.h:58
const ClusterParameterEstimator< Phase2TrackerCluster1D > * phase2TrackerCPE
Definition: TkClonerImpl.h:60
const SiStripRecHitMatcher * theMatcher
Definition: TkClonerImpl.h:59

Member Function Documentation

TrackingRecHit::ConstRecHitPointer TkClonerImpl::makeShared ( SiPixelRecHit const &  hit,
TrajectoryStateOnSurface const &  tsos 
) const
overridevirtual

Implements TkCloner.

Definition at line 60 of file TkClonerImpl.cc.

References SiPixelRecHit::cluster(), TrackingRecHit::det(), TrackerSingleRecHit::detUnit(), PixelClusterParameterEstimator::getParameters(), CalibrationSummaryClient_cfi::params, and pixelCPE.

Referenced by DAFTrackProducerAlgorithm::filter(), TrackingRecHitPropagator::project(), TkClonerImpl(), and SiTrackerMultiRecHitUpdator::update().

61  {
62  // std::cout << "cloning " << typeid(hit).name() << std::endl;
63  const SiPixelCluster& clust = *hit.cluster();
64  auto&& params = pixelCPE->getParameters(clust, *hit.detUnit(), tsos);
65  return std::make_shared<SiPixelRecHit>(
66  std::get<0>(params), std::get<1>(params), std::get<2>(params), *hit.det(), hit.cluster());
67 }
virtual ReturnType getParameters(const SiPixelCluster &cl, const GeomDetUnit &det) const =0
const PixelClusterParameterEstimator * pixelCPE
Definition: TkClonerImpl.h:57
Pixel cluster – collection of neighboring pixels above threshold.
TrackingRecHit::ConstRecHitPointer TkClonerImpl::makeShared ( SiStripRecHit2D const &  hit,
TrajectoryStateOnSurface const &  tsos 
) const
overridevirtual

FIXME: this only uses the first cluster and ignores the others

Implements TkCloner.

Definition at line 69 of file TkClonerImpl.cc.

References TrackingRecHit::det(), TrackerSingleRecHit::detUnit(), StripClusterParameterEstimator::localParameters(), TrackerSingleRecHit::omniCluster(), TrackerSingleRecHit::stripCluster(), and stripCPE.

70  {
71  // std::cout << "cloning " << typeid(hit).name() << std::endl;
73  const SiStripCluster& clust = hit.stripCluster();
75  return std::make_shared<SiStripRecHit2D>(lv.first, lv.second, *hit.det(), hit.omniCluster());
76 }
std::pair< LocalPoint, LocalError > LocalValues
virtual void localParameters(AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters &ltp) const
const StripClusterParameterEstimator * stripCPE
Definition: TkClonerImpl.h:58
TrackingRecHit::ConstRecHitPointer TkClonerImpl::makeShared ( SiStripRecHit1D const &  hit,
TrajectoryStateOnSurface const &  tsos 
) const
overridevirtual

FIXME: this only uses the first cluster and ignores the others

Implements TkCloner.

Definition at line 78 of file TkClonerImpl.cc.

References TrackingRecHit::det(), TrackerSingleRecHit::detUnit(), StripClusterParameterEstimator::localParameters(), SiStripPI::max, TrackerSingleRecHit::omniCluster(), TrackerSingleRecHit::stripCluster(), and stripCPE.

79  {
80  // std::cout << "cloning " << typeid(hit).name() << std::endl;
82  const SiStripCluster& clust = hit.stripCluster();
84  LocalError le(lv.second.xx(), 0., std::numeric_limits<float>::max()); //Correct??
85  return std::make_shared<SiStripRecHit1D>(lv.first, le, *hit.det(), hit.omniCluster());
86 }
std::pair< LocalPoint, LocalError > LocalValues
virtual void localParameters(AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters &ltp) const
const StripClusterParameterEstimator * stripCPE
Definition: TkClonerImpl.h:58
TrackingRecHit::ConstRecHitPointer TkClonerImpl::makeShared ( SiStripMatchedRecHit2D const &  hit,
TrajectoryStateOnSurface const &  tsos 
) const
overridevirtual

std::cout << "cloning " << typeid(hit).name() << std::endl;

Implements TkCloner.

Definition at line 152 of file TkClonerImpl.cc.

153  {
155  return TrackingRecHit::ConstRecHitPointer((*this)(hit, tsos));
156 }
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
TrackingRecHit::ConstRecHitPointer TkClonerImpl::makeShared ( ProjectedSiStripRecHit2D const &  hit,
TrajectoryStateOnSurface const &  tsos 
) const
overridevirtual

Implements TkCloner.

Definition at line 158 of file TkClonerImpl.cc.

159  {
160  // std::cout << "cloning " << typeid(hit).name() << std::endl;
161  return TrackingRecHit::ConstRecHitPointer((*this)(hit, tsos));
162 }
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
TrackingRecHit::ConstRecHitPointer TkClonerImpl::makeShared ( Phase2TrackerRecHit1D const &  hit,
TrajectoryStateOnSurface const &  tsos 
) const
overridevirtual

Implements TkCloner.

Definition at line 88 of file TkClonerImpl.cc.

References TrajectoryStateOnSurface::charge(), Phase2TrackerRecHit1D::cluster(), dumpMFGeometry_cfg::delta, TrackingRecHit::det(), TrackerSingleRecHit::detUnit(), TrajectoryStateOnSurface::globalParameters(), TrajectoryStateOnSurface::globalPosition(), ClusterParameterEstimator< T >::localParameters(), TrajectoryStateOnSurface::localParameters(), GlobalTrajectoryParameters::momentum(), CalibrationSummaryClient_cfi::params, TrackerSingleRecHit::phase2OTCluster(), phase2TrackerCPE, GluedGeomDet::stereoDet(), GeomDet::surface(), and PV3DBase< T, PVType, FrameType >::z().

89  {
90  const Phase2TrackerCluster1D& clust = hit.phase2OTCluster();
91  const PixelGeomDetUnit& gdu = (const PixelGeomDetUnit&)*(hit.detUnit());
92  auto&& params = phase2TrackerCPE->localParameters(clust, gdu, tsos);
93  return std::unique_ptr<Phase2TrackerRecHit1D>{
94  new Phase2TrackerRecHit1D(params.first, params.second, *hit.det(), hit.cluster())};
95 }
virtual LocalValues localParameters(const T &, const GeomDetUnit &) const =0
const ClusterParameterEstimator< Phase2TrackerCluster1D > * phase2TrackerCPE
Definition: TkClonerImpl.h:60
std::unique_ptr< SiPixelRecHit > TkClonerImpl::operator() ( SiPixelRecHit const &  hit,
TrajectoryStateOnSurface const &  tsos 
) const
overridevirtual

Implements TkCloner.

Definition at line 26 of file TkClonerImpl.cc.

References SiPixelRecHit::cluster(), TrackingRecHit::det(), TrackerSingleRecHit::detUnit(), PixelClusterParameterEstimator::getParameters(), CalibrationSummaryClient_cfi::params, and pixelCPE.

Referenced by TkClonerImpl().

27  {
28  const SiPixelCluster& clust = *hit.cluster();
29  auto&& params = pixelCPE->getParameters(clust, *hit.detUnit(), tsos);
30  return std::unique_ptr<SiPixelRecHit>(
31  new SiPixelRecHit(std::get<0>(params), std::get<1>(params), std::get<2>(params), *hit.det(), hit.cluster()));
32 }
virtual ReturnType getParameters(const SiPixelCluster &cl, const GeomDetUnit &det) const =0
const PixelClusterParameterEstimator * pixelCPE
Definition: TkClonerImpl.h:57
Pixel cluster – collection of neighboring pixels above threshold.
Our base class.
Definition: SiPixelRecHit.h:23
std::unique_ptr< SiStripRecHit2D > TkClonerImpl::operator() ( SiStripRecHit2D const &  hit,
TrajectoryStateOnSurface const &  tsos 
) const
overridevirtual

FIXME: this only uses the first cluster and ignores the others

Implements TkCloner.

Definition at line 34 of file TkClonerImpl.cc.

References TrackingRecHit::det(), TrackerSingleRecHit::detUnit(), StripClusterParameterEstimator::localParameters(), TrackerSingleRecHit::omniCluster(), TrackerSingleRecHit::stripCluster(), and stripCPE.

35  {
37  const SiStripCluster& clust = hit.stripCluster();
39  return std::unique_ptr<SiStripRecHit2D>{new SiStripRecHit2D(lv.first, lv.second, *hit.det(), hit.omniCluster())};
40 }
std::pair< LocalPoint, LocalError > LocalValues
virtual void localParameters(AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters &ltp) const
const StripClusterParameterEstimator * stripCPE
Definition: TkClonerImpl.h:58
std::unique_ptr< SiStripRecHit1D > TkClonerImpl::operator() ( SiStripRecHit1D const &  hit,
TrajectoryStateOnSurface const &  tsos 
) const
overridevirtual

FIXME: this only uses the first cluster and ignores the others

Implements TkCloner.

Definition at line 42 of file TkClonerImpl.cc.

References TrackingRecHit::det(), TrackerSingleRecHit::detUnit(), StripClusterParameterEstimator::localParameters(), SiStripPI::max, TrackerSingleRecHit::omniCluster(), TrackerSingleRecHit::stripCluster(), and stripCPE.

43  {
45  const SiStripCluster& clust = hit.stripCluster();
47  LocalError le(lv.second.xx(), 0., std::numeric_limits<float>::max()); //Correct??
48  return std::unique_ptr<SiStripRecHit1D>{new SiStripRecHit1D(lv.first, le, *hit.det(), hit.omniCluster())};
49 }
std::pair< LocalPoint, LocalError > LocalValues
virtual void localParameters(AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters &ltp) const
const StripClusterParameterEstimator * stripCPE
Definition: TkClonerImpl.h:58
std::unique_ptr< SiStripMatchedRecHit2D > TkClonerImpl::operator() ( SiStripMatchedRecHit2D const &  hit,
TrajectoryStateOnSurface const &  tsos 
) const
overridevirtual

Implements TkCloner.

Definition at line 126 of file TkClonerImpl.cc.

References SiStripMatchedRecHit2D::clone(), TrackingRecHit::det(), LocalTrajectoryParameters::directionNotNormalized(), TrajectoryStateOnSurface::isValid(), StripClusterParameterEstimator::localParameters(), TrajectoryStateOnSurface::localParameters(), SiStripRecHitMatcher::match(), SiStripMatchedRecHit2D::monoCluster(), SiStripMatchedRecHit2D::monoClusterRef(), GluedGeomDet::monoDet(), GeomDet::position(), SiStripMatchedRecHit2D::stereoCluster(), SiStripMatchedRecHit2D::stereoClusterRef(), GluedGeomDet::stereoDet(), stripCPE, GeomDet::surface(), groupFilesInBlocks::temp, theMatcher, and GloballyPositioned< T >::toLocal().

127  {
128  const GeomDet* det = hit.det();
129  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(det);
130  LocalVector tkDir = (tsos.isValid() ? tsos.localParameters().directionNotNormalized()
131  : det->surface().toLocal(det->position() - GlobalPoint(0, 0, 0)));
132 
133  const SiStripCluster& monoclust = hit.monoCluster();
134  const SiStripCluster& stereoclust = hit.stereoCluster();
135 
138  stripCPE->localParameters(stereoclust, *gdet->stereoDet(), gluedToStereo(tsos, gdet));
139 
140  SiStripRecHit2D monoHit = SiStripRecHit2D(lvMono.first, lvMono.second, *gdet->monoDet(), hit.monoClusterRef());
141  SiStripRecHit2D stereoHit =
142  SiStripRecHit2D(lvStereo.first, lvStereo.second, *gdet->stereoDet(), hit.stereoClusterRef());
143 
144  // return theMatcher->match(&monoHit,&stereoHit,gdet,tkDir,true);
145  std::unique_ptr<SiStripMatchedRecHit2D> temp = theMatcher->match(&monoHit, &stereoHit, gdet, tkDir, false);
146  if (temp.get() == nullptr) {
147  temp = std::unique_ptr<SiStripMatchedRecHit2D>(hit.clone());
148  }
149  return temp;
150 }
std::pair< LocalPoint, LocalError > LocalValues
const GeomDetUnit * monoDet() const
Definition: GluedGeomDet.h:19
virtual void localParameters(AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters &ltp) const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
const StripClusterParameterEstimator * stripCPE
Definition: TkClonerImpl.h:58
std::unique_ptr< SiStripMatchedRecHit2D > match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection, bool force) const
LocalPoint toLocal(const GlobalPoint &gp) const
const SiStripRecHitMatcher * theMatcher
Definition: TkClonerImpl.h:59
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:20
std::unique_ptr< ProjectedSiStripRecHit2D > TkClonerImpl::operator() ( ProjectedSiStripRecHit2D const &  hit,
TrajectoryStateOnSurface const &  tsos 
) const
overridevirtual

Implements TkCloner.

Definition at line 164 of file TkClonerImpl.cc.

References dumpMFGeometry_cfg::delta, TrackingRecHit::det(), f, TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localDirection(), StripClusterParameterEstimator::localParameters(), TrackerSingleRecHit::omniCluster(), ProjectedSiStripRecHit2D::originalDet(), GeomDet::position(), LocalError::rotate(), TrackerSingleRecHit::stripCluster(), stripCPE, GeomDet::surface(), GloballyPositioned< T >::toLocal(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().

165  {
166  const SiStripCluster& clust = hit.stripCluster();
167  const GeomDetUnit* gdu = reinterpret_cast<const GeomDetUnit*>(hit.originalDet());
168  //if (!gdu) std::cout<<"no luck dude"<<std::endl;
170 
171  // project...
172  const GeomDet& det = *hit.det();
173  const BoundPlane& gluedPlane = det.surface();
174  const BoundPlane& hitPlane = gdu->surface();
175  LocalVector tkDir =
176  (tsos.isValid() ? tsos.localDirection() : det.surface().toLocal(det.position() - GlobalPoint(0, 0, 0)));
177 
178  auto delta = gluedPlane.localZ(hitPlane.position());
179  const LocalVector& ldir = tkDir;
180  LocalPoint lhitPos = gluedPlane.toLocal(hitPlane.toGlobal(lv.first));
181  LocalPoint projectedHitPos = lhitPos - ldir * delta / ldir.z();
182 
183  LocalVector hitXAxis = gluedPlane.toLocal(hitPlane.toGlobal(LocalVector(1.f, 0, 0)));
184  LocalError hitErr = lv.second;
185  if (gluedPlane.normalVector().dot(hitPlane.normalVector()) < 0) {
186  // the two planes are inverted, and the correlation element must change sign
187  hitErr = LocalError(hitErr.xx(), -hitErr.xy(), hitErr.yy());
188  }
189  LocalError rotatedError = hitErr.rotate(hitXAxis.x(), hitXAxis.y());
190  return std::unique_ptr<ProjectedSiStripRecHit2D>{
191  new ProjectedSiStripRecHit2D(projectedHitPos, rotatedError, *hit.det(), *hit.originalDet(), hit.omniCluster())};
192 }
std::pair< LocalPoint, LocalError > LocalValues
float xx() const
Definition: LocalError.h:22
virtual void localParameters(AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters &ltp) const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
T y() const
Definition: PV3DBase.h:60
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
float xy() const
Definition: LocalError.h:23
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
const StripClusterParameterEstimator * stripCPE
Definition: TkClonerImpl.h:58
float yy() const
Definition: LocalError.h:24
LocalPoint toLocal(const GlobalPoint &gp) const
T z() const
Definition: PV3DBase.h:61
double f[11][100]
LocalError rotate(float x, float y) const
Return a new LocalError, rotated by an angle defined by the direction (x,y)
Definition: LocalError.h:37
T x() const
Definition: PV3DBase.h:59
std::unique_ptr< Phase2TrackerRecHit1D > TkClonerImpl::operator() ( Phase2TrackerRecHit1D const &  hit,
TrajectoryStateOnSurface const &  tsos 
) const
overridevirtual

Implements TkCloner.

Definition at line 51 of file TkClonerImpl.cc.

References Phase2TrackerRecHit1D::cluster(), TrackingRecHit::det(), TrackerSingleRecHit::detUnit(), ClusterParameterEstimator< T >::localParameters(), CalibrationSummaryClient_cfi::params, TrackerSingleRecHit::phase2OTCluster(), and phase2TrackerCPE.

52  {
53  const Phase2TrackerCluster1D& clust = hit.phase2OTCluster();
54  const PixelGeomDetUnit& gdu = (const PixelGeomDetUnit&)*(hit.detUnit());
55  auto&& params = phase2TrackerCPE->localParameters(clust, gdu, tsos);
56  return std::unique_ptr<Phase2TrackerRecHit1D>{
57  new Phase2TrackerRecHit1D(params.first, params.second, *hit.det(), hit.cluster())};
58 }
virtual LocalValues localParameters(const T &, const GeomDetUnit &) const =0
const ClusterParameterEstimator< Phase2TrackerCluster1D > * phase2TrackerCPE
Definition: TkClonerImpl.h:60
std::unique_ptr< ProjectedSiStripRecHit2D > TkClonerImpl::project ( SiStripMatchedRecHit2D const &  hit,
bool  mono,
TrajectoryStateOnSurface const &  tsos 
) const

Definition at line 194 of file TkClonerImpl.cc.

References dumpMFGeometry_cfg::delta, TrackingRecHit::det(), f, TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localDirection(), StripClusterParameterEstimator::localParameters(), SiStripMatchedRecHit2D::monoCluster(), SiStripMatchedRecHit2D::monoClusterRef(), GluedGeomDet::monoDet(), GeomDet::position(), LocalError::rotate(), SiStripMatchedRecHit2D::stereoCluster(), SiStripMatchedRecHit2D::stereoClusterRef(), GluedGeomDet::stereoDet(), stripCPE, GeomDet::surface(), GloballyPositioned< T >::toLocal(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by TkClonerImpl().

196  {
197  const GeomDet& det = *hit.det();
198  const GluedGeomDet& gdet = static_cast<const GluedGeomDet&>(det);
199  const GeomDetUnit* odet = mono ? gdet.monoDet() : gdet.stereoDet();
200  const BoundPlane& gluedPlane = det.surface();
201  const BoundPlane& hitPlane = odet->surface();
202 
203  LocalVector tkDir =
204  (tsos.isValid() ? tsos.localDirection() : det.surface().toLocal(det.position() - GlobalPoint(0, 0, 0)));
205 
206  const SiStripCluster& monoclust = hit.monoCluster();
207  const SiStripCluster& stereoclust = hit.stereoCluster();
208 
210  if (tsos.isValid())
211  lv = mono ? stripCPE->localParameters(monoclust, *odet, tsos)
212  : stripCPE->localParameters(stereoclust, *odet, gluedToStereo(tsos, &gdet));
213  else
214  lv = stripCPE->localParameters(mono ? monoclust : stereoclust, *odet);
215 
216  auto delta = gluedPlane.localZ(hitPlane.position());
217  const LocalVector& ldir = tkDir;
218  LocalPoint lhitPos = gluedPlane.toLocal(hitPlane.toGlobal(lv.first));
219  LocalPoint projectedHitPos = lhitPos - ldir * delta / ldir.z();
220 
221  LocalVector hitXAxis = gluedPlane.toLocal(hitPlane.toGlobal(LocalVector(1.f, 0, 0)));
222  LocalError hitErr = lv.second;
223  if (gluedPlane.normalVector().dot(hitPlane.normalVector()) < 0) {
224  // the two planes are inverted, and the correlation element must change sign
225  hitErr = LocalError(hitErr.xx(), -hitErr.xy(), hitErr.yy());
226  }
227  LocalError rotatedError = hitErr.rotate(hitXAxis.x(), hitXAxis.y());
228  return std::unique_ptr<ProjectedSiStripRecHit2D>{new ProjectedSiStripRecHit2D(
229  projectedHitPos, rotatedError, det, *odet, mono ? hit.monoClusterRef() : hit.stereoClusterRef())};
230 }
std::pair< LocalPoint, LocalError > LocalValues
float xx() const
Definition: LocalError.h:22
const GeomDetUnit * monoDet() const
Definition: GluedGeomDet.h:19
virtual void localParameters(AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters &ltp) const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
T y() const
Definition: PV3DBase.h:60
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
float xy() const
Definition: LocalError.h:23
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
const StripClusterParameterEstimator * stripCPE
Definition: TkClonerImpl.h:58
float yy() const
Definition: LocalError.h:24
LocalPoint toLocal(const GlobalPoint &gp) const
T z() const
Definition: PV3DBase.h:61
double f[11][100]
LocalError rotate(float x, float y) const
Return a new LocalError, rotated by an angle defined by the direction (x,y)
Definition: LocalError.h:37
T x() const
Definition: PV3DBase.h:59
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:20

Member Data Documentation

const ClusterParameterEstimator<Phase2TrackerCluster1D>* TkClonerImpl::phase2TrackerCPE
private

Definition at line 60 of file TkClonerImpl.h.

Referenced by makeShared(), and operator()().

const PixelClusterParameterEstimator* TkClonerImpl::pixelCPE
private

Definition at line 57 of file TkClonerImpl.h.

Referenced by makeShared(), and operator()().

const StripClusterParameterEstimator* TkClonerImpl::stripCPE
private

Definition at line 58 of file TkClonerImpl.h.

Referenced by makeShared(), operator()(), and project().

const SiStripRecHitMatcher* TkClonerImpl::theMatcher
private

Definition at line 59 of file TkClonerImpl.h.

Referenced by operator()().