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>
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, initial MCParticles will be skipped (default). If false, initial MCParticles will be included.",
true);
69 "If true, the secondary MC particle will be skipped, default is false",
73 "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",
77 "If true, the secondary MC daughters will be skipped, default is false",
81 "Track hypothesis to use when loading the particle. By default, use the particle's own hypothesis.",
85 "If true, a Particle is only created if a track fit with the particle hypothesis passed to the ParticleLoader is available.",
89 "Use Dummy instead of reconstructed MDST dataobjects (tracks, ECL, KLM, clusters, V0s, ...)",
false);
92 "mdst index to use for dummy particle", 0);
95 "Diagonal value of covariance matrix to use for dummy particle", 10000.);
98 "Should treeFitter treat the particle as invisible?",
true);
101 "Load neutral Particles from the clusters being matched with the track of the sourceParticleList",
104 "If true, the most energetic ECLCluster among ones matching with the Track is used. "
105 "If false, all matched ECLCluster are used. "
106 "This option is checked only when loadChargedCluster=True.",
113 B2INFO(
"ParticleLoader's Summary of Actions:");
116 B2FATAL(
"The options on how to load the Particle are not valid. The incompatible combination of options is selected. "
148 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.");
155 B2ERROR(
"ParticleLoaderModule::initialize Invalid input DecayString: " << decayString);
163 string listName = mother->
getName() +
":all";
169 else if (nProducts > 0)
170 listName = mother->
getName() +
":V0";
173 bool isSelfConjugatedParticle = (listName == antiListName);
177 if (!particleList.isOptional()) {
179 particleList.registerInDataStore(flags);
180 if (!isSelfConjugatedParticle) {
185 B2WARNING(
"ParticleList " << listName <<
" already exists and will not be created again. " <<
186 "Please note that the given options (addDaughters, skipNonPrimaryDaughters, skipNonPrimary, skipInitial) do not apply to "
189 B2WARNING(
"ParticleList " << listName <<
" already exists and will not be created again. " <<
190 "Please note that the given option, useOnlyMostEnergeticECLCluster, does not apply to "
195 B2ERROR(
"Invalid particle type requested to be loaded. Set a valid decayString module parameter.");
198 bool mdstSourceIsV0 =
false;
202 mdstSourceIsV0 =
true;
204 if (mdstSourceIsV0) {
205 if (nProducts == 2) {
208 B2ERROR(
"MDST source of the particle list is V0, the two daughters should have opposite charge");
210 B2ERROR(
"ParticleLoaderModule::initialize Invalid input DecayString " << decayString
211 <<
". MDST source of the particle list is V0, DecayString should contain exactly two daughters, as well as the mother particle.");
216 B2INFO(
"ParticleLoaderModule: Replacing the source particle list name by " <<
218 <<
" all other daughters will be ignored.");
221 B2ERROR(
"ParticleLoaderModule::initialize Invalid input DecayString " << decayString
222 <<
". DecayString should not contain any daughters, only the mother particle.");
228 B2ERROR(
"The sourceParticleListName is not given. The charged ParticleList is required for the chargedCluster loading.");
231 B2INFO(
" o) creating (anti-)ParticleList with name: " << listName <<
" (" << antiListName <<
")");
233 B2INFO(
" -> MDST source: RestOfEvents");
234 m_ROE2Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle);
236 B2INFO(
" -> MDST source: No MDST source");
237 m_Dummies2Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle);
239 B2INFO(
" -> MDST source: MCParticles");
245 B2INFO(
" -> MDST source: ECLClusters and KLMClusters being matched with Tracks");
247 B2ERROR(
"The Particle type must be gamma, K_L0, or (anti-)n0 for the loadChargedCluster option.");
252 B2INFO(
" -> MDST source: Tracks");
253 m_Tracks2Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle);
259 B2INFO(
" -> MDST source: ECLClusters and KLMClusters");
261 B2INFO(
" -> MDST source: V0");
262 m_V02Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle);
267 B2INFO(
" -> MDST source: V0");
268 m_V02Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle);
272 B2INFO(
" -> MDST source: exclusively KLMClusters or exclusively ECLClusters (matching between those not used)");
277 B2INFO(
" -> MDST source: V0");
278 m_V02Plists.emplace_back(pdgCode, listName, antiListName, isSelfConjugatedParticle);
317 <<
" tracks skipped because of zero charge for "
318 << get<c_PListName>(track2Plist));
325 <<
" v0s skipped because of same charge daughters for "
326 << get<c_PListName>(v02Plist));
336 B2ERROR(
"ParticleLoaderModule::dummyToParticles Multiple particle lists are not supported!");
338 string dummyListName = get<c_PListName>(dummy2Plist);
339 string antiDummyListName = get<c_AntiPListName>(dummy2Plist);
340 int pdgCode = get<c_PListPDGCode>(dummy2Plist);
341 bool isSelfConjugatedParticle = get<c_IsPListSelfConjugated>(dummy2Plist);
345 plist->initialize(pdgCode, dummyListName);
347 if (!isSelfConjugatedParticle) {
350 antiPlist->initialize(-1 * pdgCode, antiDummyListName);
351 antiPlist->bindAntiParticleList(*(plist));
354 TMatrixFSym covariance(7);
355 for (
int row = 0; row < 7; ++row) {
364 ROOT::Math::PxPyPzEVector zero4Vector = {0., 0., 0., 0.};
366 newPart =
m_particles.
appendNew(zero4Vector, pdgCode, isFlavored, Particle::EParticleSourceObject::c_NoMDSTSource,
370 plist->addParticle(newPart);
372 if (!isSelfConjugatedParticle) {
373 newAntiPart =
m_particles.
appendNew(zero4Vector, -pdgCode, isFlavored, Particle::EParticleSourceObject::c_NoMDSTSource,
377 plist->addParticle(newAntiPart);
389 string listName = get<c_PListName>(roe2Plist);
390 string antiListName = get<c_AntiPListName>(roe2Plist);
391 int pdgCode = get<c_PListPDGCode>(roe2Plist);
392 bool isSelfConjugatedParticle = get<c_IsPListSelfConjugated>(roe2Plist);
400 plist->initialize(pdgCode, listName);
402 if (!isSelfConjugatedParticle) {
405 antiPlist->initialize(-1 * pdgCode, antiListName);
406 antiPlist->bindAntiParticleList(*(plist));
414 for (
unsigned int i = 0; i < pList->getListSize(); i++) {
420 if (isSelfConjugatedParticle)
422 else if (i < pList->getListSize(
false))
431 for (
int i = 0; i <
m_roes.getEntries(); i++) {
450 ROOT::Math::PxPyPzEVector signal4Vector = signalSideParticle->get4Vector();
452 ROOT::Math::PxPyPzEVector missing4Vector = boost4Vector - signal4Vector - roe4Vector;
454 newPart =
m_particles.
appendNew(missing4Vector, pdgCode, isFlavored, Particle::EParticleSourceObject::c_Undefined, mdstIndex);
460 string listName = get<c_PListName>(roe2Plist);
462 plist->addParticle(newPart);
473 bool matchingDaughtersOrder =
true;
476 matchingDaughtersOrder =
false;
479 for (
size_t ilist = 0; ilist <
m_V02Plists.size(); ilist++) {
481 string listName = get<c_PListName>(v02Plist);
482 string antiListName = get<c_AntiPListName>(v02Plist);
483 int pdgCode = get<c_PListPDGCode>(v02Plist);
484 bool isSelfConjugatedParticle = get<c_IsPListSelfConjugated>(v02Plist);
492 plist->initialize(pdgCode, listName);
494 if (!isSelfConjugatedParticle) {
497 antiPlist->initialize(-1 * pdgCode, antiListName);
499 antiPlist->bindAntiParticleList(*(plist));
502 plist->setEditable(
true);
505 for (
int i = 0; i <
m_v0s.getEntries(); i++) {
514 B2DEBUG(19,
"V0 with same charge daughters skipped!");
538 B2WARNING(
"Unknown V0 hypothesis!");
544 bool correctOrder = matchingDaughtersOrder;
547 correctOrder = !correctOrder;
549 std::pair<Track*, Track*> v0Tracks = v0->
getTracks();
550 std::pair<TrackFitResult*, TrackFitResult*> v0TrackFitResults = v0->
getTrackFitResults();
552 Particle daugP((v0Tracks.first)->getArrayIndex(), v0TrackFitResults.first, pTypeP);
553 Particle daugM((v0Tracks.second)->getArrayIndex(), v0TrackFitResults.second, pTypeM);
555 const PIDLikelihood* pidP = (v0Tracks.first)->getRelated<PIDLikelihood>();
556 const PIDLikelihood* pidM = (v0Tracks.second)->getRelated<PIDLikelihood>();
558 const auto& mcParticlePWithWeight = (v0Tracks.first)->getRelatedToWithWeight<MCParticle>();
559 const auto& mcParticleMWithWeight = (v0Tracks.second)->getRelatedToWithWeight<MCParticle>();
576 if (mcParticlePWithWeight.first)
577 newDaugP->
addRelationTo(mcParticlePWithWeight.first, mcParticlePWithWeight.second);
582 if (mcParticleMWithWeight.first)
583 newDaugM->
addRelationTo(mcParticleMWithWeight.first, mcParticleMWithWeight.second);
604 plist->addParticle(newPart);
607 plist->setEditable(
false);
619 string listName = get<c_PListName>(track2Plist);
620 string antiListName = get<c_AntiPListName>(track2Plist);
621 int pdgCode = get<c_PListPDGCode>(track2Plist);
622 bool isSelfConjugatedParticle = get<c_IsPListSelfConjugated>(track2Plist);
630 plist->initialize(pdgCode, listName);
633 if (!isSelfConjugatedParticle) {
636 antiPlist->initialize(-1 * pdgCode, antiListName);
638 antiPlist->bindAntiParticleList(*(plist));
641 plist->setEditable(
true);
645 for (
int i = 0; i <
m_tracks.getEntries(); i++) {
648 const auto& mcParticleWithWeight = track->getRelatedToWithWeight<
MCParticle>();
656 const TrackFitResult* trackFit = track->getTrackFitResultWithClosestMass(type);
659 B2WARNING(
"Track returned null TrackFitResult pointer for ChargedStable::getPDGCode() = " << type.getPDGCode());
672 B2DEBUG(19,
"Track with charge = 0 skipped!");
678 Particle particle(track->getArrayIndex(), trackFit, type);
685 if (mcParticleWithWeight.first)
686 newPart->
addRelationTo(mcParticleWithWeight.first, mcParticleWithWeight.second);
689 plist->addParticle(newPart);
694 plist->setEditable(
false);
705 string listName = get<c_PListName>(eclKLMCluster2Plist);
706 string antiListName = get<c_AntiPListName>(eclKLMCluster2Plist);
707 int pdgCode = get<c_PListPDGCode>(eclKLMCluster2Plist);
708 bool isSelfConjugatedParticle = get<c_IsPListSelfConjugated>(eclKLMCluster2Plist);
717 plist->initialize(pdgCode, listName);
720 if (!isSelfConjugatedParticle) {
723 antiPlist->initialize(-1 * pdgCode, antiListName);
725 antiPlist->bindAntiParticleList(*(plist));
728 plist->setEditable(
true);
738 Particle particle(cluster, thisType);
740 B2FATAL(
"Particle created from ECLCluster does not have ECLCluster type.");
748 plist->addParticle(newPart);
755 if (std::isnan(cluster->getMomentumMag())) {
756 B2DEBUG(19,
"Skipping KLMCluster because its momentum is NaN. "
757 "This can happen if the timing calibration is missing or wrong, so that the velocity is calculated to be negative.");
764 Particle particle(cluster, pdgCode);
765 if (particle.getParticleSource() != Particle::c_KLMCluster) {
766 B2FATAL(
"Particle created from KLMCluster does not have KLMCluster type.");
774 plist->addParticle(newPart);
777 plist->setEditable(
false);
789 if (!cluster->isNeutral() and onlyNeutral)
819 std::vector<std::pair<double, int>> weightsAndIndices;
820 for (
unsigned int iMCParticle = 0; iMCParticle < mcRelations.
size(); iMCParticle++) {
821 const MCParticle* relMCParticle = mcRelations[iMCParticle];
823 double weight = mcRelations.
weight(iMCParticle);
824 weightsAndIndices.emplace_back(weight, relMCParticle->
getArrayIndex());
829 std::sort(weightsAndIndices.begin(), weightsAndIndices.end(),
830 ValueIndexPairSorting::higherPair<
decltype(weightsAndIndices)::value_type>);
833 for (
auto& weightsAndIndex : weightsAndIndices) {
835 double weight = weightsAndIndex.first;
842 && weight / relMCParticle->
getEnergy() > 0.30)
856 string listName = get<c_PListName>(chargedCluster2Plist);
857 string antiListName = get<c_AntiPListName>(chargedCluster2Plist);
858 int pdgCode = get<c_PListPDGCode>(chargedCluster2Plist);
859 bool isSelfConjugatedParticle = get<c_IsPListSelfConjugated>(chargedCluster2Plist);
868 plist->initialize(pdgCode, listName);
871 if (!isSelfConjugatedParticle) {
874 antiPlist->initialize(-1 * pdgCode, antiListName);
876 antiPlist->bindAntiParticleList(*(plist));
883 for (
unsigned int iPart = 0; iPart < sourceList->getListSize(); iPart++) {
885 const Particle* sourcePart = sourceList->getParticle(iPart);
886 const Track* sourceTrack = sourceList->getParticle(iPart)->getTrack();
895 Particle particle(cluster, thisType);
897 B2FATAL(
"Particle created from ECLCluster does not have ECLCluster type.");
901 plist->addParticle(newPart);
907 for (
unsigned int iCluster = 0; iCluster < clusters.
size(); iCluster++) {
908 const ECLCluster* cluster = clusters[iCluster];
912 Particle particle(cluster, thisType);
914 B2FATAL(
"Particle created from ECLCluster does not have ECLCluster type.");
918 plist->addParticle(newPart);
924 if (!cluster)
continue;
926 if (std::isnan(cluster->getMomentumMag())) {
927 B2DEBUG(19,
"Skipping KLMCluster because its momentum is NaN. "
928 "This can happen if the timing calibration is missing or wrong, so that the velocity is calculated to be negative.");
933 Particle particle(cluster, pdgCode);
935 B2FATAL(
"Particle created from KLMCluster does not have KLMCluster type.");
942 plist->addParticle(newPart);
955 string listName = get<c_PListName>(mcParticle2Plist);
956 string antiListName = get<c_AntiPListName>(mcParticle2Plist);
957 int pdgCode = get<c_PListPDGCode>(mcParticle2Plist);
958 bool isSelfConjugatedParticle = get<c_IsPListSelfConjugated>(mcParticle2Plist);
964 plist->initialize(pdgCode, listName);
966 if (!isSelfConjugatedParticle) {
969 antiPlist->initialize(-1 * pdgCode, antiListName);
971 antiPlist->bindAntiParticleList(*(plist));
977 if (abs(pdgCode) != abs(mcParticle->
getPDG()))
993 plist->addParticle(newPart);
1001 bool result =
false;
1032 vector<MCParticle*> mcdaughters = mcmother->
getDaughters();
1034 for (
auto& mcdaughter : mcdaughters) {
1038 daughter->addRelationTo(mcdaughter);
1041 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 DecayDescriptor * getDaughter(int i) const
return i-th daughter (0 based index).
int getNDaughters() const
return number of direct daughters.
int getProperty() const
return property of the particle.
const DecayDescriptorParticle * getMother() const
return mother.
@ 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.
ParticleLoaderModule()
Constructor.
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.
bool m_skipInitial
toggle skip of initial MC particles
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.
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
FROM * getRelatedFrom(const std::string &name="", const std::string &namedRelation="") const
Get the object from which this object has a relation.
RelationVector< TO > getRelationsTo(const std::string &name="", const std::string &namedRelation="") const
Get the relations that point from this object to another store array.
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.
T * appendNew()
Construct a new T object at the end of the array.
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< Track *, Track * > getTracks() const
Get pair of yhe Tracks, that are part of the V0 particle.
std::pair< TrackFitResult *, TrackFitResult * > getTrackFitResults() const
Get pair of the TrackFitResults, 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.
bool isInitial() const
Check if particle is an initial particle such as ISR.
std::string antiParticleListName(const std::string &listName)
Returns name of anti-particle-list corresponding to listName.
Abstract base class for different kinds of events.