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 
19 class TkGluedMeasurementDet GCC11_FINAL : public MeasurementDet {
20 public:
21 
22  TkGluedMeasurementDet( const GluedGeomDet* gdet,const SiStripRecHitMatcher* matcher, const StripClusterParameterEstimator* cpe);
23  void init(const MeasurementDet* monoDet,
24  const MeasurementDet* stereoDet);
25 
26  virtual RecHitContainer recHits( const TrajectoryStateOnSurface&, const MeasurementTrackerEvent & data) const;
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,
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 
48  return (monoDet()->hasBadComponents(tsos,data) || stereoDet()->hasBadComponents(tsos,data));}
49 
50 private:
53  const TkStripMeasurementDet* theMonoDet;
54  const TkStripMeasurementDet* theStereoDet;
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:
67  HitCollectorForRecHits(const GeomDet * geomDet,
68  const SiStripRecHitMatcher * matcher,
71  void add(SiStripMatchedRecHit2D const& hit) {
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:
98  HitCollectorForSimpleHits(const GeomDet * geomDet,
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 
131  HitCollectorForFastMeasurements(const GeomDet * geomDet,
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 
180  void checkProjection(const TrajectoryStateOnSurface& ts,
181  const RecHitContainer& monoHits,
182  const RecHitContainer& stereoHits) const;
183  void checkHitProjection(const TrackingRecHit& hit,
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
bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const
return TRUE if at least one of the mono and stereo components has badChannels
RecHitSplitter::RecHitContainer RecHitContainer
const StripClusterParameterEstimator * cpe_
const StripClusterParameterEstimator * theCPE
size_t size() const
always fast as no estimator available here!
int init
Definition: HydjetWrapper.h:62
std::vector< ConstRecHitPointer > RecHitContainer
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
const SiStripRecHitMatcher * theMatcher
const TrajectoryStateOnSurface & stateOnThisDet_
SiStripRecHitMatcher::Collector Collector
const TrajectoryStateOnSurface & stateOnThisDet_
const TkStripMeasurementDet * theMonoDet
const TkStripMeasurementDet * theStereoDet
bool isActive(const MeasurementTrackerEvent &data) const
return TRUE if both mono and stereo components are active
const GeomDet & fastGeomDet() const
SiStripRecHitMatcher::Collector & collector()
static const MeasurementEstimator & estimator()
tuple result
Definition: query.py:137
SiStripRecHitMatcher::Collector & collector()
#define dso_internal
Definition: Visibility.h:13
SiStripRecHitMatcher::Collector & collector()
SiStripRecHitMatcher::Collector collector_
const GluedGeomDet & specificGeomDet() const
const MeasurementEstimator & estimator()
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
const SiStripRecHitMatcher * matcher_
const StripClusterParameterEstimator * cpe_
JetCorrectorParametersCollection coll
Definition: classes.h:10
void add(SiStripMatchedRecHit2D const &hit)
const TkStripMeasurementDet * stereoDet() const
string const
Definition: compareJSON.py:14
SiStripRecHitMatcher::Collector Collector
GloballyPositioned< float >::GlobalVector GlobalVector
Definition: MagVolume.h:21
SiStripRecHitMatcher::Collector collector_
std::vector< BaseTrackerRecHit * > SimpleHitContainer
const TkStripMeasurementDet * monoDet() const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
boost::function< void(SiStripMatchedRecHit2D const &)> Collector
TransientTrackingRecHit::RecHitPointer RecHitPointer
const StripClusterParameterEstimator * cpe_
virtual bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const =0
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const =0
Unlimited (trivial) bounds.