CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GlobalTrackingRegion Class Referencefinal

#include <GlobalTrackingRegion.h>

Inheritance diagram for GlobalTrackingRegion:
TrackingRegion

Public Member Functions

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 override
 
GlobalTrackingRegionclone () const override
 
 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::EventSetup &es, const SeedingLayerSetsHits::SeedingLayer &layer) const override
 get hits from layer compatible with region constraints More...
 
std::string name () const override
 
std::string print () const override
 
- 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
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.

References checkRZ(), runTauDisplay::dr, PVValHelper::dz, and hits().

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
overridevirtual

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

Implements TrackingRegion.

Definition at line 36 of file GlobalTrackingRegion.cc.

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

Referenced by GlobalTrackingRegion().

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

Implements TrackingRegion.

Definition at line 47 of file GlobalTrackingRegion.h.

References GlobalTrackingRegion().

47  {
48  return new GlobalTrackingRegion(*this);
49  }
GlobalTrackingRegion(float ptMin, const GlobalPoint &origin, float originRadius, float originHalfLength, bool precise=false, bool useMS=false)
TrackingRegion::Hits GlobalTrackingRegion::hits ( 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().

Referenced by GlobalTrackingRegion(), and SimpleCosmicBONSeeder::triplets().

29  {
30  return layer.hits();
31 }
std::string GlobalTrackingRegion::name ( void  ) const
inlineoverridevirtual

Reimplemented from TrackingRegion.

Definition at line 51 of file GlobalTrackingRegion.h.

References print(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by config.CFG::__str__(), and validation.Sample::digest().

51 { return "GlobalTrackingRegion"; }
std::string GlobalTrackingRegion::print ( void  ) const
overridevirtual

Reimplemented from TrackingRegion.

Definition at line 21 of file GlobalTrackingRegion.cc.

References TrackingRegion::print(), and str.

Referenced by name().

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

Member Data Documentation

bool GlobalTrackingRegion::thePrecise =false
private

Definition at line 55 of file GlobalTrackingRegion.h.

bool GlobalTrackingRegion::theUseMS =false
private

Definition at line 56 of file GlobalTrackingRegion.h.