15 #include <Math/VectorUtil.h>
43 double xfx(
int nset,
double x,
double Q,
int fl);
44 double getXmin(
int nset,
int member);
45 double getXmax(
int nset,
int member);
46 double getQ2min(
int nset,
int member);
47 double getQ2max(
int nset,
int member);
53 fixPOWHEG_(pset.getUntrackedParameter<std::string> (
"FixPOWHEG",
"")),
54 useFirstAsDefault_(pset.getUntrackedParameter<bool>(
"useFirstAsDefault",
false)),
55 genTag_(pset.getUntrackedParameter<edm::InputTag> (
"GenTag", edm::InputTag(
"genParticles"))),
56 pdfInfoTag_(pset.getUntrackedParameter<edm::InputTag> (
"PdfInfoTag", edm::InputTag(
"generator"))),
57 pdfSetNames_(pset.getUntrackedParameter<std::vector<std::string> > (
"PdfSetNames"))
102 float Q = pdfstuff->pdf()->scalePDF;
104 int id1 = pdfstuff->pdf()->
id.first;
105 if ( id1 == 21 ) { id1 = 0; }
106 double x1 = pdfstuff->pdf()->x.first;
107 double pdf1 = pdfstuff->pdf()->xPDF.first;
109 int id2 = pdfstuff->pdf()->
id.second;
110 if ( id2 == 21 ) { id2 = 0; }
111 double x2 = pdfstuff->pdf()->x.second;
112 double pdf2 = pdfstuff->pdf()->xPDF.second;
129 unsigned int gensize = genParticles->size();
131 for(
unsigned int i = 0;
i<gensize; ++
i) {
134 if (status!=3)
continue;
135 int id = part.
pdgId();
136 if (
id!=23 &&
abs(
id)!=24)
continue;
137 mboson = part.
mass();
140 Q =
sqrt(mboson*mboson+Q*Q);
148 std::auto_ptr<std::vector<double> >
weights (
new std::vector<double>);
149 unsigned int nweights = 1;
151 weights->reserve(nweights);
153 for (
unsigned int i=0;
i<nweights; ++
i) {
157 weights->push_back(newpdf1/pdf1*newpdf2/pdf2);
virtual int pdgId() const
PDG identifier.
#define DEFINE_FWK_MODULE(type)
virtual int status() const
status word
virtual void produce(edm::Event &, const edm::EventSetup &)
Double_t pdf1(double mHstar, double mHreq)
void initPDFSet(int nset, const std::string &filename, int member=0)
std::vector< std::string > pdfSetNames_
double getXmax(int nset, int member)
double getQ2max(int nset, int member)
virtual double mass() const
mass
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void extrapolate(bool extrapolate=true)
double getXmin(int nset, int member)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
PdfWeightProducer(const edm::ParameterSet &)
edm::InputTag pdfInfoTag_
std::vector< std::string > pdfShortNames_
T dot(const Basic3DVector &v) const
Scalar product, or "dot" product, with a vector of same type.
double xfx(int nset, double x, double Q, int fl)
double getQ2min(int nset, int member)
void usePDFMember(int nset, int member)