11 #include <analysis/modules/AnalysisConfiguration/AnalysisConfigurationModule.h>
12 #include <analysis/utility/AnalysisConfiguration.h>
23 setDescription(
"This is a supplementary module designed to configure other modules");
24 addParam(
"tupleStyle", m_tupleStyle, R
"DOCSTRING(This parameter defines style of variables written by all other ntuples tools. \n
25 Possible styles on example of PX variable of pi0 from D in decay B->(D->pi0 pi) pi0:\n
26 'default': B_D_pi0_PX\n
27 'semilaconic': D_pi0_PX\n
28 'laconic': pi01_PX\n)DOCSTRING", std::string("default"));
30 addParam(
"mcMatchingVersion", m_mcMatchingVersion,
"Specifies what version of mc matching algorithm is going to be used. \n"
31 "Possibilities are: BelleII (default) and Belle. The latter should be used when analysing Belle MC.\n"
32 "The difference between the algorithms is only in the treatment (identification) of FSR photons. In Belle II MC \n"
33 "it is possible to identify FSR photons via special flag set by the generator, while in case of Belle MC such\n"
34 "information is not available.", std::string(
"BelleII"));
37 void AnalysisConfigurationModule::initialize()
39 if (m_styles.find(m_tupleStyle) == m_styles.end()) {
40 B2WARNING(
"Chosen tuple style '" << m_tupleStyle <<
"' is not defined. Using default tuple style.");
42 AnalysisConfiguration::instance()->setTupleStyle(m_tupleStyle);
44 if (m_mcMatchingVersion ==
"BelleII")
45 AnalysisConfiguration::instance()->useLegacyMCMatching(
false);
46 else if (m_mcMatchingVersion ==
"Belle" or m_mcMatchingVersion ==
"MC5")
47 AnalysisConfiguration::instance()->useLegacyMCMatching(
true);
49 B2ERROR(
"Invalid mcMatchingVersion specified to AnalysisConfiguration: " << m_mcMatchingVersion <<
"\n"
50 "Please choose between BelleII or Belle depending whether you are analysing Belle II or Belle MC.");
Class to hold general basf2 configuration Used to intiate and configure CreateAnalysis object.
Singleton class keeping configurables of analysis components.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.