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, const edm::EventSetup &es)
 
 HIProtoTrackFilter (const edm::ParameterSet &ps)
 
virtual bool operator() (const reco::Track *, const PixelTrackFilter::Hits &hits) const
 
virtual void update (edm::Event &ev)
 
virtual ~HIProtoTrackFilter ()
 
- Public Member Functions inherited from PixelTrackFilter
virtual bool operator() (const reco::Track *) const
 
virtual ~PixelTrackFilter ()
 

Private Attributes

bool doVariablePtMin
 
const reco::BeamSpottheBeamSpot
 
edm::InputTag theBeamSpotTag
 
double theChi2Max
 
double thePtMin
 
edm::InputTag theSiPixelRecHits
 
double theTIPMax
 
double theVariablePtMin
 

Additional Inherited Members

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

Detailed Description

Definition at line 11 of file HIProtoTrackFilter.h.

Constructor & Destructor Documentation

HIProtoTrackFilter::HIProtoTrackFilter ( const edm::ParameterSet ps,
const edm::EventSetup es 
)

Definition at line 23 of file HIProtoTrackFilter.cc.

23  :
24 theTIPMax( ps.getParameter<double>("tipMax") ),
25 theChi2Max( ps.getParameter<double>("chi2") ),
26 thePtMin( ps.getParameter<double>("ptMin") ),
27 doVariablePtMin( ps.getParameter<bool>("doVariablePtMin") ),
28 theBeamSpotTag( ps.getParameter<InputTag>("beamSpot")),
29 theSiPixelRecHits( ps.getParameter<InputTag>("siPixelRecHits")),
30 theBeamSpot(0),
32 {
33 }
T getParameter(std::string const &) const
edm::InputTag theBeamSpotTag
edm::InputTag theSiPixelRecHits
const reco::BeamSpot * theBeamSpot
HIProtoTrackFilter::HIProtoTrackFilter ( const edm::ParameterSet ps)

Definition at line 36 of file HIProtoTrackFilter.cc.

36  :
37 theTIPMax( ps.getParameter<double>("tipMax") ),
38 theChi2Max( ps.getParameter<double>("chi2") ),
39 thePtMin( ps.getParameter<double>("ptMin") ),
40 doVariablePtMin( ps.getParameter<bool>("doVariablePtMin") ),
41 theBeamSpotTag( ps.getParameter<InputTag>("beamSpot")),
42 theSiPixelRecHits( ps.getParameter<InputTag>("siPixelRecHits")),
43 theBeamSpot(0),
45 {
46 }
T getParameter(std::string const &) const
edm::InputTag theBeamSpotTag
edm::InputTag theSiPixelRecHits
const reco::BeamSpot * theBeamSpot
HIProtoTrackFilter::~HIProtoTrackFilter ( )
virtual

Definition at line 49 of file HIProtoTrackFilter.cc.

50 { }

Member Function Documentation

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

Reimplemented from PixelTrackFilter.

Definition at line 53 of file HIProtoTrackFilter.cc.

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

54 {
55 
56  if (!track) return false;
57 
58  float minpt = thePtMin;
60 
61  if (track->chi2() > theChi2Max || track->pt() < minpt) return false;
62 
63  math::XYZPoint vtxPoint(0.0,0.0,0.0);
64 
65  if(theBeamSpot)
66  vtxPoint = theBeamSpot->position();
67 
68  double d0=0.0;
69  d0 = -1.*track->dxy(vtxPoint);
70 
71  if (theTIPMax>0 && fabs(d0)>theTIPMax) return false;
72 
73  return true;
74 }
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:107
double pt() const
track transverse momentum
Definition: TrackBase.h:131
const reco::BeamSpot * theBeamSpot
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
const Point & position() const
position
Definition: BeamSpot.h:63
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:121
void HIProtoTrackFilter::update ( edm::Event ev)
virtual

Reimplemented from PixelTrackFilter.

Definition at line 77 of file HIProtoTrackFilter.cc.

References edmNew::copyDetSetRange(), edm::Event::getByLabel(), LogTrace, TrackerLayerIdAccessor::pixelBarrelLayer(), edm::Handle< T >::product(), theBeamSpot, theBeamSpotTag, thePtMin, theSiPixelRecHits, theVariablePtMin, reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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().

78 {
79 
80  // Get the beam spot
82  ev.getByLabel( theBeamSpotTag, bsHandle);
83  theBeamSpot = bsHandle.product();
84 
85  if(theBeamSpot) {
86  LogInfo("HeavyIonVertexing")
87  << "[HIProtoTrackFilter] Proto track selection based on beamspot"
88  << "\n (x,y,z) = (" << theBeamSpot->x0() << "," << theBeamSpot->y0() << "," << theBeamSpot->z0() << ")";
89  } else {
90  LogError("HeavyIonVertexing") // this can be made a warning when operator() is fixed
91  << "No beamspot found with tag '" << theBeamSpotTag << "'";
92  }
93 
94  // Estimate multiplicity
96  ev.getByLabel(theSiPixelRecHits, recHitColl);
97 
98  vector<const TrackingRecHit*> theChosenHits;
100  edmNew::copyDetSetRange(*recHitColl,theChosenHits,acc.pixelBarrelLayer(1));
101  float estMult = theChosenHits.size();
102 
104 
105  // parameterize ptMin such that a roughly constant number of selected prototracks passed are to vertexing
106  float varPtCutoff = 1500; //cutoff for variable ptMin
107  if(estMult < varPtCutoff) {
108  theVariablePtMin = 0.075;
109  if(estMult > 0) theVariablePtMin = (13. - (varPtCutoff/estMult) )/12.;
110  if(theVariablePtMin<0.075) theVariablePtMin = 0.075; // don't lower the cut past 75 MeV
111  }
112 
113  LogTrace("heavyIonHLTVertexing")<<" [HIProtoTrackFilter: theVariablePtMin: " << theVariablePtMin << "]";
114 
115 
116  return;
117 
118 }
double z0() const
z coordinate
Definition: BeamSpot.h:69
void copyDetSetRange(DSTV const &dstv, std::vector< T const * > &v, std::pair< A, B > const &sel)
edm::InputTag theBeamSpotTag
edm::InputTag theSiPixelRecHits
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
#define LogTrace(id)
const reco::BeamSpot * theBeamSpot
T const * product() const
Definition: Handle.h:74
std::pair< DetId, DetIdPXBSameLayerComparator > pixelBarrelLayer(int layer)
double y0() const
y coordinate
Definition: BeamSpot.h:67
double x0() const
x coordinate
Definition: BeamSpot.h:65

Member Data Documentation

bool HIProtoTrackFilter::doVariablePtMin
private

Definition at line 21 of file HIProtoTrackFilter.h.

Referenced by operator()().

const reco::BeamSpot* HIProtoTrackFilter::theBeamSpot
private

Definition at line 24 of file HIProtoTrackFilter.h.

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

edm::InputTag HIProtoTrackFilter::theBeamSpotTag
private

Definition at line 22 of file HIProtoTrackFilter.h.

Referenced by update().

double HIProtoTrackFilter::theChi2Max
private

Definition at line 20 of file HIProtoTrackFilter.h.

Referenced by operator()().

double HIProtoTrackFilter::thePtMin
private

Definition at line 20 of file HIProtoTrackFilter.h.

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

edm::InputTag HIProtoTrackFilter::theSiPixelRecHits
private

Definition at line 23 of file HIProtoTrackFilter.h.

Referenced by update().

double HIProtoTrackFilter::theTIPMax
private

Definition at line 19 of file HIProtoTrackFilter.h.

Referenced by operator()().

double HIProtoTrackFilter::theVariablePtMin
private

Definition at line 25 of file HIProtoTrackFilter.h.

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