CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PixelHitMatcher.h
Go to the documentation of this file.
1 #ifndef PIXELHITMATCHER_H
2 #define PIXELHITMATCHER_H
3 
4 // -*- C++ -*-
5 //
6 // Package: EgammaElectronAlgos
7 // Class: PixelHitMatcher
8 //
17 //
18 // Original Author: Ursula Berthon, Claude Charlot
19 // Created: Mon Mar 27 13:22:06 CEST 2006
20 // $Id: PixelHitMatcher.h,v 1.32 2013/01/02 18:59:12 dlange Exp $
21 //
22 //
23 
26 
31 
34 
37 
38 #include "CLHEP/Vector/ThreeVector.h"
39 #include <vector>
40 #include <limits>
41 
46 class MeasurementTracker;
47 class MagneticField;
49 class LayerMeasurements;
50 class TrackerGeometry;
51 class TrackerTopology;
52 
54  {
55  public :
56 
60 
61  RecHitWithDist( ConstRecHitPointer rh, float & dphi )
62  : rh_(rh), dphi_(dphi)
63  {}
64 
65  ConstRecHitPointer recHit() const { return rh_ ; }
66  float dPhi() const { return dphi_ ; }
67 
68  void invert() { dphi_*=-1. ; }
69 
70  private :
71 
73  float dphi_ ;
74 
75  } ;
76 
77 
79  {
80  public :
81 
85 
89  : rh_(rh), subDet_(subDet), dRz_(dRz), dPhi_(dPhi)
90  {}
91 
92  ConstRecHitPointer recHit() const { return rh_; }
93  int subDet() const { return subDet_ ; }
94  float dRz() const { return dRz_ ; }
95  float dPhi() const { return dPhi_ ; }
96 
97  void invert() { dPhi_*=-1. ; }
98 
99  private:
100 
102  int subDet_ ;
103  float dRz_ ;
104  float dPhi_ ;
105 
106  } ;
107 
109  {
110  public :
111 
112  SeedWithInfo( TrajectorySeed seed, unsigned char hitsMask, int subDet2, float dRz2, float dPhi2 , int subDet1, float dRz1, float dPhi1)
113  : seed_(seed), hitsMask_(hitsMask),
114  subDet2_(subDet2), dRz2_(dRz2), dPhi2_(dPhi2),
115  subDet1_(subDet1), dRz1_(dRz1), dPhi1_(dPhi1)
116  {}
117 
118  const TrajectorySeed & seed() const { return seed_ ; }
119  unsigned char hitsMask() const { return hitsMask_ ; }
120 
121  int subDet2() const { return subDet2_ ; }
122  float dRz2() const { return dRz2_ ; }
123  float dPhi2() const { return dPhi2_ ; }
124 
125  int subDet1() const { return subDet1_ ; }
126  float dRz1() const { return dRz1_ ; }
127  float dPhi1() const { return dPhi1_ ; }
128 
129  private :
130 
132  unsigned char hitsMask_ ;
133  int subDet2_ ;
134  float dRz2_ ;
135  float dPhi2_ ;
136  int subDet1_ ;
137  float dRz1_ ;
138  float dPhi1_ ;
139  } ;
140 
142  {
143  public :
144 
148 
150  ( float phi1min, float phi1max,
151  //float phi2min, float phi2max,
152  float phi2minB, float phi2maxB, float phi2minF, float phi2maxF,
153  float z2minB, float z2maxB, float r2minF, float r2maxF,
154  float rMinI, float rMaxI, bool searchInTIDTEC ) ;
155 
156  virtual ~PixelHitMatcher() ;
157  void setES( const MagneticField *, const MeasurementTracker * theMeasurementTracker, const TrackerGeometry * trackerGeometry ) ;
158 
159  std::vector<std::pair<RecHitWithDist,ConstRecHitPointer> >
160  compatibleHits(const GlobalPoint& xmeas, const GlobalPoint& vprim,
161  float energy, float charge,
162  const TrackerTopology *tTopo) ;
163 
164  // compatibleSeeds(edm::Handle<TrajectorySeedCollection> &seeds, const GlobalPoint& xmeas,
165  std::vector<SeedWithInfo>
167  ( TrajectorySeedCollection * seeds, const GlobalPoint & xmeas,
168  const GlobalPoint & vprim, float energy, float charge ) ;
169 
170  std::vector<CLHEP::Hep3Vector> predicted1Hits() ;
171  std::vector<CLHEP::Hep3Vector> predicted2Hits();
172 
173  void set1stLayer( float dummyphi1min, float dummyphi1max ) ;
174  void set1stLayerZRange( float zmin1, float zmax1 ) ;
175  //void set2ndLayer( float dummyphi2min, float dummyphi2max ) ;
176  void set2ndLayer( float dummyphi2minB, float dummyphi2maxB, float dummyphi2minF, float dummyphi2maxF ) ;
177 
178  float getVertex() ;
179  void setUseRecoVertex( bool val ) ;
180 
181  private :
182 
184 
185  std::vector<CLHEP::Hep3Vector> pred1Meas ;
186  std::vector<CLHEP::Hep3Vector> pred2Meas ;
199 
200  float vertex_;
201 
204  std::vector<std::pair<const GeomDet*, TrajectoryStateOnSurface> > mapTsos_ ;
205  std::vector<std::pair<std::pair<const GeomDet*,GlobalPoint>, TrajectoryStateOnSurface> > mapTsos2_ ;
206 
207 } ;
208 
209 #endif
210 
211 
212 
213 
214 
215 
216 
217 
TransientTrackingRecHit::RecHitPointer RecHitPointer
TransientTrackingRecHit::RecHitPointer RecHitPointer
int subDet() const
BarrelMeasurementEstimator meas2ndBLayer
RecHitWithInfo(ConstRecHitPointer rh, int subDet=0, float dRz=std::numeric_limits< float >::infinity(), float dPhi=std::numeric_limits< float >::infinity())
TransientTrackingRecHit::RecHitContainer RecHitContainer
BarrelMeasurementEstimator meas1stBLayer
TrajectorySeed seed_
float dPhi() const
PropagatorWithMaterial * prop1stLayer
void setES(const MagneticField *, const MeasurementTracker *theMeasurementTracker, const TrackerGeometry *trackerGeometry)
float dRz1() const
std::vector< CLHEP::Hep3Vector > pred1Meas
unsigned char hitsMask() const
float dRz2() const
TransientTrackingRecHit::RecHitContainer RecHitContainer
float dRz() const
SeedWithInfo(TrajectorySeed seed, unsigned char hitsMask, int subDet2, float dRz2, float dPhi2, int subDet1, float dRz1, float dPhi1)
double charge(const std::vector< uint8_t > &Ampls)
ConstRecHitPointer rh_
std::vector< ConstRecHitPointer > RecHitContainer
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
FTSFromVertexToPointFactory myFTS
void set2ndLayer(float dummyphi2minB, float dummyphi2maxB, float dummyphi2minF, float dummyphi2maxF)
void set1stLayerZRange(float zmin1, float zmax1)
PixelHitMatcher(float phi1min, float phi1max, float phi2minB, float phi2maxB, float phi2minF, float phi2maxF, float z2minB, float z2maxB, float r2minF, float r2maxF, float rMinI, float rMaxI, bool searchInTIDTEC)
std::vector< std::pair< std::pair< const GeomDet *, GlobalPoint >, TrajectoryStateOnSurface > > mapTsos2_
std::vector< TrajectorySeed > TrajectorySeedCollection
ConstRecHitPointer recHit() const
TransientTrackingRecHit::RecHitContainer RecHitContainer
const double infinity
const MagneticField * theMagField
std::vector< CLHEP::Hep3Vector > predicted1Hits()
float dPhi1() const
float dPhi2() const
unsigned char hitsMask_
void set1stLayer(float dummyphi1min, float dummyphi1max)
PixelMatchStartLayers startLayers
std::vector< std::pair< RecHitWithDist, ConstRecHitPointer > > compatibleHits(const GlobalPoint &xmeas, const GlobalPoint &vprim, float energy, float charge, const TrackerTopology *tTopo)
const GeometricSearchTracker * theGeometricSearchTracker
float dPhi() const
std::vector< std::pair< const GeomDet *, TrajectoryStateOnSurface > > mapTsos_
std::vector< CLHEP::Hep3Vector > pred2Meas
virtual ~PixelHitMatcher()
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
ForwardMeasurementEstimator meas2ndFLayer
PropagatorWithMaterial * prop2ndLayer
ForwardMeasurementEstimator meas1stFLayer
ConstRecHitPointer rh_
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
int subDet1() const
TransientTrackingRecHit::RecHitPointer RecHitPointer
int subDet2() const
std::vector< SeedWithInfo > compatibleSeeds(TrajectorySeedCollection *seeds, const GlobalPoint &xmeas, const GlobalPoint &vprim, float energy, float charge)
const TrajectorySeed & seed() const
std::vector< CLHEP::Hep3Vector > predicted2Hits()
const LayerMeasurements * theLayerMeasurements
RecHitContainer hitsInTrack
void setUseRecoVertex(bool val)
ConstRecHitPointer recHit() const
const TrackerGeometry * theTrackerGeometry
RecHitWithDist(ConstRecHitPointer rh, float &dphi)