|
| PATTrackAndVertexUnpacker (const edm::ParameterSet &iConfig) |
|
void | produce (edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override |
|
| ~PATTrackAndVertexUnpacker () override |
|
| EDProducer ()=default |
|
bool | hasAbilityToProduceInLumis () const final |
|
bool | hasAbilityToProduceInRuns () const final |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
bool | wantsStreamLuminosityBlocks () const final |
|
bool | wantsStreamRuns () const final |
|
| EDProducerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
| ~EDProducerBase () override |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
std::vector< edm::ProductResolverIndex > const & | indiciesForPutProducts (BranchType iBranchType) const |
|
| ProducerBase () |
|
std::vector< edm::ProductResolverIndex > const & | putTokenIndexToProductResolverIndex () const |
|
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
|
std::function< void(BranchDescription const &)> | registrationCallback () const |
| used by the fwk to register list of products More...
|
|
void | resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel) |
|
| ~ProducerBase () noexcept(false) override |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
void | convertCurrentProcessAlias (std::string const &processName) |
| Convert "@currentProcess" in InputTag process names to the actual current process name. More...
|
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
typedef EDProducerBase | ModuleType |
|
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >> |
|
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
|
typedef ProductLabels | Labels |
|
static const std::string & | baseType () |
|
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
|
static void | prevalidate (ConfigurationDescriptions &descriptions) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
|
ConsumesCollector | consumesCollector () |
| Use a ConsumesCollector to gather consumes information from helper functions. More...
|
|
template<typename ProductType , BranchType B = InEvent> |
void | consumesMany () |
|
void | consumesMany (const TypeToGet &id) |
|
template<BranchType B> |
void | consumesMany (const TypeToGet &id) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
Definition at line 28 of file TrackAndVertexUnpacker.cc.
Definition at line 69 of file TrackAndVertexUnpacker.cc.
References reco::Vertex::add(), AdditionalTracks_, EnergyCorrector::c, egammaForCoreTracking_cff::cands, Cands_, pat::PackedCandidate::charge(), reco::CompositePtrCandidate::daughterPtr(), DEFINE_FWK_MODULE, pat::PackedCandidate::fromPV(), edm::Event::getByToken(), pat::PackedCandidate::hasTrackDetails(), mps_fire::i, edm::HandleBase::id(), edm::Ptr< T >::id(), edm::Ptr< T >::key(), eostools::move(), reco::CompositePtrCandidate::numberOfDaughters(), pat::PackedCandidate::numberOfHits(), pat::PackedCandidate::pseudoTrack(), edm::Event::put(), MetAnalyzer::pv(), PVs_, pat::PackedCandidate::PVUsedInFit, alignCSCRings::r, findQualityFiles::rr, pfDeepBoostedJetPreprocessParams_cfi::sv, SVs_, reco::LeafCandidate::vertex(), reco::VertexCompositePtrCandidate::vertexChi2(), reco::VertexCompositePtrCandidate::vertexCovariance(), and reco::VertexCompositePtrCandidate::vertexNdof().
70 using namespace edm;
using namespace std;
using namespace reco;
80 auto outTks = std::make_unique<std::vector<reco::Track>>();
81 std::map<unsigned int, std::vector<unsigned int> > asso;
82 std::map<unsigned int, unsigned int> trackKeys;
84 for(
unsigned int i=0;
i<cands->size();
i++) {
88 for(
size_t ipv=0;ipv< pvs->size(); ++ipv) {
90 asso[ipv].push_back(j);
98 for(
unsigned int i = 0;
i < addTracks->size();
i++) {
99 if( (*addTracks)[
i].hasTrackDetails() ){
100 outTks->push_back((*addTracks)[
i].pseudoTrack());
101 for(
size_t ipv=0;ipv< pvs->size(); ++ipv) {
103 asso[ipv].push_back(j);
111 auto outPv = std::make_unique<std::vector<reco::Vertex>>();
113 for(
size_t ipv=0;ipv< pvs->size(); ++ipv) {
115 for(
unsigned int i=0;
i<asso[ipv].size();
i++)
121 outPv->push_back(pv);
125 auto outSv = std::make_unique<std::vector<reco::Vertex>>();
126 for(
size_t i=0;
i< svs->size();
i++) {
138 outSv->back().add(
rr);
const edm::EDGetTokenT< reco::VertexCollection > PVs_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
double vertexNdof() const override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const edm::EDGetTokenT< std::vector< pat::PackedCandidate > > Cands_
size_t numberOfDaughters() const override
number of daughters
int charge() const override
electric charge
const PVAssoc fromPV(size_t ipv=0) const
double vertexCovariance(int i, int j) const override
(i, j)-th element of error matrix, i, j = 0, ... 3
const Point & vertex() const override
vertex position (overwritten by PF...)
virtual const reco::Track & pseudoTrack() const
Return reference to a pseudo track made with candidate kinematics, parameterized error for eta...
const edm::EDGetTokenT< std::vector< pat::PackedCandidate > > AdditionalTracks_
bool hasTrackDetails() const
Return true if a bestTrack can be extracted from this Candidate.
void add(const TrackBaseRef &r, float w=1.0)
add a reference to a Track
const edm::EDGetTokenT< reco::VertexCompositePtrCandidateCollection > SVs_
virtual CandidatePtr daughterPtr(size_type i) const
reference to daughter at given position
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
ProductID id() const
Accessor for product ID.
double vertexChi2() const override
chi-squares