CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackingRegionBase.h
Go to the documentation of this file.
1 #ifndef TrackingRegionBase_H
2 #define TrackingRegionBase_H
3 
8 #include <utility>
9 
13 #include <sstream>
14 class BarrelDetLayer;
15 class ForwardDetLayer;
16 
18 
19 public:
20 
22  const GlobalPoint & originPos,
23  const Range & invPtRange,
24  const float & originRBound,
25  const float & originZBound)
26  : theDirection( direction), theVertexPos( originPos),
27  theInvPtRange( invPtRange), theVertexRBound( originRBound),
28  theVertexZBound( originZBound) { }
29 
32 
34  virtual ~TrackingRegionBase() { }
35 
37  virtual GlobalVector direction() const { return theDirection; }
38 
43  virtual GlobalPoint origin() const { return theVertexPos; }
44 
46  virtual float originRBound() const { return theVertexRBound; }
47 
49  virtual float originZBound() const { return theVertexZBound; }
50 
52  virtual float ptMin() const {
53  return 1./std::max(fabs(theInvPtRange.max()), fabs(theInvPtRange.min()));
54  }
55 
57  virtual Range invPtRange() const { return theInvPtRange; }
58 
59 
60 
63  virtual HitRZCompatibility * checkRZ(const DetLayer* layer,
64  const Hit & outerHit,
65  const edm::EventSetup& iSetup) const = 0;
66 
68  virtual TrackingRegionBase* restrictedRegion( const GlobalPoint & originPos,
69  const float & originRBound, const float & originZBound) const {
70  TrackingRegionBase* restr = clone();
71  restr->theVertexPos = originPos;
74  return restr;
75  }
76 
77  virtual TrackingRegionBase* clone() const = 0;
78 
79  virtual std::string print() const {
80  std::ostringstream str;
81  str << name() <<" dir:"<<theDirection<<" vtx:"<<theVertexPos
82  <<" dr:"<<theVertexRBound<<" dz:"<<theVertexZBound<<" pt:"<<1./theInvPtRange.max();
83  return str.str();
84  }
85 
86  virtual void setDirection(const GlobalVector & dir ) { theDirection = dir; }
87 
88 private:
89 
95 
96 };
97 
98 #endif
virtual std::string print() const
T max() const
virtual GlobalPoint origin() const
virtual GlobalVector direction() const
the direction around which region is constructed
virtual TrackingRegionBase * clone() const =0
clone region
T min() const
virtual TrackingRegionBase * restrictedRegion(const GlobalPoint &originPos, const float &originRBound, const float &originZBound) const
clone region with new vertex position
virtual Range invPtRange() const
inverse pt range
const T & max(const T &a, const T &b)
virtual float ptMin() const
minimal pt of interest
TrackingRegionBase(const GlobalVector &direction, const GlobalPoint &originPos, const Range &invPtRange, const float &originRBound, const float &originZBound)
virtual std::string name() const
virtual void setDirection(const GlobalVector &dir)
virtual HitRZCompatibility * checkRZ(const DetLayer *layer, const Hit &outerHit, const edm::EventSetup &iSetup) const =0
GlobalVector theDirection
dbl *** dir
Definition: mlp_gen.cc:35
virtual float originZBound() const
bounds the particle vertex in the longitudinal plane
virtual float originRBound() const
bounds the particle vertex in the transverse plane