CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HIPixelTrackFilter Class Reference

#include <HIPixelTrackFilter.h>

Inheritance diagram for HIPixelTrackFilter:
ClusterShapeTrackFilter PixelTrackFilterBase

Public Member Functions

 HIPixelTrackFilter (const SiPixelClusterShapeCache *cache, double ptMin, double ptMax, const edm::EventSetup &es, const reco::VertexCollection *vertices, double tipMax, double tipMaxTolerance, double lipMax, double lipMaxTolerance, double chi2max, bool useClusterShape)
 
bool operator() (const reco::Track *, const PixelTrackFilterBase::Hits &hits) const override
 
 ~HIPixelTrackFilter () override
 
- Public Member Functions inherited from ClusterShapeTrackFilter
 ClusterShapeTrackFilter (const SiPixelClusterShapeCache *cache, double ptmin, double ptmax, const edm::EventSetup &es)
 
bool operator() (const reco::Track *, const std::vector< const TrackingRecHit * > &hits) const override
 
 ~ClusterShapeTrackFilter () override
 
- Public Member Functions inherited from PixelTrackFilterBase
virtual ~PixelTrackFilterBase ()
 

Private Attributes

double theChi2Max
 
double theLIPMax
 
double theNSigmaLipMaxTolerance
 
double theNSigmaTipMaxTolerance
 
double thePtMin
 
double theTIPMax
 
const reco::VertexCollectiontheVertices
 
bool useClusterShape
 

Additional Inherited Members

- Public Types inherited from PixelTrackFilterBase
typedef std::vector< const TrackingRecHit * > Hits
 

Detailed Description

Definition at line 10 of file HIPixelTrackFilter.h.

Constructor & Destructor Documentation

HIPixelTrackFilter::HIPixelTrackFilter ( const SiPixelClusterShapeCache cache,
double  ptMin,
double  ptMax,
const edm::EventSetup es,
const reco::VertexCollection vertices,
double  tipMax,
double  tipMaxTolerance,
double  lipMax,
double  lipMaxTolerance,
double  chi2max,
bool  useClusterShape 
)

Definition at line 17 of file HIPixelTrackFilter.cc.

22  :
23  ClusterShapeTrackFilter(cache, ptMin, ptMax, es),
26  theNSigmaTipMaxTolerance(tipMaxTolerance),
28  theNSigmaLipMaxTolerance(lipMaxTolerance),
29  theChi2Max(chi2max),
30  thePtMin(ptMin),
32 {
33 }
ClusterShapeTrackFilter(const SiPixelClusterShapeCache *cache, double ptmin, double ptmax, const edm::EventSetup &es)
const reco::VertexCollection * theVertices
HIPixelTrackFilter::~HIPixelTrackFilter ( )
override

Definition at line 36 of file HIPixelTrackFilter.cc.

37 { }

Member Function Documentation

bool HIPixelTrackFilter::operator() ( const reco::Track track,
const PixelTrackFilterBase::Hits hits 
) const
overridevirtual

Implements PixelTrackFilterBase.

Definition at line 40 of file HIPixelTrackFilter.cc.

References reco::TrackBase::chi2(), allConversions_cfi::d0, reco::TrackBase::d0Error(), reco::TrackBase::dxy(), PVValHelper::dz, reco::TrackBase::dz(), reco::TrackBase::dzError(), convertSQLiteXML::ok, ClusterShapeTrackFilter::operator()(), reco::TrackBase::pt(), mathSSE::sqrt(), theChi2Max, theLIPMax, theNSigmaLipMaxTolerance, theNSigmaTipMaxTolerance, thePtMin, theTIPMax, theVertices, and useClusterShape.

41 {
42 
43  if (!track) return false;
44  if (track->chi2() > theChi2Max || track->pt() < thePtMin) return false;
45 
46 
47  math::XYZPoint vtxPoint(0.0,0.0,0.0);
48  double vzErr =0.0, vxErr=0.0, vyErr=0.0;
49 
50  if(!theVertices->empty()) {
51  vtxPoint=theVertices->begin()->position();
52  vzErr=theVertices->begin()->zError();
53  vxErr=theVertices->begin()->xError();
54  vyErr=theVertices->begin()->yError();
55  } else {
56  // THINK OF SOMETHING TO DO IF THERE IS NO VERTEX
57  }
58 
59  double d0=0.0, dz=0.0, d0sigma=0.0, dzsigma=0.0;
60  d0 = -1.*track->dxy(vtxPoint);
61  dz = track->dz(vtxPoint);
62  d0sigma = sqrt(track->d0Error()*track->d0Error()+vxErr*vyErr);
63  dzsigma = sqrt(track->dzError()*track->dzError()+vzErr*vzErr);
64 
65  if (theTIPMax>0 && fabs(d0)>theTIPMax) return false;
66  if (theNSigmaTipMaxTolerance>0 && (fabs(d0)/d0sigma)>theNSigmaTipMaxTolerance) return false;
67  if (theLIPMax>0 && fabs(dz)>theLIPMax) return false;
68  if (theNSigmaLipMaxTolerance>0 && (fabs(dz)/dzsigma)>theNSigmaLipMaxTolerance) return false;
69 
70  bool ok = true;
72 
73  return ok;
74 }
double d0Error() const
error on d0
Definition: TrackBase.h:853
bool operator()(const reco::Track *, const std::vector< const TrackingRecHit * > &hits) const override
const reco::VertexCollection * theVertices
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:588
T sqrt(T t)
Definition: SSEVec.h:18
double pt() const
track transverse momentum
Definition: TrackBase.h:660
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:648
double dzError() const
error on dz
Definition: TrackBase.h:865
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:630

Member Data Documentation

double HIPixelTrackFilter::theChi2Max
private

Definition at line 24 of file HIPixelTrackFilter.h.

Referenced by operator()().

double HIPixelTrackFilter::theLIPMax
private

Definition at line 23 of file HIPixelTrackFilter.h.

Referenced by operator()().

double HIPixelTrackFilter::theNSigmaLipMaxTolerance
private

Definition at line 23 of file HIPixelTrackFilter.h.

Referenced by operator()().

double HIPixelTrackFilter::theNSigmaTipMaxTolerance
private

Definition at line 22 of file HIPixelTrackFilter.h.

Referenced by operator()().

double HIPixelTrackFilter::thePtMin
private

Definition at line 24 of file HIPixelTrackFilter.h.

Referenced by operator()().

double HIPixelTrackFilter::theTIPMax
private

Definition at line 22 of file HIPixelTrackFilter.h.

Referenced by operator()().

const reco::VertexCollection* HIPixelTrackFilter::theVertices
private

Definition at line 21 of file HIPixelTrackFilter.h.

Referenced by operator()().

bool HIPixelTrackFilter::useClusterShape
private

Definition at line 25 of file HIPixelTrackFilter.h.

Referenced by operator()().