Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
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
14namespace JAANET {}
15namespace JPP { using namespace JAANET; }
16
17namespace 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
Monte Carlo run header.
Definition JHead.hh:1236
Extensions to Evt data format.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Definition Evt.hh:21
Low-level interface for event weighing.
virtual bool check(const JHead &header) const =0
Check whether header is consistent with this event weighter.
virtual void setNormalisation(const double normalisation)=0
Set event-weight normalisation factor.
virtual double getWeight(const Evt &evt) const =0
Get weight of given event.
virtual double getNormalisation() const =0
Get event-weight normalisation factor.
virtual void configure(const JHead &header)=0
Configuration.
virtual const char *const getName() const =0
Get name.