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 Referencefinal

#include <GlobalTrackingRegion.h>

Inheritance diagram for GlobalTrackingRegion:
TrackingRegion

Public Member Functions

virtual HitRZCompatibilitycheckRZ (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
 
virtual GlobalTrackingRegionclone () const
 
 GlobalTrackingRegion (float ptMin, const GlobalPoint &origin, float originRadius, float originHalfLength, bool precise=false, bool useMS=false)
 
 GlobalTrackingRegion (float ptMin=1., float originRadius=0.2, float originHalfLength=22.7, float originZPos=0., bool precise=false)
 
TrackingRegion::Hits hits (const edm::Event &ev, const edm::EventSetup &es, const SeedingLayerSetsHits::SeedingLayer &layer) const override
 get hits from layer compatible with region constraints More...
 
virtual std::string name () const
 
virtual std::string print () const
 
- Public Member Functions inherited from TrackingRegion
GlobalVector const & direction () const
 the direction around which region is constructed More...
 
Range invPtRange () const
 inverse pt range More...
 
GlobalPoint const & origin () const
 
float originRBound () const
 bounds the particle vertex in the transverse plane More...
 
float originZBound () const
 bounds the particle vertex in the longitudinal plane More...
 
float phiDirection () const
 
float ptMin () const
 minimal pt of interest More...
 
TrackingRegionrestrictedRegion (const GlobalPoint &originPos, const float &originRBound, const float &originZBound) const
 clone region with new vertex position More...
 
 TrackingRegion (const GlobalVector &direction, const GlobalPoint &originPos, const Range &invPtRange, const float &originRBound, const float &originZBound)
 
GlobalVector const & unitDirection () const
 
virtual ~TrackingRegion ()
 

Private Attributes

bool thePrecise =false
 
bool theUseMS =false
 

Additional Inherited Members

- Public Types inherited from TrackingRegion
using ctfHits = ctfseeding::SeedingLayer::Hits
 
typedef
SeedingLayerSetsHits::ConstRecHitPointer 
Hit
 
typedef SeedingLayerSetsHits::Hits Hits
 
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,
bool  useMS = 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 "origin". This class DOES provide the possibility 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), theUseMS(useMS) { }
PixelRecoRange< float > Range
float ptMin() const
minimal pt of interest
Global3DVector GlobalVector
Definition: GlobalVector.h:10
TrackingRegion TrackingRegionBase
GlobalTrackingRegion::GlobalTrackingRegion ( float  ptMin = 1.,
float  originRadius = 0.2,
float  originHalfLength = 22.7,
float  originZPos = 0.,
bool  precise = false 
)
inline

Definition at line 29 of file GlobalTrackingRegion.h.

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

Member Function Documentation

HitRZCompatibility * GlobalTrackingRegion::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
virtual

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

Implements TrackingRegion.

Definition at line 37 of file GlobalTrackingRegion.cc.

References constexpr, corr, PixelRecoLineRZ::cotLine(), SimpleLineRZ::cotLine(), GeomDetEnumerators::isBarrel(), DetLayer::isBarrel(), fastTrackerRecHitType::isPixel(), nSigmaPhi, GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, PtMinSelector_cfg::ptMin, DetLayer::seqNum(), funct::sqr(), mathSSE::sqrt(), DetLayer::subDetector(), unlikely, vtxMean(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

40 {
41 
42  bool isBarrel = layer->isBarrel();
43  bool isPixel = (layer->subDetector() == PixelBarrel || layer->subDetector() == PixelEndcap);
44 
45  if unlikely(!outerlayer) {
46  GlobalPoint ohit = outerHit->globalPosition();
47  lr = std::sqrt( sqr(ohit.x()-origin().x())+sqr(ohit.y()-origin().y()) );
48  gz = ohit.z();
49  dr = outerHit->errorGlobalR();
50  dz = outerHit->errorGlobalZ();
51  }
52 
53 
54  PixelRecoPointRZ outerred(lr, gz);
55 
56 
57  PixelRecoPointRZ vtxR = (gz > origin().z()+originZBound()) ?
60  PixelRecoPointRZ vtxL = (gz< origin().z()-originZBound()) ?
63 
64  if unlikely((!thePrecise) &&(isPixel )) {
65  auto VcotMin = PixelRecoLineRZ( vtxR, outerred).cotLine();
66  auto VcotMax = PixelRecoLineRZ( vtxL, outerred).cotLine();
67  return new HitEtaCheck(isBarrel, outerred, VcotMax, VcotMin);
68  }
69 
70  constexpr float nSigmaPhi = 3.;
71 
72  dr *= nSigmaPhi;
73  dz *= nSigmaPhi;
74 
75  PixelRecoPointRZ outerL, outerR;
76  if (isBarrel) {
77  outerL = PixelRecoPointRZ(lr, gz-dz);
78  outerR = PixelRecoPointRZ(lr, gz+dz);
79  }
80  else if (gz > 0) {
81  outerL = PixelRecoPointRZ(lr+dr, gz);
82  outerR = PixelRecoPointRZ(lr-dr, gz);
83  }
84  else {
85  outerL = PixelRecoPointRZ(lr-dr, gz);
86  outerR = PixelRecoPointRZ(lr+dr, gz);
87  }
88 
89  auto corr = isBarrel ? dz : dr;
90 
91  SimpleLineRZ leftLine( vtxL, outerL);
92  SimpleLineRZ rightLine( vtxR, outerR);
93  HitRZConstraint rzConstraint(leftLine, rightLine);
94 
95 
96  if unlikely(theUseMS) {
97  MultipleScatteringParametrisation iSigma(layer,iSetup);
99 
100  float innerScatt = 3.f * ( outerlayer ?
101  iSigma( ptMin(), vtxMean, outerred, outerlayer->seqNum())
102  : iSigma( ptMin(), vtxMean, outerred) ) ;
103 
104  float cotTheta = SimpleLineRZ(vtxMean,outerred).cotLine();
105 
106  if (isBarrel) {
107  float sinTheta = 1/std::sqrt(1+sqr(cotTheta));
108  corr = innerScatt/sinTheta + dz;
109  } else {
110  float cosTheta = 1/std::sqrt(1+sqr(1/cotTheta));
111  corr = innerScatt/cosTheta + dr;
112  }
113  }
114 
115  return isBarrel ? (HitRZCompatibility*)(new HitZCheck(rzConstraint, HitZCheck::Margin(corr,corr))) :
116  (HitRZCompatibility*)(new HitRCheck(rzConstraint, HitRCheck::Margin(corr,corr)));
117 }
float originRBound() const
bounds the particle vertex in the transverse plane
float cotLine() const
GlobalPoint const & origin() const
bool isBarrel(GeomDetEnumerators::SubDetector m)
T y() const
Definition: PV3DBase.h:63
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
#define constexpr
#define unlikely(x)
int seqNum() const
Definition: DetLayer.h:36
float cotLine() const
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
static GlobalPoint vtxMean(const GlobalPoint &p1, const GlobalError &e1, const GlobalPoint &p2, const GlobalError &e2)
float originZBound() const
bounds the particle vertex in the longitudinal plane
JetCorrectorParameters corr
Definition: classes.h:5
bool isBarrel() const
Definition: DetLayer.h:32
float ptMin() const
minimal pt of interest
Square< F >::type sqr(const F &f)
Definition: Square.h:13
bool isPixel(HitType hitType)
T x() const
Definition: PV3DBase.h:62
virtual GlobalTrackingRegion* GlobalTrackingRegion::clone ( void  ) const
inlinevirtual

Implements TrackingRegion.

Definition at line 48 of file GlobalTrackingRegion.h.

References GlobalTrackingRegion().

48  {
49  return new GlobalTrackingRegion(*this);
50  }
GlobalTrackingRegion(float ptMin, const GlobalPoint &origin, float originRadius, float originHalfLength, bool precise=false, bool useMS=false)
TrackingRegion::Hits GlobalTrackingRegion::hits ( const edm::Event ev,
const edm::EventSetup es,
const SeedingLayerSetsHits::SeedingLayer layer 
) const
overridevirtual

get hits from layer compatible with region constraints

Implements TrackingRegion.

Definition at line 27 of file GlobalTrackingRegion.cc.

References SeedingLayerSetsHits::SeedingLayer::hits().

30  {
31  return layer.hits();
32 }
virtual std::string GlobalTrackingRegion::name ( void  ) const
inlinevirtual

Reimplemented from TrackingRegion.

Definition at line 52 of file GlobalTrackingRegion.h.

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

Reimplemented from TrackingRegion.

Definition at line 21 of file GlobalTrackingRegion.cc.

References TrackingRegion::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 =false
private

Definition at line 56 of file GlobalTrackingRegion.h.

bool GlobalTrackingRegion::theUseMS =false
private

Definition at line 57 of file GlobalTrackingRegion.h.