#include <RecoTracker/TkTrackingRegions/interface/GlobalTrackingRegion.h>
Public Member Functions | |
virtual HitRZCompatibility * | checkRZ (const DetLayer *layer, const TrackingRecHit *outerHit, const edm::EventSetup &iSetup) const |
utility to check eta/theta hit compatibility with region constraints and outer hit constraint | |
virtual GlobalTrackingRegion * | clone () const |
clone region | |
GlobalTrackingRegion (float ptMin=1., float originRadius=0.2, float originHalfLength=22.7, float originZPos=0., bool precise=false) | |
GlobalTrackingRegion (float ptMin, const GlobalPoint &origin, float originRadius, float originHalfLength, bool precise=false) | |
Construct from minimal track P_t, and origin size and position. | |
virtual std::vector < ctfseeding::SeedingHit > | hits (const edm::Event &ev, const edm::EventSetup &es, const ctfseeding::SeedingLayer *layer) const |
get hits from layer compatible with region constraints | |
virtual std::string | name () const |
virtual std::string | print () const |
Private Attributes | |
bool | thePrecise |
Definition at line 13 of file GlobalTrackingRegion.h.
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().
00024 : TrackingRegionBase(GlobalVector( 0, 0, 0), origin, 00025 Range( -1/ptMin, 1/ptMin), originRadius, originHalfLength), 00026 thePrecise(precise) { }
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.
00031 : TrackingRegionBase(GlobalVector( 0, 0, 0), GlobalPoint( 0, 0, originZPos), 00032 Range( -1/ptMin, 1/ptMin), originRadius, originHalfLength), 00033 thePrecise(precise) { }
HitRZCompatibility * GlobalTrackingRegion::checkRZ | ( | const DetLayer * | layer, | |
const TrackingRecHit * | 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, TrackingRecHit::geographicalId(), edm::EventSetup::get(), TrackingRegionBase::hitErrR(), TrackingRegionBase::hitErrZ(), TrackingRecHit::localPosition(), DetLayer::location(), TrackingRegionBase::origin(), TrackingRegionBase::originRBound(), TrackingRegionBase::originZBound(), PV3DBase< T, PVType, FrameType >::perp(), GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, TrackingRegionBase::ptMin(), sqr(), funct::sqrt(), DetLayer::subDetector(), thePrecise, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), PV3DBase< T, PVType, FrameType >::z(), and z.
00037 { 00038 00039 edm::ESHandle<TrackerGeometry> tracker; 00040 iSetup.get<TrackerDigiGeometryRecord>().get(tracker); 00041 00042 bool isBarrel = (layer->location() == barrel); 00043 bool isPixel = (layer->subDetector() == PixelBarrel || layer->subDetector() == PixelEndcap); 00044 00045 00046 GlobalPoint ohit = tracker->idToDet(outerHit->geographicalId())->surface().toGlobal(outerHit->localPosition()); 00047 00048 PixelRecoPointRZ ohit_rz(ohit.perp(), ohit.z()); 00049 00050 float outerred_r = sqrt( sqr(ohit.x()-origin().x())+sqr(ohit.y()-origin().y()) ); 00051 PixelRecoPointRZ outerred(outerred_r, ohit.z()); 00052 00053 PixelRecoPointRZ vtxR = (outerred.z() > origin().z()+originZBound()) ? 00054 PixelRecoPointRZ(-originRBound(), origin().z()+originZBound()) 00055 : PixelRecoPointRZ( originRBound(), origin().z()+originZBound()); 00056 PixelRecoPointRZ vtxL = (outerred.z() < origin().z()-originZBound()) ? 00057 PixelRecoPointRZ(-originRBound(), origin().z()-originZBound()) 00058 : PixelRecoPointRZ( originRBound(), origin().z()-originZBound()); 00059 00060 if ((!thePrecise) &&(isPixel )) { 00061 double VcotMin = PixelRecoLineRZ( vtxR, outerred).cotLine(); 00062 double VcotMax = PixelRecoLineRZ( vtxL, outerred).cotLine(); 00063 return new HitEtaCheck(isBarrel, outerred, VcotMax, VcotMin); 00064 } 00065 00066 float errZ = hitErrZ(layer); 00067 float errR = hitErrR(layer); 00068 00069 PixelRecoPointRZ outerL, outerR; 00070 00071 if (layer->location() == barrel) { 00072 outerL = PixelRecoPointRZ(outerred.r(), outerred.z()-errZ); 00073 outerR = PixelRecoPointRZ(outerred.r(), outerred.z()+errZ); 00074 } 00075 else if (outerred.z() > 0) { 00076 outerL = PixelRecoPointRZ(outerred.r()+errR, outerred.z()); 00077 outerR = PixelRecoPointRZ(outerred.r()-errR, outerred.z()); 00078 } 00079 else { 00080 outerL = PixelRecoPointRZ(outerred.r()-errR, outerred.z()); 00081 outerR = PixelRecoPointRZ(outerred.r()+errR, outerred.z()); 00082 } 00083 00084 MultipleScatteringParametrisation iSigma(layer,iSetup); 00085 PixelRecoPointRZ vtxMean(0.,origin().z()); 00086 float innerScatt = 3 * iSigma( ptMin(), vtxMean, ohit_rz); 00087 00088 // 00089 // 00090 // 00091 PixelRecoLineRZ leftLine( vtxL, outerL); 00092 PixelRecoLineRZ rightLine( vtxR, outerR); 00093 HitRZConstraint rzConstraint(leftLine, rightLine); 00094 float cotTheta = PixelRecoLineRZ(vtxMean,outerred).cotLine(); 00095 00096 if (isBarrel) { 00097 float sinTheta = 1/sqrt(1+sqr(cotTheta)); 00098 float corrZ = innerScatt/sinTheta + errZ; 00099 return new HitZCheck(rzConstraint, HitZCheck::Margin(corrZ,corrZ)); 00100 } else { 00101 float cosTheta = 1/sqrt(1+sqr(1/cotTheta)); 00102 float corrR = innerScatt/cosTheta + errR; 00103 return new HitRCheck( rzConstraint, HitRCheck::Margin(corrR,corrR)); 00104 } 00105 }
virtual GlobalTrackingRegion* GlobalTrackingRegion::clone | ( | ) | const [inline, virtual] |
clone region
Implements TrackingRegionBase.
Definition at line 45 of file GlobalTrackingRegion.h.
References GlobalTrackingRegion().
00045 { 00046 return new GlobalTrackingRegion(*this); 00047 }
std::vector< ctfseeding::SeedingHit > 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().
00031 { 00032 return layer->hits(ev,es); 00033 }
virtual std::string GlobalTrackingRegion::name | ( | void | ) | const [inline, virtual] |
std::string GlobalTrackingRegion::print | ( | void | ) | const [virtual] |
Reimplemented from TrackingRegionBase.
Definition at line 21 of file GlobalTrackingRegion.cc.
References TrackingRegionBase::print(), and thePrecise.
00021 { 00022 std::ostringstream str; 00023 str << TrackingRegionBase::print() << "precise: "<<thePrecise; 00024 return str.str(); 00025 }
bool GlobalTrackingRegion::thePrecise [private] |