13 typedef std::vector<reco::CandidatePtr>
CandPtrs;
21 int translateTypeToAbsPdgId(
int type) {
43 std::vector<CandidatePtr>
flattenPiZeros(
const std::vector<RecoTauPiZero>::const_iterator& piZerosBegin,
44 const std::vector<RecoTauPiZero>::const_iterator& piZerosEnd) {
45 std::vector<CandidatePtr>
output;
47 for (std::vector<RecoTauPiZero>::const_iterator piZero = piZerosBegin; piZero != piZerosEnd; ++piZero) {
48 for (
size_t iDaughter = 0; iDaughter < piZero->numberOfDaughters(); ++iDaughter) {
49 output.push_back(
CandidatePtr(piZero->daughterPtr(iDaughter)));
55 std::vector<CandidatePtr>
flattenPiZeros(
const std::vector<RecoTauPiZero>& piZeros) {
63 std::vector<CandidatePtr>
pfCandidates(
const Jet&
jet,
const std::vector<int>& particleIds,
bool sort) {
64 std::vector<int> pdgIds;
65 pdgIds.reserve(particleIds.size());
66 for (
auto particleId : particleIds)
67 pdgIds.push_back(translateTypeToAbsPdgId(particleId));
74 return selectedPFCands;
78 const std::vector<int>& pdgIds,
83 for (std::vector<int>::const_iterator pdgId = pdgIds.begin(); pdgId != pdgIds.end(); ++pdgId) {
85 output.insert(output.end(), selectedPFCands.begin(), selectedPFCands.end());
100 output.reserve(mus.size() + es.size() + chs.size());
101 output.insert(output.end(), mus.begin(), mus.end());
102 output.insert(output.end(), es.begin(), es.end());
103 output.insert(output.end(), chs.begin(), chs.end());
std::vector< CandidatePtr > pfCandidatesByPdgId(const Jet &jet, int pdgId, bool sort=true)
std::vector< CandidatePtr > pfCandidates(const Jet &jet, int particleId, bool sort=true)
virtual double energy() const =0
energy
math::XYZPointF atECALEntrance(const reco::Candidate *part, double bField)
Base class for all types of Jets.
virtual double pz() const =0
z coordinate of momentum vector
int getSuccess() const
Has propagation been performed and was barrel or endcap reached ?
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
RawParticle const & particle() const
The particle being propagated.
std::vector< CandidatePtr > pfChargedCands(const Jet &jet, bool sort=true)
Extract all non-neutral candidates from a PFJet.
const math::XYZPointF & positionAtECALEntrance() const
virtual const daughters & daughterPtrVector() const
references to daughtes
std::vector< CandidatePtr > flattenPiZeros(const std::vector< RecoTauPiZero >::const_iterator &, const std::vector< RecoTauPiZero >::const_iterator &)
Flatten a list of pi zeros into a list of there constituent PFCandidates.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
std::vector< reco::CandidatePtr > CandPtrs
virtual const Point & vertex() const =0
vertex position
virtual int charge() const =0
electric charge
virtual double py() const =0
y coordinate of momentum vector
bool propagateToEcalEntrance(bool first=true)
virtual double px() const =0
x coordinate of momentum vector
const XYZTLorentzVector & vertex() const
the vertex fourvector
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Particle reconstructed by the particle flow algorithm.
std::vector< CandidatePtr > filterPFCandidates(const Iterator &begin, const Iterator &end, int pdgId, bool sort=true)
CandPtrs::iterator CandIter
std::vector< CandidatePtr > pfGammas(const Jet &jet, bool sort=true)
Extract all pfGammas from a PFJet.