CMS 3D CMS Logo

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

Public Member Functions

bool accept (const reco::Candidate &cand, const reco::Vertex *pv) const
 
 BPHSoftMuonSelect (int cutTrackerLayers=5, int cutPixelLayers=0, float maxDxy=0.3, float maxDz=20.0, bool goodMuon=true, bool highPurity=true)
 

Private Attributes

int cutPL
 
int cutTL
 
bool gM
 
bool hP
 
float maxXY
 
float maxZ
 
const reco::Vertexpv
 

Detailed Description

Definition at line 78 of file BPHHistoSpecificDecay.cc.

Constructor & Destructor Documentation

BPHSoftMuonSelect::BPHSoftMuonSelect ( int  cutTrackerLayers = 5,
int  cutPixelLayers = 0,
float  maxDxy = 0.3,
float  maxDz = 20.0,
bool  goodMuon = true,
bool  highPurity = true 
)
inline

Member Function Documentation

bool BPHSoftMuonSelect::accept ( const reco::Candidate cand,
const reco::Vertex pv 
) const
inline

Definition at line 87 of file BPHHistoSpecificDecay.cc.

References reco::TrackBase::highPurity, pat::Muon::innerTrack(), muon::isGoodMuon(), CosmicsPD_Skims::maxZ, AlCaHLTBitMon_ParallelJobs::p, reco::Vertex::position(), and muon::TMOneStationTight.

Referenced by Vispa.Gui.BoxContentDialog.BoxContentDialog::apply(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::apply(), and esMonitoring.FDJsonServer::handle_accept().

87  {
88  const pat::Muon* p = reinterpret_cast<const pat::Muon*>(&cand);
89  if (p == nullptr)
90  return false;
92  return false;
93  if (p->innerTrack()->hitPattern().trackerLayersWithMeasurement() <= cutTL)
94  return false;
95  if (p->innerTrack()->hitPattern().pixelLayersWithMeasurement() <= cutPL)
96  return false;
97  if (hP && !p->innerTrack()->quality(reco::TrackBase::highPurity))
98  return false;
99  if (pv == nullptr)
100  return true;
101  const reco::Vertex::Point& pos = pv->position();
102  if (fabs(p->innerTrack()->dxy(pos)) >= maxXY)
103  return false;
104  if (fabs(p->innerTrack()->dz(pos)) >= maxZ)
105  return false;
106  return true;
107  }
const Point & position() const
position
Definition: Vertex.h:113
reco::TrackRef innerTrack() const override
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
Definition: Muon.h:72
math::XYZPoint Point
point in the space
Definition: Vertex.h:39
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
Analysis-level muon class.
Definition: Muon.h:51

Member Data Documentation

int BPHSoftMuonSelect::cutPL
private

Definition at line 112 of file BPHHistoSpecificDecay.cc.

int BPHSoftMuonSelect::cutTL
private

Definition at line 111 of file BPHHistoSpecificDecay.cc.

bool BPHSoftMuonSelect::gM
private

Definition at line 115 of file BPHHistoSpecificDecay.cc.

bool BPHSoftMuonSelect::hP
private

Definition at line 116 of file BPHHistoSpecificDecay.cc.

float BPHSoftMuonSelect::maxXY
private

Definition at line 113 of file BPHHistoSpecificDecay.cc.

float BPHSoftMuonSelect::maxZ
private

Definition at line 114 of file BPHHistoSpecificDecay.cc.

const reco::Vertex* BPHSoftMuonSelect::pv
private

Definition at line 110 of file BPHHistoSpecificDecay.cc.