|
|
Go to the documentation of this file.
11 : signalConeSizeFormula_(
12 std::regex_replace(
cfg.getParameter<
std::
string>(
"signalConeSize"),
std::regex(
"pt"),
"x")),
13 minSignalConeSize_(
cfg.getParameter<double>(
"minSignalConeSize")),
14 maxSignalConeSize_(
cfg.getParameter<double>(
"maxSignalConeSize")),
15 useStrips_(
cfg.getParameter<
bool>(
"useStrips")),
16 stripSizeEta_(
cfg.getParameter<double>(
"stripSizeEta")),
17 stripSizePhi_(
cfg.getParameter<double>(
"stripSizePhi")),
18 isolationConeSize_(
cfg.getParameter<double>(
"isolationConeSize")),
19 debug_(
cfg.getUntrackedParameter<
bool>(
"debug",
false)) {
25 std::cout <<
"setting Quality cuts for signal PFCands:" << std::endl;
31 std::cout <<
"setting Quality cuts for isolation PFCands:" << std::endl;
94 std::cout <<
"<L1HPSPFTauBuilder::setL1PFTauSeed>:" << std::endl;
95 std::cout <<
"seeding HPSPFTau with ChargedPFCand:";
102 if (l1PFCandSeed->charge() != 0 && l1PFCandSeed->pfTrack().
isNonnull()) {
148 const std::vector<l1t::PFCandidateRef>& l1PFCands) {
150 std::cout <<
"<L1HPSPFTauBuilder::setL1PFTauSeed>:" << std::endl;
151 std::cout <<
"seeding HPSPFTau with Jet:";
152 std::cout <<
" pT = " << l1JetSeed->pt() <<
", eta = " << l1JetSeed->eta() <<
", phi = " << l1JetSeed->phi()
158 float l1PFTauSeedZVtx = 0.;
159 bool l1PFTauSeed_hasVtx =
false;
160 float max_chargedPFCand_pt = -1.;
161 for (
const auto& l1PFCand : l1PFCands) {
162 double dR =
reco::deltaR(l1PFCand->eta(), l1PFCand->phi(), l1JetSeed->eta(), l1JetSeed->phi());
167 l1PFTauSeed_p4 += l1PFCand->p4();
168 if (l1PFCand->charge() != 0 && l1PFCand->pfTrack().isNonnull() && l1PFCand->pt() > max_chargedPFCand_pt) {
169 l1PFTauSeedZVtx = l1PFCand->pfTrack()->vertex().z();
170 l1PFTauSeed_hasVtx =
true;
171 max_chargedPFCand_pt = l1PFCand->pt();
175 if (l1PFTauSeed_p4.pt() > 1. && l1PFTauSeed_hasVtx) {
185 std::cout <<
"<L1HPSPFTauBuilder::addL1PFCandidates>:" << std::endl;
194 for (
const auto& l1PFCand : l1PFCands) {
214 std::vector<double> emptyV;
215 std::vector<double> sumAllL1PFCandidatesPt(1);
231 bool isSignalPFCand =
false;
232 bool isStripPFCand =
false;
233 bool isElectron_or_Photon =
237 isSignalPFCand =
true;
241 isSignalPFCand =
true;
243 isStripPFCand =
true;
246 if (isSignalPFCand && passesSignalQualityCuts) {
260 if (isStripPFCand && passesSignalQualityCuts) {
274 if (isIsolationPFCand && passesIsolationQualityCuts) {
291 <<
" isSignalPFCand = " << isSignalPFCand <<
", isStripPFCand = " << isStripPFCand
292 <<
" (passesSignalQualityCuts = " << passesSignalQualityCuts <<
"),"
293 <<
" isIsolationPFCand = " << isIsolationPFCand
294 <<
" (passesIsolationQualityCuts = " << passesIsolationQualityCuts <<
")" << std::endl;
298 for (
const auto& l1PFCand : l1PFCands) {
344 l1PFTau_p4 += l1PFCand->p4();
345 if (l1PFCand->charge() != 0 &&
401 double sumChargedIso = 0.;
402 double sumNeutralIso = 0.;
404 if (l1PFCand->charge() != 0) {
405 sumChargedIso += l1PFCand->pt();
407 sumNeutralIso += l1PFCand->pt();
412 const double weightNeutralIso = 1.;
413 const double offsetNeutralIso = 0.;
433 for (
const auto& l1PFCand : l1PFCands) {
436 return l1PFCandsRefVector;
void setVertex(const l1t::TkPrimaryVertexRef &primaryVertex)
double sumChargedIsoPileup_
std::vector< L1HPSPFTauQualityCut > signalQualityCutsDzCutEnabledPrimary_
void setSumAllL1PFCandidatesPt(float sumAllL1PFCandidatesPt)
void setLeadChargedPFCand(l1t::PFCandidateRef leadChargedPFCand)
l1t::PFCandidateRef l1PFCandSeed_
void setSumChargedIsoPileup(float sumChargedIsoPileup)
reco::Particle::LorentzVector stripP4_
std::vector< L1HPSPFTauQualityCut > isolationQualityCutsDzCutDisabled_
std::vector< l1t::PFCandidateRef > sumChargedHadrons_
bool isNull() const
Checks for null.
void setIsoAllL1PFCandidates(l1t::PFCandidateRefVector isoAllL1PFCandidates)
void setIsoElectrons(l1t::PFCandidateRefVector isoElectrons)
void setIsoPhotons(l1t::PFCandidateRefVector isoPhotons)
void setSignalChargedHadrons(l1t::PFCandidateRefVector signalChargedHadrons)
void setSumPhotons(l1t::PFCandidateRefVector sumPhotons)
std::vector< l1t::PFCandidateRef > isoMuons_
void setPrimaryVertex(l1t::TkPrimaryVertexRef primaryVertex)
std::vector< L1HPSPFTauQualityCut > isolationQualityCutsDzCutEnabledPrimary_
void setSumNeutralIso(float sumNeutralIso)
bool isSelected(const std::vector< L1HPSPFTauQualityCut > &qualityCuts, const l1t::PFCandidate &pfCand, float_t primaryVertexZ)
void setIsoChargedHadrons(l1t::PFCandidateRefVector isoChargedHadrons)
bool isWithinSignalCone(const l1t::PFCandidate &l1PFCand)
void addL1PFCandidates(const std::vector< l1t::PFCandidateRef > &l1PFCands)
edm::ProductID l1PFCandProductID_
reco::FormulaEvaluator signalConeSizeFormula_
L1HPSPFTauBuilder(const edm::ParameterSet &cfg)
std::vector< l1t::PFCandidateRef > stripPhotons_
void setSumAllL1PFCandidates(l1t::PFCandidateRefVector sumAllL1PFCandidates)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::vector< l1t::PFCandidateRef > stripAllL1PFCandidates_
void setSumChargedIso(float sumChargedIso)
std::vector< l1t::PFCandidateRef > signalChargedHadrons_
primaryVertex
hltOfflineBeamSpot for HLTMON
void setPassMediumIso(bool passMediumIso)
std::vector< l1t::PFCandidateRef > isoNeutralHadrons_
void setSignalConeSize(float signalConeSize)
void setSumNeutralHadrons(l1t::PFCandidateRefVector sumNeutralHadrons)
static const double deltaEta
edm::Ref< l1t::PFCandidateCollection > PFCandidateRef
void setPassVLooseIso(bool passVLooseIso)
void setL1PFTauSeed(const l1t::PFCandidateRef &l1PFCandSeed)
std::vector< l1t::PFCandidateRef > signalNeutralHadrons_
float sumChargedIso() const
void setSignalAllL1PFCandidates(l1t::PFCandidateRefVector signalAllL1PFCandidates)
edm::Ref< TkPrimaryVertexCollection > TkPrimaryVertexRef
void setStripPhotons(l1t::PFCandidateRefVector stripPhotons)
l1t::PFCandidateRefVector convertToRefVector(const std::vector< l1t::PFCandidateRef > &l1PFCands)
void setTauType(Kind tauType)
void setSumCombinedIso(float sumCombinedIso)
std::vector< l1t::PFCandidateRef > sumAllL1PFCandidates_
std::vector< l1t::PFCandidateRef > isoChargedHadrons_
bool isWithinStrip(const l1t::PFCandidate &l1PFCand)
void setSignalNeutralHadrons(l1t::PFCandidateRefVector signalNeutralHadrons)
void setStripAllL1PFCandidates(l1t::PFCandidateRefVector stripAllL1PFCandidates)
std::vector< L1HPSPFTauQualityCut > signalQualityCutsDzCutDisabled_
std::vector< l1t::PFCandidateRef > sumElectrons_
std::vector< l1t::PFCandidateRef > stripElectrons_
std::vector< l1t::PFCandidateRef > sumPhotons_
double eta() const final
momentum pseudorapidity
void setSumChargedHadrons(l1t::PFCandidateRefVector sumChargedHadrons)
bool isNonnull() const
Checks for non-null.
std::vector< l1t::PFCandidateRef > isoAllL1PFCandidates_
std::vector< L1HPSPFTauQualityCut > isolationQualityCutsDzCutEnabledPileup_
void setPassTightIso(bool passTightIso)
std::vector< l1t::PFCandidateRef > isoPhotons_
bool isWithinIsolationCone(const l1t::PFCandidate &l1PFCand)
void setSeedJet(reco::CaloJetRef seedJet)
void setisolationConeSize(float isolationConeSize)
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
void setSignalPhotons(l1t::PFCandidateRefVector signalPhotons)
std::vector< L1HPSPFTauQualityCut > readL1PFTauQualityCuts(const edm::ParameterSet &cfg, const std::string &dzCut, bool debug=false)
std::vector< l1t::PFCandidateRef > signalElectrons_
void setIsoMuons(l1t::PFCandidateRefVector isoMuons)
reco::CaloJetRef l1JetSeed_
std::vector< l1t::PFCandidateRef > isoElectrons_
void setStripElectrons(l1t::PFCandidateRefVector stripElectrons)
void setP4(const LorentzVector &p4) final
set 4-momentum
void setSignalElectrons(l1t::PFCandidateRefVector signalElectrons)
void setIsoNeutralHadrons(l1t::PFCandidateRefVector isoNeutralHadrons)
double phi() const final
momentum azimuthal angle
l1t::TkPrimaryVertexRef primaryVertex_
void printPFCand(ostream &os, const l1t::PFCandidate &l1PFCand, const l1t::TkPrimaryVertexRef &primaryVertex)
std::vector< l1t::PFCandidateRef > signalPhotons_
const l1t::PFCandidateRef & leadChargedPFCand() const
void setPassLooseIso(bool passLooseIso)
double minSignalConeSize_
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
double isolationConeSize_
edm::Ref< CaloJetCollection > CaloJetRef
edm references
const l1t::PFCandidateRefVector & signalChargedHadrons() const
void setSumMuons(l1t::PFCandidateRefVector sumMuons)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
void setSignalMuons(l1t::PFCandidateRefVector signalMuons)
std::vector< l1t::PFCandidateRef > sumNeutralHadrons_
size_type size() const
Size of the RefVector.
std::vector< l1t::PFCandidateRef > sumMuons_
void setSumElectrons(l1t::PFCandidateRefVector sumElectrons)
double sumAllL1PFCandidatesPt_
void setSeedChargedPFCand(l1t::PFCandidateRef seedChargedPFCand)
double maxSignalConeSize_
std::vector< l1t::PFCandidateRef > signalMuons_
void setStripP4(reco::Particle::LorentzVector &stripP4)
void setL1PFCandProductID(const edm::ProductID &l1PFCandProductID)
std::vector< l1t::PFCandidateRef > signalAllL1PFCandidates_
double isolationConeSize2_