CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h

Go to the documentation of this file.
00001 #ifndef SimDataFormats_GeneratorProducts_GenEventInfoProduct_h
00002 #define SimDataFormats_GeneratorProducts_GenEventInfoProduct_h
00003 
00004 #include <vector>
00005 #include <memory>
00006 
00007 #include "SimDataFormats/GeneratorProducts/interface/PdfInfo.h"
00008 
00009 namespace HepMC { class GenEvent; } // forward declaration
00010 
00015 class GenEventInfoProduct {
00016     public:
00017         GenEventInfoProduct();
00018         GenEventInfoProduct(const HepMC::GenEvent *evt);
00019         GenEventInfoProduct(const GenEventInfoProduct &other);
00020         virtual ~GenEventInfoProduct();
00021 
00022         GenEventInfoProduct &operator = (const GenEventInfoProduct &other);
00023 
00024         typedef gen::PdfInfo PDF;
00025 
00026         // getters
00027 
00028         const std::vector<double> &weights() const { return weights_; }
00029         double weight() const;
00030 
00031         unsigned int signalProcessID() const { return signalProcessID_; }
00032 
00033         double qScale() const { return qScale_; }
00034         double alphaQCD() const { return alphaQCD_; }
00035         double alphaQED() const { return alphaQED_; }
00036 
00037         const PDF *pdf() const { return pdf_.get(); }
00038         bool hasPDF() const { return pdf() != 0; }
00039 
00040         const std::vector<double> &binningValues() const { return binningValues_; }
00041         bool hasBinningValues() const { return !binningValues_.empty(); }
00042 
00043         // setters
00044 
00045         void setWeights(const std::vector<double> &weights)
00046         { weights_ = weights; }
00047 
00048         void setSignalProcessID(unsigned int procID)
00049         { signalProcessID_  = procID; }
00050 
00051         void setScales(double q = -1., double qcd = -1., double qed = -1.)
00052         { qScale_ = q, alphaQCD_ = qcd, alphaQED_ = qed; }
00053 
00054         void setPDF(const PDF *pdf) { pdf_.reset(pdf ? new PDF(*pdf) : 0); }
00055 
00056         void setBinningValues(const std::vector<double> &values)
00057         { binningValues_ = values; }
00058 
00059     private:
00060         // HepMC::GenEvent provides a list of weights
00061         std::vector<double>     weights_;
00062 
00063         // generator-dependent process ID
00064         unsigned int            signalProcessID_;
00065 
00066         // information about scales
00067         double                  qScale_;
00068         double                  alphaQCD_, alphaQED_;
00069 
00070         // optional PDF info
00071         std::auto_ptr<PDF>      pdf_;
00072 
00073         // If event was produced in bis, this contains
00074         // the values that were used to define which
00075         // bin the event belongs in
00076         // This replaces the genEventScale, which only
00077         // corresponds to Pythia pthat.  The RunInfo
00078         // will contain the information what physical
00079         // quantity these values actually belong to
00080         std::vector<double>     binningValues_;
00081 };
00082 
00083 #endif // SimDataFormats_GeneratorProducts_GenEventInfoProduct_h