1 |
#ifndef l1menu_implementation_MenuRateImplementation_h
|
2 |
#define l1menu_implementation_MenuRateImplementation_h
|
3 |
|
4 |
#include "l1menu/IMenuRate.h"
|
5 |
#include <vector>
|
6 |
#include "l1menu/implementation/TriggerRateImplementation.h"
|
7 |
|
8 |
//
|
9 |
// Forward declarations
|
10 |
//
|
11 |
namespace l1menu
|
12 |
{
|
13 |
class ITrigger;
|
14 |
class ITriggerRate;
|
15 |
class TriggerMenu;
|
16 |
class ISample;
|
17 |
}
|
18 |
|
19 |
|
20 |
namespace l1menu
|
21 |
{
|
22 |
namespace implementation
|
23 |
{
|
24 |
/** @brief Implementation of the IMenuRate interface.
|
25 |
*
|
26 |
* @author Mark Grimes (mark.grimes@bristol.ac.uk)
|
27 |
* @date 28/Jun/2013
|
28 |
*/
|
29 |
class MenuRateImplementation : public l1menu::IMenuRate
|
30 |
{
|
31 |
public:
|
32 |
MenuRateImplementation( const l1menu::TriggerMenu& menu, const l1menu::ISample& sample );
|
33 |
float weightOfAllEvents() const;
|
34 |
float weightOfAllEventsPassingAnyTrigger() const;
|
35 |
void setWeightOfAllEvents( float weightOfAllEvents );
|
36 |
void setWeightOfEventsPassingAnyTrigger( float weightOfEventsPassingAnyTrigger );
|
37 |
|
38 |
void setScaling( float scaling );
|
39 |
float scaling() const;
|
40 |
void addTriggerRate( const l1menu::ITrigger& trigger, float weightOfEventsPassingTheTrigger, float weightOfEventsOnlyPassingTheTrigger );
|
41 |
// Methods required by the l1menu::IMenuRate interface
|
42 |
virtual float totalFraction() const;
|
43 |
virtual float totalRate() const;
|
44 |
virtual const std::vector<const l1menu::ITriggerRate*>& triggerRates() const;
|
45 |
protected:
|
46 |
float weightOfAllEvents_;
|
47 |
float weightOfEventsPassingAnyTrigger_;
|
48 |
float scaling_;
|
49 |
std::vector<TriggerRateImplementation> triggerRates_;
|
50 |
private:
|
51 |
mutable std::vector<const l1menu::ITriggerRate*> baseClassReferences_;
|
52 |
};
|
53 |
|
54 |
|
55 |
} // end of the implementation namespace
|
56 |
} // end of the l1menu namespace
|
57 |
#endif
|