CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
GlobalTrackingRegion Class Reference

#include <GlobalTrackingRegion.h>

Inheritance diagram for GlobalTrackingRegion:
TrackingRegionBase TrackingRegion

Public Member Functions

virtual HitRZCompatibilitycheckRZ (const DetLayer *layer, const Hit &outerHit, const edm::EventSetup &iSetup) const
 
virtual GlobalTrackingRegionclone () const
 clone region More...
 
 GlobalTrackingRegion (float ptMin, const GlobalPoint &origin, float originRadius, float originHalfLength, bool precise=false)
 
 GlobalTrackingRegion (float ptMin=1., float originRadius=0.2, float originHalfLength=22.7, float originZPos=0., bool precise=false)
 
virtual TrackingRegion::Hits hits (const edm::Event &ev, const edm::EventSetup &es, const ctfseeding::SeedingLayer *layer) const
 get hits from layer compatible with region constraints More...
 
virtual std::string name () const
 
virtual std::string print () const
 
- Public Member Functions inherited from TrackingRegionBase
virtual GlobalVector direction () const
 the direction around which region is constructed More...
 
virtual Range invPtRange () const
 inverse pt range More...
 
virtual GlobalPoint origin () const
 
virtual float originRBound () const
 bounds the particle vertex in the transverse plane More...
 
virtual float originZBound () const
 bounds the particle vertex in the longitudinal plane More...
 
virtual float ptMin () const
 minimal pt of interest More...
 
virtual TrackingRegionBaserestrictedRegion (const GlobalPoint &originPos, const float &originRBound, const float &originZBound) const
 clone region with new vertex position More...
 
virtual void setDirection (const GlobalVector &dir)
 
 TrackingRegionBase (const GlobalVector &direction, const GlobalPoint &originPos, const Range &invPtRange, const float &originRBound, const float &originZBound)
 
 TrackingRegionBase ()
 
virtual ~TrackingRegionBase ()
 

Private Attributes

bool thePrecise
 

Additional Inherited Members

- Public Types inherited from TrackingRegion
typedef
TransientTrackingRecHit::ConstRecHitPointer 
Hit
 
typedef std::vector< HitHits
 
typedef PixelRecoRange< float > Range
 

Detailed Description

An implementation of the TrackingRegion where the region of interest is global, ie there are no constraints on the allowed direction of particles of interest

Definition at line 13 of file GlobalTrackingRegion.h.

Constructor & Destructor Documentation

GlobalTrackingRegion::GlobalTrackingRegion ( float  ptMin,
const GlobalPoint origin,
float  originRadius,
float  originHalfLength,
bool  precise = false 
)
inline

Construct from minimal track P_t, and origin size and position. The origin region is a cylinder of radius originRadius, half length originHalfLength, positioned at (0,0,originZPos). This class does not provide the pssibility to displace the origin in the transverse plane.

Definition at line 22 of file GlobalTrackingRegion.h.

Referenced by clone().

24  : TrackingRegionBase(GlobalVector( 0, 0, 0), origin,
26  thePrecise(precise) { }
PixelRecoRange< float > Range
virtual float ptMin() const
minimal pt of interest
Global3DVector GlobalVector
Definition: GlobalVector.h:10
GlobalTrackingRegion::GlobalTrackingRegion ( float  ptMin = 1.,
float  originRadius = 0.2,
float  originHalfLength = 22.7,
float  originZPos = 0.,
bool  precise = false 
)
inline

Definition at line 28 of file GlobalTrackingRegion.h.

31  : TrackingRegionBase(GlobalVector( 0, 0, 0), GlobalPoint( 0, 0, originZPos),
33  thePrecise(precise) { }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
PixelRecoRange< float > Range
virtual float ptMin() const
minimal pt of interest
Global3DVector GlobalVector
Definition: GlobalVector.h:10

Member Function Documentation

HitRZCompatibility * GlobalTrackingRegion::checkRZ ( const DetLayer layer,
const Hit outerHit,
const edm::EventSetup iSetup 
) const
virtual

utility to check eta/theta hit compatibility with region constraints and outer hit constraint

Implements TrackingRegionBase.

Definition at line 35 of file GlobalTrackingRegion.cc.

References GeomDetEnumerators::barrel, PixelRecoLineRZ::cotLine(), DetLayer::location(), nSigmaPhi, GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, PtMinSelector_cfg::ptMin, funct::sqr(), mathSSE::sqrt(), DetLayer::subDetector(), vtxMean(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), detailsBasic3DVector::z, and PV3DBase< T, PVType, FrameType >::z().

37 {
38 
39  bool isBarrel = (layer->location() == barrel);
40  bool isPixel = (layer->subDetector() == PixelBarrel || layer->subDetector() == PixelEndcap);
41 
42 
43  GlobalPoint ohit = outerHit->globalPosition();
44  float outerred_r = sqrt( sqr(ohit.x()-origin().x())+sqr(ohit.y()-origin().y()) );
45  PixelRecoPointRZ outerred(outerred_r, ohit.z());
46 
47 
48  PixelRecoPointRZ vtxR = (outerred.z() > origin().z()+originZBound()) ?
51  PixelRecoPointRZ vtxL = (outerred.z() < origin().z()-originZBound()) ?
54 
55  if ((!thePrecise) &&(isPixel )) {
56  double VcotMin = PixelRecoLineRZ( vtxR, outerred).cotLine();
57  double VcotMax = PixelRecoLineRZ( vtxL, outerred).cotLine();
58  return new HitEtaCheck(isBarrel, outerred, VcotMax, VcotMin);
59  }
60 
61  float nSigmaPhi = 3.;
62  float errZ = nSigmaPhi*outerHit->errorGlobalZ();
63  float errR = nSigmaPhi*outerHit->errorGlobalR();
64 
65  PixelRecoPointRZ outerL, outerR;
66 
67  if (layer->location() == barrel) {
68  outerL = PixelRecoPointRZ(outerred.r(), outerred.z()-errZ);
69  outerR = PixelRecoPointRZ(outerred.r(), outerred.z()+errZ);
70  }
71  else if (outerred.z() > 0) {
72  outerL = PixelRecoPointRZ(outerred.r()+errR, outerred.z());
73  outerR = PixelRecoPointRZ(outerred.r()-errR, outerred.z());
74  }
75  else {
76  outerL = PixelRecoPointRZ(outerred.r()-errR, outerred.z());
77  outerR = PixelRecoPointRZ(outerred.r()+errR, outerred.z());
78  }
79 
80  MultipleScatteringParametrisation iSigma(layer,iSetup);
82  float innerScatt = 3 * iSigma( ptMin(), vtxMean, outerred);
83 
84  //
85  //
86  //
87  PixelRecoLineRZ leftLine( vtxL, outerL);
88  PixelRecoLineRZ rightLine( vtxR, outerR);
89  HitRZConstraint rzConstraint(leftLine, rightLine);
90  float cotTheta = PixelRecoLineRZ(vtxMean,outerred).cotLine();
91 
92  if (isBarrel) {
93  float sinTheta = 1/sqrt(1+sqr(cotTheta));
94  float corrZ = innerScatt/sinTheta + errZ;
95  return new HitZCheck(rzConstraint, HitZCheck::Margin(corrZ,corrZ));
96  } else {
97  float cosTheta = 1/sqrt(1+sqr(1/cotTheta));
98  float corrR = innerScatt/cosTheta + errR;
99  return new HitRCheck( rzConstraint, HitRCheck::Margin(corrR,corrR));
100  }
101 }
virtual Location location() const =0
Which part of the detector (barrel, endcap)
static const double nSigmaPhi
virtual GlobalPoint origin() const
T y() const
Definition: PV3DBase.h:62
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
double double double z
float cotLine() const
virtual float ptMin() const
minimal pt of interest
T sqrt(T t)
Definition: SSEVec.h:46
T z() const
Definition: PV3DBase.h:63
static GlobalPoint vtxMean(const GlobalPoint &p1, const GlobalError &e1, const GlobalPoint &p2, const GlobalError &e2)
Square< F >::type sqr(const F &f)
Definition: Square.h:13
T x() const
Definition: PV3DBase.h:61
virtual float originZBound() const
bounds the particle vertex in the longitudinal plane
virtual float originRBound() const
bounds the particle vertex in the transverse plane
virtual GlobalTrackingRegion* GlobalTrackingRegion::clone ( ) const
inlinevirtual

clone region

Implements TrackingRegionBase.

Definition at line 45 of file GlobalTrackingRegion.h.

References GlobalTrackingRegion().

45  {
46  return new GlobalTrackingRegion(*this);
47  }
GlobalTrackingRegion(float ptMin, const GlobalPoint &origin, float originRadius, float originHalfLength, bool precise=false)
TrackingRegion::Hits GlobalTrackingRegion::hits ( const edm::Event ev,
const edm::EventSetup es,
const ctfseeding::SeedingLayer layer 
) const
virtual

get hits from layer compatible with region constraints

Implements TrackingRegion.

Definition at line 27 of file GlobalTrackingRegion.cc.

References ctfseeding::SeedingLayer::hits().

Referenced by SimpleCosmicBONSeeder::triplets().

31 {
32  return layer->hits(ev,es);
33 }
void hits(const edm::Event &ev, const edm::EventSetup &es, Hits &) const
virtual std::string GlobalTrackingRegion::name ( void  ) const
inlinevirtual

Reimplemented from TrackingRegion.

Definition at line 49 of file GlobalTrackingRegion.h.

Referenced by BeautifulSoup.Tag::_invert().

49 { return "GlobalTrackingRegion"; }
std::string GlobalTrackingRegion::print ( void  ) const
virtual

Reimplemented from TrackingRegionBase.

Definition at line 21 of file GlobalTrackingRegion.cc.

References TrackingRegionBase::print().

21  {
22  std::ostringstream str;
23  str << TrackingRegionBase::print() << "precise: "<<thePrecise;
24  return str.str();
25 }
virtual std::string print() const

Member Data Documentation

bool GlobalTrackingRegion::thePrecise
private

Definition at line 53 of file GlobalTrackingRegion.h.