29 class JEvtWeightFactorUndefined final :
37 JEvtWeightFactorUndefined()
47 double getFactor(
const Evt& evt)
const override final
51 THROW(
JNoValue,
"JEvtWeightFactorUndefined::getFactor(): No weight defined.");
62 return JEvtWeightFactorUndefinedHelper(*
this, eqpars);
73 return JEvtWeightFactorUndefinedHelper(*
this, eqpars);
82 struct JEvtWeightFactorUndefinedHelper :
91 template<
class JEvtWeightFactorUndefined_t>
92 JEvtWeightFactorUndefinedHelper(JEvtWeightFactorUndefined_t& factor,
96 (*this)[JEvtWeightFactor::getTypeKey()] =
"undefined";
132 catch(
const exception& error) {
133 FATAL(error.what() << endl);
140 WARNING(
"No flux functions set." << endl);
146 const JEvtWeight& weighter = scanner->getEvtWeighter();
152 if (p == NULL) {
continue; }
158 for (JEvtCategorySet::const_iterator i = categories.cbegin(); i != categories.cend(); ++i) {
166 for (JEvtCategorySet::const_iterator i = categories.cbegin(); i != categories.cend(); ++i) {
171 NOTICE(
"scanner " <<
distance(scanners.begin(), scanner) <<
":" << endl <<
172 "======================================================" << endl);
173 DEBUG (endl << header << endl << endl);
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
General purpose messaging.
#define DEBUG(A)
Message macros.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int main(int argc, char **argv)
I/O formatting auxiliaries.
ROOT TTree parameter settings of various packages.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Template specialisation for a map between event categories and event-weight factor products.
void insert(const JEvtCategoryHelper &category, const JEvtWeightFactorProduct &product)
Insert pair of an event category and a product of event-weight factors.
const JOscProbHelper & getOscProb() const
Get oscillation probability calculator.
const JHead & getHeader() const
Get header.
Utility class to parse parameter values.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Exception for missing value.
Utility class to parse command line options.
JEvtCategorySet getCategories(const JHead &header)
Auxiliary method to retrieve the unique event categories corresponding to a MC header.
JProperties & getProperties(T &object, const JEquationParameters ¶meters=JEquationParameters(), const int debug=1)
Get properties of a given object.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Container for a set of event categories.
Helper class for event-weight factor.
Abstract base class for event weighing.
Template class for object cloning.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class for organising Monte Carlo file scanners associated with event weighters.
size_t setEvtWeightFactor(const JEvtCategoryHelper &category, const JEvtWeightFactorHelper &factor)
Set event-weighting factor for all MC-files corresponding to a given PDG code.
std::vector< filescanner_type >::iterator iterator
Auxiliary base class for list of file names.