Jpp
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JAAnet
JWeightMupage.hh
Go to the documentation of this file.
1
#ifndef __JAANET__JWEIGHTMUPAGE__
2
#define __JAANET__JWEIGHTMUPAGE__
3
4
#include "
JWeightEvent.hh
"
5
6
7
namespace
JAANET {
8
9
/**
10
* Implementation of event weighing for MUPAGE data.
11
*/
12
struct
JWeightMupage :
13
public
JClonable<JWeightEvent, JWeightMupage>
14
{
15
/**
16
* Configuration.
17
*
18
* \param header header
19
* \return true if okay; else false
20
*/
21
virtual
bool
configure
(
const
JHead
& header)
22
{
23
if
(header.
livetime
.
numberOfSeconds
> 0.0) {
24
25
W
= 1.0 / header.
livetime
.
numberOfSeconds
;
26
27
return
true
;
28
29
}
else
{
30
31
return
false
;
32
}
33
}
34
35
/**
36
* Get weight of given event.
37
*
38
* \param evt event
39
* \return weight [1/s]
40
*/
41
virtual
double
getWeight
(
const
Evt
& evt)
const
42
{
43
return
W
;
44
}
45
46
private
:
47
double
W
;
48
};
49
}
50
51
#endif
JAANET::JWeightMupage::getWeight
virtual double getWeight(const Evt &evt) const
Get weight of given event.
Definition:
JWeightMupage.hh:41
JWeightEvent.hh
JAANET::JHead::livetime
JAANET::livetime livetime
Definition:
JHead.hh:1102
JAANET::JHead
Monte Carlo run header.
Definition:
JHead.hh:836
JAANET::JWeightMupage::configure
virtual bool configure(const JHead &header)
Configuration.
Definition:
JWeightMupage.hh:21
JAANET::livetime::numberOfSeconds
double numberOfSeconds
Live time [s].
Definition:
JHead.hh:654
Evt
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Definition:
Evt.hh:19
JAANET::JWeightMupage::W
double W
Definition:
JWeightDAQ.hh:47
Generated by
1.8.5