15 #include <Math/VectorUtil.h> 28 virtual void endJob()
override ;
41 std::vector<double> defPtEdges;
42 defPtEdges.push_back(0.);
43 defPtEdges.push_back(999999.);
48 std::vector<double> defWeights;
49 defWeights.push_back(1.);
51 if (
ptWeights_.size()==1 && ninputs_expected>1) {
74 unsigned int gensize = genParticles->size();
76 std::unique_ptr<double>
weight (
new double);
82 for(
unsigned int i = 0;
i<gensize; ++
i) {
84 int id = part.
pdgId();
85 if (
id!=23 &&
abs(
id)!=24)
continue;
87 if (status!=3)
continue;
88 double pt = part.
pt();
90 for (
unsigned int j=1; j<=
nbins; ++j) {
virtual double pt() const final
transverse momentum
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
virtual void beginJob() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
virtual int status() const final
status word
std::vector< double > isrBinEdges_
edm::EDGetTokenT< reco::GenParticleCollection > genToken_
virtual int pdgId() const final
PDG identifier.
ISRWeightProducer(const edm::ParameterSet &)
Abs< T >::type abs(const T &t)
virtual void endJob() override
std::vector< double > ptWeights_
virtual void produce(edm::Event &, const edm::EventSetup &) override