Jpp
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JAAnet
JWeightDAQ.hh
Go to the documentation of this file.
1
#ifndef __JAANET__JWEIGHTDAQ__
2
#define __JAANET__JWEIGHTDAQ__
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.
DAQ
.
livetime_s
> 0.0) {
24
25
W
= 1.0 / header.
DAQ
.
livetime_s
;
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
Implementation of event weighing for MUPAGE data.
Definition:
JWeightDAQ.hh:12
JAANET::JWeightMupage::getWeight
virtual double getWeight(const Evt &evt) const
Get weight of given event.
Definition:
JWeightDAQ.hh:41
JAANET::DAQ::livetime_s
double livetime_s
Live time [s].
Definition:
JHead.hh:750
JWeightEvent.hh
JLANG::JClonable
Template class for object cloning.
Definition:
JClonable.hh:20
JAANET::JHead
Monte Carlo run header.
Definition:
JHead.hh:836
JAANET::JWeightMupage::configure
virtual bool configure(const JHead &header)
Configuration.
Definition:
JWeightDAQ.hh:21
JAANET::JHead::DAQ
JAANET::DAQ DAQ
Definition:
JHead.hh:1104
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