CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/GeneratorInterface/LHEInterface/interface/BranchingRatios.h

Go to the documentation of this file.
00001 #ifndef GeneratorInterface_LHEInterface_BranchingRatios_h
00002 #define GeneratorInterface_LHEInterface_BranchingRatios_h
00003 
00004 #include <map>
00005 
00006 #include <boost/shared_ptr.hpp>
00007 
00008 namespace lhef {
00009 
00010 class LHEEvent;
00011 class Hadronisation;
00012 
00013 class BranchingRatios {
00014     public:
00015         BranchingRatios() {}
00016         ~BranchingRatios() {}
00017 
00018         void reset();
00019 
00020         void set(int pdgId, bool both = true, double value = 1.0);
00021         double getFactor(const Hadronisation *hadronisation,
00022                          const boost::shared_ptr<LHEEvent> &event) const;
00023 
00024     private:
00025         double get(int pdgId, const Hadronisation *hadronisation) const;
00026 
00027         mutable std::map<int, double>   cache;
00028 };
00029 
00030 } // namespace lhef
00031 
00032 #endif // GeneratorCommon_LHEInterface_BranchingRatios_h