14 ,embeddedIsolationTracks_(
false)
15 ,embeddedLeadTrack_(
false)
16 ,embeddedSignalTracks_(
false)
17 ,embeddedLeadPFCand_(
false)
18 ,embeddedLeadPFChargedHadrCand_(
false)
19 ,embeddedLeadPFNeutralCand_(
false)
20 ,embeddedSignalPFCands_(
false)
21 ,embeddedSignalPFChargedHadrCands_(
false)
22 ,embeddedSignalPFNeutralHadrCands_(
false)
23 ,embeddedSignalPFGammaCands_(
false)
24 ,embeddedIsolationPFCands_(
false)
25 ,embeddedIsolationPFChargedHadrCands_(
false)
26 ,embeddedIsolationPFNeutralHadrCands_(
false)
27 ,embeddedIsolationPFGammaCands_(
false)
34 ,embeddedIsolationTracks_(
false)
35 ,embeddedLeadTrack_(
false)
36 ,embeddedSignalTracks_(
false)
37 ,embeddedLeadPFCand_(
false)
38 ,embeddedLeadPFChargedHadrCand_(
false)
39 ,embeddedLeadPFNeutralCand_(
false)
40 ,embeddedSignalPFCands_(
false)
41 ,embeddedSignalPFChargedHadrCands_(
false)
42 ,embeddedSignalPFNeutralHadrCands_(
false)
43 ,embeddedSignalPFGammaCands_(
false)
44 ,embeddedIsolationPFCands_(
false)
45 ,embeddedIsolationPFChargedHadrCands_(
false)
46 ,embeddedIsolationPFNeutralHadrCands_(
false)
47 ,embeddedIsolationPFGammaCands_(
false)
58 ,embeddedIsolationTracks_(
false)
59 ,embeddedLeadTrack_(
false)
60 ,embeddedSignalTracks_(
false)
61 ,embeddedLeadPFCand_(
false)
62 ,embeddedLeadPFChargedHadrCand_(
false)
63 ,embeddedLeadPFNeutralCand_(
false)
64 ,embeddedSignalPFCands_(
false)
65 ,embeddedSignalPFChargedHadrCands_(
false)
66 ,embeddedSignalPFNeutralHadrCands_(
false)
67 ,embeddedSignalPFGammaCands_(
false)
68 ,embeddedIsolationPFCands_(
false)
69 ,embeddedIsolationPFChargedHadrCands_(
false)
70 ,embeddedIsolationPFNeutralHadrCands_(
false)
71 ,embeddedIsolationPFGammaCands_(
false)
82 ,embeddedIsolationTracks_(
false)
83 ,embeddedLeadTrack_(
false)
84 ,embeddedSignalTracks_(
false)
85 ,embeddedLeadPFCand_(
false)
86 ,embeddedLeadPFChargedHadrCand_(
false)
87 ,embeddedLeadPFNeutralCand_(
false)
88 ,embeddedSignalPFCands_(
false)
89 ,embeddedSignalPFChargedHadrCands_(
false)
90 ,embeddedSignalPFNeutralHadrCands_(
false)
91 ,embeddedSignalPFGammaCands_(
false)
92 ,embeddedIsolationPFCands_(
false)
93 ,embeddedIsolationPFChargedHadrCands_(
false)
94 ,embeddedIsolationPFNeutralHadrCands_(
false)
95 ,embeddedIsolationPFGammaCands_(
false)
112 out <<
"\tpat::Tau: ";
113 out << std::setiosflags(std::ios::right);
114 out << std::setiosflags(std::ios::fixed);
115 out << std::setprecision(3);
116 out <<
" E/pT/eta/phi "
174 for (
unsigned int i = 0;
i < trackRefVec.
size();
i++) {
195 for (
unsigned int i = 0;
i < trackRefVec.
size();
i++) {
216 for (std::vector<IdPair>::const_iterator it =
tauIDs_.begin(), ed =
tauIDs_.end(); it != ed; ++it) {
217 if (it->first == name)
return it->second;
220 ex <<
"pat::Tau: the ID " << name <<
" can't be found in this pat::Tau.\n";
221 ex <<
"The available IDs are: ";
222 for (std::vector<IdPair>::const_iterator it =
tauIDs_.begin(), ed =
tauIDs_.end(); it != ed; ++it) {
223 ex <<
"'" << it->first <<
"' ";
230 for (std::vector<IdPair>::const_iterator it =
tauIDs_.begin(), ed =
tauIDs_.end(); it != ed; ++it) {
231 if (it->first == name)
return true;
238 if (!
isPFTau())
throw cms::Exception(
"Type Error") <<
"Requesting a PFTau-specific information from a pat::Tau which wasn't made from a PFTau.\n";
243 if (!
isCaloTau())
throw cms::Exception(
"Type Error") <<
"Requesting a CaloTau-specific information from a pat::Tau which wasn't made from a CaloTau.\n";
251 throw cms::Exception(
"Type Error") <<
"Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't made from either a CaloTau or a PFTau.\n";
267 cov(
i,
j) = sv(
i,
j) + pv(
i,
j);
277 throw cms::Exception(
"Type Error") <<
"Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't made from either a CaloTau or a PFTau.\n";
284 throw cms::Exception(
"Type Error") <<
"Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't made from either a CaloTau or a PFTau.\n";
291 throw cms::Exception(
"Type Error") <<
"Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't made from either a CaloTau or a PFTau.\n";
296 if (!
isPFTau())
throw cms::Exception(
"Type Error") <<
"Requesting a PFTau-specific information from a pat::Tau which wasn't made from a PFTau.\n";
338 std::vector<reco::PFCandidatePtr> candPtrs =
pfSpecific_[0].selectedSignalPFCands_;
339 for (
unsigned int i = 0;
i < candPtrs.size();
i++) {
348 std::vector<reco::PFCandidatePtr> candPtrs =
pfSpecific_[0].selectedSignalPFChargedHadrCands_;
349 for (
unsigned int i = 0;
i < candPtrs.size();
i++) {
358 std::vector<reco::PFCandidatePtr> candPtrs =
pfSpecific_[0].selectedSignalPFNeutrHadrCands_;
359 for (
unsigned int i = 0;
i < candPtrs.size();
i++) {
368 std::vector<reco::PFCandidatePtr> candPtrs =
pfSpecific_[0].selectedSignalPFGammaCands_;
369 for (
unsigned int i = 0;
i < candPtrs.size();
i++) {
379 std::vector<reco::PFCandidatePtr> candPtrs =
pfSpecific_[0].selectedIsolationPFCands_;
380 for (
unsigned int i = 0;
i < candPtrs.size();
i++) {
390 std::vector<reco::PFCandidatePtr> candPtrs =
pfSpecific_[0].selectedIsolationPFChargedHadrCands_;
391 for (
unsigned int i = 0;
i < candPtrs.size();
i++) {
400 std::vector<reco::PFCandidatePtr> candPtrs =
pfSpecific_[0].selectedIsolationPFNeutrHadrCands_;
401 for (
unsigned int i = 0;
i < candPtrs.size();
i++) {
410 std::vector<reco::PFCandidatePtr> candPtrs =
pfSpecific_[0].selectedIsolationPFGammaCands_;
411 for (
unsigned int i = 0;
i < candPtrs.size();
i++) {
418 if (
pfSpecific().signalTauChargedHadronCandidates_.size() > 0 ) {
449 std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{
new std::vector<reco::PFCandidatePtr>{}};
464 std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{
new std::vector<reco::PFCandidatePtr>{}};
479 std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{
new std::vector<reco::PFCandidatePtr>{}};
494 std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{
new std::vector<reco::PFCandidatePtr>{}};
517 std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{
new std::vector<reco::PFCandidatePtr>{}};
532 std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{
new std::vector<reco::PFCandidatePtr>{}};
547 std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{
new std::vector<reco::PFCandidatePtr>{}};
562 std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{
new std::vector<reco::PFCandidatePtr>{}};
596 for ( std::vector<pat::TauJetCorrFactors>::const_iterator corrFactor =
jec_.begin();
597 corrFactor !=
jec_.end(); ++corrFactor ) {
598 if ( corrFactor->jecSet() == set )
return corrFactor-
jec_.begin();
606 std::vector<std::string> sets;
607 for ( std::vector<pat::TauJetCorrFactors>::const_iterator corrFactor =
jec_.begin();
608 corrFactor !=
jec_.end(); ++corrFactor ) {
609 sets.push_back(corrFactor->jecSet());
616 return set>=0 ?
jec_.at(set).correctionLabels() : std::vector<std::string>();
624 if ( set.empty() ||
jec_.at(
idx).jecSet() == set ){
625 if (
jec_[
idx].jecLevel(level) >= 0 )
629 <<
"This JEC level " << level <<
" does not exist. \n";
633 <<
"This jet does not carry any jet energy correction factor information \n"
634 <<
"for a jet energy correction set with label " << set <<
"\n";
643 <<
"This jet does not carry any jet energy correction factor information \n";
646 <<
"This jet does not carry any jet energy correction factor information \n"
647 <<
"for a jet energy correction set with index " << set <<
"\n";
658 if ( set.empty() ||
jec_.at(
idx).jecSet() == set ) {
659 if (
jec_[
idx].jecLevel(level) >= 0 )
663 <<
"This JEC level " << level <<
" does not exist. \n";
667 <<
"This JEC set " << set <<
" does not exist. \n";
const std::vector< reco::RecoTauPiZero > & signalPiZeroCandidates() const
bool embeddedLeadPFNeutralCand_
virtual double energy() const GCC11_FINAL
energy
virtual reco::TrackRef leadTrack() const
edm::AtomicPtrCache< reco::TrackRefVector > signalTracksTransientRefVector_
reco::Candidate::LorentzVector p4Jet_
reco::PFTauTransverseImpactParameter::CovMatrix flightLengthCov() const
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
bool embeddedSignalPFChargedHadrCands_
std::vector< reco::PFCandidatePtr > selectedIsolationPFChargedHadrCands_
std::vector< reco::PFCandidate > leadPFNeutralCand_
reco::PFCandidatePtr leadPFCand_
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > isolationPFChargedHadrCandsTransientPtrs_
virtual const reco::TrackRefVector & isolationTracks() const
std::vector< reco::PFCandidate > signalPFNeutralHadrCands_
const pat::tau::TauCaloSpecific & caloSpecific() const
return CaloTau info or throw exception 'not CaloTau'
std::vector< reco::PFCandidate > signalPFCands_
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFNeutralHadrCandsTransientPtrs_
bool embeddedIsolationPFChargedHadrCands_
bool jecSetAvailable(const std::string &set) const
bool embeddedIsolationPFCands_
void embedLeadPFChargedHadrCand()
method to store the leading charged hadron candidate internally
reco::PFCandidatePtr leadPFChargedHadrCand_
std::vector< reco::PFCandidate > isolationPFGammaCands_
std::vector< reco::PFCandidate > isolationPFNeutralHadrCands_
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > isolationPFGammaCandsTransientPtrs_
const reco::PFCandidatePtr leadPFCand() const
void embedSignalPFGammaCands()
method to store the signal gamma candidates internally
std::vector< reco::GenJet > genJet_
void embedIsolationPFCands()
method to store the isolation candidates internally
void embedIsolationPFGammaCands()
method to store the isolation gamma candidates internally
const reco::GenJet * genJet() const
return matched GenJet, built from the visible particles of a generated tau
const reco::Candidate::LorentzVector & p4Jet() const
const std::vector< std::string > availableJECSets() const
all available label-names of all sets of jet energy corrections
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFCandsTransientPtrs_
reco::TrackRef leadTrack() const
override the reco::BaseTau::leadTrack method, to access the internal storage of the leading track ...
bool embeddedIsolationPFNeutralHadrCands_
void embedSignalTracks()
method to store the signal tracks internally
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFGammaCandsTransientPtrs_
const std::vector< reco::PFCandidatePtr > & isolationPFChargedHadrCands() const
const pat::tau::TauPFSpecific & pfSpecific() const
return PFTau info or throw exception 'not PFTau'
float phiphiMoment() const
std::vector< reco::PFCandidate > leadPFCand_
std::vector< reco::PFCandidatePtr > selectedIsolationPFNeutrHadrCands_
bool embeddedSignalPFGammaCands_
float etaetaMoment() const
int jecSet(const std::string &label) const
return true if this jet carries the jet correction factors of a different set, for systematic studies...
std::vector< reco::PFRecoTauChargedHadron > isolationTauChargedHadronCandidates_
void initializeJEC(unsigned int level, const unsigned int set=0)
initialize the jet to a given JEC level during creation starting from Uncorrected ...
Tau correctedTauJet(const std::string &level, const std::string &set="") const
unsigned int currentJECLevel_
edm::AtomicPtrCache< reco::TrackRefVector > isolationTracksTransientRefVector_
void embedSignalPFChargedHadrCands()
method to store the signal charged hadrons candidates internally
std::vector< reco::PFRecoTauChargedHadron > signalTauChargedHadronCandidates_
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
void embedSignalPFCands()
method to store the signal candidates internally
std::vector< reco::RecoTauPiZero > isolationPiZeroCandidates_
std::ostream & operator<<(std::ostream &, BeamSpot beam)
std::vector< reco::Track > signalTracks_
std::vector< IdPair > tauIDs_
const std::vector< reco::PFRecoTauChargedHadron > & isolationTauChargedHadronCandidates() const
T const * get() const
Returns C++ pointer to the item.
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFChargedHadrCandsTransientPtrs_
std::vector< reco::RecoTauPiZero > signalPiZeroCandidates_
bool embeddedIsolationPFGammaCands_
std::vector< reco::PFCandidate > signalPFChargedHadrCands_
const reco::PFTauTransverseImpactParameter::CovMatrix & secondaryVertexCov() const
void embedLeadTrack()
method to store the leading track internally
Analysis-level lepton class.
const std::vector< reco::RecoTauPiZero > & isolationPiZeroCandidates() const
const std::vector< reco::PFCandidatePtr > & isolationPFNeutrHadrCands() const
const reco::PFTauTransverseImpactParameter::CovMatrix & primaryVertexCov() const
Jets made from MC generator particles.
bool embeddedSignalTracks_
std::vector< reco::PFCandidatePtr > selectedSignalPFChargedHadrCands_
virtual const reco::TrackRefVector & signalTracks() const
std::vector< reco::PFCandidatePtr > selectedSignalPFCands_
void reserve(size_type n)
Reserve space for RefVector.
std::string currentJECLevel() const
return the name of the current step of jet energy corrections
Analysis-level tau class.
bool embeddedLeadPFChargedHadrCand_
void embedIsolationPFNeutralHadrCands()
method to store the isolation neutral hadrons candidates internally
const std::vector< reco::PFCandidatePtr > & signalPFChargedHadrCands() const
bool embeddedSignalPFNeutralHadrCands_
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
std::vector< reco::PFCandidate > isolationPFCands_
std::vector< reco::Track > isolationTracks_
bool isTauIDAvailable(const std::string &name) const
Returns true if a specific ID is available in this pat::Tau.
void embedLeadPFNeutralCand()
method to store the leading neutral candidate internally
std::vector< pat::tau::TauCaloSpecific > caloSpecific_
holder for CaloTau info, or empty vector if PFTau
std::vector< reco::PFCandidatePtr > selectedIsolationPFGammaCands_
bool isCaloTau() const
Returns true if this pat::Tau was made from a reco::CaloTau.
std::vector< reco::PFCandidatePtr > selectedIsolationPFCands_
reco::PFCandidatePtr leadPFNeutralCand_
int decayMode() const
reconstructed tau decay mode (specific to PFTau)
bool set(std::unique_ptr< T > iNewValue) const
const std::vector< reco::PFCandidatePtr > & isolationPFGammaCands() const
std::vector< reco::PFCandidatePtr > selectedSignalPFGammaCands_
const std::vector< reco::PFRecoTauChargedHadron > & signalTauChargedHadronCandidates() const
std::vector< pat::TauJetCorrFactors > jec_
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > isolationPFNeutralHadrCandsTransientPtrs_
std::vector< reco::PFCandidate > signalPFGammaCands_
void embedSignalPFNeutralHadrCands()
method to store the signal neutral hadrons candidates internally
std::vector< reco::Track > leadTrack_
edm::Ref< PFRecoTauChargedHadronCollection > PFRecoTauChargedHadronRef
presistent reference to a PFRecoTauChargedHadron
std::vector< reco::PFCandidate > isolationPFChargedHadrCands_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
float jecFactor(const std::string &level, const std::string &set="") const
bool jecSetsAvailable() const
void setDecayMode(int)
set decay mode
float etaphiMoment() const
std::vector< reco::PFCandidatePtr > selectedSignalPFNeutrHadrCands_
reco::PFRecoTauChargedHadronRef leadTauChargedHadronCandidate() const
void embedIsolationPFChargedHadrCands()
method to store the isolation charged hadrons candidates internally
value_type const at(size_type idx) const
Retrieve an element of the RefVector.
bool embeddedSignalPFCands_
const reco::PFCandidatePtr leadPFChargedHadrCand() const
math::Error< dimension >::type CovMatrix
const std::vector< reco::PFCandidatePtr > & signalPFCands() const
virtual void setP4(const LorentzVector &p4) GCC11_FINAL
set 4-momentum
const std::vector< std::string > availableJECLevels(const int &set=0) const
const std::vector< reco::PFCandidatePtr > & signalPFGammaCands() const
const std::vector< reco::PFCandidatePtr > & signalPFNeutrHadrCands() const
size_type size() const
Size of the RefVector.
bool isPFTau() const
Returns true if this pat::Tau was made from a reco::PFTau.
float tauID(const std::string &name) const
void setGenJet(const reco::GenJetRef &ref)
set the matched GenJet
bool embeddedIsolationTracks_
const reco::PFCandidatePtr leadPFNeutralCand() const
void embedIsolationTracks()
method to store the isolation tracks internally
volatile std::atomic< bool > shutdown_flag false
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > isolationPFCandsTransientPtrs_
const reco::TrackRefVector & signalTracks() const
override the reco::BaseTau::signalTracks method, to access the internal storage of the signal tracks ...
std::vector< reco::PFCandidate > leadPFChargedHadrCand_
std::string currentJECSet() const
returns the label of the current set of jet energy corrections
virtual float pt() const GCC11_FINAL
transverse momentum
edm::Ptr< PFCandidate > PFCandidatePtr
persistent Ptr to a PFCandidate
void embedLeadPFCand()
method to store the leading candidate internally
value_type const * get() const
const std::vector< reco::PFCandidatePtr > & isolationPFCands() const
std::vector< pat::tau::TauPFSpecific > pfSpecific_
holder for PFTau info, or empty vector if CaloTau
const reco::TrackRefVector & isolationTracks() const
override the reco::BaseTau::isolationTracks method, to access the internal storage of the isolation t...
reco::Candidate::LorentzVector p4Jet_
unsigned int currentJECSet_