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 //
21 //
22 
25 
30 
33 
37 
38 #include "CLHEP/Vector/ThreeVector.h"
39 #include <vector>
40 #include <limits>
41 
46 class MeasurementTracker;
48 class MagneticField;
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  void setEvent( const MeasurementTrackerEvent & event ) ;
160 
161  std::vector<std::pair<RecHitWithDist,ConstRecHitPointer> >
162  compatibleHits(const GlobalPoint& xmeas, const GlobalPoint& vprim,
163  float energy, float charge,
164  const TrackerTopology *tTopo) ;
165 
166  // compatibleSeeds(edm::Handle<TrajectorySeedCollection> &seeds, const GlobalPoint& xmeas,
167  std::vector<SeedWithInfo>
169  ( TrajectorySeedCollection * seeds, const GlobalPoint & xmeas,
170  const GlobalPoint & vprim, float energy, float charge ) ;
171 
172  std::vector<CLHEP::Hep3Vector> predicted1Hits() ;
173  std::vector<CLHEP::Hep3Vector> predicted2Hits();
174 
175  void set1stLayer( float dummyphi1min, float dummyphi1max ) ;
176  void set1stLayerZRange( float zmin1, float zmax1 ) ;
177  //void set2ndLayer( float dummyphi2min, float dummyphi2max ) ;
178  void set2ndLayer( float dummyphi2minB, float dummyphi2maxB, float dummyphi2minF, float dummyphi2maxF ) ;
179 
180  float getVertex() ;
181  void setUseRecoVertex( bool val ) ;
182 
183  private :
184 
186 
187  std::vector<CLHEP::Hep3Vector> pred1Meas ;
188  std::vector<CLHEP::Hep3Vector> pred2Meas ;
202 
203  float vertex_;
204 
207  std::vector<std::pair<const GeomDet*, TrajectoryStateOnSurface> > mapTsos_ ;
208  std::vector<std::pair<std::pair<const GeomDet*,GlobalPoint>, TrajectoryStateOnSurface> > mapTsos2_ ;
209 
210 } ;
211 
212 #endif
213 
214 
215 
216 
217 
218 
219 
220 
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
void setEvent(const MeasurementTrackerEvent &event)
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
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
LayerMeasurements theLayerMeasurements
TransientTrackingRecHit::RecHitContainer RecHitContainer
const double infinity
const MagneticField * theMagField
const MeasurementTrackerEvent * theTrackerEvent
std::vector< CLHEP::Hep3Vector > predicted1Hits()
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
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()
RecHitContainer hitsInTrack
void setUseRecoVertex(bool val)
ConstRecHitPointer recHit() const
const TrackerGeometry * theTrackerGeometry
RecHitWithDist(ConstRecHitPointer rh, float &dphi)
const MeasurementTracker * theTracker