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 
26  virtual RecHitContainer recHits( const TrajectoryStateOnSurface&) const;
27 
28  const GluedGeomDet& specificGeomDet() const {return static_cast<GluedGeomDet const&>(fastGeomDet());}
29 
30  virtual std::vector<TrajectoryMeasurement>
31  fastMeasurements( const TrajectoryStateOnSurface& stateOnThisDet,
32  const TrajectoryStateOnSurface& startingState,
33  const Propagator&,
34  const MeasurementEstimator&) const;
35 
36  const TkStripMeasurementDet* monoDet() const{ return theMonoDet;}
37  const TkStripMeasurementDet* stereoDet() const{ return theStereoDet;}
38 
40  bool isActive() const {return monoDet()->isActive() && stereoDet()->isActive(); }
41 
43  bool hasBadComponents( const TrajectoryStateOnSurface &tsos ) const {
44  return (monoDet()->hasBadComponents(tsos) || stereoDet()->hasBadComponents(tsos));}
45 
46 private:
51 
52 
53  template<typename Collector>
54  void doubleMatch(const TrajectoryStateOnSurface& ts, Collector & collector) const dso_internal;
55 
56  template<typename Collector>
57  void collectRecHits(const TrajectoryStateOnSurface&, Collector &coll) const dso_internal;
58 
60  public:
63  const SiStripRecHitMatcher * matcher,
66  void add(SiStripMatchedRecHit2D const& hit) {
67  target_.push_back(
68  TSiStripMatchedRecHit::build( geomDet_, std::auto_ptr<TrackingRecHit>(hit.clone()),
69  matcher_,cpe_)
70  );
71  hasNewHits_ = true;
72  }
73  void addProjected(const TransientTrackingRecHit& hit,
74  const GlobalVector & gdir) ;
75  SiStripRecHitMatcher::Collector & collector() { return collector_; }
76  bool hasNewMatchedHits() const { return hasNewHits_; }
77  void clearNewMatchedHitsFlag() { hasNewHits_ = false; }
78  private:
79  const GeomDet * geomDet_;
85  };
86 
87 
89  public:
92 
94  const SiStripRecHitMatcher * matcher,
96  const TrajectoryStateOnSurface& stateOnThisDet,
97  const MeasurementEstimator& est,
98  std::vector<TrajectoryMeasurement> & target) ;
99  void add(SiStripMatchedRecHit2D const& hit) ;
100  void addProjected(const TransientTrackingRecHit& hit,
101  const GlobalVector & gdir) ;
102 
103  SiStripRecHitMatcher::Collector & collector() { return collector_; }
104  bool hasNewMatchedHits() const { return hasNewHits_; }
105  void clearNewMatchedHitsFlag() { hasNewHits_ = false; }
106  private:
107  const GeomDet * geomDet_;
112  std::vector<TrajectoryMeasurement> & target_;
115  };
116 
117 
119  projectOnGluedDet( const RecHitContainer& hits,
120  const TrajectoryStateOnSurface& ts) const dso_internal;
121 
122  template<typename HitCollector>
123  void
124  projectOnGluedDet( HitCollector & collector,
125  const RecHitContainer& hits,
126  const GlobalVector & gdir ) const dso_internal;
127 
129  const RecHitContainer& monoHits,
130  const RecHitContainer& stereoHits) const;
132  const TrajectoryStateOnSurface& ts,
133  const GeomDet& det) const dso_internal;
134 
136  bool testStrips(const TrajectoryStateOnSurface& tsos,
137  const BoundPlane &gluedPlane,
138  const TkStripMeasurementDet &mdet) const dso_internal;
139 
140 };
141 
142 #endif
void collectRecHits(const TrajectoryStateOnSurface &, Collector &coll) const dso_internal
const TkStripMeasurementDet * theMonoDet
RecHitContainer projectOnGluedDet(const RecHitContainer &hits, const TrajectoryStateOnSurface &ts) const dso_internal
void init(const MeasurementDet *monoDet, const MeasurementDet *stereoDet)
void checkHitProjection(const TransientTrackingRecHit &hit, const TrajectoryStateOnSurface &ts, const GeomDet &det) const dso_internal
void checkProjection(const TrajectoryStateOnSurface &ts, const RecHitContainer &monoHits, const RecHitContainer &stereoHits) const
TransientTrackingRecHit::ConstRecHitContainer RecHitContainer
virtual const GeomDet & geomDet() const
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
const TkStripMeasurementDet * monoDet() const
bool hasBadComponents(const TrajectoryStateOnSurface &tsos) const
return TRUE if at least one of the mono and stereo components has badChannels
TkGluedMeasurementDet(const GluedGeomDet *gdet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe)
void doubleMatch(const TrajectoryStateOnSurface &ts, Collector &collector) const dso_internal
const GeomDet & fastGeomDet() const
const GluedGeomDet & specificGeomDet() const
TransientTrackingRecHit::RecHitPointer RecHitPointer
#define dso_internal
Definition: Visibility.h:13
bool testStrips(const TrajectoryStateOnSurface &tsos, const BoundPlane &gluedPlane, const TkStripMeasurementDet &mdet) const dso_internal
Test the strips on one of the two dets with projection.
const StripClusterParameterEstimator * cpe_
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &) const
const SiStripRecHitMatcher * theMatcher
SiStripRecHitMatcher::Collector & collector()
JetCorrectorParametersCollection coll
Definition: classes.h:14
virtual std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &startingState, const Propagator &, const MeasurementEstimator &) const
const TkStripMeasurementDet * theStereoDet
string const
Definition: compareJSON.py:14
void add(SiStripMatchedRecHit2D const &hit)
bool isActive() const
Is this module active in reconstruction? It must be both &#39;setActiveThisEvent&#39; and &#39;setActive&#39;...
boost::function< void(SiStripMatchedRecHit2D const &)> Collector
const TkStripMeasurementDet * stereoDet() const
bool isActive() const
return TRUE if both mono and stereo components are active
const StripClusterParameterEstimator * theCPE