CMS 3D CMS Logo

Public Member Functions | Private Attributes

GlobalTrackingRegion Class Reference

#include <GlobalTrackingRegion.h>

Inheritance diagram for GlobalTrackingRegion:
TrackingRegionBase TrackingRegion

List of all members.

Public Member Functions

virtual HitRZCompatibilitycheckRZ (const DetLayer *layer, const Hit &outerHit, const edm::EventSetup &iSetup) const
virtual GlobalTrackingRegionclone () 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)
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
virtual std::string name () const
virtual std::string print () const

Private Attributes

bool thePrecise

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().

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.

    : TrackingRegionBase(GlobalVector( 0, 0, 0), GlobalPoint( 0, 0, originZPos),
      Range( -1/ptMin, 1/ptMin), originRadius, originHalfLength),
      thePrecise(precise) { }

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(), PV3DBase< T, PVType, FrameType >::z(), and z.

{

  bool isBarrel = (layer->location() == barrel);
  bool isPixel = (layer->subDetector() == PixelBarrel || layer->subDetector() == PixelEndcap);
  

  GlobalPoint ohit =  outerHit->globalPosition();
  float outerred_r = sqrt( sqr(ohit.x()-origin().x())+sqr(ohit.y()-origin().y()) );
  PixelRecoPointRZ outerred(outerred_r, ohit.z());


  PixelRecoPointRZ vtxR = (outerred.z() > origin().z()+originZBound()) ?
      PixelRecoPointRZ(-originRBound(), origin().z()+originZBound())
    : PixelRecoPointRZ( originRBound(), origin().z()+originZBound());
  PixelRecoPointRZ vtxL = (outerred.z() < origin().z()-originZBound()) ?
      PixelRecoPointRZ(-originRBound(), origin().z()-originZBound())
    : PixelRecoPointRZ( originRBound(), origin().z()-originZBound()); 

  if ((!thePrecise) &&(isPixel )) {
    double VcotMin = PixelRecoLineRZ( vtxR, outerred).cotLine();
    double VcotMax = PixelRecoLineRZ( vtxL, outerred).cotLine();
    return new HitEtaCheck(isBarrel, outerred, VcotMax, VcotMin);
  }
  
  float nSigmaPhi = 3.;
  float errZ =  nSigmaPhi*outerHit->errorGlobalZ(); 
  float errR =  nSigmaPhi*outerHit->errorGlobalR();

  PixelRecoPointRZ  outerL, outerR;

  if (layer->location() == barrel) {
    outerL = PixelRecoPointRZ(outerred.r(), outerred.z()-errZ);
    outerR = PixelRecoPointRZ(outerred.r(), outerred.z()+errZ);
  } 
  else if (outerred.z() > 0) {
    outerL = PixelRecoPointRZ(outerred.r()+errR, outerred.z());
    outerR = PixelRecoPointRZ(outerred.r()-errR, outerred.z());
  } 
  else {
    outerL = PixelRecoPointRZ(outerred.r()-errR, outerred.z());
    outerR = PixelRecoPointRZ(outerred.r()+errR, outerred.z());
  }
  
  MultipleScatteringParametrisation iSigma(layer,iSetup);
  PixelRecoPointRZ vtxMean(0.,origin().z());
  float innerScatt = 3 * iSigma( ptMin(), vtxMean, outerred);

  //
  //
  //
  PixelRecoLineRZ leftLine( vtxL, outerL);
  PixelRecoLineRZ rightLine( vtxR, outerR);
  HitRZConstraint rzConstraint(leftLine, rightLine);
  float cotTheta = PixelRecoLineRZ(vtxMean,outerred).cotLine();

  if (isBarrel) {
    float sinTheta = 1/sqrt(1+sqr(cotTheta));
    float corrZ = innerScatt/sinTheta + errZ;
    return new HitZCheck(rzConstraint, HitZCheck::Margin(corrZ,corrZ));
  } else {
    float cosTheta = 1/sqrt(1+sqr(1/cotTheta));
    float corrR = innerScatt/cosTheta + errR;
    return new HitRCheck( rzConstraint, HitRCheck::Margin(corrR,corrR));
  }
}
virtual GlobalTrackingRegion* GlobalTrackingRegion::clone ( ) const [inline, virtual]

clone region

Implements TrackingRegionBase.

Definition at line 45 of file GlobalTrackingRegion.h.

References GlobalTrackingRegion().

                                              { 
    return new GlobalTrackingRegion(*this);
  }
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().

{
 return layer->hits(ev,es);
}
virtual std::string GlobalTrackingRegion::name ( void  ) const [inline, virtual]

Reimplemented from TrackingRegion.

Definition at line 49 of file GlobalTrackingRegion.h.

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

Reimplemented from TrackingRegionBase.

Definition at line 21 of file GlobalTrackingRegion.cc.

References reco::print().

                                            {
  std::ostringstream str;
  str << TrackingRegionBase::print() << "precise: "<<thePrecise;
  return str.str(); 
}

Member Data Documentation

Definition at line 53 of file GlobalTrackingRegion.h.