CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TkGluedMeasurementDet.h
Go to the documentation of this file.
1 #ifndef TkGluedMeasurementDet_H
2 #define TkGluedMeasurementDet_H
3 
6 
7 class GluedGeomDet;
8 //class SiStripRecHitMatcher;
14 
15 
17 
18 
20 public:
21 
23  void init(const MeasurementDet* monoDet,
24  const MeasurementDet* stereoDet);
25 
27 
28  // simple hits
29  virtual bool recHits(SimpleHitContainer & result,
30  const TrajectoryStateOnSurface& stateOnThisDet, const MeasurementEstimator&, const MeasurementTrackerEvent & data) const;
31 
32 
33 
34  const GluedGeomDet& specificGeomDet() const {return static_cast<GluedGeomDet const&>(fastGeomDet());}
35 
36  virtual bool measurements( const TrajectoryStateOnSurface& stateOnThisDet,
37  const MeasurementEstimator& est, const MeasurementTrackerEvent & data,
38  TempMeasurements & result) const;
39 
40  const TkStripMeasurementDet* monoDet() const{ return theMonoDet;}
41  const TkStripMeasurementDet* stereoDet() const{ return theStereoDet;}
42 
44  bool isActive(const MeasurementTrackerEvent & data) const {return monoDet()->isActive(data) && stereoDet()->isActive(data); }
45 
47  bool hasBadComponents( const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent & data ) const {
48  return (monoDet()->hasBadComponents(tsos,data) || stereoDet()->hasBadComponents(tsos,data));}
49 
50 private:
55 
56 
57  template<typename Collector>
58  void doubleMatch(const TrajectoryStateOnSurface& ts, const MeasurementTrackerEvent & data, Collector & collector) const dso_internal;
59 
60  template<typename Collector>
61  void collectRecHits(const TrajectoryStateOnSurface&, const MeasurementTrackerEvent & data, Collector &coll) const dso_internal;
62 
63  // for TTRH
65  public:
68  const SiStripRecHitMatcher * matcher,
72  target_.emplace_back(hit.cloneSH());
73  hasNewHits_ = true;
74  }
75  void addProjected(const TrackingRecHit& hit,
76  const GlobalVector & gdir) ;
77  SiStripRecHitMatcher::Collector & collector() { return collector_; }
78  bool hasNewMatchedHits() const { return hasNewHits_; }
79  void clearNewMatchedHitsFlag() { hasNewHits_ = false; }
80  static bool filter() { return false;}
81  size_t size() const { return target_.size();}
82 
83  static const MeasurementEstimator & estimator() { static MeasurementEstimator * dummy=0; return *dummy;}
84 
85  private:
86  const GeomDet * geomDet_;
92  };
93 
94  // for TRH
96  public:
99  const SiStripRecHitMatcher * matcher,
101  const TrajectoryStateOnSurface& stateOnThisDet,
102  const MeasurementEstimator& est,
104  void add(SiStripMatchedRecHit2D const & hit);
105  void addProjected(const TrackingRecHit& hit,
106  const GlobalVector & gdir) ;
107  SiStripRecHitMatcher::Collector & collector() { return collector_; }
108  bool hasNewMatchedHits() const { return hasNewHits_; }
109  void clearNewMatchedHitsFlag() { hasNewHits_ = false; }
110  bool filter() const { return matcher_->preFilter();} // if true mono-colection will been filter using the estimator before matching
111  size_t size() const { return target_.size();}
112  const MeasurementEstimator & estimator() { return est_;}
113  private:
114  const GeomDet * geomDet_;
122  };
123 
124 
125 
127  public:
130 
132  const SiStripRecHitMatcher * matcher,
134  const TrajectoryStateOnSurface& stateOnThisDet,
135  const MeasurementEstimator& est,
137  void add(SiStripMatchedRecHit2D const& hit) ;
138  void addProjected(const TrackingRecHit& hit,
139  const GlobalVector & gdir) ;
140 
141  SiStripRecHitMatcher::Collector & collector() { return collector_; }
142  bool hasNewMatchedHits() const { return hasNewHits_; }
143  void clearNewMatchedHitsFlag() { hasNewHits_ = false; }
144  bool filter() const { return matcher_->preFilter();} // if true mono-colection will been filter using the estimator before matching
145  size_t size() const { return target_.size();}
146  const MeasurementEstimator & estimator() { return est_;}
147  private:
148  const GeomDet * geomDet_;
156  };
157 
158 
159 
161  projectOnGluedDet( const std::vector<SiStripRecHit2D>& hits,
162  const TrajectoryStateOnSurface& ts) const dso_internal;
163  template<typename HitCollector>
164  void
165  projectOnGluedDet( HitCollector & collector,
166  const std::vector<SiStripRecHit2D>& hits,
167  const GlobalVector & gdir ) const dso_internal;
168 
169 
171  projectOnGluedDet( const RecHitContainer& hits,
172  const TrajectoryStateOnSurface& ts) const dso_internal;
173  template<typename HitCollector>
174  void
175  projectOnGluedDet( HitCollector & collector,
176  const RecHitContainer& hits,
177  const GlobalVector & gdir ) const dso_internal;
178 
179 
181  const RecHitContainer& monoHits,
182  const RecHitContainer& stereoHits) const;
184  const TrajectoryStateOnSurface& ts,
185  const GeomDet& det) const dso_internal;
186 
188  bool testStrips(const TrajectoryStateOnSurface& tsos,
189  const BoundPlane &gluedPlane,
190  const TkStripMeasurementDet &mdet) const dso_internal;
191 
192 };
193 
194 #endif
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &data) const
bool testStrips(const TrajectoryStateOnSurface &tsos, const BoundPlane &gluedPlane, const TkStripMeasurementDet &mdet) const
Test the strips on one of the two dets with projection.
const TkStripMeasurementDet * theMonoDet
void init(const MeasurementDet *monoDet, const MeasurementDet *stereoDet)
#define GCC11_FINAL
const StripClusterParameterEstimator * cpe_
tracking::TempMeasurements TempMeasurements
void checkProjection(const TrajectoryStateOnSurface &ts, const RecHitContainer &monoHits, const RecHitContainer &stereoHits) const
virtual const GeomDet & geomDet() const
static const MeasurementEstimator & estimator()
bool isActive(const MeasurementTrackerEvent &data) const
return TRUE if both mono and stereo components are active
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
const TkStripMeasurementDet * monoDet() const
TkGluedMeasurementDet(const GluedGeomDet *gdet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe)
const GeomDet & fastGeomDet() const
size_t size() const
always fast as no estimator available here!
virtual RecHitPointer cloneSH() const
const GluedGeomDet & specificGeomDet() const
tuple result
Definition: query.py:137
TransientTrackingRecHit::RecHitPointer RecHitPointer
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const
bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const
return TRUE if at least one of the mono and stereo components has badChannels
void collectRecHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &data, Collector &coll) const
void doubleMatch(const TrajectoryStateOnSurface &ts, const MeasurementTrackerEvent &data, Collector &collector) const
std::shared_ptr< TrackingRecHit const > RecHitPointer
const StripClusterParameterEstimator * cpe_
RecHitContainer projectOnGluedDet(const std::vector< SiStripRecHit2D > &hits, const TrajectoryStateOnSurface &ts) const
const SiStripRecHitMatcher * theMatcher
SiStripRecHitMatcher::Collector & collector()
JetCorrectorParametersCollection coll
Definition: classes.h:10
void checkHitProjection(const TrackingRecHit &hit, const TrajectoryStateOnSurface &ts, const GeomDet &det) const
bool isActive(const MeasurementTrackerEvent &data) const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
const TkStripMeasurementDet * theStereoDet
string const
Definition: compareJSON.py:14
#define dso_internal
TrackingRecHit::ConstRecHitContainer RecHitContainer
std::vector< BaseTrackerRecHit * > SimpleHitContainer
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void add(SiStripMatchedRecHit2D const &hit)
boost::function< void(SiStripMatchedRecHit2D const &)> Collector
const TkStripMeasurementDet * stereoDet() const
const StripClusterParameterEstimator * theCPE