Jpp  18.6.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JEvtWeightInterface.hh
Go to the documentation of this file.
1 #ifndef __JAANET__JEVTWEIGHTINTERFACE__
2 #define __JAANET__JEVTWEIGHTINTERFACE__
3 
6 
7 #include "JAAnet/JHead.hh"
8 
9 
10 /**
11  * \author mdejong
12  */
13 
14 namespace JAANET {}
15 namespace JPP { using namespace JAANET; }
16 
17 namespace JAANET {
18 
19  /**
20  * Low-level interface for event weighing.
21  */
23  {
24  /**
25  * Get name.
26  *
27  * \return name
28  */
29  virtual const char* const getName() const = 0;
30 
31 
32  /**
33  * Configuration.
34  *
35  * \param header header
36  */
37  virtual void configure(const JHead& header) = 0;
38 
39 
40  /**
41  * Check whether header is consistent with this event weighter.
42  *
43  * \param header header
44  * \return true if consistent; else false
45  */
46  virtual bool check(const JHead& header) const = 0;
47 
48 
49  /**
50  * Get weight of given event.
51  *
52  * \param evt event
53  * \return weight [Hz]
54  */
55  virtual double getWeight(const Evt& evt) const = 0;
56 
57 
58  /**
59  * Get event-weight normalisation factor.
60  * Note: the return-value should be *multiplied* in order to normalise the event-weight
61  *
62  * \return event-weight normalisation factor.
63  */
64  virtual double getNormalisation() const = 0;
65 
66 
67  /**
68  * Set event-weight normalisation factor.
69  * Note: the set-value should be *multiplied* in order to normalise the event-weight
70  *
71  * \param normalisation event-weight normalisation factor.
72  */
73  virtual void setNormalisation(const double normalisation) = 0;
74  };
75 }
76 
77 #endif
virtual double getNormalisation() const =0
Get event-weight normalisation factor.
virtual bool check(const JHead &header) const =0
Check whether header is consistent with this event weighter.
virtual const char *const getName() const =0
Get name.
virtual void setNormalisation(const double normalisation)=0
Set event-weight normalisation factor.
Low-level interface for event weighing.
Monte Carlo run header.
Definition: JHead.hh:1234
virtual double getWeight(const Evt &evt) const =0
Get weight of given event.
virtual void configure(const JHead &header)=0
Configuration.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Definition: Evt.hh:20