CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
CandidateSelector Class Reference

#include <CandidateSelector.h>

Public Member Functions

 CandidateSelector (const edm::ParameterSet &iConfig)
 
bool isSelected (susybsm::HSCParticle &candidate)
 

Public Attributes

bool isEcal
 
bool isMTMuon
 
bool isMuon
 
bool isMuonGB
 
bool isMuonSTA
 
bool isMuonTK
 
bool isRpc
 
bool isTrack
 
float maxBetaEcal
 
float maxBetaRpc
 
float maxMuTimeCombinedBeta
 
float maxMuTimeCscBeta
 
float maxMuTimeDtBeta
 
float minDedx
 
float minMTMuonPt
 
float minMuonP
 
float minMuonPt
 
float minMuTimeCombinedNdof
 
float minMuTimeCscNdof
 
float minMuTimeDtNdof
 
float minSAMuonPt
 
int minTrackHits
 
float minTrackP
 
float minTrackPt
 

Detailed Description

Definition at line 18 of file CandidateSelector.h.

Constructor & Destructor Documentation

◆ CandidateSelector()

CandidateSelector::CandidateSelector ( const edm::ParameterSet iConfig)

Definition at line 7 of file CandidateSelector.cc.

7  {
8  isTrack = iConfig.getParameter<bool>("onlyConsiderTrack");
9  isMuon = iConfig.getParameter<bool>("onlyConsiderMuon");
10  isMuonSTA = iConfig.getParameter<bool>("onlyConsiderMuonSTA");
11  isMuonGB = iConfig.getParameter<bool>("onlyConsiderMuonGB");
12  isMuonTK = iConfig.getParameter<bool>("onlyConsiderMuonTK");
13  isMTMuon = iConfig.getParameter<bool>("onlyConsiderMTMuon");
14  isRpc = iConfig.getParameter<bool>("onlyConsiderRpc");
15  isEcal = iConfig.getParameter<bool>("onlyConsiderEcal");
16 
17  minTrackHits = iConfig.getParameter<int>("minTrackHits");
18  minTrackP = iConfig.getParameter<double>("minTrackP");
19  minTrackPt = iConfig.getParameter<double>("minTrackPt");
20 
21  minDedx = iConfig.getParameter<double>("minDedx");
22 
23  minMuonP = iConfig.getParameter<double>("minMuonP");
24  minMuonPt = iConfig.getParameter<double>("minMuonPt");
25  minSAMuonPt = iConfig.getParameter<double>("minMTMuonPt");
26  minMTMuonPt = iConfig.getParameter<double>("minMTMuonPt");
27 
28  maxMuTimeDtBeta = iConfig.getParameter<double>("maxMuTimeDtBeta");
29  minMuTimeDtNdof = iConfig.getParameter<double>("minMuTimeDtNdof");
30  maxMuTimeCscBeta = iConfig.getParameter<double>("maxMuTimeCscBeta");
31  minMuTimeCscNdof = iConfig.getParameter<double>("minMuTimeCscNdof");
32  maxMuTimeCombinedBeta = iConfig.getParameter<double>("maxMuTimeCombinedBeta");
33  minMuTimeCombinedNdof = iConfig.getParameter<double>("minMuTimeCombinedNdof");
34 
35  maxBetaRpc = iConfig.getParameter<double>("maxBetaRpc");
36  maxBetaEcal = iConfig.getParameter<double>("maxBetaEcal");
37 }

References edm::ParameterSet::getParameter(), reco::isMuon(), PFRecoTauChargedHadronQualityPlugins_cfi::isTrack, HSCPSelections_cff::maxBetaEcal, HSCPSelections_cff::maxBetaRpc, HSCPSelections_cff::maxMuTimeCombinedBeta, HSCPSelections_cff::maxMuTimeCscBeta, HSCPSelections_cff::maxMuTimeDtBeta, HSCPSelections_cff::minDedx, HSCPSelections_cff::minMTMuonPt, HSCPSelections_cff::minMuonP, BadChargedCandidateFilter_cfi::minMuonPt, HSCPSelections_cff::minMuTimeCombinedNdof, HSCPSelections_cff::minMuTimeCscNdof, HSCPSelections_cff::minMuTimeDtNdof, HSCPSelections_cff::minSAMuonPt, HLT_2018_cff::minTrackHits, align_cfg::minTrackP, and align_cfg::minTrackPt.

Member Function Documentation

◆ isSelected()

bool CandidateSelector::isSelected ( susybsm::HSCParticle candidate)

Definition at line 39 of file CandidateSelector.cc.

39  {
40  if (isTrack && !candidate.hasTrackRef()) {
41  return false;
42  }
43  if (isMuon && !candidate.hasMuonRef()) {
44  return false;
45  }
46  if (isMuonSTA && (!candidate.hasMuonRef() || candidate.muonRef()->standAloneMuon().isNull())) {
47  return false;
48  }
49  if (isMuonGB && (!candidate.hasMuonRef() || candidate.muonRef()->combinedMuon().isNull())) {
50  return false;
51  }
52  if (isMuonTK && (!candidate.hasMuonRef() || candidate.muonRef()->innerTrack().isNull())) {
53  return false;
54  }
55  if (isMTMuon && !candidate.hasMTMuonRef()) {
56  return false;
57  }
58  if (isRpc && !candidate.hasRpcInfo()) {
59  return false;
60  }
61  if (isEcal && !candidate.hasCaloInfo()) {
62  return false;
63  }
64 
65  if (candidate.hasTrackRef()) {
66  if (candidate.trackRef()->found() < minTrackHits) {
67  return false;
68  }
69  if (candidate.trackRef()->p() < minTrackP) {
70  return false;
71  }
72  if (candidate.trackRef()->pt() < minTrackPt) {
73  return false;
74  }
75 
76  // Need to be implemented using external dE/dx object
77  // if(candidate.hasDedxEstim1() && minDedxEstimator1>=0 && candidate.dedxEstimator1 ().dEdx()<minDedxEstimator1) {return false;}
78  // if(candidate.hasDedxDiscrim1() && minDedxDiscriminator1>=0 && candidate.dedxDiscriminator1().dEdx()<minDedxDiscriminator1){return false;}
79  }
80 
81  if (candidate.hasMuonRef()) {
82  if (candidate.muonRef()->p() < minMuonP) {
83  return false;
84  }
85  if (candidate.muonRef()->pt() < minMuonPt) {
86  return false;
87  }
88 
89  // Need to be implemented using external timing object
90  // if(maxMuTimeDtBeta >=0 && 1.0/candidate.muonTimeDt().inverseBeta() > maxMuTimeDtBeta ){return false;}
91  // if(minMuTimeDtNdof >=0 && 1.0/candidate.muonTimeDt().nDof() < minMuTimeDtNdof ){return false;}
92  // if(maxMuTimeCscBeta >=0 && 1.0/candidate.muonTimeCsc().inverseBeta() > maxMuTimeCscBeta ){return false;}
93  // if(minMuTimeCscNdof >=0 && 1.0/candidate.muonTimeCsc().nDof() < minMuTimeCscNdof ){return false;}
94  // if(maxMuTimeCombinedBeta>=0 && 1.0/candidate.muonTimeCombined().inverseBeta() > maxMuTimeCombinedBeta){return false;}
95  // if(minMuTimeCombinedNdof>=0 && 1.0/candidate.muonTimeCombined().nDof() < minMuTimeCombinedNdof){return false;}
96  }
97 
98  if (candidate.hasRpcInfo() && maxBetaRpc >= 0 && candidate.rpc().beta > maxBetaRpc) {
99  return false;
100  }
101 
102  if (candidate.hasMuonRef() && candidate.muonRef()->isStandAloneMuon()) {
103  if (candidate.muonRef()->standAloneMuon()->pt() < minSAMuonPt) {
104  return false;
105  }
106  }
107 
108  if (candidate.hasMTMuonRef()) {
109  if (!candidate.MTMuonRef()->standAloneMuon().isNull()) {
110  if (candidate.MTMuonRef()->standAloneMuon()->pt() < minMTMuonPt) {
111  return false;
112  }
113  }
114  }
115 
116  // Need to be implemented using external dE/dx object
117  // if(candidate.hasCaloInfo() && maxBetaEcal>=0 && candidate.calo().ecalBeta > maxBetaEcal){return false;}
118 
119  return true;
120 }

References susybsm::RPCBetaMeasurement::beta, susybsm::HSCParticle::hasCaloInfo(), susybsm::HSCParticle::hasMTMuonRef(), susybsm::HSCParticle::hasMuonRef(), susybsm::HSCParticle::hasRpcInfo(), susybsm::HSCParticle::hasTrackRef(), reco::isMuon(), edm::Ref< C, T, F >::isNull(), PFRecoTauChargedHadronQualityPlugins_cfi::isTrack, HSCPSelections_cff::maxBetaRpc, HSCPSelections_cff::minMTMuonPt, HSCPSelections_cff::minMuonP, BadChargedCandidateFilter_cfi::minMuonPt, HSCPSelections_cff::minSAMuonPt, HLT_2018_cff::minTrackHits, align_cfg::minTrackP, align_cfg::minTrackPt, susybsm::HSCParticle::MTMuonRef(), susybsm::HSCParticle::muonRef(), susybsm::HSCParticle::rpc(), and susybsm::HSCParticle::trackRef().

Member Data Documentation

◆ isEcal

bool CandidateSelector::isEcal

Definition at line 30 of file CandidateSelector.h.

◆ isMTMuon

bool CandidateSelector::isMTMuon

Definition at line 28 of file CandidateSelector.h.

◆ isMuon

bool CandidateSelector::isMuon

Definition at line 24 of file CandidateSelector.h.

◆ isMuonGB

bool CandidateSelector::isMuonGB

Definition at line 26 of file CandidateSelector.h.

◆ isMuonSTA

bool CandidateSelector::isMuonSTA

Definition at line 25 of file CandidateSelector.h.

◆ isMuonTK

bool CandidateSelector::isMuonTK

Definition at line 27 of file CandidateSelector.h.

◆ isRpc

bool CandidateSelector::isRpc

Definition at line 29 of file CandidateSelector.h.

◆ isTrack

bool CandidateSelector::isTrack

Definition at line 23 of file CandidateSelector.h.

◆ maxBetaEcal

float CandidateSelector::maxBetaEcal

Definition at line 50 of file CandidateSelector.h.

◆ maxBetaRpc

float CandidateSelector::maxBetaRpc

Definition at line 49 of file CandidateSelector.h.

◆ maxMuTimeCombinedBeta

float CandidateSelector::maxMuTimeCombinedBeta

Definition at line 46 of file CandidateSelector.h.

◆ maxMuTimeCscBeta

float CandidateSelector::maxMuTimeCscBeta

Definition at line 44 of file CandidateSelector.h.

◆ maxMuTimeDtBeta

float CandidateSelector::maxMuTimeDtBeta

Definition at line 42 of file CandidateSelector.h.

◆ minDedx

float CandidateSelector::minDedx

Definition at line 35 of file CandidateSelector.h.

◆ minMTMuonPt

float CandidateSelector::minMTMuonPt

Definition at line 40 of file CandidateSelector.h.

◆ minMuonP

float CandidateSelector::minMuonP

Definition at line 37 of file CandidateSelector.h.

◆ minMuonPt

float CandidateSelector::minMuonPt

Definition at line 38 of file CandidateSelector.h.

◆ minMuTimeCombinedNdof

float CandidateSelector::minMuTimeCombinedNdof

Definition at line 47 of file CandidateSelector.h.

◆ minMuTimeCscNdof

float CandidateSelector::minMuTimeCscNdof

Definition at line 45 of file CandidateSelector.h.

◆ minMuTimeDtNdof

float CandidateSelector::minMuTimeDtNdof

Definition at line 43 of file CandidateSelector.h.

◆ minSAMuonPt

float CandidateSelector::minSAMuonPt

Definition at line 39 of file CandidateSelector.h.

◆ minTrackHits

int CandidateSelector::minTrackHits

Definition at line 32 of file CandidateSelector.h.

◆ minTrackP

float CandidateSelector::minTrackP

Definition at line 33 of file CandidateSelector.h.

◆ minTrackPt

float CandidateSelector::minTrackPt

Definition at line 34 of file CandidateSelector.h.

susybsm::HSCParticle::hasMuonRef
bool hasMuonRef() const
Definition: HSCParticle.h:48
edm::Ref::isNull
bool isNull() const
Checks for null.
Definition: Ref.h:235
susybsm::HSCParticle::rpc
const RPCBetaMeasurement & rpc() const
Definition: HSCParticle.h:69
CandidateSelector::minMuTimeCscNdof
float minMuTimeCscNdof
Definition: CandidateSelector.h:45
CandidateSelector::minMuTimeCombinedNdof
float minMuTimeCombinedNdof
Definition: CandidateSelector.h:47
CandidateSelector::isMTMuon
bool isMTMuon
Definition: CandidateSelector.h:28
susybsm::HSCParticle::MTMuonRef
reco::MuonRef MTMuonRef() const
Definition: HSCParticle.h:67
susybsm::HSCParticle::hasRpcInfo
bool hasRpcInfo() const
Definition: HSCParticle.h:52
susybsm::RPCBetaMeasurement::beta
float beta
Definition: HSCParticle.h:34
susybsm::HSCParticle::hasCaloInfo
bool hasCaloInfo() const
Definition: HSCParticle.h:53
CandidateSelector::minTrackP
float minTrackP
Definition: CandidateSelector.h:33
CandidateSelector::isMuon
bool isMuon
Definition: CandidateSelector.h:24
CandidateSelector::minTrackPt
float minTrackPt
Definition: CandidateSelector.h:34
CandidateSelector::minMTMuonPt
float minMTMuonPt
Definition: CandidateSelector.h:40
CandidateSelector::minMuonP
float minMuonP
Definition: CandidateSelector.h:37
CandidateSelector::isEcal
bool isEcal
Definition: CandidateSelector.h:30
CandidateSelector::maxMuTimeDtBeta
float maxMuTimeDtBeta
Definition: CandidateSelector.h:42
susybsm::HSCParticle::hasTrackRef
bool hasTrackRef() const
Definition: HSCParticle.h:50
CandidateSelector::isMuonTK
bool isMuonTK
Definition: CandidateSelector.h:27
CandidateSelector::maxMuTimeCombinedBeta
float maxMuTimeCombinedBeta
Definition: CandidateSelector.h:46
CandidateSelector::maxMuTimeCscBeta
float maxMuTimeCscBeta
Definition: CandidateSelector.h:44
susybsm::HSCParticle::muonRef
reco::MuonRef muonRef() const
Definition: HSCParticle.h:66
CandidateSelector::isTrack
bool isTrack
Definition: CandidateSelector.h:23
susybsm::HSCParticle::hasMTMuonRef
bool hasMTMuonRef() const
Definition: HSCParticle.h:49
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CandidateSelector::minMuTimeDtNdof
float minMuTimeDtNdof
Definition: CandidateSelector.h:43
CandidateSelector::minMuonPt
float minMuonPt
Definition: CandidateSelector.h:38
susybsm::HSCParticle::trackRef
reco::TrackRef trackRef() const
Definition: HSCParticle.h:64
CandidateSelector::minTrackHits
int minTrackHits
Definition: CandidateSelector.h:32
CandidateSelector::maxBetaRpc
float maxBetaRpc
Definition: CandidateSelector.h:49
CandidateSelector::isRpc
bool isRpc
Definition: CandidateSelector.h:29
CandidateSelector::maxBetaEcal
float maxBetaEcal
Definition: CandidateSelector.h:50
CandidateSelector::isMuonSTA
bool isMuonSTA
Definition: CandidateSelector.h:25
CandidateSelector::minSAMuonPt
float minSAMuonPt
Definition: CandidateSelector.h:39
CandidateSelector::isMuonGB
bool isMuonGB
Definition: CandidateSelector.h:26
CandidateSelector::minDedx
float minDedx
Definition: CandidateSelector.h:35