5#ifndef RATESANALYSIS_RATESTGROUP_H
6#define RATESANALYSIS_RATESTGROUP_H 1
18 void execute(
const double prescale);
40 RatesGroup(
const std::string& name, IMessageSvc* msgSvc,
const bool doHistograms =
true,
const bool doExtrapolation =
true);
98 const std::unordered_map<size_t, std::set<const RatesTrigger*>>&
getChildren()
const;
106 const std::string
printRate(
const double ratesDenominator)
const;
127 std::unordered_map<size_t, std::set<const RatesTrigger*>>
m_children;
ExtrapStrat_t
Extrapolation strategy to apply to each emulated trigger.
double getWeight() const
Return the union product (OR of many chains) coherently weighted by the coherent factor.
void execute(const double prescale)
Keep track of a union product (OR of many chains) excluding the coherent part.
void setCoherentFactor(const double coherentFactor)
Set a common prescale factor for this group.
bool m_useCachedWeights
Efficiency.
void setUseCachedWeights(const bool i)
Set to use cached weights from the Master group (need ptr to m_masterGroup)
double getCachedWeight(const size_t l1Hash) const
Get cached weight from triggers seeding from a given L1 item.
bool m_doCachedWeights
Used in the global rates group.
RatesGroup & operator=(const RatesGroup &)=delete
void removeFromGroup(const RatesTrigger *toRemove)
Remove a trigger from this group.
void setDoCachedWeights(const bool i)
Flag group to cache weights.
double m_rateAccumulatorOR2
For stat error.
RatesTrigger * getUniqueTrigger()
Get the trigger I am doing unique rates for.
double m_rateAccumulatorAND
Numerator for the rate of the AND of all triggers.
const ExtrapStrat_t m_extrapolationStrategy
How this group is to scale with luminosity.
const std::string m_name
Name of the group.
const std::unordered_map< size_t, std::set< const RatesTrigger * > > & getChildren() const
void execute(const WeightingValuesSummary_t &weights)
Perform group rates evaluation.
void setExpressGroup(const bool i)
Flag this group as the express group (modifies group trigger's prescales)
double getUniqueWeight(const double ratesDenominator) const
Get the unique rate of a unique-rate group For a group being used to get a unique rate,...
RatesGroup(const std::string &name, IMessageSvc *msgSvc, const bool doHistograms=true, const bool doExtrapolation=true)
Construct new RatesGroup to enumerate the combined union (OR) and intersection (AND) rate of a set of...
const std::string printConfig() const
Prints the RatesGroup's configuration.
void duplicateChildren(const RatesGroup *toDuplicate)
Copy in triggers from another group.
const std::string printRate(const double ratesDenominator) const
Prints the RatesGroup's rate.
RatesTrigger * m_uniqueTrigger
If not nullptr, then a trigger this group is calculating the unique rate for.
void setUniqueTrigger(RatesTrigger *trigger)
Set trigger I am doing unique rates for.
void addToGroup(const RatesTrigger *toAdd)
Add a trigger to this group.
RatesGroup(const RatesGroup &)=delete
const RatesGroup * m_masterGroup
If not nullptr, then use the cached weights info in this master group object.
std::unordered_map< size_t, double > m_cachedWeights
Cached weight of the OR of all triggers except for the L1 seed-hash of the key here.
double m_rateAccumulatorAND2
For stat error.
double m_rateAccumulatorOR
Numerator for the rate of the OR of all triggers.
const size_t m_nameHash
Hash of the group's name.
bool m_isExpressGroup
If this group is calculating for the express stream - also include express prescales.
void removeOtherL1(const RatesTrigger *toKeep)
Remove from the groups mapping all triggers which have a dissimilar seed to the supplied trigger.
std::unordered_map< size_t, std::set< const RatesTrigger * > > m_children
bool doHistograms() const
If histogramming was enabled in this rates object.
RatesHistoBase(const std::string &name, IMessageSvc *msgSvc, const bool doHistograms=true)
Used to calculate the rate for a single trigger at L1 or the HLT.
Structure to hold per-event weights for distribution.