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)
 
 ~BPHSoftMuonSelect ()=default
 

Private Attributes

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

Detailed Description

Definition at line 137 of file BPHHistoSpecificDecay.cc.

Constructor & Destructor Documentation

◆ BPHSoftMuonSelect()

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

◆ ~BPHSoftMuonSelect()

BPHSoftMuonSelect::~BPHSoftMuonSelect ( )
default

Member Function Documentation

◆ accept()

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

Definition at line 147 of file BPHHistoSpecificDecay.cc.

References reco::TrackBase::highPurity, muon::isGoodMuon(), CosmicsPD_Skims::maxZ, AlCaHLTBitMon_ParallelJobs::p, MetAnalyzer::pv(), and muon::TMOneStationTight.

Referenced by esMonitoring.FDJsonServer::handle_accept().

147  {
148  const pat::Muon* p = dynamic_cast<const pat::Muon*>(&cand);
149  if (p == nullptr)
150  return false;
152  return false;
153  if (p->innerTrack()->hitPattern().trackerLayersWithMeasurement() <= cutTL)
154  return false;
155  if (p->innerTrack()->hitPattern().pixelLayersWithMeasurement() <= cutPL)
156  return false;
157  if (hP && !p->innerTrack()->quality(reco::TrackBase::highPurity))
158  return false;
159  if (pv == nullptr)
160  return true;
161  const reco::Vertex::Point& pos = pv->position();
162  if (fabs(p->innerTrack()->dxy(pos)) >= maxXY)
163  return false;
164  if (fabs(p->innerTrack()->dz(pos)) >= maxZ)
165  return false;
166  return true;
167  }
const reco::Vertex * pv
const Point & position() const
position
Definition: Vertex.h:127
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
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

◆ cutPL

int BPHSoftMuonSelect::cutPL
private

Definition at line 172 of file BPHHistoSpecificDecay.cc.

◆ cutTL

int BPHSoftMuonSelect::cutTL
private

Definition at line 171 of file BPHHistoSpecificDecay.cc.

◆ gM

bool BPHSoftMuonSelect::gM
private

Definition at line 175 of file BPHHistoSpecificDecay.cc.

◆ hP

bool BPHSoftMuonSelect::hP
private

Definition at line 176 of file BPHHistoSpecificDecay.cc.

◆ maxXY

float BPHSoftMuonSelect::maxXY
private

Definition at line 173 of file BPHHistoSpecificDecay.cc.

◆ maxZ

float BPHSoftMuonSelect::maxZ
private

Definition at line 174 of file BPHHistoSpecificDecay.cc.

◆ pv

const reco::Vertex* BPHSoftMuonSelect::pv
private

Definition at line 170 of file BPHHistoSpecificDecay.cc.