Implementation of event weighing for MUPAGE data.
More...
#include <JEvtWeightMupage.hh>
Implementation of event weighing for MUPAGE data.
Definition at line 33 of file JEvtWeightMupage.hh.
◆ pointer_type
◆ clone_type
template<class JClonable_t , class JDerived_t >
◆ JEvtWeightMupage() [1/3]
JAANET::JEvtWeightMupage::JEvtWeightMupage |
( |
| ) |
|
|
inline |
Default Constructor.
Definition at line 40 of file JEvtWeightMupage.hh.
JEvtWeightFactorHelper()
Default constructor.
◆ JEvtWeightMupage() [2/3]
JAANET::JEvtWeightMupage::JEvtWeightMupage |
( |
const JHead & |
header | ) |
|
|
inline |
Constructor.
- Parameters
-
Definition at line 50 of file JEvtWeightMupage.hh.
void configure(const JHead &header) override final
Configuration.
◆ JEvtWeightMupage() [3/3]
Constructor.
- Parameters
-
header | header |
factor | factor |
Definition at line 63 of file JEvtWeightMupage.hh.
void configure(const pointer_type &p)
Configure event-weight factor.
◆ getName()
const char* const JAANET::JEvtWeightMupage::getName |
( |
| ) |
const |
|
inlinefinaloverride |
◆ configure() [1/3]
void JAANET::JEvtWeightMupage::configure |
( |
const JHead & |
header | ) |
|
|
inlinefinaloverride |
Configuration.
- Parameters
-
Definition at line 87 of file JEvtWeightMupage.hh.
98 setNormalisation(1.0 / dt);
102 THROW(
JValueOutOfRange,
"JEvtWeightMupage::configure(): Provided header is inconsistent with MUPAGE.");
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
JAANET::livetime livetime
JAANET::time_interval time_interval
Exception for accessing a value in a collection that is outside of its range.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool check(const JHead &header) const override final
Check whether header is consistent with this event weighter.
double numberOfSeconds
Live time [s].
double t1
Start time in seconds.
double t2
Stop time in seconds.
◆ check()
bool JAANET::JEvtWeightMupage::check |
( |
const JHead & |
header | ) |
const |
|
inlinefinaloverride |
Check whether header is consistent with this event weighter.
- Parameters
-
- Returns
- true if consistent; else false
Definition at line 113 of file JEvtWeightMupage.hh.
bool is_mupage(const JHead &header)
Check for generator.
◆ getWeight()
double JAANET::JEvtWeightMupage::getWeight |
( |
const Evt & |
evt | ) |
const |
|
inlinefinaloverride |
Get rate of given event.
- Parameters
-
- Returns
- weight [1/s]
Definition at line 125 of file JEvtWeightMupage.hh.
129 return getFactor(evt) * getNormalisation(evt);
137 return getNormalisation(evt);
std::vector< double > w
MC: Weights w[0]=w1, w[1]=w2, w[2]=w3 (see e.g. Tag list or km3net-dataformat/definitions)
Helper class for event-weight factor.
JEvtWeightFactor & getFactor() const
Get reference to event-weight factor.
static const int WEIGHTLIST_RESCALED_EVENT_RATE
Rescaled event rate [s-1].
◆ configure() [2/3]
void JAANET::JEvtWeightFactorHelper::configure |
( |
const pointer_type & |
p | ) |
|
|
inlineinherited |
Configure event-weight factor.
- Parameters
-
p | pointer to event-weight factor |
Definition at line 68 of file JEvtWeightFactorHelper.hh.
std::shared_ptr< JEvtWeightFactor > pointer_type
◆ configure() [3/3]
void JAANET::JEvtWeightFactorHelper::configure |
( |
const JEvtWeightFactor & |
factor | ) |
|
|
inlineinherited |
Configure event-weight factor.
- Parameters
-
factor | event-weight factor |
Definition at line 79 of file JEvtWeightFactorHelper.hh.
Exception for null pointer operation.
Abstract base class for specifiable event-weight factors.
virtual clone_type clone() const override
Get clone of this object.
◆ getFactor() [1/2]
Get reference to event-weight factor.
- Returns
- reference to event-weight factor
Definition at line 98 of file JEvtWeightFactorHelper.hh.
103 return *(this->get());
◆ getFactor() [2/2]
double JAANET::JEvtWeightFactorHelper::getFactor |
( |
const Evt & |
evt | ) |
const |
|
inlineinherited |
Get weight-factor of given event.
- Parameters
-
- Returns
- event-weight factor
Definition at line 129 of file JEvtWeightFactorHelper.hh.
virtual double getFactor(const Evt &evt) const =0
Get event-weight factor of given event.
◆ is_valid()
bool JAANET::JEvtWeightFactorHelper::is_valid |
( |
| ) |
const |
|
inlineinherited |
Check whether this event-weight factor is valid.
- Returns
- true if valid; else false
Definition at line 115 of file JEvtWeightFactorHelper.hh.
119 return (helper && helper->
is_valid());
bool is_valid() const
Check whether this event-weight factor is valid.
◆ operator()()
double JAANET::JEvtWeightFactorHelper::operator() |
( |
const Evt & |
evt | ) |
const |
|
inlineinherited |
◆ getProperties() [1/2]
Get properties of this class.
- Parameters
-
eqpars | equation parameters |
Definition at line 154 of file JEvtWeightFactorHelper.hh.
virtual JProperties getProperties(const JEquationParameters &eqpars=JEvtWeightFactor::getEquationParameters())
Get properties of this class.
◆ getProperties() [2/2]
◆ clone()
template<class JClonable_t , class JDerived_t >
|
inlineoverridevirtualinherited |
Get clone of this object.
- Returns
- pointer to newly created object
Reimplemented in JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer, 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 >, and JPHYSICS::JPDFTransformer_t< JArgument_t >.
Definition at line 69 of file JClonable.hh.
71 return new JDerived_t(
static_cast<const JDerived_t&
>(*
this));
The documentation for this struct was generated from the following file: