10 #include <analysis/modules/ParticleLoader/ParticleLoaderModule.h>
13 #include <framework/logging/Logger.h>
14 #include <framework/core/ModuleParam.templateDetails.h>
17 #include <analysis/DecayDescriptor/ParticleListName.h>
18 #include <analysis/utility/PCmsLabTransform.h>
19 #include <analysis/utility/ValueIndexPairSorting.h>
36 ParticleLoaderModule::ParticleLoaderModule() :
Module()
39 setDescription(
"Loads MDST dataobjects as Particle objects to the StoreArray<Particle> and collects them in specified ParticleList.");
44 "List of decay strings (see :ref:`DecayString` for syntax) that specify all output ParticleLists to be created by the module.",
48 "Use MCParticles instead of reconstructed MDST dataobjects (tracks, ECL, KLM, clusters, V0s, ...)",
false);
51 "Use ROE instead of reconstructed MDST dataobjects (tracks, ECL, KLM, clusters, V0s, ...)",
false);
57 "Particle list name from which we need to get ROEs", std::string(
""));
60 "If true, the Particle List will be filled with missing momentum from the ROE and signal particle.",
false);
63 "If true, the output ParticleList will be saved by RootOutput. If false, it will be ignored when writing the file.",
false);
66 "If true, the secondary MC particle will be skipped, default is false",
70 "If true, the particles from the bottom part of the selected particle's decay chain will also be created in the datastore and mother-daughter relations are recursively set",
74 "If true, the secondary MC daughters will be skipped, default is false",
78 "Track hypothesis to use when loading the particle. By default, use the particle's own hypothesis.",
82 "If true, a Particle is only created if a track fit with the particle hypothesis passed to the ParticleLoader is available.",
86 "Use Dummy instead of reconstructed MDST dataobjects (tracks, ECL, KLM, clusters, V0s, ...)",
false);
89 "mdst index to use for dummy particle", 0);
92 "Diagonal value of covariance matrix to use for dummy particle", 10000.);
95 "Should treeFitter treat the particle as invisible?",
true);
98 "Load neutral Particles from the clusters being matched with the track of the sourceParticleList",
101 "If true, the most energetic ECLCluster among ones matching with the Track is used. "
102 "If false, all matched ECLCluster are used. "
103 "This option is checked only when loadChargedCluster=True.",
110 B2INFO(
"ParticleLoader's Summary of Actions:");
113 B2FATAL(
"The options on how to load the Particle are not valid. The incompatible combination of options is selected. "
145 B2WARNING(
"Obsolete usage of the ParticleLoader module (load all MDST objects as all possible Particle object types). Specify the particle type via decayStrings module parameter instead.");
152 B2ERROR(
"ParticleLoaderModule::initialize Invalid input DecayString: " << decayString);
160 string listName = mother->
getName() +
":all";
166 else if (nProducts > 0)
167 listName = mother->
getName() +
":V0";
170 bool isSelfConjugatedParticle = (listName == antiListName);
174 if (!particleList.isOptional()) {
176 particleList.registerInDataStore(flags);
177 if (!isSelfConjugatedParticle) {
182 B2WARNING(
"ParticleList " << listName <<
" already exists and will not be created again. " <<
183 "Please note that the given options (addDaughters, skipNonPrimaryDaughters, skipNonPrimary) do not apply to "
186 B2WARNING(
"ParticleList " << listName <<
" already exists and will not be created again. " <<
187 "Please note that the given option, useOnlyMostEnergeticECLCluster, does not apply to "
192 B2ERROR(
"Invalid particle type requested to be loaded. Set a valid decayString module parameter.");
195 bool mdstSourceIsV0 =
false;
199 mdstSourceIsV0 =
true;
201 if (mdstSourceIsV0) {
202 if (nProducts == 2) {
205 B2ERROR(
"MDST source of the particle list is V0, the two daughters should have opposite charge");
207 B2ERROR(
"ParticleLoaderModule::initialize Invalid input DecayString " << decayString
208 <<
". MDST source of the particle list is V0, DecayString should contain exactly two daughters, as well as the mother particle.");
213 B2INFO(
"ParticleLoaderModule: Replacing the source particle list name by " <<
215 <<
" all other daughters will be ignored.");
218 B2ERROR(
"ParticleLoaderModule::initialize Invalid input DecayString " << decayString
219 <<
". DecayString should not contain any daughters, only the mother particle.");
225 B2ERROR(
"The sourceParticleListName is not given. The charged ParticleList is required for the chargedCluster loading.");
228 B2INFO(
" o) creating (anti-)ParticleList with name: " << listName <<
" (" << antiListName <<
")");
230 B2INFO(
" -> MDST source: RestOfEvents");
231 m_ROE2Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle);
233 B2INFO(
" -> MDST source: No MDST source");
234 m_Dummies2Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle);
236 B2INFO(
" -> MDST source: MCParticles");
242 B2INFO(
" -> MDST source: ECLClusters and KLMClusters being matched with Tracks");
244 B2ERROR(
"The Particle type must be gamma, K_L0, or (anti-)n0 for the loadChargedCluster option.");
249 B2INFO(
" -> MDST source: Tracks");
250 m_Tracks2Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle);
256 B2INFO(
" -> MDST source: ECLClusters and KLMClusters");
258 B2INFO(
" -> MDST source: V0");
259 m_V02Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle);
264 B2INFO(
" -> MDST source: V0");
265 m_V02Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle);
269 B2INFO(
" -> MDST source: exclusively KLMClusters or exclusively ECLClusters (matching between those not used)");
274 B2INFO(
" -> MDST source: V0");
275 m_V02Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle);
314 <<
" tracks skipped because of zero charge for "
315 << get<c_PListName>(track2Plist));
322 <<
" v0s skipped because of same charge daughters for "
323 << get<c_PListName>(v02Plist));
333 B2ERROR(
"ParticleLoaderModule::dummyToParticles Multiple particle lists are not supported!");
335 string dummyListName = get<c_PListName>(dummy2Plist);
336 string antiDummyListName = get<c_AntiPListName>(dummy2Plist);
337 int pdgCode = get<c_PListPDGCode>(dummy2Plist);
338 bool isSelfConjugatedParticle = get<c_IsPListSelfConjugated>(dummy2Plist);
342 plist->initialize(pdgCode, dummyListName);
344 if (!isSelfConjugatedParticle) {
347 antiPlist->initialize(-1 * pdgCode, antiDummyListName);
348 antiPlist->bindAntiParticleList(*(plist));
351 TMatrixFSym covariance(7);
352 for (
int row = 0; row < 7; ++row) {
359 auto isFlavored = (isSelfConjugatedParticle) ? Particle::EFlavorType::c_Unflavored : Particle::EFlavorType::c_Flavored;
361 ROOT::Math::PxPyPzEVector zero4Vector = {0., 0., 0., 0.};
363 newPart =
m_particles.appendNew(zero4Vector, pdgCode, isFlavored, Particle::EParticleSourceObject::c_NoMDSTSource,
367 plist->addParticle(newPart);
369 if (!isSelfConjugatedParticle) {
370 newAntiPart =
m_particles.appendNew(zero4Vector, -pdgCode, isFlavored, Particle::EParticleSourceObject::c_NoMDSTSource,
374 plist->addParticle(newAntiPart);
386 string listName = get<c_PListName>(roe2Plist);
387 string antiListName = get<c_AntiPListName>(roe2Plist);
388 int pdgCode = get<c_PListPDGCode>(roe2Plist);
389 bool isSelfConjugatedParticle = get<c_IsPListSelfConjugated>(roe2Plist);
397 plist->initialize(pdgCode, listName);
399 if (!isSelfConjugatedParticle) {
402 antiPlist->initialize(-1 * pdgCode, antiListName);
403 antiPlist->bindAntiParticleList(*(plist));
411 for (
unsigned int i = 0; i < pList->getListSize(); i++) {
417 if (isSelfConjugatedParticle)
419 else if (i < pList->getListSize(
false))
428 for (
int i = 0; i <
m_roes.getEntries(); i++) {
447 ROOT::Math::PxPyPzEVector signal4Vector = signalSideParticle->get4Vector();
449 ROOT::Math::PxPyPzEVector missing4Vector = boost4Vector - signal4Vector - roe4Vector;
450 auto isFlavored = (isSelfConjugatedParticle) ? Particle::EFlavorType::c_Unflavored : Particle::EFlavorType::c_Flavored;
451 newPart =
m_particles.appendNew(missing4Vector, pdgCode, isFlavored, Particle::EParticleSourceObject::c_Undefined, mdstIndex);
457 string listName = get<c_PListName>(roe2Plist);
459 plist->addParticle(newPart);
470 bool matchingDaughtersOrder =
true;
473 matchingDaughtersOrder =
false;
476 for (
size_t ilist = 0; ilist <
m_V02Plists.size(); ilist++) {
478 string listName = get<c_PListName>(v02Plist);
479 string antiListName = get<c_AntiPListName>(v02Plist);
480 int pdgCode = get<c_PListPDGCode>(v02Plist);
481 bool isSelfConjugatedParticle = get<c_IsPListSelfConjugated>(v02Plist);
489 plist->initialize(pdgCode, listName);
491 if (!isSelfConjugatedParticle) {
494 antiPlist->initialize(-1 * pdgCode, antiListName);
496 antiPlist->bindAntiParticleList(*(plist));
499 plist->setEditable(
true);
502 for (
int i = 0; i <
m_v0s.getEntries(); i++) {
511 B2DEBUG(19,
"V0 with same charge daughters skipped!");
535 B2WARNING(
"Unknown V0 hypothesis!");
541 bool correctOrder = matchingDaughtersOrder;
544 correctOrder = !correctOrder;
546 std::pair<Track*, Track*> v0Tracks = v0->
getTracks();
547 std::pair<TrackFitResult*, TrackFitResult*> v0TrackFitResults = v0->
getTrackFitResults();
549 Particle daugP((v0Tracks.first)->getArrayIndex(), v0TrackFitResults.first, pTypeP);
550 Particle daugM((v0Tracks.second)->getArrayIndex(), v0TrackFitResults.second, pTypeM);
552 const PIDLikelihood* pidP = (v0Tracks.first)->getRelated<PIDLikelihood>();
553 const PIDLikelihood* pidM = (v0Tracks.second)->getRelated<PIDLikelihood>();
555 const auto& mcParticlePWithWeight = (v0Tracks.first)->getRelatedToWithWeight<MCParticle>();
556 const auto& mcParticleMWithWeight = (v0Tracks.second)->getRelatedToWithWeight<MCParticle>();
573 if (mcParticlePWithWeight.first)
574 newDaugP->
addRelationTo(mcParticlePWithWeight.first, mcParticlePWithWeight.second);
579 if (mcParticleMWithWeight.first)
580 newDaugM->
addRelationTo(mcParticleMWithWeight.first, mcParticleMWithWeight.second);
601 plist->addParticle(newPart);
604 plist->setEditable(
false);
616 string listName = get<c_PListName>(track2Plist);
617 string antiListName = get<c_AntiPListName>(track2Plist);
618 int pdgCode = get<c_PListPDGCode>(track2Plist);
619 bool isSelfConjugatedParticle = get<c_IsPListSelfConjugated>(track2Plist);
627 plist->initialize(pdgCode, listName);
630 if (!isSelfConjugatedParticle) {
633 antiPlist->initialize(-1 * pdgCode, antiListName);
635 antiPlist->bindAntiParticleList(*(plist));
638 plist->setEditable(
true);
642 for (
int i = 0; i <
m_tracks.getEntries(); i++) {
645 const auto& mcParticleWithWeight = track->getRelatedToWithWeight<
MCParticle>();
653 const TrackFitResult* trackFit = track->getTrackFitResultWithClosestMass(type);
656 B2WARNING(
"Track returned null TrackFitResult pointer for ChargedStable::getPDGCode() = " << type.getPDGCode());
669 B2DEBUG(19,
"Track with charge = 0 skipped!");
675 Particle particle(track->getArrayIndex(), trackFit, type);
682 if (mcParticleWithWeight.first)
683 newPart->
addRelationTo(mcParticleWithWeight.first, mcParticleWithWeight.second);
686 plist->addParticle(newPart);
691 plist->setEditable(
false);
702 string listName = get<c_PListName>(eclKLMCluster2Plist);
703 string antiListName = get<c_AntiPListName>(eclKLMCluster2Plist);
704 int pdgCode = get<c_PListPDGCode>(eclKLMCluster2Plist);
705 bool isSelfConjugatedParticle = get<c_IsPListSelfConjugated>(eclKLMCluster2Plist);
714 plist->initialize(pdgCode, listName);
717 if (!isSelfConjugatedParticle) {
720 antiPlist->initialize(-1 * pdgCode, antiListName);
722 antiPlist->bindAntiParticleList(*(plist));
725 plist->setEditable(
true);
735 Particle particle(cluster, thisType);
737 B2FATAL(
"Particle created from ECLCluster does not have ECLCluster type.");
745 plist->addParticle(newPart);
752 if (std::isnan(cluster->getMomentumMag())) {
753 B2DEBUG(19,
"Skipping KLMCluster because its momentum is NaN. "
754 "This can happen if the timing calibration is missing or wrong, so that the velocity is calculated to be negative.");
761 Particle particle(cluster, pdgCode);
762 if (particle.getParticleSource() != Particle::c_KLMCluster) {
763 B2FATAL(
"Particle created from KLMCluster does not have KLMCluster type.");
771 plist->addParticle(newPart);
774 plist->setEditable(
false);
786 if (!cluster->isNeutral() and onlyNeutral)
816 std::vector<std::pair<double, int>> weightsAndIndices;
817 for (
unsigned int iMCParticle = 0; iMCParticle < mcRelations.
size(); iMCParticle++) {
818 const MCParticle* relMCParticle = mcRelations[iMCParticle];
820 double weight = mcRelations.
weight(iMCParticle);
821 weightsAndIndices.emplace_back(weight, relMCParticle->
getArrayIndex());
826 std::sort(weightsAndIndices.begin(), weightsAndIndices.end(),
827 ValueIndexPairSorting::higherPair<decltype(weightsAndIndices)::value_type>);
830 for (
auto& weightsAndIndex : weightsAndIndices) {
832 double weight = weightsAndIndex.first;
839 && weight / relMCParticle->
getEnergy() > 0.30)
853 string listName = get<c_PListName>(chargedCluster2Plist);
854 string antiListName = get<c_AntiPListName>(chargedCluster2Plist);
855 int pdgCode = get<c_PListPDGCode>(chargedCluster2Plist);
856 bool isSelfConjugatedParticle = get<c_IsPListSelfConjugated>(chargedCluster2Plist);
865 plist->initialize(pdgCode, listName);
868 if (!isSelfConjugatedParticle) {
871 antiPlist->initialize(-1 * pdgCode, antiListName);
873 antiPlist->bindAntiParticleList(*(plist));
880 for (
unsigned int iPart = 0; iPart < sourceList->getListSize(); iPart++) {
882 const Particle* sourcePart = sourceList->getParticle(iPart);
883 const Track* sourceTrack = sourceList->getParticle(iPart)->getTrack();
892 Particle particle(cluster, thisType);
894 B2FATAL(
"Particle created from ECLCluster does not have ECLCluster type.");
898 plist->addParticle(newPart);
904 for (
unsigned int iCluster = 0; iCluster < clusters.
size(); iCluster++) {
905 const ECLCluster* cluster = clusters[iCluster];
909 Particle particle(cluster, thisType);
911 B2FATAL(
"Particle created from ECLCluster does not have ECLCluster type.");
915 plist->addParticle(newPart);
921 if (!cluster)
continue;
923 if (std::isnan(cluster->getMomentumMag())) {
924 B2DEBUG(19,
"Skipping KLMCluster because its momentum is NaN. "
925 "This can happen if the timing calibration is missing or wrong, so that the velocity is calculated to be negative.");
930 Particle particle(cluster, pdgCode);
932 B2FATAL(
"Particle created from KLMCluster does not have KLMCluster type.");
939 plist->addParticle(newPart);
952 string listName = get<c_PListName>(mcParticle2Plist);
953 string antiListName = get<c_AntiPListName>(mcParticle2Plist);
954 int pdgCode = get<c_PListPDGCode>(mcParticle2Plist);
955 bool isSelfConjugatedParticle = get<c_IsPListSelfConjugated>(mcParticle2Plist);
961 plist->initialize(pdgCode, listName);
963 if (!isSelfConjugatedParticle) {
966 antiPlist->initialize(-1 * pdgCode, antiListName);
968 antiPlist->bindAntiParticleList(*(plist));
974 if (abs(pdgCode) != abs(mcParticle->
getPDG()))
987 plist->addParticle(newPart);
1026 vector<MCParticle*> mcdaughters = mcmother->
getDaughters();
1028 for (
auto& mcdaughter : mcdaughters) {
1032 daughter->addRelationTo(mcdaughter);
1035 if (mcdaughter->getNDaughters() > 0)
Provides a type-safe way to pass members of the chargedStableSet set.
bool contains(const ParticleType &p) const
Returns true if and only if the set contains 'p'.
The ParticleType class for identifying different particle types.
int getPDGCode() const
PDG code.
static const ParticleType neutron
neutron particle
static const ParticleType Lambda
Lambda particle.
static const ParticleSet chargedStableSet
set of charged stable particles
static const ChargedStable pion
charged pion particle
static const ParticleType Klong
K^0_L particle.
static const ParticleType antiLambda
Anti-Lambda particle.
static const ChargedStable proton
proton particle
static const ParticleType invalidParticle
Invalid particle, used internally.
static const ParticleType Kshort
K^0_S particle.
static const ParticleType photon
photon particle
static const ChargedStable electron
electron particle
EStoreFlags
Flags describing behaviours of objects etc.
@ c_WriteOut
Object/array should be saved by output modules.
@ c_DontWriteOut
Object/array should be NOT saved by output modules.
Represents a particle in the DecayDescriptor.
int getPDGCode() const
Return PDG code.
std::string getFullName() const
returns the full name of the particle full_name = name:label
std::string getName() const
evt.pdl name of the particle.
int getProperty() const
return property of the particle.
bool init(const std::string &str)
Initialise the DecayDescriptor from given string.
const DecayDescriptorParticle * getMother() const
return mother.
int getNDaughters() const
return number of direct daughters.
int getProperty() const
return property of the particle.
const DecayDescriptor * getDaughter(int i) const
return i-th daughter (0 based index).
@ c_nPhotons
CR is split into n photons (N1)
@ c_neutralHadron
CR is reconstructed as a neutral hadron (N2)
A Class to store the Monte Carlo particle information.
float getEnergy() const
Return particle energy in GeV.
@ c_PrimaryParticle
bit 0: Particle is primary particle.
std::vector< Belle2::MCParticle * > getDaughters() const
Get vector of all daughter particles, empty vector if none.
bool hasStatus(unsigned short int bitmask) const
Return if specific status bit is set.
int getArrayIndex() const
Get 0-based index of the particle in the corresponding MCParticle list.
int getPDG() const
Return PDG code of particle.
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 collect log likelihoods from TOP, ARICH, dEdx, ECL and KLM aimed for output to mdst includes...
std::vector< PList > m_ECLKLMClusters2Plists
Collection of PLists that will collect Particles created from ECLClusters and KLMClusters.
void mcParticlesToParticles()
Loads specified MCParticles as Particle to StoreArray<Particle>
void v0sToParticles()
Loads V0 object as Particle of specified type to StoreArray<Particle> and adds it to the ParticleList...
StoreArray< TrackFitResult > m_trackfitresults
StoreArray of TrackFitResults.
std::vector< PList > m_Dummies2Plists
Collection of PLists that will collect Particles created from Dummies.
std::vector< std::string > m_decayStrings
Input decay strings specifying the particles being created/loaded.
void roeToParticles()
Loads ROE object as Particle of specified type to StoreArray<Particle> and adds it to the ParticleLis...
bool m_dummyTreatAsInvisible
should treeFitter treat the particle as invisible?
virtual void initialize() override
Initialize the Module.
int m_trackHypothesis
pdg code for track hypothesis that should be used to create the particle
StoreArray< KLMCluster > m_klmclusters
StoreArray of KLMCluster.
std::vector< int > m_sameChargeDaughtersV0Counts
internally used to count the number of V0s with same charge daughters
StoreArray< V0 > m_v0s
StoreArray of V0s.
void addROEToParticleList(RestOfEvent *roe, int mdstIndex, int pdgCode=0, bool isSelfConjugatedParticle=true)
Helper method to load ROE object as Particle.
virtual void event() override
Event processor.
std::string m_sourceParticleListName
Particle list name from which we need to get related ROEs.
bool isValidPDGCode(const int pdgCode)
returns true if the PDG code determined from the decayString is valid
StoreArray< MCParticle > m_mcparticles
StoreArray of MCParticles.
StoreArray< Particle > m_particles
StoreArray of Particles.
int m_dummyMDSTIndex
mdst index for dummy particles
std::string m_roeMaskName
ROE mask name to load.
virtual void terminate() override
Terminate the Module.
void tracksToParticles()
Loads Track object as Particle to StoreArray<Particle> and adds it to the ParticleList.
StoreObjPtr< ParticleExtraInfoMap > m_particleExtraInfoMap
object pointer to extra info map
double m_dummyCovMatrix
diag value of cov matrix for dummy particles
bool m_addDaughters
toggle addition of the bottom part of the particle's decay chain
StoreArray< PIDLikelihood > m_pidlikelihoods
StoreArray of PIDLikelihoods.
bool m_skipNonPrimaryDaughters
toggle skip of secondary MC daughters
StoreArray< Track > m_tracks
StoreArray of Tracks.
bool m_enforceFitHypothesis
If true, a Particle is only created if a track fit with the particle hypothesis passed to the Particl...
std::vector< PList > m_ROE2Plists
Collection of PLists that will collect Particles created from V0.
StoreArray< RestOfEvent > m_roes
StoreArray of ROEs.
bool isValidECLCluster(const ECLCluster *cluster, const int pdgCode, bool onlyNeutral) const
Checks if the given ECLCluster is valid for the pdgCode.
std::vector< PList > m_ChargedCluster2Plists
Collection of PLists that will collect Particles created from charged-cluster.
void appendDaughtersRecursive(Particle *mother)
recursively append bottom of a particle's decay chain (daughters of mother, granddaughters of daughte...
std::vector< PList > m_MCParticles2Plists
Collection of PLists that will collect Particles created from MCParticles.
void dummyToParticles()
Loads dummy object as Particle of specified type to StoreArray<Particle> and adds it to the ParticleL...
std::vector< PList > m_V02Plists
Collection of PLists that will collect Particles created from V0.
DecayDescriptor m_decaydescriptor
Decay descriptor for parsing the user specified DecayString.
bool m_useDummy
Switch to load dummy as Particle.
bool m_writeOut
toggle particle list btw.
std::vector< int > m_chargeZeroTrackCounts
internally used to count number of tracks with charge zero
bool m_useOnlyMostEnergeticECLCluster
If true, only the most energetic ECLCluster is used.
std::vector< PList > m_Tracks2Plists
Collection of PLists that will collect Particles created from Tracks.
StoreObjPtr< EventExtraInfo > m_eventExtraInfo
object pointer to event extra info
StoreArray< ECLCluster > m_eclclusters
StoreArray of ECLCluster.
bool m_skipNonPrimary
toggle skip of secondary MC particle
int m_properties
Particle property to be assigned only on V0s.
void chargedClustersToParticles()
Loads ECLCluster and KLMCluster objects that are being matched with Track as Particle to StoreArray<P...
void assignMCParticleFromECLCluster(Particle *newPart, const ECLCluster *cluster) const
Assigns the MCParticle relation to the newPart.
bool m_useROEs
Switch to load ROE as Particle.
bool m_loadChargedCluster
Switch to load charged-cluster
bool m_useMissing
Use missing momentum to build a particle.
void eclAndKLMClustersToParticles()
Loads ECLCluster and KLMCluster object as Particle to StoreArray<Particle> and adds it to the Particl...
bool m_useMCParticles
Load MCParticle as Particle instead of the corresponding MDST dataobject.
Class to store reconstructed particles.
void setProperty(const int properties)
sets m_properties
const KLMCluster * getKLMCluster() const
Returns the pointer to the KLMCluster object that was used to create this Particle (ParticleType == c...
void appendDaughter(const Particle *daughter, const bool updateType=true, const int daughterProperty=c_Ordinary)
Appends index of daughter to daughters index array.
const ECLCluster * getECLCluster() const
Returns the pointer to the ECLCluster object that was used to create this Particle (if ParticleType =...
void writeExtraInfo(const std::string &name, const double value)
Sets the user defined extraInfo.
ROOT::Math::PxPyPzEVector get4Vector() const
Returns Lorentz vector.
void setMomentumVertexErrorMatrix(const TMatrixFSym &errMatrix)
Sets 7x7 error matrix.
EParticleSourceObject getParticleSource() const
Returns particle source as defined with enum EParticleSourceObject.
EFlavorType
describes flavor type, see getFlavorType().
@ c_Unflavored
Is its own antiparticle or we don't know whether it is a particle/antiparticle.
@ c_Flavored
Is either particle or antiparticle.
double getECLClusterEnergy() const
Returns the energy of the ECLCluster for the particle.
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
float weight(int index) const
Get weight with index.
void addRelationTo(const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
Add a relation from this object to another object (with caching).
int getArrayIndex() const
Returns this object's array index (in StoreArray), or -1 if not found.
RelationVector< TO > getRelationsTo(const std::string &name="", const std::string &namedRelation="") const
Get the relations that point from this object to another store array.
FROM * getRelatedFrom(const std::string &name="", const std::string &namedRelation="") const
Get the object from which this object has a relation.
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
This is a general purpose class for collecting reconstructed MDST data objects that are not used in r...
ROOT::Math::PxPyPzEVector get4Vector(const std::string &maskName=c_defaultMaskName) const
Get 4-momentum vector all (no mask) or a subset (use mask) of all Tracks and ECLClusters in ROE.
static constexpr const char * c_defaultMaskName
Default mask name.
Particle * convertToParticle(const std::string &maskName=c_defaultMaskName, int pdgCode=0, bool isSelfConjugated=true)
Converts ROE to Particle and adds it to StoreArray.
bool isOptional(const std::string &name="")
Tell the DataStore about an optional input.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
bool create(bool replace=false)
Create a default object in the data store.
Accessor to arrays stored in the data store.
bool registerRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut, const std::string &namedRelation="") const
Register a relation to the given StoreArray.
Type-safe access to single objects in the data store.
bool isValid() const
Check whether the object was created.
Values of the result of a track fit with a given particle hypothesis.
short getChargeSign() const
Return track charge (1 or -1).
Const::ParticleType getParticleType() const
Getter for ParticleType of the mass hypothesis of the track fit.
Class that bundles various TrackFitResults.
Object holding information for V0s.
std::pair< TrackFitResult *, TrackFitResult * > getTrackFitResults() const
Get pair of the TrackFitResults, that are part of the V0 particle.
std::pair< Track *, Track * > getTracks() const
Get pair of yhe Tracks, that are part of the V0 particle.
Const::ParticleType getV0Hypothesis() const
Get the hypothesis under which the V0 particle was created.
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.
std::string antiParticleListName(const std::string &listName)
Returns name of anti-particle-list corresponding to listName.
Abstract base class for different kinds of events.