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 
43  unsigned int rawId() const { return fastGeomDet().geographicalId(); }
44 
45 
47  bool isActive(const MeasurementTrackerEvent & data) const {return monoDet()->isActive(data) && stereoDet()->isActive(data); }
48 
50  bool hasBadComponents( const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent & data ) const {
51  return (monoDet()->hasBadComponents(tsos,data) || stereoDet()->hasBadComponents(tsos,data));}
52 
53 private:
58 
59 
60  template<typename Collector>
61  void doubleMatch(const TrajectoryStateOnSurface& ts, const MeasurementTrackerEvent & data, Collector & collector) const dso_internal;
62 
63  template<typename Collector>
64  void collectRecHits(const TrajectoryStateOnSurface&, const MeasurementTrackerEvent & data, Collector &coll) const dso_internal;
65 
66  // for TTRH
68  public:
70  HitCollectorForRecHits(const GeomDet * geomDet,
71  const SiStripRecHitMatcher * matcher,
75  target_.emplace_back(hit.cloneSH());
76  hasNewHits_ = true;
77  }
78  void addProjected(const TrackingRecHit& hit,
79  const GlobalVector & gdir) ;
80  SiStripRecHitMatcher::Collector & collector() { return collector_; }
81  bool hasNewMatchedHits() const { return hasNewHits_; }
82  void clearNewMatchedHitsFlag() { hasNewHits_ = false; }
83  static bool filter() { return false;}
84  size_t size() const { return target_.size();}
85 
86  static const MeasurementEstimator & estimator() { static MeasurementEstimator * dummy=0; return *dummy;}
87 
88  private:
89  const GeomDet * geomDet_;
95  };
96 
97  // for TRH
99  public:
101  HitCollectorForSimpleHits(const GeomDet * geomDet,
102  const SiStripRecHitMatcher * matcher,
104  const TrajectoryStateOnSurface& stateOnThisDet,
105  const MeasurementEstimator& est,
107  void add(SiStripMatchedRecHit2D const & hit);
108  void addProjected(const TrackingRecHit& hit,
109  const GlobalVector & gdir) ;
110  SiStripRecHitMatcher::Collector & collector() { return collector_; }
111  bool hasNewMatchedHits() const { return hasNewHits_; }
112  void clearNewMatchedHitsFlag() { hasNewHits_ = false; }
113  bool filter() const { return matcher_->preFilter();} // if true mono-colection will been filter using the estimator before matching
114  size_t size() const { return target_.size();}
115  const MeasurementEstimator & estimator() { return est_;}
116  private:
117  const GeomDet * geomDet_;
125  };
126 
127 
128 
130  public:
133 
134  HitCollectorForFastMeasurements(const GeomDet * geomDet,
135  const SiStripRecHitMatcher * matcher,
137  const TrajectoryStateOnSurface& stateOnThisDet,
138  const MeasurementEstimator& est,
140  void add(SiStripMatchedRecHit2D const& hit) ;
141  void addProjected(const TrackingRecHit& hit,
142  const GlobalVector & gdir) ;
143 
144  SiStripRecHitMatcher::Collector & collector() { return collector_; }
145  bool hasNewMatchedHits() const { return hasNewHits_; }
146  void clearNewMatchedHitsFlag() { hasNewHits_ = false; }
147  bool filter() const { return matcher_->preFilter();} // if true mono-colection will been filter using the estimator before matching
148  size_t size() const { return target_.size();}
149  const MeasurementEstimator & estimator() { return est_;}
150  private:
151  const GeomDet * geomDet_;
159  };
160 
161 
162 
164  projectOnGluedDet( const std::vector<SiStripRecHit2D>& hits,
165  const TrajectoryStateOnSurface& ts) const dso_internal;
166  template<typename HitCollector>
167  void
168  projectOnGluedDet( HitCollector & collector,
169  const std::vector<SiStripRecHit2D>& hits,
170  const GlobalVector & gdir ) const dso_internal;
171 
172 
174  projectOnGluedDet( const RecHitContainer& hits,
175  const TrajectoryStateOnSurface& ts) const dso_internal;
176  template<typename HitCollector>
177  void
178  projectOnGluedDet( HitCollector & collector,
179  const RecHitContainer& hits,
180  const GlobalVector & gdir ) const dso_internal;
181 
182 
183  void checkProjection(const TrajectoryStateOnSurface& ts,
184  const RecHitContainer& monoHits,
185  const RecHitContainer& stereoHits) const;
186  void checkHitProjection(const TrackingRecHit& hit,
187  const TrajectoryStateOnSurface& ts,
188  const GeomDet& det) const dso_internal;
189 
191  bool testStrips(const TrajectoryStateOnSurface& tsos,
192  const BoundPlane &gluedPlane,
193  const TkStripMeasurementDet &mdet) const dso_internal;
194 
195 };
196 
197 #endif
#define dso_hidden
const TkStripMeasurementDet * theMonoDet
#define GCC11_FINAL
const StripClusterParameterEstimator * cpe_
unsigned int rawId() const
int init
Definition: HydjetWrapper.h:62
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
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
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
bool hasBadComponents(const TrajectoryStateOnSurface &tsos, const MeasurementTrackerEvent &data) const
return TRUE if at least one of the mono and stereo components has badChannels
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
const StripClusterParameterEstimator * cpe_
const SiStripRecHitMatcher * theMatcher
SiStripRecHitMatcher::Collector & collector()
JetCorrectorParametersCollection coll
Definition: classes.h:10
const TkStripMeasurementDet * theStereoDet
string const
Definition: compareJSON.py:14
#define dso_internal
TrackingRecHit::ConstRecHitContainer RecHitContainer
virtual bool isActive(const MeasurementTrackerEvent &data) const =0
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
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