13 typedef std::vector<reco::CandidatePtr>
CandPtrs;
16 namespace reco {
namespace tau {
20 int translateTypeToAbsPdgId(
int type) {
34 std::vector<CandidatePtr>
35 flattenPiZeros(
const std::vector<RecoTauPiZero>::const_iterator& piZerosBegin,
const std::vector<RecoTauPiZero>::const_iterator& piZerosEnd) {
36 std::vector<CandidatePtr>
output;
38 for(std::vector<RecoTauPiZero>::const_iterator piZero = piZerosBegin;
39 piZero != piZerosEnd; ++piZero) {
40 for(
size_t iDaughter = 0; iDaughter < piZero->numberOfDaughters();
42 output.push_back(
CandidatePtr(piZero->daughterPtr(iDaughter)));
48 std::vector<CandidatePtr>
59 const std::vector<int>& particleIds,
61 std::vector<int> pdgIds;
63 pdgIds.push_back(translateTypeToAbsPdgId(
particleId));
68 int pdgId,
bool sort) {
71 pfCands.begin(), pfCands.end(),
pdgId, sort);
72 return selectedPFCands;
76 const std::vector<int>& pdgIds,
bool sort) {
80 for(std::vector<int>::const_iterator
pdgId = pdgIds.begin();
83 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 pz() const =0
z coordinate of momentum vector
math::XYZPointF atECALEntrance(const reco::Candidate *part, double bField)
Base class for all types of Jets.
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.
virtual double energy() const =0
energy
virtual double py() const =0
y coordinate of momentum vector
std::vector< reco::CandidatePtr > CandPtrs
bool propagateToEcalEntrance(bool first=true)
const XYZTLorentzVector & vertex() const
the vertex fourvector
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
virtual int charge() const =0
electric charge
Particle reconstructed by the particle flow algorithm.
virtual const Point & vertex() const =0
vertex position
virtual double px() const =0
x coordinate of momentum vector
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.