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(
100  const edm::Event& ev,
101  const edm::EventSetup& es,
102  const SeedingLayerSetsHits::SeedingLayer& layer) const = 0;
103 
106  const float & originRBound, const float & originZBound) const {
107  TrackingRegion* restr = clone();
108  restr->theVertexPos = originPos;
109  restr->theVertexRBound = originRBound;
110  restr->theVertexZBound = originZBound;
111  return restr;
112  }
113 
114  virtual TrackingRegion* clone() const = 0;
115 
116  virtual std::string name() const { return "TrackingRegion"; }
117  virtual std::string print() const {
118  std::ostringstream str;
119  str << name() <<" dir:"<<theDirection<<" vtx:"<<theVertexPos
120  <<" dr:"<<theVertexRBound<<" dz:"<<theVertexZBound<<" pt:"<<1./theInvPtRange.max();
121  return str.str();
122  }
123 
124  // void setDirection(const GlobalVector & dir ) { theDirection = dir; }
125 
126 private:
127 
128  GlobalVector theDirection; // this is not direction is momentum...
129  GlobalVector theUnitDirection; // the real direction
132  float thePhi;
133  float thePtMin;
136 
137 };
138 
140 
141 #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
virtual Hits hits(const edm::Event &ev, const edm::EventSetup &es, const SeedingLayerSetsHits::SeedingLayer &layer) const =0
get hits from layer compatible with region constraints
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
const T & max(const T &a, const T &b)
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
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