98 template<
typename T,
typename U>
100 if ( not oCache.
isSet()) {
102 auto temp = std::make_unique<U>();
103 temp->reserve(iFrom.size());
104 for (
auto const& ref: iFrom ) {
105 temp->push_back(*ref);
113 if(not oCache.
isSet()) {
128 if (pf_cand !=
nullptr) {
130 }
else throw cms::Exception(
"Type Mismatch") <<
"This PFTau was not made from PFCandidates, but it is being tried to access a PFCandidate.\n";
135 std::unique_ptr<std::vector<reco::PFCandidatePtr> > convertToPFPtrs(
const std::vector<reco::CandidatePtr>&
cands) {
136 std::unique_ptr<std::vector<reco::PFCandidatePtr> > newSignalPFCands{
new std::vector<reco::PFCandidatePtr>{}};
138 for (
auto&
cand : cands) {
142 if (pf_cand !=
nullptr) {
144 newSignalPFCands->reserve(cands.size());
145 }
else throw cms::Exception(
"Type Mismatch") <<
"This PFTau was not made from PFCandidates, but it is being tried to access PFCandidates.\n";
148 newSignalPFCands->push_back(newPtr);
150 return newSignalPFCands;
357 if( muonRef.
isNull() )
return false;
358 else if( muonRef.
isNonnull() )
return true;
387 out <<
"Its TauTagInfo constituents :"<<std::endl;
389 out<<
"# PF charged hadr. cand's "<<
pfTauTagInfoRef()->PFChargedHadrCands().size()<<std::endl;
390 out<<
"# PF neutral hadr. cand's "<<
pfTauTagInfoRef()->PFNeutrHadrCands().size()<<std::endl;
391 out<<
"# PF gamma cand's "<<
pfTauTagInfoRef()->PFGammaCands().size()<<std::endl;
393 out<<
"in detail :"<<std::endl;
395 out<<
"Pt of the PFTau "<<
pt()<<std::endl;
398 out<<
"No Lead Cand "<<std::endl;
400 out<<
"Lead Cand PDG Id " << (*theLeadCand).pdgId() << std::endl;
401 out<<
"Lead Cand Pt "<<(*theLeadCand).pt()<<std::endl;
402 out<<
"Lead Cand Charge "<<(*theLeadCand).charge()<<std::endl;
403 out<<
"Inner point position (x,y,z) of the PFTau ("<<
vx()<<
","<<
vy()<<
","<<
vz()<<
")"<<std::endl;
404 out<<
"Charge of the PFTau "<<
charge()<<std::endl;
421 out << std::setprecision(3)
423 <<
" charge: " << tau.
charge() <<
" " 424 <<
" pt:" <<tau.
pt()<<
" " 425 <<
" eta:" <<tau.
eta()<<
" " 426 <<
" phi:" <<tau.
phi()<<
" " 427 <<
" mass:" << tau.
mass() <<
" " float ecalStripSumEOverPLead_
bool hasMuonReference() const
float maximumHCALPFClusterEt() const
Et of the highest Et HCAL PFCluster.
void setisolationPiZeroCandidates(std::vector< RecoTauPiZero >)
int Charge
electric charge type
void setsignalChargedHadrCands(const std::vector< reco::CandidatePtr > &)
void setSignalTauChargedHadronCandidatesRefs(PFRecoTauChargedHadronRefVector)
bool checkOverlap(const R &r1, const R &r2) const
check if two components overlap
RecoTauPiZeroRefVector signalPiZeroCandidatesRefs_
void setMuonDecision(const bool &)
void setsignalNeutrHadrCands(const std::vector< reco::CandidatePtr > &)
const std::vector< reco::PFCandidatePtr > & isolationPFCands() const
void setelectronPreIDOutput(const float &)
float isolationPFGammaCandsEtSum() const
bool isNonnull() const
Checks for non-null.
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientSignalPFCands_
double eta() const final
momentum pseudorapidity
void setisolationNeutrHadrCands(const std::vector< reco::CandidatePtr > &)
float isolationPFChargedHadrCandsPtSum() const
void setelectronPreIDDecision(const bool &)
reco::CandidatePtr leadCand_
edm::AtomicPtrCache< std::vector< reco::RecoTauPiZero > > signalPiZeroCandidates_
double vy() const override
y coordinate of vertex position
float hcalTotOverPLead() const
bool electronPreIDDecision_
float maximumHCALPFClusterEt_
const std::vector< reco::PFCandidatePtr > & isolationPFChargedHadrCands() const
void setIsolationTauChargedHadronCandidates(std::vector< PFRecoTauChargedHadron >)
reco::CandidatePtr leadChargedHadrCand_
bool electronPreIDDecision() const
float isolationPFChargedHadrCandsPtSum_
float hcal3x3OverPLead() const
CandidatePtr sourceCandidatePtr(size_type i) const override
double pt() const final
transverse momentum
int charge() const final
electric charge
const std::vector< reco::CandidatePtr > & signalGammaCands() const
Gamma candidates in signal region.
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_
bool empty() const
Is the RefVector empty.
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_
const std::vector< reco::CandidatePtr > & isolationGammaCands() const
Gamma candidates in isolation region.
virtual reco::TrackRef track() const
reference to a Track
std::vector< RecoTauPiZero > & signalPiZeroCandidatesRestricted()
bool muonDecision() const
void setleadChargedHadrCand(const CandidatePtr &)
void setleadNeutralCand(const CandidatePtr &)
hadronicDecayMode decayMode() const
const std::vector< reco::CandidatePtr > & signalNeutrHadrCands() const
Neutral hadrons in signal region.
void dump(std::ostream &out=std::cout) const
prints information on this PFTau
void setisolationCands(const std::vector< reco::CandidatePtr > &)
std::ostream & operator<<(std::ostream &, BeamSpot beam)
float leadPFChargedHadrCandsignedSipt_
const PFCandidatePtr leadPFCand() const
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientIsolationPFChargedHadrCands_
std::vector< reco::CandidatePtr > selectedSignalGammaCands_
PFRecoTauChargedHadronRef leadTauChargedHadronCandidate() const
const CandidatePtr & leadChargedHadrCand() const
const std::vector< RecoTauPiZero > & signalPiZeroCandidates() const
Retrieve the association of signal region gamma candidates into candidate PiZeros.
RecoTauPiZeroRefVector isolationPiZeroCandidatesRefs_
void setDecayMode(const hadronicDecayMode &)
std::vector< reco::CandidatePtr > selectedSignalNeutrHadrCands_
const std::vector< reco::PFCandidatePtr > & signalPFNeutrHadrCands() const
const std::vector< reco::PFCandidatePtr > & isolationPFGammaCands() const
const JetBaseRef & jetRef() const
void setCaloComp(const float &)
bool isNull() const
Checks for null.
std::vector< reco::CandidatePtr > selectedIsolationGammaCands_
void setisolationPFChargedHadrCandsPtSum(const float &)
void setleadPFChargedHadrCandsignedSipt(const float &)
edm::AtomicPtrCache< reco::PFCandidatePtr > leadPFNeutralCand_
const LorentzVector & p4() const final
four-momentum Lorentz vector
const std::vector< reco::PFCandidatePtr > & signalPFCands() const
PFTau * clone() const override
returns a clone of the Candidate object
hadronicDecayMode decayMode_
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientSignalPFNeutrHadrCands_
std::vector< reco::CandidatePtr > selectedSignalCands_
float leadPFChargedHadrCandsignedSipt() const
bool isNull() const
Checks for null.
void setsignalCands(const std::vector< reco::CandidatePtr > &)
void setbremsRecoveryEOverPLead(const float &)
reco::MuonRef muonRef() const
bool isNonnull() const
Checks for non-null.
double vz() const override
z coordinate of vertex position
std::vector< reco::CandidatePtr > selectedIsolationCands_
const std::vector< reco::PFCandidatePtr > & signalPFChargedHadrCands() const
const std::vector< reco::CandidatePtr > & isolationChargedHadrCands() const
Charged candidates in isolation region.
const std::vector< RecoTauPiZero > & isolationPiZeroCandidates() const
Retrieve the association of isolation region gamma candidates into candidate PiZeros.
const PFTauTagInfoRef & pfTauTagInfoRef() const
std::vector< PFRecoTauChargedHadron > & isolationTauChargedHadronCandidatesRestricted()
std::vector< RecoTauPiZero > & isolationPiZeroCandidatesRestricted()
void sethcalMaxOverPLead(const float &)
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
std::vector< reco::CandidatePtr > selectedIsolationNeutrHadrCands_
edm::AtomicPtrCache< reco::PFCandidatePtr > leadPFChargedHadrCand_
bool set(std::unique_ptr< T > iNewValue) const
edm::AtomicPtrCache< std::vector< reco::PFRecoTauChargedHadron > > signalTauChargedHadronCandidates_
void setSegComp(const float &)
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientSignalPFChargedHadrCands_
const CandidatePtr & leadCand() const
float bremsRecoveryEOverPLead() const
float bremsRecoveryEOverPLead_
edm::Ref< PFRecoTauChargedHadronCollection > PFRecoTauChargedHadronRef
presistent reference to a PFRecoTauChargedHadron
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 > &)
void setsignalGammaCands(const std::vector< reco::CandidatePtr > &)
float electronPreIDOutput_
Particle reconstructed by the particle flow algorithm.
void setjetRef(const JetBaseRef &)
Structure Point Contains parameters of Gaussian fits to DMRs.
void setmaximumHCALPFClusterEt(const float &)
void setSignalTauChargedHadronCandidates(std::vector< PFRecoTauChargedHadron >)
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientIsolationPFCands_
void setecalStripSumEOverPLead(const float &)
edm::AtomicPtrCache< std::vector< reco::PFRecoTauChargedHadron > > isolationTauChargedHadronCandidates_
PFRecoTauChargedHadronRefVector signalTauChargedHadronCandidatesRefs_
const std::vector< reco::CandidatePtr > & isolationNeutrHadrCands() const
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientIsolationPFGammaCands_
const std::vector< PFRecoTauChargedHadron > & signalTauChargedHadronCandidates() const
Retrieve the association of signal region PF candidates into candidate PFRecoTauChargedHadrons.
const std::vector< reco::CandidatePtr > & isolationCands() const
Candidates in isolation region.
void setIsolationPiZeroCandidatesRefs(RecoTauPiZeroRefVector)
void sethcalTotOverPLead(const float &)
const PFCandidatePtr leadPFNeutralCand() const
std::vector< PFRecoTauChargedHadron > & signalTauChargedHadronCandidatesRestricted()
const PFCandidatePtr leadPFChargedHadrCand() const
Getters for different PFCandidates for PFTaus made from PFCandidates.
std::vector< reco::CandidatePtr > selectedSignalChargedHadrCands_
const std::vector< reco::CandidatePtr > & signalCands() const
Candidates in signal region.
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientSignalPFGammaCands_
const std::vector< PFRecoTauChargedHadron > & isolationTauChargedHadronCandidates() const
Retrieve the association of isolation region PF candidates into candidate PFRecoTauChargedHadron.
void setelectronPreIDTrack(const reco::TrackRef &)
float hcalMaxOverPLead() const
void setIsolationTauChargedHadronCandidatesRefs(PFRecoTauChargedHadronRefVector)
float electronPreIDOutput() const
reco::TrackRef electronPreIDTrack() const
edm::Ptr< PFCandidate > PFCandidatePtr
persistent Ptr to a PFCandidate
double phi() const final
momentum azimuthal angle
reco::TrackRef electronPreIDTrack_
bool overlap(const Candidate &) const override
check overlap with another candidate
float isolationPFGammaCandsEtSum_
double vx() const override
x coordinate of vertex position
float ecalStripSumEOverPLead() const
double mass() const final
mass
const CandidatePtr & leadNeutralCand() const
const std::vector< reco::PFCandidatePtr > & isolationPFNeutrHadrCands() const
const std::vector< reco::PFCandidatePtr > & signalPFGammaCands() const
void setpfTauTagInfoRef(const PFTauTagInfoRef)
void setSignalPiZeroCandidatesRefs(RecoTauPiZeroRefVector)