5 :
debug_(cfg.getUntrackedParameter<bool>(
"debug",
false)) {
7 if (pfCandTypeString ==
"chargedHadron")
9 else if (pfCandTypeString ==
"electron")
11 else if (pfCandTypeString ==
"muon")
13 else if (pfCandTypeString ==
"neutralHadron")
15 else if (pfCandTypeString ==
"photon")
19 <<
"Invalid Configuration parameter 'pfCandType' = '" << pfCandTypeString <<
"' !!\n";
22 if (dzCutString ==
"disabled")
24 else if (dzCutString ==
"enabled_primary")
26 else if (dzCutString ==
"enabled_pileup")
30 <<
"Invalid Configuration parameter 'dzCut' = '" << dzCutString <<
"' !!\n";
42 if (pfCand.
charge() != 0) {
45 double dz = std::fabs(pfCand_track->vertex().z() - primaryVertex_z);
92 float_t primaryVertex_z) {
93 for (
auto qualityCut : qualityCuts) {
94 if (!qualityCut(pfCand, primaryVertex_z))
l1t::PFCandidate::ParticleType pfCandType_
double pt() const final
transverse momentum
bool operator()(const l1t::PFCandidate &pfCand, float_t primaryVertexZ) const
returns true (false) if PFCandidate passes (fails) quality cuts
bool exists(std::string const ¶meterName) const
checks if a parameter exists
l1t::PFCandidate::ParticleType pfCandType() const
accessor functions
const PFTrackRef & pfTrack() const
void addParameter(std::string const &name, T const &value)
std::vector< L1HPSPFTauQualityCut > readL1PFTauQualityCuts(const edm::ParameterSet &cfg, const std::string &dzCut, bool debug=false)
void addUntrackedParameter(std::string const &name, T const &value)
T getParameter(std::string const &) const
bool isSelected(const std::vector< L1HPSPFTauQualityCut > &qualityCuts, const l1t::PFCandidate &pfCand, float_t primaryVertexZ)
L1HPSPFTauQualityCut(const edm::ParameterSet &cfg)
constructor
L1HPSPFTauQualityCut readL1PFTauQualityCut(const edm::ParameterSet &cfg, const std::string &pfCandType, const std::string &dzCut, bool debug)
int charge() const final
electric charge