105 template <
typename T,
typename U>
107 if (not oCache.
isSet()) {
109 auto temp = std::make_unique<U>();
110 temp->reserve(iFrom.size());
111 for (
auto const& ref : iFrom) {
112 temp->push_back(*ref);
118 template <
typename T>
120 if (not oCache.
isSet()) {
121 oCache.
set(std::make_unique<T>());
126 template <
typename T>
135 if (pf_cand !=
nullptr) {
136 return std::make_unique<reco::PFCandidatePtr>(ptr);
139 <<
"This PFTau was not made from PFCandidates, but it is being tried to access a PFCandidate.\n";
141 return std::make_unique<reco::PFCandidatePtr>();
144 std::unique_ptr<std::vector<reco::PFCandidatePtr> > convertToPFPtrs(
const std::vector<reco::CandidatePtr>&
cands) {
145 std::unique_ptr<std::vector<reco::PFCandidatePtr> > newSignalPFCands{
new std::vector<reco::PFCandidatePtr>{}};
151 if (pf_cand !=
nullptr) {
153 newSignalPFCands->reserve(
cands.size());
156 <<
"This PFTau was not made from PFCandidates, but it is being tried to access PFCandidates.\n";
159 newSignalPFCands->push_back(newPtr);
161 return newSignalPFCands;
400 out <<
"Its TauTagInfo constituents :" << std::endl;
402 out <<
"# PF charged hadr. cand's " <<
pfTauTagInfoRef()->PFChargedHadrCands().size() << std::endl;
403 out <<
"# PF neutral hadr. cand's " <<
pfTauTagInfoRef()->PFNeutrHadrCands().size() << std::endl;
406 out <<
"in detail :" << std::endl;
408 out <<
"Pt of the PFTau " <<
pt() << std::endl;
411 out <<
"No Lead Cand " << std::endl;
413 out <<
"Lead Cand PDG Id " << (*theLeadCand).pdgId() << std::endl;
414 out <<
"Lead Cand Pt " << (*theLeadCand).pt() << std::endl;
415 out <<
"Lead Cand Charge " << (*theLeadCand).charge() << std::endl;
416 out <<
"Inner point position (x,y,z) of the PFTau (" <<
vx() <<
"," <<
vy() <<
"," <<
vz() <<
")" << std::endl;
417 out <<
"Charge of the PFTau " <<
charge() << std::endl;
423 out <<
"Sum of Pt of charged hadr. PFCandidates in isolation annulus around Lead PF = " 425 out <<
"Sum of Et of gamma PFCandidates in other isolation annulus around Lead PF = " 435 out << std::setprecision(3) <<
"PFTau " 436 <<
" charge: " <<
tau.charge() <<
" " 437 <<
" pt:" <<
tau.pt() <<
" " 438 <<
" eta:" <<
tau.eta() <<
" " 439 <<
" phi:" <<
tau.phi() <<
" " 440 <<
" mass:" <<
tau.mass() <<
" " 441 <<
" dm: " <<
tau.decayMode() <<
" " <<
tau.signalCands().size() <<
"," <<
tau.signalChargedHadrCands().size()
442 <<
"," <<
tau.signalGammaCands().size() <<
"," <<
tau.signalPiZeroCandidates().size() <<
"," 443 <<
tau.signalNeutrHadrCands().size() <<
" " 445 <<
tau.isolationCands().size() <<
"," <<
tau.isolationChargedHadrCands().size() <<
"," 446 <<
tau.isolationGammaCands().size() <<
"," <<
tau.isolationPiZeroCandidates().size() <<
"," 447 <<
tau.isolationNeutrHadrCands().size();
float ecalStripSumEOverPLead_
void setisolationPiZeroCandidates(std::vector< RecoTauPiZero >)
int Charge
electric charge type
void setsignalChargedHadrCands(const std::vector< reco::CandidatePtr > &)
float hcal3x3OverPLead() const
bool empty() const
Is the RefVector empty.
const std::vector< reco::CandidatePtr > & signalNeutrHadrCands() const
Neutral hadrons in signal region.
void setSignalTauChargedHadronCandidatesRefs(PFRecoTauChargedHadronRefVector)
RecoTauPiZeroRefVector signalPiZeroCandidatesRefs_
void setMuonDecision(const bool &)
void setsignalNeutrHadrCands(const std::vector< reco::CandidatePtr > &)
float hcalMaxOverPLead() const
const std::vector< reco::PFCandidatePtr > & signalPFNeutrHadrCands() const
void setelectronPreIDOutput(const float &)
float ecalStripSumEOverPLead() const
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientSignalPFCands_
void setisolationNeutrHadrCands(const std::vector< reco::CandidatePtr > &)
const std::vector< reco::PFCandidatePtr > & isolationPFChargedHadrCands() const
double pt() const final
transverse momentum
const std::vector< reco::PFCandidatePtr > & isolationPFNeutrHadrCands() const
bool set(std::unique_ptr< T > iNewValue) const
void setelectronPreIDDecision(const bool &)
double vz() const override
z coordinate of vertex position
reco::CandidatePtr leadCand_
const std::vector< RecoTauPiZero > & signalPiZeroCandidates() const
Retrieve the association of signal region gamma candidates into candidate PiZeros.
edm::AtomicPtrCache< std::vector< reco::RecoTauPiZero > > signalPiZeroCandidates_
bool electronPreIDDecision_
const std::vector< PFRecoTauChargedHadron > & isolationTauChargedHadronCandidates() const
Retrieve the association of isolation region PF candidates into candidate PFRecoTauChargedHadron.
const CandidatePtr & leadChargedHadrCand() const
float maximumHCALPFClusterEt_
void setIsolationTauChargedHadronCandidates(std::vector< PFRecoTauChargedHadron >)
reco::CandidatePtr leadChargedHadrCand_
const CandidatePtr & leadNeutralCand() const
const std::vector< reco::CandidatePtr > & signalCands() const
Candidates in signal region.
double vy() const override
y coordinate of vertex position
float isolationPFChargedHadrCandsPtSum_
bool isNonnull() const
Checks for non-null.
bool electronPreIDDecision() const
float hcalTotOverPLead() const
float isolationPFGammaCandsEtSum() const
void setsignalPiZeroCandidates(std::vector< RecoTauPiZero >)
void sethcal3x3OverPLead(const float &)
void setleadCand(const CandidatePtr &)
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientIsolationPFNeutrHadrCands_
void setisolationPFGammaCandsEtSum(const float &)
void reset()
unsets the value and deletes the memory
reco::CandidatePtr leadNeutralCand_
edm::AtomicPtrCache< std::vector< reco::RecoTauPiZero > > isolationPiZeroCandidates_
void setemFraction(const float &)
PFRecoTauChargedHadronRefVector isolationTauChargedHadronCandidatesRefs_
void setisolationChargedHadrCands(const std::vector< reco::CandidatePtr > &)
edm::AtomicPtrCache< reco::PFCandidatePtr > leadPFCand_
std::vector< RecoTauPiZero > & signalPiZeroCandidatesRestricted()
void setleadChargedHadrCand(const CandidatePtr &)
void setleadNeutralCand(const CandidatePtr &)
float electronPreIDOutput() const
const std::vector< reco::PFCandidatePtr > & isolationPFGammaCands() const
const std::vector< reco::CandidatePtr > & isolationNeutrHadrCands() const
bool isNull() const
Checks for null.
reco::TrackRef electronPreIDTrack() const
void setisolationCands(const std::vector< reco::CandidatePtr > &)
std::ostream & operator<<(std::ostream &, BeamSpot beam)
float leadPFChargedHadrCandsignedSipt_
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientIsolationPFChargedHadrCands_
const std::vector< reco::PFCandidatePtr > & signalPFGammaCands() const
std::vector< reco::CandidatePtr > selectedSignalGammaCands_
CandidatePtr sourceCandidatePtr(size_type i) const override
RecoTauPiZeroRefVector isolationPiZeroCandidatesRefs_
bool isNonnull() const
Checks for non-null.
void setDecayMode(const hadronicDecayMode &)
std::vector< reco::CandidatePtr > selectedSignalNeutrHadrCands_
void setCaloComp(const float &)
std::vector< reco::CandidatePtr > selectedIsolationGammaCands_
void setisolationPFChargedHadrCandsPtSum(const float &)
PFTau * clone() const override
returns a clone of the Candidate object
void setleadPFChargedHadrCandsignedSipt(const float &)
edm::AtomicPtrCache< reco::PFCandidatePtr > leadPFNeutralCand_
hadronicDecayMode decayMode_
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientSignalPFNeutrHadrCands_
bool overlap(const Candidate &) const override
check overlap with another candidate
std::vector< reco::CandidatePtr > selectedSignalCands_
double vx() const override
x coordinate of vertex position
bool isNull() const
Checks for null.
bool checkOverlap(const R &r1, const R &r2) const
check if two components overlap
reco::MuonRef muonRef() const
const std::vector< reco::CandidatePtr > & signalGammaCands() const
Gamma candidates in signal region.
void setsignalCands(const std::vector< reco::CandidatePtr > &)
void setbremsRecoveryEOverPLead(const float &)
std::vector< reco::CandidatePtr > selectedIsolationCands_
const std::vector< reco::PFCandidatePtr > & signalPFChargedHadrCands() const
PFRecoTauChargedHadronRef leadTauChargedHadronCandidate() const
std::vector< PFRecoTauChargedHadron > & isolationTauChargedHadronCandidatesRestricted()
std::vector< RecoTauPiZero > & isolationPiZeroCandidatesRestricted()
void sethcalMaxOverPLead(const float &)
const std::vector< reco::PFCandidatePtr > & isolationPFCands() const
void dump(std::ostream &out=std::cout) const
prints information on this PFTau
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
float isolationPFChargedHadrCandsPtSum() const
std::vector< reco::CandidatePtr > selectedIsolationNeutrHadrCands_
edm::AtomicPtrCache< reco::PFCandidatePtr > leadPFChargedHadrCand_
edm::AtomicPtrCache< std::vector< reco::PFRecoTauChargedHadron > > signalTauChargedHadronCandidates_
const std::vector< reco::CandidatePtr > & isolationChargedHadrCands() const
Charged candidates in isolation region.
void setSegComp(const float &)
float leadPFChargedHadrCandsignedSipt() const
float maximumHCALPFClusterEt() const
Et of the highest Et HCAL PFCluster.
hadronicDecayMode decayMode() const
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientSignalPFChargedHadrCands_
float bremsRecoveryEOverPLead_
edm::Ref< PFRecoTauChargedHadronCollection > PFRecoTauChargedHadronRef
presistent reference to a PFRecoTauChargedHadron
const std::vector< reco::CandidatePtr > & isolationCands() const
Candidates in isolation region.
math::XYZTLorentzVector LorentzVector
Lorentz vector.
const std::vector< reco::CandidatePtr > & signalChargedHadrCands() const
Charged hadrons in signal region.
std::vector< reco::CandidatePtr > selectedIsolationChargedHadrCands_
PFTauTagInfoRef PFTauTagInfoRef_
void setisolationGammaCands(const std::vector< reco::CandidatePtr > &)
const PFCandidatePtr leadPFCand() const
void setsignalGammaCands(const std::vector< reco::CandidatePtr > &)
float electronPreIDOutput_
Particle reconstructed by the particle flow algorithm.
const std::vector< reco::CandidatePtr > & isolationGammaCands() const
Gamma candidates in isolation region.
const std::vector< reco::PFCandidatePtr > & signalPFCands() const
const std::vector< PFRecoTauChargedHadron > & signalTauChargedHadronCandidates() const
Retrieve the association of signal region PF candidates into candidate PFRecoTauChargedHadrons.
void setjetRef(const JetBaseRef &)
Structure Point Contains parameters of Gaussian fits to DMRs.
void setmaximumHCALPFClusterEt(const float &)
virtual reco::TrackRef track() const
reference to a Track
void setSignalTauChargedHadronCandidates(std::vector< PFRecoTauChargedHadron >)
const CandidatePtr & leadCand() const
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientIsolationPFCands_
void setecalStripSumEOverPLead(const float &)
edm::AtomicPtrCache< std::vector< reco::PFRecoTauChargedHadron > > isolationTauChargedHadronCandidates_
const JetBaseRef & jetRef() const
PFRecoTauChargedHadronRefVector signalTauChargedHadronCandidatesRefs_
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientIsolationPFGammaCands_
const PFCandidatePtr leadPFNeutralCand() const
void setIsolationPiZeroCandidatesRefs(RecoTauPiZeroRefVector)
void sethcalTotOverPLead(const float &)
std::vector< PFRecoTauChargedHadron > & signalTauChargedHadronCandidatesRestricted()
std::vector< reco::CandidatePtr > selectedSignalChargedHadrCands_
const PFCandidatePtr leadPFChargedHadrCand() const
Getters for different PFCandidates for PFTaus made from PFCandidates.
float bremsRecoveryEOverPLead() const
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientSignalPFGammaCands_
const PFTauTagInfoRef & pfTauTagInfoRef() const
void setelectronPreIDTrack(const reco::TrackRef &)
void setIsolationTauChargedHadronCandidatesRefs(PFRecoTauChargedHadronRefVector)
reco::TrackRef electronPreIDTrack_
const std::vector< RecoTauPiZero > & isolationPiZeroCandidates() const
Retrieve the association of isolation region gamma candidates into candidate PiZeros.
bool hasMuonReference() const
float isolationPFGammaCandsEtSum_
int charge() const final
electric charge
void setpfTauTagInfoRef(const PFTauTagInfoRef)
bool muonDecision() const
void setSignalPiZeroCandidatesRefs(RecoTauPiZeroRefVector)