Implementation of event weighing for KM3BUU data.
More...
#include <JWeightKM3BUU.hh>
Implementation of event weighing for KM3BUU data.
Definition at line 28 of file JWeightKM3BUU.hh.
template<class JClonable_t, class JDerived_t = JNullType>
JAANET::JWeightKM3BUU::JWeightKM3BUU |
( |
| ) |
|
|
inline |
JAANET::JWeightKM3BUU::JWeightKM3BUU |
( |
const JHead & |
header | ) |
|
|
inline |
Constructor.
- Parameters
-
Definition at line 43 of file JWeightKM3BUU.hh.
virtual void configure(const JHead &header) override
Configuration.
virtual void JAANET::JWeightKM3BUU::configure |
( |
const JHead & |
header | ) |
|
|
inlineoverridevirtual |
Configuration.
- Parameters
-
- Returns
- true if okay; else false
Definition at line 55 of file JWeightKM3BUU.hh.
57 if (
check(header) && (header.tgen.numberOfSeconds > 0.0 &&
58 header.genvol.numberOfEvents > 0.0)) {
60 W = 1.0 / header.genvol.numberOfEvents / header.tgen.numberOfSeconds;
64 THROW(JValueOutOfRange,
"JWeightKM3BUU::configure(): Provided header is inconsistent with KM3BUU.");
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
virtual bool check(const JHead &header) const override
Check whether header is consistent with this event weighter.
virtual bool JAANET::JWeightKM3BUU::check |
( |
const JHead & |
header | ) |
const |
|
inlineoverridevirtual |
Check whether header is consistent with this event weighter.
- Parameters
-
- Returns
- true if consistent; else false
Definition at line 75 of file JWeightKM3BUU.hh.
bool is_km3buu(const JHead &header)
Check for generator.
virtual double JAANET::JWeightKM3BUU::getWeight |
( |
const Evt & |
evt | ) |
const |
|
inlineoverridevirtual |
Get weight of given event.
- Parameters
-
- Returns
- weight [Hz]
Definition at line 87 of file JWeightKM3BUU.hh.
89 if (evt.
w.size() > 2 && evt.
w[2] > 0.0) {
95 if (evt.
w.size() < 3) {
96 THROW(JIndexOutOfRange,
"JWeightKM3BUU::getWeight(): w3-weight is empty.");
98 THROW(JValueOutOfRange,
"JWeightKM3BUU::getWeight(): w3-weight is negative.");
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
std::vector< double > w
MC: Weights w[0]=w1, w[1]=w2, w[2]]=w3 (see e.g. Tag list)
virtual double JAANET::JWeightKM3BUU::getWeight |
( |
const Evt & |
evt, |
|
|
const double |
flux |
|
) |
| const |
|
inlineoverridevirtual |
Get weight of given event.
- Parameters
-
evt | event |
flux | neutrino flux [m^-2 s^-1 sr^-1 GeV^-1] |
- Returns
- weight [Hz]
Definition at line 111 of file JWeightKM3BUU.hh.
114 if (evt.
w.size() > 1 && !(evt.
w[1] < 0.0 || flux < 0.0)) {
116 return W * evt.
w[1] * flux;
120 if (evt.
w.size() < 2) {
121 THROW(JIndexOutOfRange,
"JWeightKM3BUU::getWeight(): w2-weight is empty.");
123 THROW(JValueOutOfRange,
"JWeightKM3BUU::getWeight(): w2-weight or flux is negative.");
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
std::vector< double > w
MC: Weights w[0]=w1, w[1]=w2, w[2]]=w3 (see e.g. Tag list)
template<class JClonable_t, class JDerived_t = JNullType>
|
inlineoverridevirtualinherited |
Get clone of this object.
- Returns
- pointer to newly created object
Reimplemented in JPHYSICS::JPDFTransformer< 5, JArgument_t >, JPHYSICS::JPDFTransformer< 4, JArgument_t >, JPHYSICS::JPDFTransformer< 3, JArgument_t >, JPHYSICS::JPDFTransformer< 2, JArgument_t >, JPHYSICS::JPDGTransformer_t< JArgument_t >, JPHYSICS::JPD0Transformer_t< JArgument_t >, JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer, JPHYSICS::JPDFTransformer_t< JArgument_t >, JLANG::JClonable< JMatch< JTRIGGER::JHitR1 > >, and JLANG::JClonable< JMatch< JTRIGGER::JHitR1 >, JMatch3G< JTRIGGER::JHitR1 > >.
Definition at line 69 of file JClonable.hh.
71 return new JDerived_t(static_cast<const JDerived_t&>(*
this));
double JAANET::JWeightKM3BUU::W |
|
private |
The documentation for this struct was generated from the following file: