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
HIPixelTrackFilter Class Reference

#include <HIPixelTrackFilter.h>

Inheritance diagram for HIPixelTrackFilter:
ClusterShapeTrackFilter PixelTrackFilter

Public Member Functions

 HIPixelTrackFilter (const edm::ParameterSet &ps, edm::ConsumesCollector &iC)
 
virtual bool operator() (const reco::Track *, const PixelTrackFilter::Hits &hits, const TrackerTopology *tTopo) const
 
virtual void update (const edm::Event &ev, const edm::EventSetup &es) override
 
virtual ~HIPixelTrackFilter ()
 
- Public Member Functions inherited from ClusterShapeTrackFilter
 ClusterShapeTrackFilter (const edm::ParameterSet &ps, edm::ConsumesCollector &iC)
 
virtual bool operator() (const reco::Track *, const std::vector< const TrackingRecHit * > &hits, const TrackerTopology *tTopo) const
 
void update (const edm::Event &ev, const edm::EventSetup &es) override
 
virtual ~ClusterShapeTrackFilter ()
 
- Public Member Functions inherited from PixelTrackFilter
virtual bool operator() (const reco::Track *) const
 
virtual bool operator() (const reco::Track *, const Hits &) const
 
virtual ~PixelTrackFilter ()
 

Private Attributes

double theChi2Max
 
double theLIPMax
 
double theNSigmaLipMaxTolerance
 
double theNSigmaTipMaxTolerance
 
double thePtMin
 
double theTIPMax
 
edm::InputTag theVertexCollection
 
edm::EDGetTokenT
< reco::VertexCollection
theVertexCollectionToken
 
const reco::VertexCollectiontheVertices
 
bool useClusterShape
 

Additional Inherited Members

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

Detailed Description

Definition at line 13 of file HIPixelTrackFilter.h.

Constructor & Destructor Documentation

HIPixelTrackFilter::HIPixelTrackFilter ( const edm::ParameterSet ps,
edm::ConsumesCollector iC 
)

Definition at line 18 of file HIPixelTrackFilter.cc.

18  :
20 theTIPMax( ps.getParameter<double>("tipMax") ),
21 theNSigmaTipMaxTolerance( ps.getParameter<double>("nSigmaTipMaxTolerance")),
22 theLIPMax( ps.getParameter<double>("lipMax") ),
23 theNSigmaLipMaxTolerance( ps.getParameter<double>("nSigmaLipMaxTolerance")),
24 theChi2Max( ps.getParameter<double>("chi2") ),
25 thePtMin( ps.getParameter<double>("ptMin") ),
26 useClusterShape( ps.getParameter<bool>("useClusterShape") ),
27 theVertexCollection( ps.getParameter<edm::InputTag>("VertexCollection")),
29 theVertices(0)
30 {
31 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< reco::VertexCollection > theVertexCollectionToken
const reco::VertexCollection * theVertices
edm::InputTag theVertexCollection
ClusterShapeTrackFilter(const edm::ParameterSet &ps, edm::ConsumesCollector &iC)
HIPixelTrackFilter::~HIPixelTrackFilter ( )
virtual

Definition at line 34 of file HIPixelTrackFilter.cc.

35 { }

Member Function Documentation

bool HIPixelTrackFilter::operator() ( const reco::Track track,
const PixelTrackFilter::Hits hits,
const TrackerTopology tTopo 
) const
virtual

Reimplemented from PixelTrackFilter.

Definition at line 38 of file HIPixelTrackFilter.cc.

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

40 {
41 
42  if (!track) return false;
43  if (track->chi2() > theChi2Max || track->pt() < thePtMin) return false;
44 
45 
46  math::XYZPoint vtxPoint(0.0,0.0,0.0);
47  double vzErr =0.0, vxErr=0.0, vyErr=0.0;
48 
49  if(theVertices->size()>0) {
50  vtxPoint=theVertices->begin()->position();
51  vzErr=theVertices->begin()->zError();
52  vxErr=theVertices->begin()->xError();
53  vyErr=theVertices->begin()->yError();
54  } else {
55  // THINK OF SOMETHING TO DO IF THERE IS NO VERTEX
56  }
57 
58  double d0=0.0, dz=0.0, d0sigma=0.0, dzsigma=0.0;
59  d0 = -1.*track->dxy(vtxPoint);
60  dz = track->dz(vtxPoint);
61  d0sigma = sqrt(track->d0Error()*track->d0Error()+vxErr*vyErr);
62  dzsigma = sqrt(track->dzError()*track->dzError()+vzErr*vzErr);
63 
64  if (theTIPMax>0 && fabs(d0)>theTIPMax) return false;
65  if (theNSigmaTipMaxTolerance>0 && (fabs(d0)/d0sigma)>theNSigmaTipMaxTolerance) return false;
66  if (theLIPMax>0 && fabs(dz)>theLIPMax) return false;
67  if (theNSigmaLipMaxTolerance>0 && (fabs(dz)/dzsigma)>theNSigmaLipMaxTolerance) return false;
68 
69  bool ok = true;
71 
72  return ok;
73 }
double d0Error() const
error on d0
Definition: TrackBase.h:789
virtual bool operator()(const reco::Track *, const std::vector< const TrackingRecHit * > &hits, const TrackerTopology *tTopo) const
const reco::VertexCollection * theVertices
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:536
T sqrt(T t)
Definition: SSEVec.h:48
double pt() const
track transverse momentum
Definition: TrackBase.h:608
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:596
double dzError() const
error on dz
Definition: TrackBase.h:801
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:578
void HIPixelTrackFilter::update ( const edm::Event ev,
const edm::EventSetup es 
)
overridevirtual

Implements PixelTrackFilter.

Definition at line 76 of file HIPixelTrackFilter.cc.

References edm::Event::getByToken(), edm::Handle< T >::product(), theVertexCollection, theVertexCollectionToken, theVertices, and ClusterShapeTrackFilter::update().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

77 {
79 
80  // Get reco vertices
83  theVertices = vc.product();
84 
85  if(theVertices->size()>0) {
86  LogInfo("HeavyIonVertexing")
87  << "[HIPixelTrackFilter] Pixel track selection based on best vertex"
88  << "\n vz = " << theVertices->begin()->z()
89  << "\n vz sigma = " << theVertices->begin()->zError();
90  } else {
91  LogError("HeavyIonVertexing") // this can be made a warning when operator() is fixed
92  << "No vertex found in collection '" << theVertexCollection << "'";
93  }
94 
95  return;
96 
97 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
edm::EDGetTokenT< reco::VertexCollection > theVertexCollectionToken
const reco::VertexCollection * theVertices
edm::InputTag theVertexCollection
T const * product() const
Definition: Handle.h:81
void update(const edm::Event &ev, const edm::EventSetup &es) override

Member Data Documentation

double HIPixelTrackFilter::theChi2Max
private

Definition at line 23 of file HIPixelTrackFilter.h.

Referenced by operator()().

double HIPixelTrackFilter::theLIPMax
private

Definition at line 22 of file HIPixelTrackFilter.h.

Referenced by operator()().

double HIPixelTrackFilter::theNSigmaLipMaxTolerance
private

Definition at line 22 of file HIPixelTrackFilter.h.

Referenced by operator()().

double HIPixelTrackFilter::theNSigmaTipMaxTolerance
private

Definition at line 21 of file HIPixelTrackFilter.h.

Referenced by operator()().

double HIPixelTrackFilter::thePtMin
private

Definition at line 23 of file HIPixelTrackFilter.h.

Referenced by operator()().

double HIPixelTrackFilter::theTIPMax
private

Definition at line 21 of file HIPixelTrackFilter.h.

Referenced by operator()().

edm::InputTag HIPixelTrackFilter::theVertexCollection
private

Definition at line 25 of file HIPixelTrackFilter.h.

Referenced by update().

edm::EDGetTokenT<reco::VertexCollection> HIPixelTrackFilter::theVertexCollectionToken
private

Definition at line 26 of file HIPixelTrackFilter.h.

Referenced by update().

const reco::VertexCollection* HIPixelTrackFilter::theVertices
private

Definition at line 27 of file HIPixelTrackFilter.h.

Referenced by operator()(), and update().

bool HIPixelTrackFilter::useClusterShape
private

Definition at line 24 of file HIPixelTrackFilter.h.

Referenced by operator()().