![]() |
![]() |
#include <RecoTauConstructor.h>
Public Types | |
enum | ParticleType { kChargedHadron, kGamma, kNeutralHadron, kAll } |
enum | Region { kSignal, kIsolation } |
Public Member Functions | |
void | addPFCand (Region region, ParticleType type, const CandidatePtr &ptr, bool skipAddToP4=false) |
Append a PFCandidateRef/Ptr to a given collection. More... | |
template<typename InputIterator > | |
void | addPFCands (Region region, ParticleType type, const InputIterator &begin, const InputIterator &end) |
void | addPiZero (Region region, const RecoTauPiZero &piZero) |
Add a PiZero to the given collection. More... | |
template<typename InputIterator > | |
void | addPiZeros (Region region, const InputIterator &begin, const InputIterator &end) |
Add a list of pizeros to the input collection. More... | |
void | addTauChargedHadron (Region region, const PFRecoTauChargedHadron &chargedHadron) |
Add a ChargedHadron to the given collection. More... | |
template<typename InputIterator > | |
void | addTauChargedHadrons (Region region, const InputIterator &begin, const InputIterator &end) |
Add a list of charged hadrons to the input collection. More... | |
std::auto_ptr< reco::PFTau > | get (bool setupLeadingCandidates=true) |
const reco::Candidate::LorentzVector & | p4 () const |
RecoTauConstructor (const JetBaseRef &jetRef, const edm::Handle< edm::View< reco::Candidate > > &pfCands, bool copyGammasFromPiZeros=false, const StringObjectFunction< reco::PFTau > *signalConeSize=0, double minAbsPhotonSumPt_insideSignalCone=2.5, double minRelPhotonSumPt_insideSignalCone=0., double minAbsPhotonSumPt_outsideSignalCone=1.e+9, double minRelPhotonSumPt_outsideSignalCone=1.e+9) | |
Constructor with PFCandidate Handle. More... | |
void | reserve (Region region, ParticleType type, size_t size) |
Reserve a set amount of space for a given RefVector. More... | |
void | reservePiZero (Region region, size_t size) |
Reserve a set amount of space for the PiZeros. More... | |
void | reserveTauChargedHadron (Region region, size_t size) |
Reserve a set amount of space for the ChargedHadrons. More... | |
template<typename T > | |
void | setleadCand (const T &cand) |
Set leading PF candidate. More... | |
template<typename T > | |
void | setleadChargedHadrCand (const T &cand) |
Set leading PFChargedHadron candidate. More... | |
template<typename T > | |
void | setleadNeutralCand (const T &cand) |
Set leading PFGamma candidate. More... | |
Private Types | |
typedef std::pair< Region, ParticleType > | CollectionKey |
typedef std::map< CollectionKey, std::vector< CandidatePtr > * > | CollectionMap |
typedef std::map< CollectionKey, SortedListPtr > | SortedCollectionMap |
typedef boost::shared_ptr< std::vector< CandidatePtr > > | SortedListPtr |
Private Member Functions | |
CandidatePtr | convertToPtr (const PFCandidatePtr &pfPtr) const |
CandidatePtr | convertToPtr (const CandidatePtr &candPtr) const |
std::vector< CandidatePtr > * | getCollection (Region region, ParticleType type) |
SortedListPtr | getSortedCollection (Region region, ParticleType type) |
void | sortAndCopyIntoTau () |
Private Attributes | |
CollectionMap | collections_ |
bool | copyGammas_ |
double | minAbsPhotonSumPt_insideSignalCone_ |
double | minAbsPhotonSumPt_outsideSignalCone_ |
double | minRelPhotonSumPt_insideSignalCone_ |
double | minRelPhotonSumPt_outsideSignalCone_ |
reco::Candidate::LorentzVector | p4_ |
const edm::Handle< edm::View< reco::Candidate > > & | pfCands_ |
const StringObjectFunction< reco::PFTau > * | signalConeSize_ |
SortedCollectionMap | sortedCollections_ |
std::auto_ptr< reco::PFTau > | tau_ |
Definition at line 40 of file RecoTauConstructor.h.
|
private |
Definition at line 133 of file RecoTauConstructor.h.
|
private |
Definition at line 134 of file RecoTauConstructor.h.
|
private |
Definition at line 136 of file RecoTauConstructor.h.
|
private |
Definition at line 135 of file RecoTauConstructor.h.
Enumerator | |
---|---|
kChargedHadron | |
kGamma | |
kNeutralHadron | |
kAll |
Definition at line 47 of file RecoTauConstructor.h.
reco::tau::RecoTauConstructor::RecoTauConstructor | ( | const JetBaseRef & | jetRef, |
const edm::Handle< edm::View< reco::Candidate > > & | pfCands, | ||
bool | copyGammasFromPiZeros = false , |
||
const StringObjectFunction< reco::PFTau > * | signalConeSize = 0 , |
||
double | minAbsPhotonSumPt_insideSignalCone = 2.5 , |
||
double | minRelPhotonSumPt_insideSignalCone = 0. , |
||
double | minAbsPhotonSumPt_outsideSignalCone = 1.e+9 , |
||
double | minRelPhotonSumPt_outsideSignalCone = 1.e+9 |
||
) |
Constructor with PFCandidate Handle.
Definition at line 12 of file RecoTauConstructor.cc.
References collections_, copyGammas_, kAll, kChargedHadron, kGamma, kIsolation, kNeutralHadron, kSignal, RecoPFTauTag_cff::PFTau, sortedCollections_, and tau_.
void reco::tau::RecoTauConstructor::addPFCand | ( | Region | region, |
ParticleType | type, | ||
const CandidatePtr & | ptr, | ||
bool | skipAddToP4 = false |
||
) |
Append a PFCandidateRef/Ptr to a given collection.
Definition at line 58 of file RecoTauConstructor.cc.
References copyGammas_, getSortedCollection(), kAll, kGamma, kSignal, LogDebug, and p4_.
Referenced by addPFCands(), addTauChargedHadron(), and setleadCand().
|
inline |
Definition at line 91 of file RecoTauConstructor.h.
References addPFCand(), addTauChargedHadron(), muons2muons_cfi::chargedHadron, convertToPtr(), end, and reserveTauChargedHadron().
Referenced by addPiZero(), reco::tau::RecoTauBuilderCombinatoricPlugin::operator()(), and reco::tau::RecoTauBuilderConePlugin::operator()().
void reco::tau::RecoTauConstructor::addPiZero | ( | Region | region, |
const RecoTauPiZero & | piZero | ||
) |
Add a PiZero to the given collection.
Definition at line 186 of file RecoTauConstructor.cc.
References addPFCands(), copyGammas_, reco::CompositePtrCandidate::daughterPtrVector(), reco::LeafCandidate::eta(), kGamma, kIsolation, kSignal, LogDebug, reco::LeafCandidate::p4(), p4_, reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), and tau_.
Referenced by addPiZeros(), and addTauChargedHadrons().
|
inline |
Add a list of pizeros to the input collection.
Definition at line 119 of file RecoTauConstructor.h.
References addPiZero(), and end.
Referenced by reco::tau::RecoTauBuilderCombinatoricPlugin::operator()(), and reco::tau::RecoTauBuilderConePlugin::operator()().
void reco::tau::RecoTauConstructor::addTauChargedHadron | ( | Region | region, |
const PFRecoTauChargedHadron & | chargedHadron | ||
) |
Add a ChargedHadron to the given collection.
Definition at line 122 of file RecoTauConstructor.cc.
References funct::abs(), addPFCand(), muons2muons_cfi::chargedHadron, g4TestGeometry_cfi::checkOverlap(), convertToPtr(), copyGammas_, reco::LeafCandidate::eta(), reco::PFRecoTauChargedHadron::getChargedPFCandidate(), reco::PFRecoTauChargedHadron::getNeutralPFCandidates(), getSortedCollection(), edm::Ptr< T >::isNonnull(), kChargedHadron, kGamma, kIsolation, kNeutralHadron, kSignal, LogDebug, reco::PFRecoTauChargedHadron::neutralPFCandidates_, reco::LeafCandidate::p4(), p4_, reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), reco::tau::setChargedHadronP4(), and tau_.
Referenced by addPFCands(), and addTauChargedHadrons().
|
inline |
Add a list of charged hadrons to the input collection.
Definition at line 105 of file RecoTauConstructor.h.
References addPiZero(), addTauChargedHadron(), end, and reservePiZero().
Referenced by reco::tau::RecoTauBuilderCombinatoricPlugin::operator()().
|
private |
Definition at line 238 of file RecoTauConstructor.cc.
References a, b, edm::Ptr< T >::isNonnull(), edm::Ptr< T >::key(), and pfCands_.
Referenced by addPFCands(), addTauChargedHadron(), setleadCand(), setleadChargedHadrCand(), and setleadNeutralCand().
|
private |
Definition at line 219 of file RecoTauConstructor.cc.
References Exception.
std::auto_ptr< reco::PFTau > reco::tau::RecoTauConstructor::get | ( | bool | setupLeadingCandidates = true | ) |
Definition at line 329 of file RecoTauConstructor.cc.
References begin, ALCARECOTkAlJpsiMuMu_cff::charge, muons2muons_cfi::chargedHadron, symbols::dm, end, getCollection(), kAll, kChargedHadron, reco::PFRecoTauChargedHadron::kChargedPFCandidate, kGamma, kIsolation, kSignal, reco::PFRecoTauChargedHadron::kTrack, reco::tau::leadCand(), LogDebug, minAbsPhotonSumPt_insideSignalCone_, minAbsPhotonSumPt_outsideSignalCone_, minRelPhotonSumPt_insideSignalCone_, minRelPhotonSumPt_outsideSignalCone_, hpstanc_transforms::nCharged, p4_, signalConeSize_, sortAndCopyIntoTau(), reco::tau::sumPFCandPt(), and tau_.
Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), reco::tau::RecoTauBuilderCombinatoricPlugin::operator()(), and reco::tau::RecoTauBuilderConePlugin::operator()().
|
private |
Definition at line 209 of file RecoTauConstructor.cc.
References collections_.
Referenced by get(), and reserve().
|
private |
Definition at line 214 of file RecoTauConstructor.cc.
References sortedCollections_.
Referenced by addPFCand(), addTauChargedHadron(), and reserve().
|
inline |
Definition at line 130 of file RecoTauConstructor.h.
References p4_.
Referenced by Tau.Tau::dxy_approx(), Tau.Tau::dz(), reco::tau::RecoTauBuilderCombinatoricPlugin::operator()(), and Lepton.Lepton::p4WithFSR().
void reco::tau::RecoTauConstructor::reserve | ( | Region | region, |
ParticleType | type, | ||
size_t | size | ||
) |
Reserve a set amount of space for a given RefVector.
Definition at line 73 of file RecoTauConstructor.cc.
References getCollection(), getSortedCollection(), kAll, and findQualityFiles::size.
Referenced by reco::tau::RecoTauBuilderCombinatoricPlugin::operator()(), reservePiZero(), and setleadCand().
void reco::tau::RecoTauConstructor::reservePiZero | ( | Region | region, |
size_t | size | ||
) |
Reserve a set amount of space for the PiZeros.
Definition at line 173 of file RecoTauConstructor.cc.
References copyGammas_, kGamma, kIsolation, kSignal, reserve(), and tau_.
Referenced by addTauChargedHadrons(), and reco::tau::RecoTauBuilderCombinatoricPlugin::operator()().
void reco::tau::RecoTauConstructor::reserveTauChargedHadron | ( | Region | region, |
size_t | size | ||
) |
Reserve a set amount of space for the ChargedHadrons.
Definition at line 83 of file RecoTauConstructor.cc.
References g4TestGeometry_cfi::checkOverlap(), edm::Ptr< T >::id(), edm::Ptr< T >::key(), kSignal, LogDebug, boostedElectronIsolation_cff::pfGamma, reco::tau::pfGammas(), edm::Ptr< T >::refCore(), and tau_.
Referenced by addPFCands().
|
inline |
Set leading PF candidate.
Definition at line 79 of file RecoTauConstructor.h.
References addPFCand(), convertToPtr(), reserve(), findQualityFiles::size, and tau_.
Referenced by reco::tau::RecoTauBuilderConePlugin::operator()().
|
inline |
Set leading PFChargedHadron candidate.
Definition at line 69 of file RecoTauConstructor.h.
References convertToPtr(), and tau_.
Referenced by reco::tau::RecoTauBuilderConePlugin::operator()().
|
inline |
Set leading PFGamma candidate.
Definition at line 74 of file RecoTauConstructor.h.
References convertToPtr(), and tau_.
Referenced by reco::tau::RecoTauBuilderConePlugin::operator()().
|
private |
Definition at line 255 of file RecoTauConstructor.cc.
References collections_, reco::deltaR(), reco::PFTau::kNull, reco::PFTau::kOneProngNPiZero, reco::PFTau::kRareDecayMode, RecoTauCombinatoricProducer_cfi::maxPiZeros, RecoTauCombinatoricProducer_cfi::minAbsPhotonSumPt_insideSignalCone, RecoTauCombinatoricProducer_cfi::minAbsPhotonSumPt_outsideSignalCone, RecoTauCombinatoricProducer_cfi::minRelPhotonSumPt_insideSignalCone, RecoTauCombinatoricProducer_cfi::minRelPhotonSumPt_outsideSignalCone, hpstanc_transforms::nCharged, hpstanc_transforms::nPiZeros, reco::Candidate::p4(), reco::LeafCandidate::p4(), muons2muons_cfi::photon, reco::Candidate::pt(), reco::LeafCandidate::pt(), reco::PFTau::signalPiZeroCandidates(), reco::PFTau::signalTauChargedHadronCandidates(), jetUpdater_cfi::sort, sortedCollections_, metsig::tau, and tau_.
Referenced by get().
|
private |
Definition at line 159 of file RecoTauConstructor.h.
Referenced by getCollection(), RecoTauConstructor(), and sortAndCopyIntoTau().
|
private |
Definition at line 138 of file RecoTauConstructor.h.
Referenced by addPFCand(), addPiZero(), addTauChargedHadron(), RecoTauConstructor(), and reservePiZero().
|
private |
Definition at line 141 of file RecoTauConstructor.h.
Referenced by get().
|
private |
Definition at line 143 of file RecoTauConstructor.h.
Referenced by get().
|
private |
Definition at line 142 of file RecoTauConstructor.h.
Referenced by get().
|
private |
Definition at line 144 of file RecoTauConstructor.h.
Referenced by get().
|
private |
Definition at line 165 of file RecoTauConstructor.h.
Referenced by addPFCand(), addPiZero(), addTauChargedHadron(), get(), and p4().
|
private |
Definition at line 157 of file RecoTauConstructor.h.
Referenced by convertToPtr().
|
private |
Definition at line 140 of file RecoTauConstructor.h.
Referenced by get().
|
private |
Definition at line 162 of file RecoTauConstructor.h.
Referenced by getSortedCollection(), RecoTauConstructor(), and sortAndCopyIntoTau().
|
private |
Definition at line 158 of file RecoTauConstructor.h.
Referenced by addPiZero(), addTauChargedHadron(), get(), RecoTauConstructor(), reservePiZero(), reserveTauChargedHadron(), setleadCand(), setleadChargedHadrCand(), setleadNeutralCand(), and sortAndCopyIntoTau().