CMS 3D CMS Logo

TrackingRegion.h
Go to the documentation of this file.
1 #ifndef TrackingRegion_H
2 #define TrackingRegion_H
3 
11 
18 
19 
22 
23 #include <utility>
24 
25 #include <sstream>
26 
27 #include <vector>
28 #include <string>
29 
31 
32 class DetLayer;
33 class HitRZCompatibility;
34 class BarrelDetLayer;
35 class ForwardDetLayer;
36 
37 namespace edm { class Event; }
38 
40 public:
41 
42 public:
43  virtual ~TrackingRegion(){}
47 
48 public:
49 
50  TrackingRegion( const GlobalVector & direction,
51  const GlobalPoint & originPos,
52  const Range & invPtRange,
53  const float & originRBound,
54  const float & originZBound)
55  : theDirection( direction), theUnitDirection(direction.unit()), theVertexPos( originPos),
56  theInvPtRange( invPtRange), thePhi(direction.barePhi()),
57  thePtMin(1.f/std::max( std::abs(invPtRange.max()), std::abs(invPtRange.min()) )),
58  theVertexRBound( originRBound),
59  theVertexZBound( originZBound) { }
60 
61 
63  GlobalVector const & direction() const { return theDirection; }
64  GlobalVector const & unitDirection() const { return theUnitDirection; }
65 
66  float phiDirection() const { return thePhi;}
67 
72  GlobalPoint const & origin() const { return theVertexPos; }
73 
75  float originRBound() const { return theVertexRBound; }
76 
78  float originZBound() const { return theVertexZBound; }
79 
81  float ptMin() const { return thePtMin;}
82 
84  Range invPtRange() const { return theInvPtRange; }
85 
86 
89  virtual HitRZCompatibility * checkRZ(const DetLayer* layer,
90  const Hit & outerHit,
91  const edm::EventSetup& iSetup,
92  const DetLayer* outerlayer=nullptr,
93  float lr=0, float gz=0, float dr=0, float dz=0) const = 0;
94 
95 
97  virtual Hits hits(const edm::EventSetup& es,
98  const SeedingLayerSetsHits::SeedingLayer& layer) const = 0;
99 
102  const float & originRBound, const float & originZBound) const {
103  TrackingRegion* restr = clone();
104  restr->theVertexPos = originPos;
105  restr->theVertexRBound = originRBound;
106  restr->theVertexZBound = originZBound;
107  return restr;
108  }
109 
110  virtual TrackingRegion* clone() const = 0;
111 
112  virtual std::string name() const { return "TrackingRegion"; }
113  virtual std::string print() const {
114  std::ostringstream str;
115  str << name() <<" dir:"<<theDirection<<" vtx:"<<theVertexPos
116  <<" dr:"<<theVertexRBound<<" dz:"<<theVertexZBound<<" pt:"<<1./theInvPtRange.max();
117  return str.str();
118  }
119 
120  // void setDirection(const GlobalVector & dir ) { theDirection = dir; }
121 
122 private:
123 
124  GlobalVector theDirection; // this is not direction is momentum...
125  GlobalVector theUnitDirection; // the real direction
128  float thePhi;
129  float thePtMin;
132 
133 };
134 
136 
137 #endif
float originRBound() const
bounds the particle vertex in the transverse plane
T barePhi() const
GlobalPoint const & origin() const
GlobalVector theUnitDirection
GlobalVector theDirection
TrackingRegion(const GlobalVector &direction, const GlobalPoint &originPos, const Range &invPtRange, const float &originRBound, const float &originZBound)
BaseTrackerRecHit const * ConstRecHitPointer
virtual ~TrackingRegion()
GlobalVector const & direction() const
the direction around which region is constructed
GlobalPoint theVertexPos
PixelRecoRange< float > Range
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
EventID const & min(EventID const &lh, EventID const &rh)
Definition: EventID.h:137
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
GlobalVector const & unitDirection() const
std::vector< ConstRecHitPointer > Hits
SeedingLayerSetsHits::Hits Hits
float ptMin() const
minimal pt of interest
virtual std::string print() const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
HLT enums.
Range invPtRange() const
inverse pt range
EventID const & max(EventID const &lh, EventID const &rh)
Definition: EventID.h:142