15 #include <Math/VectorUtil.h> 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) {
int pdgId() const final
PDG identifier.
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
double pt() const final
transverse momentum
std::vector< double > isrBinEdges_
~ISRWeightProducer() override
edm::EDGetTokenT< reco::GenParticleCollection > genToken_
ISRWeightProducer(const edm::ParameterSet &)
Abs< T >::type abs(const T &t)
std::vector< double > ptWeights_
int status() const final
status word
void produce(edm::Event &, const edm::EventSetup &) override