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  const std::vector<float> &DJRValues() const { return DJRValues_; }
44  bool hasDJRValues() const { return !DJRValues_.empty(); }
45 
46  int nMEPartons() const { return nMEPartons_; }
47 
48  int nMEPartonsFiltered() const { return nMEPartonsFiltered_; }
49 
50  // setters
51 
52  void setWeights(const std::vector<double> &weights)
53  { weights_ = weights; }
54 
55  void setSignalProcessID(unsigned int procID)
56  { signalProcessID_ = procID; }
57 
58  void setScales(double q = -1., double qcd = -1., double qed = -1.)
59  { qScale_ = q, alphaQCD_ = qcd, alphaQED_ = qed; }
60 
61  void setPDF(const PDF *pdf) { pdf_.reset(pdf ? new PDF(*pdf) : 0); }
62 
63  void setBinningValues(const std::vector<double> &values)
64  { binningValues_ = values; }
65 
66  void setDJR(const std::vector<float> &values)
67  {DJRValues_ = values;}
68 
69  void setNMEPartons(int n) {nMEPartons_ = n;}
70 
72 
73  private:
74  // HepMC::GenEvent provides a list of weights
75  std::vector<double> weights_;
76 
77  // generator-dependent process ID
78  unsigned int signalProcessID_;
79 
80  // information about scales
81  double qScale_;
83 
84  // optional PDF info
85  std::auto_ptr<PDF> pdf_;
86 
87  // If event was produced in bis, this contains
88  // the values that were used to define which
89  // bin the event belongs in
90  // This replaces the genEventScale, which only
91  // corresponds to Pythia pthat. The RunInfo
92  // will contain the information what physical
93  // quantity these values actually belong to
94  std::vector<double> binningValues_;
95  std::vector<float> DJRValues_;
98 };
99 
100 #endif // SimDataFormats_GeneratorProducts_GenEventInfoProduct_h
void setNMEPartonsFiltered(int n)
const std::vector< double > & binningValues() const
void setPDF(const PDF *pdf)
const PDF * pdf() const
bool hasBinningValues() const
double alphaQCD() const
const std::vector< float > & DJRValues() const
GenEventInfoProduct & operator=(const GenEventInfoProduct &other)
void setDJR(const std::vector< float > &values)
std::vector< float > DJRValues_
double qScale() const
void setBinningValues(const std::vector< double > &values)
std::vector< double > weights_
bool hasDJRValues() const
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)
int nMEPartonsFiltered() const
unsigned int signalProcessID() const
unsigned int signalProcessID_