Jpp
test_elongated_shower_pde
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JDAQ
JHighRateVeto.hh
Go to the documentation of this file.
1
#ifndef __JDAQ__JHIGHRATEVETO__
2
#define __JDAQ__JHIGHRATEVETO__
3
4
#include "
km3net-dataformat/online/JDAQClock.hh
"
5
6
/**
7
* \author mdejong
8
*/
9
10
namespace
KM3NETDAQ {
11
12
/**
13
* High-rate veto [kHz]
14
*/
15
static
double
HIGH_RATE_VETO_HZ
= 20.0e3;
16
17
18
/**
19
* Get maximal number of hits from one PMT within data frame.
20
*
21
* \return number of hits
22
*/
23
inline
size_t
getMaximalNumberOfHits
()
24
{
25
return
(
size_t
) (
getFrameTime
() * (
HIGH_RATE_VETO_HZ
* 1.0e-9));
26
}
27
28
29
/**
30
* Get maximal time for given rate.
31
*
32
* \param R_Hz rate [Hz]
33
* \return time [ns]
34
*/
35
inline
double
getMaximalTime
(
const
double
R_Hz)
36
{
37
double
t1 =
getFrameTime
();
38
39
if
(R_Hz > 0) {
40
41
t1 = (double)
getMaximalNumberOfHits
() / (R_Hz * 1.0e-9);
42
43
if
(t1 >
getFrameTime
()) {
44
t1 =
getFrameTime
();
45
}
46
}
47
48
return
t1;
49
}
50
}
51
52
#endif
KM3NETDAQ::getMaximalNumberOfHits
size_t getMaximalNumberOfHits()
Get maximal number of hits from one PMT within data frame.
Definition:
JHighRateVeto.hh:23
KM3NETDAQ::getFrameTime
double getFrameTime()
Get frame time duration.
Definition:
JDAQClock.hh:162
KM3NETDAQ::getMaximalTime
double getMaximalTime(const double R_Hz)
Get maximal time for given rate.
Definition:
JHighRateVeto.hh:35
KM3NETDAQ::HIGH_RATE_VETO_HZ
static double HIGH_RATE_VETO_HZ
High-rate veto [kHz].
Definition:
JHighRateVeto.hh:15
JDAQClock.hh
Generated by
1.8.5