Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
SUSYBSMAnalysis
HSCP
src
CandidateSelector.cc
Go to the documentation of this file.
1
#include "
SUSYBSMAnalysis/HSCP/interface/CandidateSelector.h
"
2
3
using namespace
edm;
4
using namespace
reco
;
5
using namespace
susybsm;
6
7
8
9
10
CandidateSelector::CandidateSelector
(
const
edm::ParameterSet
& iConfig){
11
isTrack
= iConfig.
getParameter
<
bool
> (
"onlyConsiderTrack"
);
12
isMuon
= iConfig.
getParameter
<
bool
> (
"onlyConsiderMuon"
);
13
isMuonSTA = iConfig.
getParameter
<
bool
> (
"onlyConsiderMuonSTA"
);
14
isMuonGB = iConfig.
getParameter
<
bool
> (
"onlyConsiderMuonGB"
);
15
isMuonTK = iConfig.
getParameter
<
bool
> (
"onlyConsiderMuonTK"
);
16
isRpc = iConfig.
getParameter
<
bool
> (
"onlyConsiderRpc"
);
17
isEcal = iConfig.
getParameter
<
bool
> (
"onlyConsiderEcal"
);
18
19
minTrackHits = iConfig.
getParameter
<
int
> (
"minTrackHits"
);
20
minTrackP
= iConfig.
getParameter
<
double
> (
"minTrackP"
);
21
minTrackPt
= iConfig.
getParameter
<
double
> (
"minTrackPt"
);
22
23
minDedx = iConfig.
getParameter
<
double
> (
"minDedx"
);
24
25
minMuonP = iConfig.
getParameter
<
double
> (
"minMuonP"
);
26
minMuonPt = iConfig.
getParameter
<
double
> (
"minMuonPt"
);
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
}
38
39
40
bool
CandidateSelector::isSelected
(
HSCParticle
& candidate)
41
{
42
if
(
isTrack
&& !candidate.
hasTrackRef
()){
return
false
;}
43
if
(
isMuon
&& !candidate.
hasMuonRef
() ){
return
false
;}
44
if
(isMuonSTA && (!candidate.
hasMuonRef
() || candidate.
muonRef
()->standAloneMuon().
isNull
()) ){
return
false
;}
45
if
(isMuonGB && (!candidate.
hasMuonRef
() || candidate.
muonRef
()->combinedMuon ().
isNull
()) ){
return
false
;}
46
if
(isMuonTK && (!candidate.
hasMuonRef
() || candidate.
muonRef
()->innerTrack ().
isNull
()) ){
return
false
;}
47
if
(isRpc && !candidate.
hasRpcInfo
() ){
return
false
;}
48
if
(isEcal && !candidate.
hasCaloInfo
()){
return
false
;}
49
50
if
(candidate.
hasTrackRef
()){
51
if
(candidate.
trackRef
()->found() < minTrackHits){
return
false
;}
52
if
(candidate.
trackRef
()->p() <
minTrackP
){
return
false
;}
53
if
(candidate.
trackRef
()->pt() <
minTrackPt
){
return
false
;}
54
55
// Need to be implemented using external dE/dx object
56
// if(candidate.hasDedxEstim1() && minDedxEstimator1>=0 && candidate.dedxEstimator1 ().dEdx()<minDedxEstimator1) {return false;}
57
// if(candidate.hasDedxDiscrim1() && minDedxDiscriminator1>=0 && candidate.dedxDiscriminator1().dEdx()<minDedxDiscriminator1){return false;}
58
}
59
60
if
(candidate.
hasMuonRef
()){
61
if
(candidate.
muonRef
()->p() < minMuonP ){
return
false
;}
62
if
(candidate.
muonRef
()->pt() < minMuonPt ){
return
false
;}
63
64
// Need to be implemented using external timing object
65
// if(maxMuTimeDtBeta >=0 && 1.0/candidate.muonTimeDt().inverseBeta() > maxMuTimeDtBeta ){return false;}
66
// if(minMuTimeDtNdof >=0 && 1.0/candidate.muonTimeDt().nDof() < minMuTimeDtNdof ){return false;}
67
// if(maxMuTimeCscBeta >=0 && 1.0/candidate.muonTimeCsc().inverseBeta() > maxMuTimeCscBeta ){return false;}
68
// if(minMuTimeCscNdof >=0 && 1.0/candidate.muonTimeCsc().nDof() < minMuTimeCscNdof ){return false;}
69
// if(maxMuTimeCombinedBeta>=0 && 1.0/candidate.muonTimeCombined().inverseBeta() > maxMuTimeCombinedBeta){return false;}
70
// if(minMuTimeCombinedNdof>=0 && 1.0/candidate.muonTimeCombined().nDof() < minMuTimeCombinedNdof){return false;}
71
}
72
73
if
(candidate.
hasRpcInfo
() && maxBetaRpc>=0 && candidate.
rpc
().
beta
> maxBetaRpc ){
return
false
;}
74
75
// Need to be implemented using external dE/dx object
76
// if(candidate.hasCaloInfo() && maxBetaEcal>=0 && candidate.calo().ecalBeta > maxBetaEcal){return false;}
77
78
return
true
;
79
}
80
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
susybsm::HSCParticle
Definition:
HSCParticle.h:48
reco::isMuon
bool isMuon(const Candidate &part)
Definition:
pdgIdUtils.h:11
susybsm::HSCParticle::rpc
const RPCBetaMeasurement & rpc() const
Definition:
HSCParticle.h:77
CandidateSelector.h
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:107
susybsm::HSCParticle::hasTrackRef
bool hasTrackRef() const
Definition:
HSCParticle.h:57
susybsm::RPCBetaMeasurement::beta
float beta
Definition:
HSCParticle.h:39
edm::Ref::isNull
bool isNull() const
Checks for null.
Definition:
Ref.h:247
align_cfg.minTrackPt
tuple minTrackPt
Definition:
align_cfg.py:22
PFRecoTauChargedHadronQualityPlugins_cfi.isTrack
tuple isTrack
Definition:
PFRecoTauChargedHadronQualityPlugins_cfi.py:20
susybsm::HSCParticle::muonRef
reco::MuonRef muonRef() const
Definition:
HSCParticle.h:74
CandidateSelector::CandidateSelector
CandidateSelector(const edm::ParameterSet &iConfig)
Definition:
CandidateSelector.cc:10
susybsm::HSCParticle::trackRef
reco::TrackRef trackRef() const
Definition:
HSCParticle.h:72
susybsm::HSCParticle::hasRpcInfo
bool hasRpcInfo() const
Definition:
HSCParticle.h:59
align_cfg.minTrackP
tuple minTrackP
Definition:
align_cfg.py:24
edm::ParameterSet
Definition:
ParameterSet.h:35
susybsm::HSCParticle::hasMuonRef
bool hasMuonRef() const
Definition:
HSCParticle.h:55
susybsm::HSCParticle::hasCaloInfo
bool hasCaloInfo() const
Definition:
HSCParticle.h:60
CandidateSelector::isSelected
bool isSelected(susybsm::HSCParticle &candidate)
Definition:
CandidateSelector.cc:40
Generated for CMSSW Reference Manual by
1.8.5