33 #include "CLHEP/Vector/ThreeVector.h" 34 #include "CLHEP/Vector/LorentzVector.h" 35 #include "CLHEP/Matrix/Vector.h" 61 maxRapidity_(iConfig.getParameter<double>(
"maxRapidity"))
63 produces< std::vector<pat::PackedGenParticle> > ();
64 produces< edm::Association< std::vector<pat::PackedGenParticle> > >();
84 std::vector<int>
mapping(genOrigs->size(), -1);
88 for(
unsigned int ic=0, nc = genOrigs->size(); ic < nc; ++ic)
95 auto outPtrP = std::make_unique<std::vector<pat::PackedGenParticle>>();
97 unsigned int packed=0;
98 for(
unsigned int ic=0, nc = cands->size(); ic < nc; ++ic) {
125 auto gp2pgp = std::make_unique<edm::Association<std::vector<pat::PackedGenParticle>>>(oh);
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool isNonnull() const
Checks for non-null.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
PATPackedGenParticleProducer(const edm::ParameterSet &)
size_t numberOfMothers() const override
number of mothers
double y() const final
rapidity
key_type key() const
Accessor for product key.
const double maxRapidity_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const edm::EDGetTokenT< reco::GenParticleCollection > Cands_
#define DEFINE_FWK_MODULE(type)
Abs< T >::type abs(const T &t)
const edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > Asso_
daughters::value_type motherRef(size_type i=0) const
reference to mother at given position
int status() const final
status word
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
const edm::EDGetTokenT< reco::GenParticleCollection > GenOrigs_
~PATPackedGenParticleProducer() override
const edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > AssoOriginal_