9 #include <analysis/modules/RestOfEventInterpreter/RestOfEventInterpreterModule.h> 
   11 #include <analysis/dataobjects/Particle.h> 
   12 #include <analysis/dataobjects/RestOfEvent.h> 
   14 #include <framework/logging/Logger.h> 
   15 #include <framework/core/ModuleParam.templateDetails.h> 
   31 RestOfEventInterpreterModule::RestOfEventInterpreterModule() : 
Module()
 
   34   setDescription(
"Creates a mask (vector of boolean values) for tracks and clusters in RestOfEvent.");
 
   38   std::vector<std::tuple<std::string, std::string, std::string, std::string>> emptyROEMask;
 
   43            "List of (maskName, trackSelectionCut, eclClusterSelectionCut) tuples that specify all ROE masks of a specific particle to be created.",
 
   46   addParam(
"update", 
m_update, 
"Set true for updating a-priori charged stable fractions used in calculation of ROE 4-momentum",
 
   59     std::string maskName = get<0>(ROEMask);
 
   60     std::string trackSelection = get<1>(ROEMask);
 
   61     std::string eclClusterSelection = get<2>(ROEMask);
 
   62     std::string klmClusterSelection = get<3>(ROEMask);
 
   64     std::shared_ptr<Variable::Cut> trackCut = std::shared_ptr<Variable::Cut>(
Variable::Cut::compile(trackSelection));
 
   65     std::shared_ptr<Variable::Cut> eclClusterCut = std::shared_ptr<Variable::Cut>(
Variable::Cut::compile(eclClusterSelection));
 
   66     std::shared_ptr<Variable::Cut> klmClusterCut = std::shared_ptr<Variable::Cut>(
Variable::Cut::compile(klmClusterSelection));
 
   69     m_trackCuts.insert(stringAndCutMap::value_type(maskName, trackCut));
 
   70     m_eclClusterCuts.insert(stringAndCutMap::value_type(maskName, eclClusterCut));
 
   71     m_klmClusterCuts.insert(stringAndCutMap::value_type(maskName, klmClusterCut));
 
   73     B2INFO(
"RestOfEventInterpreter added ROEMask with specific fractions under name \'" << maskName << 
"\' with track cuts: " <<
 
   74            trackSelection << 
" and eclCluster cuts: " << eclClusterSelection);
 
   80   unsigned int nParts = 
m_plist->getListSize();
 
   82   for (
unsigned i = 0; i < nParts; i++) {
 
static std::unique_ptr< GeneralCut > compile(const std::string &cut)
Creates an instance of a cut and returns a unique_ptr to it, if you need a copy-able object instead y...
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Class to store reconstructed particles.
TO * getRelatedTo(const std::string &name="", const std::string &namedRelation="") const
Get the object to which this object has a relation.
std::string m_particleListName
Name of the ParticleList.
virtual void initialize() override
Overridden initialize method.
virtual void event() override
Overridden event method.
std::vector< std::string > m_maskNames
Container for added mask names of ROE interpretations.
std::vector< std::tuple< std::string, std::string, std::string, std::string > > m_ROEMasks
Container for tuples.
stringAndCutMap m_trackCuts
Cut object which performs the cuts on the remaining tracks for a single ROE interpretation.
bool m_update
Set true for updating a-priori charged stable fractions.
stringAndCutMap m_eclClusterCuts
Cut object which performs the cuts on the remaining ECL clusters for a single ROE interpretation.
StoreObjPtr< ParticleList > m_plist
input particle list
stringAndCutMap m_klmClusterCuts
Cut object which performs the cuts on the remaining KLM clusters for a single ROE interpretation.
This is a general purpose class for collecting reconstructed MDST data objects that are not used in r...
void initializeMask(const std::string &name, const std::string &origin="unknown")
Initialize new mask.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.