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

#include <HIProtoTrackFilter.h>

Inheritance diagram for HIProtoTrackFilter:
PixelTrackFilter

Public Member Functions

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

Private Attributes

bool doVariablePtMin
 
const reco::BeamSpottheBeamSpot
 
edm::InputTag theBeamSpotTag
 
edm::EDGetTokenT< reco::BeamSpottheBeamSpotToken
 
double theChi2Max
 
double thePtMin
 
edm::EDGetTokenT
< SiPixelRecHitCollection
theSiPixelRecHitsToken
 
double theTIPMax
 
double theVariablePtMin
 

Additional Inherited Members

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

Detailed Description

Definition at line 13 of file HIProtoTrackFilter.h.

Constructor & Destructor Documentation

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

Definition at line 24 of file HIProtoTrackFilter.cc.

24  :
25 theTIPMax( ps.getParameter<double>("tipMax") ),
26 theChi2Max( ps.getParameter<double>("chi2") ),
27 thePtMin( ps.getParameter<double>("ptMin") ),
28 doVariablePtMin( ps.getParameter<bool>("doVariablePtMin") ),
29 theBeamSpotTag( ps.getParameter<InputTag>("beamSpot")),
32 theBeamSpot(0),
34 {
35 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::InputTag theBeamSpotTag
edm::EDGetTokenT< SiPixelRecHitCollection > theSiPixelRecHitsToken
const reco::BeamSpot * theBeamSpot
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotToken
HIProtoTrackFilter::~HIProtoTrackFilter ( )
virtual

Definition at line 38 of file HIProtoTrackFilter.cc.

39 { }

Member Function Documentation

bool HIProtoTrackFilter::operator() ( const reco::Track track,
const PixelTrackFilter::Hits hits 
) const
virtual

Reimplemented from PixelTrackFilter.

Definition at line 42 of file HIProtoTrackFilter.cc.

References reco::TrackBase::chi2(), doVariablePtMin, reco::TrackBase::dxy(), reco::BeamSpot::position(), reco::TrackBase::pt(), theBeamSpot, theChi2Max, thePtMin, theTIPMax, and theVariablePtMin.

43 {
44 
45  if (!track) return false;
46 
47  float minpt = thePtMin;
49 
50  if (track->chi2() > theChi2Max || track->pt() < minpt) return false;
51 
52  math::XYZPoint vtxPoint(0.0,0.0,0.0);
53 
54  if(theBeamSpot)
55  vtxPoint = theBeamSpot->position();
56 
57  double d0=0.0;
58  d0 = -1.*track->dxy(vtxPoint);
59 
60  if (theTIPMax>0 && fabs(d0)>theTIPMax) return false;
61 
62  return true;
63 }
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:536
double pt() const
track transverse momentum
Definition: TrackBase.h:608
const reco::BeamSpot * theBeamSpot
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
const Point & position() const
position
Definition: BeamSpot.h:62
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 HIProtoTrackFilter::update ( const edm::Event ev,
const edm::EventSetup es 
)
overridevirtual

Implements PixelTrackFilter.

Definition at line 66 of file HIProtoTrackFilter.cc.

References edmNew::copyDetSetRange(), edm::EventSetup::get(), edm::Event::getByToken(), LogTrace, edm::Handle< T >::product(), theBeamSpot, theBeamSpotTag, theBeamSpotToken, thePtMin, theSiPixelRecHitsToken, theVariablePtMin, reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().

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

67 {
68 
69  // Get the beam spot
71  ev.getByToken( theBeamSpotToken, bsHandle);
72  theBeamSpot = bsHandle.product();
73 
74  if(theBeamSpot) {
75  LogInfo("HeavyIonVertexing")
76  << "[HIProtoTrackFilter] Proto track selection based on beamspot"
77  << "\n (x,y,z) = (" << theBeamSpot->x0() << "," << theBeamSpot->y0() << "," << theBeamSpot->z0() << ")";
78  } else {
79  LogError("HeavyIonVertexing") // this can be made a warning when operator() is fixed
80  << "No beamspot found with tag '" << theBeamSpotTag << "'";
81  }
82 
83  // Estimate multiplicity
85  ev.getByToken(theSiPixelRecHitsToken, recHitColl);
86 
88  es.get<TrackerTopologyRcd>().get(httopo);
89 
90  vector<const TrackingRecHit*> theChosenHits;
91  edmNew::copyDetSetRange(*recHitColl,theChosenHits, httopo->pxbDetIdLayerComparator(1));
92  float estMult = theChosenHits.size();
93 
95 
96  // parameterize ptMin such that a roughly constant number of selected prototracks passed are to vertexing
97  float varPtCutoff = 1500; //cutoff for variable ptMin
98  if(estMult < varPtCutoff) {
99  theVariablePtMin = 0.075;
100  if(estMult > 0) theVariablePtMin = (13. - (varPtCutoff/estMult) )/12.;
101  if(theVariablePtMin<0.075) theVariablePtMin = 0.075; // don't lower the cut past 75 MeV
102  }
103 
104  LogTrace("heavyIonHLTVertexing")<<" [HIProtoTrackFilter: theVariablePtMin: " << theVariablePtMin << "]";
105 
106 
107  return;
108 
109 }
double z0() const
z coordinate
Definition: BeamSpot.h:68
void copyDetSetRange(DSTV const &dstv, std::vector< T const * > &v, std::pair< A, B > const &sel)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
edm::InputTag theBeamSpotTag
edm::EDGetTokenT< SiPixelRecHitCollection > theSiPixelRecHitsToken
#define LogTrace(id)
T const * product() const
Definition: Handle.h:81
const reco::BeamSpot * theBeamSpot
const T & get() const
Definition: EventSetup.h:56
double y0() const
y coordinate
Definition: BeamSpot.h:66
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotToken
double x0() const
x coordinate
Definition: BeamSpot.h:64

Member Data Documentation

bool HIProtoTrackFilter::doVariablePtMin
private

Definition at line 22 of file HIProtoTrackFilter.h.

Referenced by operator()().

const reco::BeamSpot* HIProtoTrackFilter::theBeamSpot
private

Definition at line 26 of file HIProtoTrackFilter.h.

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

edm::InputTag HIProtoTrackFilter::theBeamSpotTag
private

Definition at line 23 of file HIProtoTrackFilter.h.

Referenced by update().

edm::EDGetTokenT<reco::BeamSpot> HIProtoTrackFilter::theBeamSpotToken
private

Definition at line 24 of file HIProtoTrackFilter.h.

Referenced by update().

double HIProtoTrackFilter::theChi2Max
private

Definition at line 21 of file HIProtoTrackFilter.h.

Referenced by operator()().

double HIProtoTrackFilter::thePtMin
private

Definition at line 21 of file HIProtoTrackFilter.h.

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

edm::EDGetTokenT<SiPixelRecHitCollection> HIProtoTrackFilter::theSiPixelRecHitsToken
private

Definition at line 25 of file HIProtoTrackFilter.h.

Referenced by update().

double HIProtoTrackFilter::theTIPMax
private

Definition at line 20 of file HIProtoTrackFilter.h.

Referenced by operator()().

double HIProtoTrackFilter::theVariablePtMin
private

Definition at line 27 of file HIProtoTrackFilter.h.

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