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.30 2010/07/28 10:52:45 chamont 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 
53  {
54  public :
55 
59 
60  RecHitWithDist( ConstRecHitPointer rh, float & dphi )
61  : rh_(rh), dphi_(dphi)
62  {}
63 
64  ConstRecHitPointer recHit() const { return rh_ ; }
65  float dPhi() const { return dphi_ ; }
66 
67  void invert() { dphi_*=-1. ; }
68 
69  private :
70 
72  float dphi_ ;
73 
74  } ;
75 
76 
78  {
79  public :
80 
84 
88  : rh_(rh), subDet_(subDet), dRz_(dRz), dPhi_(dPhi)
89  {}
90 
91  ConstRecHitPointer recHit() const { return rh_; }
92  int subDet() const { return subDet_ ; }
93  float dRz() const { return dRz_ ; }
94  float dPhi() const { return dPhi_ ; }
95 
96  void invert() { dPhi_*=-1. ; }
97 
98  private:
99 
101  int subDet_ ;
102  float dRz_ ;
103  float dPhi_ ;
104 
105  } ;
106 
108  {
109  public :
110 
111  SeedWithInfo( TrajectorySeed seed, unsigned char hitsMask, int subDet2, float dRz2, float dPhi2 , int subDet1, float dRz1, float dPhi1)
112  : seed_(seed), hitsMask_(hitsMask),
113  subDet2_(subDet2), dRz2_(dRz2), dPhi2_(dPhi2),
114  subDet1_(subDet1), dRz1_(dRz1), dPhi1_(dPhi1)
115  {}
116 
117  const TrajectorySeed & seed() const { return seed_ ; }
118  unsigned char hitsMask() const { return hitsMask_ ; }
119 
120  int subDet2() const { return subDet2_ ; }
121  float dRz2() const { return dRz2_ ; }
122  float dPhi2() const { return dPhi2_ ; }
123 
124  int subDet1() const { return subDet1_ ; }
125  float dRz1() const { return dRz1_ ; }
126  float dPhi1() const { return dPhi1_ ; }
127 
128  private :
129 
131  unsigned char hitsMask_ ;
132  int subDet2_ ;
133  float dRz2_ ;
134  float dPhi2_ ;
135  int subDet1_ ;
136  float dRz1_ ;
137  float dPhi1_ ;
138  } ;
139 
141  {
142  public :
143 
147 
149  ( float phi1min, float phi1max,
150  //float phi2min, float phi2max,
151  float phi2minB, float phi2maxB, float phi2minF, float phi2maxF,
152  float z2minB, float z2maxB, float r2minF, float r2maxF,
153  float rMinI, float rMaxI, bool searchInTIDTEC ) ;
154 
155  virtual ~PixelHitMatcher() ;
156  void setES( const MagneticField *, const MeasurementTracker * theMeasurementTracker, const TrackerGeometry * trackerGeometry ) ;
157 
158  std::vector<std::pair<RecHitWithDist,ConstRecHitPointer> >
159  compatibleHits(const GlobalPoint& xmeas, const GlobalPoint& vprim, float energy, float charge ) ;
160 
161  // compatibleSeeds(edm::Handle<TrajectorySeedCollection> &seeds, const GlobalPoint& xmeas,
162  std::vector<SeedWithInfo>
164  ( TrajectorySeedCollection * seeds, const GlobalPoint & xmeas,
165  const GlobalPoint & vprim, float energy, float charge ) ;
166 
167  std::vector<CLHEP::Hep3Vector> predicted1Hits() ;
168  std::vector<CLHEP::Hep3Vector> predicted2Hits();
169 
170  void set1stLayer( float dummyphi1min, float dummyphi1max ) ;
171  void set1stLayerZRange( float zmin1, float zmax1 ) ;
172  //void set2ndLayer( float dummyphi2min, float dummyphi2max ) ;
173  void set2ndLayer( float dummyphi2minB, float dummyphi2maxB, float dummyphi2minF, float dummyphi2maxF ) ;
174 
175  float getVertex() ;
176  void setUseRecoVertex( bool val ) ;
177 
178  private :
179 
181 
182  std::vector<CLHEP::Hep3Vector> pred1Meas ;
183  std::vector<CLHEP::Hep3Vector> pred2Meas ;
196 
197  float vertex_;
198 
201  std::vector<std::pair<const GeomDet*, TrajectoryStateOnSurface> > mapTsos_ ;
202  std::vector<std::pair<std::pair<const GeomDet*,GlobalPoint>, TrajectoryStateOnSurface> > mapTsos2_ ;
203 
204 } ;
205 
206 #endif
207 
208 
209 
210 
211 
212 
213 
214 
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
std::vector< std::pair< RecHitWithDist, ConstRecHitPointer > > compatibleHits(const GlobalPoint &xmeas, const GlobalPoint &vprim, float energy, float charge)
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
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)