#include <BranchingRatios.h>
Public Member Functions | |
BranchingRatios () | |
double | getFactor (const Hadronisation *hadronisation, const boost::shared_ptr< LHEEvent > &event) const |
void | reset () |
void | set (int pdgId, bool both=true, double value=1.0) |
~BranchingRatios () | |
Private Member Functions | |
double | get (int pdgId, const Hadronisation *hadronisation) const |
Private Attributes | |
std::map< int, double > | cache |
Definition at line 13 of file BranchingRatios.h.
lhef::BranchingRatios::BranchingRatios | ( | ) | [inline] |
Definition at line 15 of file BranchingRatios.h.
{}
lhef::BranchingRatios::~BranchingRatios | ( | ) | [inline] |
Definition at line 16 of file BranchingRatios.h.
{}
double lhef::BranchingRatios::get | ( | int | pdgId, |
const Hadronisation * | hadronisation | ||
) | const [private] |
Definition at line 38 of file BranchingRatios.cc.
References cache, pos, and lhef::Hadronisation::totalBranchingRatio().
{ std::map<int, double>::const_iterator pos = cache.find(pdgId); if (pos == cache.end()) { double val = hadronisation->totalBranchingRatio(pdgId); if (val <= 0.0) val = 1.0; if (val < 0.99) edm::LogInfo("Generator|LHEInterface") << "Particle with pdgId " << pdgId << " only partly decayed in hadronizer, " "reducing respective event cross-section " "contribution with a factor of " << val << "." << std::endl; cache.insert(std::make_pair(pdgId, val)); return val; } else return pos->second; }
double lhef::BranchingRatios::getFactor | ( | const Hadronisation * | hadronisation, |
const boost::shared_ptr< LHEEvent > & | event | ||
) | const |
Definition at line 25 of file BranchingRatios.cc.
References i, lhef::HEPEUP::IDUP, lhef::HEPEUP::ISTUP, and lhef::HEPEUP::NUP.
Referenced by LHEProducer::filter().
void lhef::BranchingRatios::reset | ( | void | ) |
void lhef::BranchingRatios::set | ( | int | pdgId, |
bool | both = true , |
||
double | value = 1.0 |
||
) |
Definition at line 18 of file BranchingRatios.cc.
References cache, benchmark_cfg::pdgId, and relativeConstraints::value.
Referenced by LHEProducer::LHEProducer().
std::map<int, double> lhef::BranchingRatios::cache [mutable, private] |
Definition at line 27 of file BranchingRatios.h.