 |
Belle II Software
release-05-02-19
|
12 #include <framework/core/Module.h>
13 #include <framework/datastore/StoreObjPtr.h>
14 #include <framework/pcore/SetMergeable.h>
15 #include <framework/pcore/RootMergeable.h>
21 #include <unordered_set>
57 virtual void event()
override;
StoreObjPtr< RootMergeable< TTree > > m_tree
ROOT TNtuple containting the saved hashes and strings.
TFile * m_file
ROOT file to store the hashes and strings.
ParticleMCDecayStringModule()
Constructor.
Adds the Monte Carlo decay string to a Particle.
const std::string c_ExtraInfoName
Name of the extraInfo, which is stored in each Particle.
float m_decayHash
Decay hash -> The hash of the decay string of the mother particle.
virtual void event() override
Called for each event.
std::string getMCDecayStringFromParticle(const Particle *p)
get mc decay string from particle
std::string m_identifiers
Characters used to identify particles in the concise decay string format (default: alphabet).
const std::string c_ExtraInfoNameExtended
Name of the extraInfo, which is stored in each Particle.
std::string getDecayStringFromParticle(const Particle *p)
get decay string of particle
virtual void initialize() override
Initialize the module.
float m_decayHashExtended
Extended decay hash -> The hash of the decay string of all daughter particles.
StoreObjPtr< SetMergeable< std::unordered_set< uint64_t > > > m_hashset
Mergeable unordered set containing the encountered hashes.
std::string getDecayString(const Particle &p)
get the decay string for p.
Abstract base class for different kinds of events.
Type-safe access to single objects in the data store.
virtual void terminate() override
Terminate modules.
std::string m_fileName
Filename in which the hash strings are saved, if empty the strings are not saved.
const MCParticle * getInitialParticle(const MCParticle *mcP)
search from mcP upwards for a particle that matches specified mother PDG codes.
void convertToConciseString(std::string &string)
Convert the extended string to a more concise format.
bool m_useConciseString
Switch to use concise format for the extended string.
std::string m_listName
Name of the particle list.
Class to store reconstructed particles.
std::string m_decayString
The complete decay string.
std::string m_treeName
Tree name in which the hash strings are saved.
std::hash< std::string > m_hasher
Hash function.
A Class to store the Monte Carlo particle information.
std::string buildMCDecayString(const MCParticle *mcPMother, const MCParticle *mcPMatched)
return decay string for mcPMother, highlight mcPMatched.
std::string getMCDecayStringFromMCParticle(const MCParticle *mcPMatched)
get mc decay string from mc particle