Main Page
Namespaces
Classes
Package Documentation
src
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
isMTMuon = iConfig.
getParameter
<
bool
> (
"onlyConsiderMTMuon"
);
17
isRpc = iConfig.
getParameter
<
bool
> (
"onlyConsiderRpc"
);
18
isEcal = iConfig.
getParameter
<
bool
> (
"onlyConsiderEcal"
);
19
20
minTrackHits
= iConfig.
getParameter
<
int
> (
"minTrackHits"
);
21
minTrackP
= iConfig.
getParameter
<
double
> (
"minTrackP"
);
22
minTrackPt
= iConfig.
getParameter
<
double
> (
"minTrackPt"
);
23
24
minDedx
= iConfig.
getParameter
<
double
> (
"minDedx"
);
25
26
minMuonP
= iConfig.
getParameter
<
double
> (
"minMuonP"
);
27
minMuonPt
= iConfig.
getParameter
<
double
> (
"minMuonPt"
);
28
minSAMuonPt
= iConfig.
getParameter
<
double
> (
"minMTMuonPt"
);
29
minMTMuonPt
= iConfig.
getParameter
<
double
> (
"minMTMuonPt"
);
30
31
maxMuTimeDtBeta
= iConfig.
getParameter
<
double
> (
"maxMuTimeDtBeta"
);
32
minMuTimeDtNdof
= iConfig.
getParameter
<
double
> (
"minMuTimeDtNdof"
);
33
maxMuTimeCscBeta
= iConfig.
getParameter
<
double
> (
"maxMuTimeCscBeta"
);
34
minMuTimeCscNdof
= iConfig.
getParameter
<
double
> (
"minMuTimeCscNdof"
);
35
maxMuTimeCombinedBeta
= iConfig.
getParameter
<
double
> (
"maxMuTimeCombinedBeta"
);
36
minMuTimeCombinedNdof
= iConfig.
getParameter
<
double
> (
"minMuTimeCombinedNdof"
);
37
38
maxBetaRpc
= iConfig.
getParameter
<
double
> (
"maxBetaRpc"
);
39
maxBetaEcal
= iConfig.
getParameter
<
double
> (
"maxBetaEcal"
);
40
}
41
42
43
bool
CandidateSelector::isSelected
(
HSCParticle
& candidate)
44
{
45
if
(
isTrack
&& !candidate.
hasTrackRef
()){
return
false
;}
46
if
(
isMuon
&& !candidate.
hasMuonRef
() ){
return
false
;}
47
if
(isMuonSTA && (!candidate.
hasMuonRef
() || candidate.
muonRef
()->standAloneMuon().
isNull
()) ){
return
false
;}
48
if
(isMuonGB && (!candidate.
hasMuonRef
() || candidate.
muonRef
()->combinedMuon ().
isNull
()) ){
return
false
;}
49
if
(isMuonTK && (!candidate.
hasMuonRef
() || candidate.
muonRef
()->innerTrack ().
isNull
()) ){
return
false
;}
50
if
(isMTMuon && !candidate.
hasMTMuonRef
() ){
return
false
;}
51
if
(isRpc && !candidate.
hasRpcInfo
() ){
return
false
;}
52
if
(isEcal && !candidate.
hasCaloInfo
()){
return
false
;}
53
54
if
(candidate.
hasTrackRef
()){
55
if
(candidate.
trackRef
()->found() <
minTrackHits
){
return
false
;}
56
if
(candidate.
trackRef
()->p() <
minTrackP
){
return
false
;}
57
if
(candidate.
trackRef
()->pt() <
minTrackPt
){
return
false
;}
58
59
// Need to be implemented using external dE/dx object
60
// if(candidate.hasDedxEstim1() && minDedxEstimator1>=0 && candidate.dedxEstimator1 ().dEdx()<minDedxEstimator1) {return false;}
61
// if(candidate.hasDedxDiscrim1() && minDedxDiscriminator1>=0 && candidate.dedxDiscriminator1().dEdx()<minDedxDiscriminator1){return false;}
62
}
63
64
if
(candidate.
hasMuonRef
()){
65
if
(candidate.
muonRef
()->p() <
minMuonP
){
return
false
;}
66
if
(candidate.
muonRef
()->pt() <
minMuonPt
){
return
false
;}
67
68
// Need to be implemented using external timing object
69
// if(maxMuTimeDtBeta >=0 && 1.0/candidate.muonTimeDt().inverseBeta() > maxMuTimeDtBeta ){return false;}
70
// if(minMuTimeDtNdof >=0 && 1.0/candidate.muonTimeDt().nDof() < minMuTimeDtNdof ){return false;}
71
// if(maxMuTimeCscBeta >=0 && 1.0/candidate.muonTimeCsc().inverseBeta() > maxMuTimeCscBeta ){return false;}
72
// if(minMuTimeCscNdof >=0 && 1.0/candidate.muonTimeCsc().nDof() < minMuTimeCscNdof ){return false;}
73
// if(maxMuTimeCombinedBeta>=0 && 1.0/candidate.muonTimeCombined().inverseBeta() > maxMuTimeCombinedBeta){return false;}
74
// if(minMuTimeCombinedNdof>=0 && 1.0/candidate.muonTimeCombined().nDof() < minMuTimeCombinedNdof){return false;}
75
}
76
77
if
(candidate.
hasRpcInfo
() &&
maxBetaRpc
>=0 && candidate.
rpc
().
beta
>
maxBetaRpc
){
return
false
;}
78
79
if
(candidate.
hasMuonRef
() && candidate.
muonRef
()->isStandAloneMuon()) {
80
if
(candidate.
muonRef
()->standAloneMuon()->pt() <
minSAMuonPt
){
return
false
;}
81
}
82
83
if
(candidate.
hasMTMuonRef
()){
84
if
(!candidate.
MTMuonRef
()->standAloneMuon().
isNull
()){
85
if
(candidate.
MTMuonRef
()->standAloneMuon()->pt() <
minMTMuonPt
){
return
false
;}
86
}
87
}
88
89
// Need to be implemented using external dE/dx object
90
// if(candidate.hasCaloInfo() && maxBetaEcal>=0 && candidate.calo().ecalBeta > maxBetaEcal){return false;}
91
92
return
true
;
93
}
94
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
HSCPSelections_cff.minMuonP
minMuonP
Definition:
HSCPSelections_cff.py:21
susybsm
Definition:
HSCParticle.h:16
HSCPSelections_cff.minDedx
minDedx
Definition:
HSCPSelections_cff.py:19
align_cfg.minTrackP
minTrackP
Definition:
align_cfg.py:24
align_cfg.minTrackPt
minTrackPt
Definition:
align_cfg.py:22
CandidateSelector.h
susybsm::HSCParticle::hasTrackRef
bool hasTrackRef() const
Definition:
HSCParticle.h:57
susybsm::RPCBetaMeasurement::beta
float beta
Definition:
HSCParticle.h:39
HPSPFTaus_cff.minTrackHits
minTrackHits
Definition:
HPSPFTaus_cff.py:176
HSCPSelections_cff.minMuTimeCscNdof
minMuTimeCscNdof
Definition:
HSCPSelections_cff.py:29
susybsm::HSCParticle::MTMuonRef
reco::MuonRef MTMuonRef() const
Definition:
HSCParticle.h:75
susybsm::HSCParticle::hasMTMuonRef
bool hasMTMuonRef() const
Definition:
HSCParticle.h:56
HSCPSelections_cff.minMuonPt
minMuonPt
Definition:
HSCPSelections_cff.py:22
edm::Ref::isNull
bool isNull() const
Checks for null.
Definition:
Ref.h:248
HSCPSelections_cff.maxBetaEcal
maxBetaEcal
Definition:
HSCPSelections_cff.py:34
PFRecoTauChargedHadronQualityPlugins_cfi.isTrack
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
HSCPSelections_cff.minMTMuonPt
minMTMuonPt
Definition:
HSCPSelections_cff.py:23
HSCPSelections_cff.maxBetaRpc
maxBetaRpc
Definition:
HSCPSelections_cff.py:33
HSCPSelections_cff.maxMuTimeCscBeta
maxMuTimeCscBeta
Definition:
HSCPSelections_cff.py:28
susybsm::HSCParticle::trackRef
reco::TrackRef trackRef() const
Definition:
HSCParticle.h:72
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:44
edm
HLT enums.
Definition:
AlignableModifier.h:17
susybsm::HSCParticle::hasRpcInfo
bool hasRpcInfo() const
Definition:
HSCParticle.h:59
HSCPSelections_cff.minSAMuonPt
minSAMuonPt
Definition:
HSCPSelections_cff.py:24
edm::ParameterSet
Definition:
ParameterSet.h:36
HSCPSelections_cff.minMuTimeDtNdof
minMuTimeDtNdof
Definition:
HSCPSelections_cff.py:27
HSCPSelections_cff.minMuTimeCombinedNdof
minMuTimeCombinedNdof
Definition:
HSCPSelections_cff.py:31
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:43
HSCPSelections_cff.maxMuTimeCombinedBeta
maxMuTimeCombinedBeta
Definition:
HSCPSelections_cff.py:30
HSCPSelections_cff.maxMuTimeDtBeta
maxMuTimeDtBeta
Definition:
HSCPSelections_cff.py:26
Generated for CMSSW Reference Manual by
1.8.11