test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackingRegion.h
Go to the documentation of this file.
1 #ifndef TrackingRegion_H
2 #define TrackingRegion_H
3 
11 
18 
19 
23 
24 #include <utility>
25 
26 #include <sstream>
27 
28 #include <vector>
29 #include <string>
30 
32 
33 class DetLayer;
34 class HitRZCompatibility;
35 class BarrelDetLayer;
36 class ForwardDetLayer;
37 
38 namespace edm { class Event; }
39 
41 public:
42 
43 public:
44  virtual ~TrackingRegion(){}
49 
50 public:
51 
53  const GlobalPoint & originPos,
54  const Range & invPtRange,
55  const float & originRBound,
56  const float & originZBound)
57  : theDirection( direction), theUnitDirection(direction.unit()), theVertexPos( originPos),
58  theInvPtRange( invPtRange), thePhi(direction.barePhi()),
59  thePtMin(1.f/std::max( std::abs(invPtRange.max()), std::abs(invPtRange.min()) )),
60  theVertexRBound( originRBound),
61  theVertexZBound( originZBound) { }
62 
63 
65  GlobalVector const & direction() const { return theDirection; }
66  GlobalVector const & unitDirection() const { return theUnitDirection; }
67 
68  float phiDirection() const { return thePhi;}
69 
74  GlobalPoint const & origin() const { return theVertexPos; }
75 
77  float originRBound() const { return theVertexRBound; }
78 
80  float originZBound() const { return theVertexZBound; }
81 
83  float ptMin() const { return thePtMin;}
84 
86  Range invPtRange() const { return theInvPtRange; }
87 
88 
91  virtual HitRZCompatibility * checkRZ(const DetLayer* layer,
92  const Hit & outerHit,
93  const edm::EventSetup& iSetup,
94  const DetLayer* outerlayer=0,
95  float lr=0, float gz=0, float dr=0, float dz=0) const = 0;
96 
97 
99  virtual Hits hits(const edm::EventSetup& es,
100  const SeedingLayerSetsHits::SeedingLayer& layer) const = 0;
101 
104  const float & originRBound, const float & originZBound) const {
105  TrackingRegion* restr = clone();
106  restr->theVertexPos = originPos;
107  restr->theVertexRBound = originRBound;
108  restr->theVertexZBound = originZBound;
109  return restr;
110  }
111 
112  virtual TrackingRegion* clone() const = 0;
113 
114  virtual std::string name() const { return "TrackingRegion"; }
115  virtual std::string print() const {
116  std::ostringstream str;
117  str << name() <<" dir:"<<theDirection<<" vtx:"<<theVertexPos
118  <<" dr:"<<theVertexRBound<<" dz:"<<theVertexZBound<<" pt:"<<1./theInvPtRange.max();
119  return str.str();
120  }
121 
122  // void setDirection(const GlobalVector & dir ) { theDirection = dir; }
123 
124 private:
125 
126  GlobalVector theDirection; // this is not direction is momentum...
127  GlobalVector theUnitDirection; // the real direction
130  float thePhi;
131  float thePtMin;
134 
135 };
136 
138 
139 #endif
float originRBound() const
bounds the particle vertex in the transverse plane
T barePhi() const
GlobalPoint const & origin() const
T max() const
GlobalVector theUnitDirection
ctfseeding::SeedingLayer::Hits ctfHits
std::vector< HitPointer > Hits
Definition: SeedingLayer.h:28
GlobalVector theDirection
TrackingRegion(const GlobalVector &direction, const GlobalPoint &originPos, const Range &invPtRange, const float &originRBound, const float &originZBound)
BaseTrackerRecHit const * ConstRecHitPointer
Definition: Event.h:16
virtual ~TrackingRegion()
GlobalVector const & direction() const
the direction around which region is constructed
GlobalPoint theVertexPos
virtual HitRZCompatibility * checkRZ(const DetLayer *layer, const Hit &outerHit, const edm::EventSetup &iSetup, const DetLayer *outerlayer=0, float lr=0, float gz=0, float dr=0, float dz=0) const =0
PixelRecoRange< float > Range
string unit
Definition: csvLumiCalc.py:46
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
TrackingRegion * restrictedRegion(const GlobalPoint &originPos, const float &originRBound, const float &originZBound) const
clone region with new vertex position
virtual std::string name() const
T min(T a, T b)
Definition: MathUtil.h:58
float phiDirection() const
float originZBound() const
bounds the particle vertex in the longitudinal plane
SeedingLayerSetsHits::ConstRecHitPointer Hit
virtual TrackingRegion * clone() const =0
GlobalVector const & unitDirection() const
std::vector< ConstRecHitPointer > Hits
SeedingLayerSetsHits::Hits Hits
float ptMin() const
minimal pt of interest
virtual std::string print() const
Range invPtRange() const
inverse pt range
virtual Hits hits(const edm::EventSetup &es, const SeedingLayerSetsHits::SeedingLayer &layer) const =0
get hits from layer compatible with region constraints