CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GenEventInfoProduct.h
Go to the documentation of this file.
1 #ifndef SimDataFormats_GeneratorProducts_GenEventInfoProduct_h
2 #define SimDataFormats_GeneratorProducts_GenEventInfoProduct_h
3 
4 #include <vector>
5 #include <memory>
6 
8 
9 namespace HepMC { class GenEvent; } // forward declaration
10 
16  public:
18  GenEventInfoProduct(const HepMC::GenEvent *evt);
20  virtual ~GenEventInfoProduct();
21 
23 
24  typedef gen::PdfInfo PDF;
25 
26  // getters
27 
28  const std::vector<double> &weights() const { return weights_; }
29  double weight() const;
30 
31  unsigned int signalProcessID() const { return signalProcessID_; }
32 
33  double qScale() const { return qScale_; }
34  double alphaQCD() const { return alphaQCD_; }
35  double alphaQED() const { return alphaQED_; }
36 
37  const PDF *pdf() const { return pdf_.get(); }
38  bool hasPDF() const { return pdf() != 0; }
39 
40  const std::vector<double> &binningValues() const { return binningValues_; }
41  bool hasBinningValues() const { return !binningValues_.empty(); }
42 
43  // setters
44 
45  void setWeights(const std::vector<double> &weights)
46  { weights_ = weights; }
47 
48  void setSignalProcessID(unsigned int procID)
49  { signalProcessID_ = procID; }
50 
51  void setScales(double q = -1., double qcd = -1., double qed = -1.)
52  { qScale_ = q, alphaQCD_ = qcd, alphaQED_ = qed; }
53 
54  void setPDF(const PDF *pdf) { pdf_.reset(pdf ? new PDF(*pdf) : 0); }
55 
56  void setBinningValues(const std::vector<double> &values)
57  { binningValues_ = values; }
58 
59  private:
60  // HepMC::GenEvent provides a list of weights
61  std::vector<double> weights_;
62 
63  // generator-dependent process ID
64  unsigned int signalProcessID_;
65 
66  // information about scales
67  double qScale_;
69 
70  // optional PDF info
71  std::auto_ptr<PDF> pdf_;
72 
73  // If event was produced in bis, this contains
74  // the values that were used to define which
75  // bin the event belongs in
76  // This replaces the genEventScale, which only
77  // corresponds to Pythia pthat. The RunInfo
78  // will contain the information what physical
79  // quantity these values actually belong to
80  std::vector<double> binningValues_;
81 };
82 
83 #endif // SimDataFormats_GeneratorProducts_GenEventInfoProduct_h
const std::vector< double > & binningValues() const
void setPDF(const PDF *pdf)
const PDF * pdf() const
bool hasBinningValues() const
double alphaQCD() const
GenEventInfoProduct & operator=(const GenEventInfoProduct &other)
double qScale() const
void setBinningValues(const std::vector< double > &values)
std::vector< double > weights_
void setScales(double q=-1., double qcd=-1., double qed=-1.)
double alphaQED() const
std::auto_ptr< PDF > pdf_
std::vector< double > binningValues_
const std::vector< double > & weights() const
void setWeights(const std::vector< double > &weights)
void setSignalProcessID(unsigned int procID)
unsigned int signalProcessID() const
unsigned int signalProcessID_