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

Private Attributes

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

Detailed Description

Definition at line 130 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 ( )
inline

Definition at line 139 of file BPHHistoSpecificDecay.cc.

139 {}

Member Function Documentation

◆ accept()

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

Definition at line 140 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().

140  {
141  const pat::Muon* p = dynamic_cast<const pat::Muon*>(&cand);
142  if (p == nullptr)
143  return false;
145  return false;
146  if (p->innerTrack()->hitPattern().trackerLayersWithMeasurement() <= cutTL)
147  return false;
148  if (p->innerTrack()->hitPattern().pixelLayersWithMeasurement() <= cutPL)
149  return false;
150  if (hP && !p->innerTrack()->quality(reco::TrackBase::highPurity))
151  return false;
152  if (pv == nullptr)
153  return true;
154  const reco::Vertex::Point& pos = pv->position();
155  if (fabs(p->innerTrack()->dxy(pos)) >= maxXY)
156  return false;
157  if (fabs(p->innerTrack()->dz(pos)) >= maxZ)
158  return false;
159  return true;
160  }
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 165 of file BPHHistoSpecificDecay.cc.

◆ cutTL

int BPHSoftMuonSelect::cutTL
private

Definition at line 164 of file BPHHistoSpecificDecay.cc.

◆ gM

bool BPHSoftMuonSelect::gM
private

Definition at line 168 of file BPHHistoSpecificDecay.cc.

◆ hP

bool BPHSoftMuonSelect::hP
private

Definition at line 169 of file BPHHistoSpecificDecay.cc.

◆ maxXY

float BPHSoftMuonSelect::maxXY
private

Definition at line 166 of file BPHHistoSpecificDecay.cc.

◆ maxZ

float BPHSoftMuonSelect::maxZ
private

Definition at line 167 of file BPHHistoSpecificDecay.cc.

◆ pv

const reco::Vertex* BPHSoftMuonSelect::pv
private

Definition at line 163 of file BPHHistoSpecificDecay.cc.