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::auto_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) {
T getUntrackedParameter(std::string const &, T const &) const
virtual int pdgId() const
PDG identifier.
virtual float pt() const
transverse momentum
virtual void beginJob() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
virtual int status() const
status word
std::vector< double > isrBinEdges_
edm::EDGetTokenT< reco::GenParticleCollection > genToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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