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;
27 
28  const GluedGeomDet& specificGeomDet() const {return static_cast<GluedGeomDet const&>(fastGeomDet());}
29 
30  virtual bool measurements( const TrajectoryStateOnSurface& stateOnThisDet,
31  const MeasurementEstimator& est,
32  TempMeasurements & result) const;
33 
34  const TkStripMeasurementDet* monoDet() const{ return theMonoDet;}
35  const TkStripMeasurementDet* stereoDet() const{ return theStereoDet;}
36 
38  bool isActive() const {return monoDet()->isActive() && stereoDet()->isActive(); }
39 
41  bool hasBadComponents( const TrajectoryStateOnSurface &tsos ) const {
42  return (monoDet()->hasBadComponents(tsos) || stereoDet()->hasBadComponents(tsos));}
43 
44 private:
47  const TkStripMeasurementDet* theMonoDet;
48  const TkStripMeasurementDet* theStereoDet;
49 
50 
51  template<typename Collector>
52  void doubleMatch(const TrajectoryStateOnSurface& ts, Collector & collector) const dso_internal;
53 
54  template<typename Collector>
55  void collectRecHits(const TrajectoryStateOnSurface&, Collector &coll) const dso_internal;
56 
58  public:
60  HitCollectorForRecHits(const GeomDet * geomDet,
61  const SiStripRecHitMatcher * matcher,
64  void add(SiStripMatchedRecHit2D const& hit) {
65  target_.push_back(
66  TSiStripMatchedRecHit::build( geomDet_, std::auto_ptr<TrackingRecHit>(hit.clone()),
67  matcher_,cpe_)
68  );
69  hasNewHits_ = true;
70  }
71  void addProjected(const TransientTrackingRecHit& hit,
72  const GlobalVector & gdir) ;
73  SiStripRecHitMatcher::Collector & collector() { return collector_; }
74  bool hasNewMatchedHits() const { return hasNewHits_; }
75  void clearNewMatchedHitsFlag() { hasNewHits_ = false; }
76  static bool filter() { return false;}
77  size_t size() const { return target_.size();}
78 
79  static const MeasurementEstimator & estimator() { static MeasurementEstimator * dummy=0; return *dummy;}
80 
81  private:
82  const GeomDet * geomDet_;
88  };
89 
90 
92  public:
95 
97  const SiStripRecHitMatcher * matcher,
99  const TrajectoryStateOnSurface& stateOnThisDet,
100  const MeasurementEstimator& est,
102  void add(SiStripMatchedRecHit2D const& hit) ;
103  void addProjected(const TransientTrackingRecHit& hit,
104  const GlobalVector & gdir) ;
105 
106  SiStripRecHitMatcher::Collector & collector() { return collector_; }
107  bool hasNewMatchedHits() const { return hasNewHits_; }
108  void clearNewMatchedHitsFlag() { hasNewHits_ = false; }
109  static bool filter() { return false;} // if true mono-colection will been filter using the estimator before matching
110  size_t size() const { return target_.size();}
111  const MeasurementEstimator & estimator() { return est_;}
112  private:
113  const GeomDet * geomDet_;
121  };
122 
123 
125  projectOnGluedDet( const RecHitContainer& hits,
126  const TrajectoryStateOnSurface& ts) const dso_internal;
127 
128  template<typename HitCollector>
129  void
130  projectOnGluedDet( HitCollector & collector,
131  const RecHitContainer& hits,
132  const GlobalVector & gdir ) const dso_internal;
133 
134  void checkProjection(const TrajectoryStateOnSurface& ts,
135  const RecHitContainer& monoHits,
136  const RecHitContainer& stereoHits) const;
137  void checkHitProjection(const TransientTrackingRecHit& hit,
138  const TrajectoryStateOnSurface& ts,
139  const GeomDet& det) const dso_internal;
140 
142  bool testStrips(const TrajectoryStateOnSurface& tsos,
143  const BoundPlane &gluedPlane,
144  const TkStripMeasurementDet &mdet) const dso_internal;
145 
146 };
147 
148 #endif
RecHitSplitter::RecHitContainer RecHitContainer
const StripClusterParameterEstimator * cpe_
bool hasBadComponents(const TrajectoryStateOnSurface &tsos) const
return TRUE if at least one of the mono and stereo components has badChannels
TransientTrackingRecHit::ConstRecHitContainer RecHitContainer
size_t size() const
always fast as no estimator available here!
int init
Definition: HydjetWrapper.h:63
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
const SiStripRecHitMatcher * theMatcher
SiStripRecHitMatcher::Collector Collector
const TrajectoryStateOnSurface & stateOnThisDet_
const TkStripMeasurementDet * theMonoDet
const TkStripMeasurementDet * theStereoDet
const GeomDet & fastGeomDet() const
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &) const =0
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_
virtual bool hasBadComponents(const TrajectoryStateOnSurface &tsos) const =0
const GluedGeomDet & specificGeomDet() const
const SiStripRecHitMatcher * matcher_
JetCorrectorParametersCollection coll
Definition: classes.h:16
void add(SiStripMatchedRecHit2D const &hit)
const TkStripMeasurementDet * stereoDet() const
string const
Definition: compareJSON.py:14
GloballyPositioned< float >::GlobalVector GlobalVector
Definition: MagVolume.h:21
const TkStripMeasurementDet * monoDet() const
const StripClusterParameterEstimator * theCPE
boost::function< void(SiStripMatchedRecHit2D const &)> Collector
bool isActive() const
return TRUE if both mono and stereo components are active
TransientTrackingRecHit::RecHitPointer RecHitPointer
const StripClusterParameterEstimator * cpe_
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, TempMeasurements &result) const =0
Unlimited (trivial) bounds.