|
|
Go to the documentation of this file.
39 double delta = gluedPlane.localZ(hitPlane.position());
41 LocalPoint lhitPos = gluedPlane.toLocal(
hit.globalPosition());
46 if (gluedPlane.normalVector().dot(hitPlane.normalVector()) < 0) {
52 return std::make_pair(projectedHitPos, rotatedError);
68 theStereoDet(nullptr),
69 theTopology(nullptr) {}
80 "TkGluedMeasurementDet ERROR: Trying to glue a det which is not a TkStripMeasurementDet");
99 auto oldSize =
result.size();
103 return result.size() > oldSize;
117 auto oldSize =
result.size();
122 if (
result.size() > oldSize)
127 bool killHIP = (1 ==
l) && (2 ==
id);
155 template <
typename T>
162 template <
typename Collector>
165 Collector& collector)
const {
169 template <
typename Collector>
172 Collector& collector)
const {
183 if (monoHits.empty()) {
188 std::vector<SiStripRecHit2D> simpleSteroHitsByValue;
191 if (simpleSteroHitsByValue.empty()) {
196 vsStereoHits.resize(simpleSteroHitsByValue.size());
198 simpleSteroHitsByValue.begin(), simpleSteroHitsByValue.end(), vsStereoHits.begin(),
take_address());
201 for (RecHitContainer::const_iterator monoHit = monoHits.begin(); monoHit != monoHits.end(); ++monoHit) {
203 const SiStripRecHit2D* verySpecificMonoHit = reinterpret_cast<const SiStripRecHit2D*>(tkhit);
205 vsStereoHits.begin(),
207 collector.collector(),
211 if (collector.hasNewMatchedHits()) {
212 collector.clearNewMatchedHitsFlag();
214 collector.addProjected(**monoHit, glbDir);
232 double totStereo = 0;
234 double totMatched = 0;
236 double filtStereo = 0;
261 if (fm != 0 && fs != 0)
263 if (fm != 0 || fs != 0)
268 printf(
"Matches:%d/%d/%d/%d/%d/%d : %f/%f/%f/%f/%f/%f/%f\n",
271 int(singleF - matchF),
280 filtStereo / totCall,
300 auto&& phit = std::make_shared<ProjectedSiStripRecHit2D>(
301 vl.first, vl.second,
fastGeomDet(), static_cast<SiStripRecHit2D const&>(*
hit));
307 template <
typename Collector>
311 for (RecHitContainer::const_iterator ihit =
hits.begin(); ihit !=
hits.end(); ihit++) {
312 collector.addProjected(**ihit, gdir);
321 auto&& phit = std::make_shared<ProjectedSiStripRecHit2D>(
322 vl.first, vl.second,
fastGeomDet(), static_cast<SiStripRecHit2D const&>(
hit));
328 template <
typename Collector>
330 std::vector<SiStripRecHit2D>
const&
hits,
333 collector.addProjected(
hit, gdir);
339 for (RecHitContainer::const_iterator
i = monoHits.begin();
i != monoHits.end(); ++
i) {
342 for (RecHitContainer::const_iterator
i = stereoHits.begin();
i != stereoHits.end(); ++
i) {
356 if ((projectedHit.localPosition() - propState.
localPosition()).
mag() > 0.0001f) {
357 std::cout <<
"PROBLEM: projected and propagated hit positions differ by "
358 << (projectedHit.localPosition() - propState.
localPosition()).
mag() << std::endl;
361 LocalError le1 = projectedHit.localPositionError();
369 std::cout <<
"PROBLEM: projected and propagated hit errors differ by " << maxdiff << std::endl;
398 if (stripPlane.normalVector().dot(gluedPlane.normalVector()) < 0) {
422 #include <boost/bind.hpp>
432 hasNewHits_(
false) {}
444 stateOnThisDet_(stateOnThisDet),
448 hasNewHits_(
false) {}
451 auto&& vl = projectedPos(
hit, *geomDet_, gdir, cpe_);
452 auto&& phit = std::make_shared<ProjectedSiStripRecHit2D>(
453 vl.first, vl.second, *geomDet_, static_cast<SiStripRecHit2D const&>(
hit));
459 if (!est_.preFilter(stateOnThisDet_,
464 std::pair<bool, double> diffEst = est_.estimate(stateOnThisDet_, hit2d);
471 auto const& thit = reinterpret_cast<TrackerSingleRecHit const&>(
hit);
476 auto&& vl = projectedPos(
hit, *geomDet_, gdir, cpe_);
477 std::unique_ptr<ProjectedSiStripRecHit2D> phit(
479 std::pair<bool, double> diffEst = est_.estimate(stateOnThisDet_, *phit);
481 target_.emplace_back(phit.release());
495 stateOnThisDet_(stateOnThisDet),
499 hasNewHits_(
false) {}
504 if (!est_.preFilter(stateOnThisDet_,
509 std::pair<bool, double> diffEst = est_.estimate(stateOnThisDet_, hit2d);
511 target_.add(hit2d.
cloneSH(), diffEst.second);
516 auto const& thit = reinterpret_cast<TrackerSingleRecHit const&>(
hit);
521 auto&& vl = projectedPos(
hit, *geomDet_, gdir, cpe_);
522 auto&& phit = std::make_shared<ProjectedSiStripRecHit2D>(
523 vl.first, vl.second, *geomDet_, static_cast<SiStripRecHit2D const&>(
hit));
525 std::pair<bool, double> diffEst = est_.estimate(stateOnThisDet_, *phit);
527 target_.add(phit, diffEst.second);
532 #include "doubleMatch.icc"
HitCollectorForRecHits(const GeomDet *geomDet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, RecHitContainer &target)
void simpleRecHits(const TrajectoryStateOnSurface &ts, const MeasurementTrackerEvent &data, std::vector< SiStripRecHit2D > &result) const
const StripGeomDetUnit & specificGeomDet() const
TrackingRecHit::ConstRecHitContainer RecHitContainer
const TkStripMeasurementDet * monoDet() const
void doubleMatch(const TrajectoryStateOnSurface &ts, const MeasurementTrackerEvent &data, Collector &collector) const
SiStripCluster const & stereoCluster() const
LocalError positionError() const
virtual TrackingRecHit const * hit() const
GlobalPoint globalPosition() const
void add(SiStripMatchedRecHit2D const &hit)
const TkStripMeasurementDet * theStereoDet
void addProjected(const TrackingRecHit &hit, const GlobalVector &gdir)
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'.
void collectRecHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &data, Collector &coll) const
DetId geographicalId() const
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
const TrackerTopology * theTopology
const Surface::PositionType & position() const
const Plane & surface() const
The nominal surface of the GeomDet.
float minPt2ForHitRecoveryInGluedDet() const
LocalVector localDirection() const
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
Global3DPoint GlobalPoint
const T * operator()(const T &val) const
GlobalVector momentum() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
TrajectoryStateOnSurface propagate(const TrackingRecHit &hit, const Plane &plane, const TrajectoryStateOnSurface &ts) const
const Surface & surface() const
bool hasAllGoodChannels() const
does this module have at least one bad strip, APV or channel?
RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &data) const override
HitCollectorForSimpleHits(const GeomDet *geomDet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, SimpleHitContainer &target)
DetId geographicalId() const
The label of this GeomDet.
LocalPoint localPosition() const
std::vector< BaseTrackerRecHit * > SimpleHitContainer
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
TkGluedMeasurementDet(const GluedGeomDet *gdet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe)
LocalError rotate(float x, float y) const
Return a new LocalError, rotated by an angle defined by the direction (x,y)
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
const StripClusterParameterEstimator * theCPE
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
void add(SiStripMatchedRecHit2D const &hit)
bool testStrips(float utraj, float uerr) const
return true if there are 'enough' good strips in the utraj +/- 3 uerr range.
const TkStripMeasurementDet * stereoDet() const
void checkProjection(const TrajectoryStateOnSurface &ts, const RecHitContainer &monoHits, const RecHitContainer &stereoHits) const
bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const override
const SiStripRecHitMatcher * theMatcher
GlobalVector globalMomentum() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
unsigned int tobLayer(const DetId &id) const
const TkStripMeasurementDet * theMonoDet
bool testStrips(const TrajectoryStateOnSurface &tsos, const BoundPlane &gluedPlane, const TkStripMeasurementDet &mdet) const
Test the strips on one of the two dets with projection.
void init(const MeasurementDet *monoDet, const MeasurementDet *stereoDet, const TrackerTopology *tTopo)
std::vector< const SiStripRecHit2D * > SimpleHitCollection
LocalPoint toLocal(const GlobalPoint &gp) const
SiStripCluster const & monoCluster() const
TrackingRecHit::ConstRecHitPointer theInactiveHit
HitCollectorForFastMeasurements(const GeomDet *geomDet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, TempMeasurements &target)
RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &data) const override
void addProjected(const TrackingRecHit &hit, const GlobalVector &gdir)
void checkHitProjection(const TrackingRecHit &hit, const TrajectoryStateOnSurface &ts, const GeomDet &det) const
char data[epos_bytes_allocation]
unsigned long long uint64_t
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
const GlobalTrajectoryParameters & globalParameters() const
RecHitPointer cloneSH() const override
const GeomDet & fastGeomDet() const
const LocalTrajectoryError & localError() const
TrackingRecHit::ConstRecHitPointer theMissingHit
RecHitContainer projectOnGluedDet(const std::vector< SiStripRecHit2D > &hits, const TrajectoryStateOnSurface &ts) const
std::unique_ptr< SiStripMatchedRecHit2D > match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection, bool force) const
const GluedGeomDet & specificGeomDet() const
virtual const GeomDet & geomDet() const
void addProjected(const TrackingRecHit &hit, const GlobalVector &gdir)