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:
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)
 
 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
 

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 
)
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) { }
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, PixelRecoLineRZ::cotLine(), SimpleLineRZ::cotLine(), GeomDetEnumerators::isBarrel(), DetLayer::isBarrel(), 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(), detailsBasic3DVector::z, 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 = 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  double VcotMin = PixelRecoLineRZ( vtxR, outerred).cotLine();
66  double 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  PixelRecoPointRZ outerL, outerR;
75 
76  if (layer->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  MultipleScatteringParametrisation iSigma(layer,iSetup);
91 
92  /*
93  float innerScatt=0;
94  if (outerlayer) {
95  innerScatt = 3.f * iSigma( ptMin(), vtxMean, outerred);
96  float anew = 3.f * iSigma( ptMin(), vtxMean, outerred, outerlayer->seqNum());
97  if (std::abs( (innerScatt-anew)/innerScatt) > .05)
98  std::cout << "MS old/new in " << outerlayer->seqNum() << " " << layer->seqNum()
99  << ": " << innerScatt << " / " << anew
100  << std::endl;
101  } else
102  innerScatt = 3.f * iSigma( ptMin(), vtxMean, outerred);
103  */
104 
105 
106  float innerScatt = 3.f * ( outerlayer ?
107  iSigma( ptMin(), vtxMean, outerred, outerlayer->seqNum())
108  : iSigma( ptMin(), vtxMean, outerred) ) ;
109 
110 
111  //
112  //
113  //
114  SimpleLineRZ leftLine( vtxL, outerL);
115  SimpleLineRZ rightLine( vtxR, outerR);
116  HitRZConstraint rzConstraint(leftLine, rightLine);
117  float cotTheta = SimpleLineRZ(vtxMean,outerred).cotLine();
118 
119  if (isBarrel) {
120  float sinTheta = 1/std::sqrt(1+sqr(cotTheta));
121  float corrZ = innerScatt/sinTheta + dz;
122  return new HitZCheck(rzConstraint, HitZCheck::Margin(corrZ,corrZ));
123  } else {
124  float cosTheta = 1/std::sqrt(1+sqr(1/cotTheta));
125  float corrR = innerScatt/cosTheta + dr;
126  return new HitRCheck( rzConstraint, HitRCheck::Margin(corrR,corrR));
127  }
128 }
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
float float float z
#define unlikely(x)
int seqNum() const
Definition: DetLayer.h:36
float cotLine() const
T sqrt(T t)
Definition: SSEVec.h:48
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
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
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)
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().

Referenced by SimpleCosmicBONSeeder::triplets().

30  {
31  return layer.hits();
32 }
virtual std::string GlobalTrackingRegion::name ( void  ) const
inlinevirtual
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
private

Definition at line 56 of file GlobalTrackingRegion.h.