Belle II Software  release-06-01-15
Particle.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 #include <framework/datastore/RelationsObject.h>
12 #include <framework/gearbox/Const.h>
13 #include <mdst/dataobjects/ECLCluster.h>
14 
15 #include <TVector3.h>
16 #include <TLorentzVector.h>
17 #include <TMatrixFSymfwd.h>
18 
19 #include <vector>
20 
21 class TClonesArray;
22 
23 namespace Belle2 {
29  // forward declarations
30  class KLMCluster;
31  class Track;
32  class TrackFitResult;
33  class MCParticle;
34  class PIDLikelihood;
35  class V0;
36 
74  class Particle : public RelationsObject {
75 
76  public:
77 
82  c_Undefined = 0,
83  c_Track = 1,
84  c_ECLCluster = 2,
85  c_KLMCluster = 3,
86  c_V0 = 4,
87  c_MCParticle = 5,
88  c_Composite = 6
89  };
90 
92  enum EFlavorType {
94  c_Flavored = 1,
95  };
96 
100  enum {c_DimPosition = 3, c_DimMomentum = 4, c_DimMatrix = 7,
101  c_SizeMatrix = c_DimMatrix * (c_DimMatrix + 1) / 2
102  };
103 
108  enum {c_Px, c_Py, c_Pz, c_E, c_X, c_Y, c_Z};
109 
115  c_Ordinary = 0,
125  };
126 
131  Particle();
132 
139  Particle(const TLorentzVector& momentum, const int pdgCode);
140 
150  Particle(const TLorentzVector& momentum,
151  const int pdgCode,
152  EFlavorType flavorType,
153  const EParticleSourceObject particleType,
154  const unsigned mdstIndex);
155 
165  Particle(const TLorentzVector& momentum,
166  const int pdgCode,
167  EFlavorType flavorType,
168  const std::vector<int>& daughterIndices,
169  TClonesArray* arrayPointer = nullptr);
170 
181  Particle(const TLorentzVector& momentum,
182  const int pdgCode,
183  EFlavorType flavorType,
184  const std::vector<int>& daughterIndices,
185  int properties,
186  TClonesArray* arrayPointer = nullptr);
187 
199  Particle(const TLorentzVector& momentum,
200  const int pdgCode,
201  EFlavorType flavorType,
202  const std::vector<int>& daughterIndices,
203  int properties,
204  const std::vector<int>& daughterProperties,
205  TClonesArray* arrayPointer = nullptr);
206 
212  Particle(const Track* track,
213  const Const::ChargedStable& chargedStable);
214 
225  [[deprecated("Please use the constructor without the chargedStableUsedForFit")]]
226  Particle(const int trackArrayIndex,
227  const TrackFitResult* trackFit,
228  const Const::ChargedStable& chargedStable,
229  const Const::ChargedStable& chargedStableUsedForFit);
230 
239  Particle(int trackArrayIndex, const TrackFitResult* trackFit,
240  const Const::ChargedStable& chargedStable);
241 
247  explicit Particle(const ECLCluster* eclCluster,
248  const Const::ParticleType& type = Const::photon);
249 
255  explicit Particle(const KLMCluster* klmCluster, const int pdgCode = Const::Klong.getPDGCode());
256 
261  explicit Particle(const MCParticle* MCparticle);
262 
267 
268  public:
269 
270  // setters
271 
276  void set4Vector(const TLorentzVector& p4)
277  {
278  m_px = p4.Px();
279  m_py = p4.Py();
280  m_pz = p4.Pz();
281  m_mass = p4.M();
282  }
283 
288  void setVertex(const TVector3& vertex)
289  {
290  m_x = vertex.X();
291  m_y = vertex.Y();
292  m_z = vertex.Z();
293  };
294 
299  void setMomentumScalingFactor(float momentumScalingFactor)
300  {
301  m_momentumScale = momentumScalingFactor;
302  }
303 
308  void setJacobiMatrix(const TMatrixF& jacobiMatrix);
309 
314  void setMomentumVertexErrorMatrix(const TMatrixFSym& errMatrix);
315 
320  void setPValue(float pValue)
321  {
322  m_pValue = pValue;
323  }
324 
328  void setProperty(const int properties)
329  {
330  m_properties = properties;
331  }
332 
340  void updateMomentum(const TLorentzVector& p4,
341  const TVector3& vertex,
342  const TMatrixFSym& errMatrix,
343  float pValue)
344  {
345  set4Vector(p4);
346  setVertex(vertex);
347  setMomentumVertexErrorMatrix(errMatrix);
348  m_pValue = pValue;
349  }
350 
355  void updateMass(const int pdgCode);
356 
362  void appendDaughter(const Particle* daughter, const bool updateType = true);
363 
369  void appendDaughter(int particleIndex, const bool updateType = true)
370  {
371  if (updateType) {
372  // is it a composite particle or fsr corrected?
373  m_particleSource = c_Composite;
374  }
375  m_daughterIndices.push_back(particleIndex);
376  m_daughterProperties.push_back(Particle::PropertyFlags::c_Ordinary);
377  }
378 
384  void removeDaughter(const Particle* daughter, const bool updateType = true);
385 
386  // getters
387 
392  int getPDGCode(void) const
393  {
394  return m_pdgCode;
395  }
396 
401  float getCharge(void) const;
402 
408  {
409  return m_flavorType;
410  }
411 
417  {
418  return m_particleSource;
419  }
420 
425  unsigned getMdstArrayIndex(void) const
426  {
427  return m_mdstIndex;
428  }
429 
436  int getProperty() const
437  {
438  return m_properties;
439  }
440 
445  float getMass() const
446  {
447  return m_mass;
448  }
449 
455  //float getMassError() const;
456 
461  float getPDGMass(void) const;
462 
467  float getEnergy() const
468  {
471  }
472 
477  TLorentzVector get4Vector() const
478  {
479  TLorentzVector vec;
481  return vec;
482  }
483 
488  TVector3 getMomentum() const
489  {
490  return m_momentumScale * TVector3(m_px, m_py, m_pz);
491  };
492 
497  float getMomentumMagnitude() const
498  {
499  return m_momentumScale * sqrt(m_px * m_px + m_py * m_py + m_pz * m_pz);
500  };
501 
506  float getP() const
507  {
508  return m_momentumScale * sqrt(m_px * m_px + m_py * m_py + m_pz * m_pz);
509  };
510 
515  float getPx() const
516  {
517  return m_momentumScale * m_px;
518  }
519 
524  float getPy() const
525  {
526  return m_momentumScale * m_py;
527  }
528 
533  float getPz() const
534  {
535  return m_momentumScale * m_pz;
536  }
537 
543  {
544  return m_momentumScale;
545  }
546 
551  TVector3 getVertex() const
552  {
553  return TVector3(m_x, m_y, m_z);
554  };
555 
560  float getX() const
561  {
562  return m_x;
563  }
564 
569  float getY() const
570  {
571  return m_y;
572  }
573 
578  float getZ() const
579  {
580  return m_z;
581  }
582 
587  float getPValue() const
588  {
589  return m_pValue;
590  }
591 
596  TMatrixFSym getMomentumVertexErrorMatrix() const;
597 
602  TMatrixFSym getMomentumErrorMatrix() const;
603 
608  TMatrixFSym getVertexErrorMatrix() const;
609 
619  float getCosHelicity(const Particle* mother = nullptr) const;
620 
627  float getCosHelicityDaughter(unsigned iDaughter, unsigned iGrandDaughter = 0) const;
628 
634  float getAcoplanarity() const;
635 
636 
641  int getMdstSource() const;
642 
647  unsigned getNDaughters(void) const
648  {
649  return m_daughterIndices.size();
650  }
651 
656  const std::vector<int>& getDaughterIndices() const
657  {
658  return m_daughterIndices;
659  }
660 
665  const std::vector<int>& getDaughterProperties() const
666  {
667  return m_daughterProperties;
668  }
669 
675  const Particle* getDaughter(unsigned i) const;
676 
686  bool forEachDaughter(const std::function<bool(const Particle*)>& function,
687  bool recursive = true, bool includeSelf = true) const;
688 
693  std::vector<Belle2::Particle*> getDaughters() const;
694  //Need namespace qualifier because ROOT CINT has troubles otherwise
695 
700  std::vector<const Belle2::Particle*> getFinalStateDaughters() const;
701  //Need namespace qualifier because ROOT CINT has troubles otherwise
702 
709  std::vector<int> getMdstArrayIndices(EParticleSourceObject type) const;
710 
716  bool overlapsWith(const Particle* oParticle) const;
717 
739  bool isCopyOf(const Particle* oParticle, bool doDetailedComparison = false) const;
740 
746  const Track* getTrack() const;
747 
753  const TrackFitResult* getTrackFitResult() const;
754 
761  const V0* getV0() const;
762 
771  const PIDLikelihood* getPIDLikelihood() const;
772 
779  const ECLCluster* getECLCluster() const;
780 
786  double getECLClusterEnergy() const;
787 
794  const KLMCluster* getKLMCluster() const;
795 
803  const MCParticle* getMCParticle() const;
804 
806  std::string getName() const override;
807 
809  std::string getInfoHTML() const override;
810 
814  void print() const;
815 
817  std::vector<std::string> getExtraInfoNames() const;
818 
822  void removeExtraInfo();
823 
828  float getExtraInfo(const std::string& name) const;
829 
831  bool hasExtraInfo(const std::string& name) const;
832 
834  int getExtraInfoMap() const
835  {
836  return !m_extraInfo.empty() ? m_extraInfo[0] : -1;
837  }
838 
840  unsigned int getExtraInfoSize() const
841  {
842  return m_extraInfo.size();
843  }
844 
848  void writeExtraInfo(const std::string& name, const float value);
849 
854  void setExtraInfo(const std::string& name, float value);
855 
860  void addExtraInfo(const std::string& name, float value);
861 
866  TClonesArray* getArrayPointer() const
867  {
868  if (!m_arrayPointer)
870  return m_arrayPointer;
871  }
872 
879  {
880  return std::abs(m_pdgCodeUsedForFit);
881  }
882 
889  {
890  return std::abs(m_pdgCodeUsedForFit) == std::abs(m_pdgCode);
891  }
892 
896  bool isMostLikely() const;
897 
902  {
903  const int pdg = abs(getPDGCode());
904  if ((pdg == Const::photon.getPDGCode())
905  or (pdg == Const::electron.getPDGCode())
906  or (pdg == Const::muon.getPDGCode())
907  or (pdg == Const::pion.getPDGCode())
908  or (pdg == Const::kaon.getPDGCode())
909  or (pdg == Const::proton.getPDGCode())
910  or (pdg == Const::deuteron.getPDGCode())) {
912  } else if ((pdg == Const::Klong.getPDGCode())
913  or (pdg == Const::neutron.getPDGCode())) {
915  } else {
917  }
918  }
919 
927  const Particle* getParticleFromGeneralizedIndexString(const std::string& generalizedIndex) const;
928 
932  void updateJacobiMatrix();
933 
934  private:
935 
936  // persistent data members
937  int m_pdgCode;
939  float m_mass;
940  float m_px;
941  float m_py;
942  float m_pz;
943  float m_momentumScale = 1.0;
944  float m_x;
945  float m_y;
946  float m_z;
947  float m_errMatrix[c_SizeMatrix] = {};
948  float m_jacobiMatrix[c_SizeMatrix] = {};
949  float m_pValue;
950  std::vector<int> m_daughterIndices;
953  unsigned m_mdstIndex;
955  std::vector<int> m_daughterProperties;
964  int m_identifier = -1;
965 
971  std::vector<float> m_extraInfo;
972 
973  // transient data members
980  mutable TClonesArray* m_arrayPointer;
981 
982  // private methods
986  void setMomentumPositionErrorMatrix(const TrackFitResult* trackFit);
987 
992  void resetErrorMatrix();
993 
998  void resetJacobiMatrix();
999 
1004  void storeErrorMatrix(const TMatrixFSym& errMatrix);
1005 
1010  void storeJacobiMatrix(const TMatrixF& jacobiMatrix);
1017  void fillFSPDaughters(std::vector<const Belle2::Particle*>& fspDaughters) const;
1018 
1026  // TODO: this can be optimized for speed
1027  void fillDecayChain(std::vector<int>& decayChain) const;
1028 
1032  void setFlavorType();
1033 
1037  void setMdstArrayIndex(const int arrayIndex);
1038 
1044  int generatePDGCodeFromCharge(const int chargedSign, const Const::ChargedStable& chargedStable);
1045 
1047  // v8: added identifier, changed getMdstSource
1048  // v9: added m_pdgCodeUsedForFit
1049  // v10: added m_properties
1050  // v11: added m_daughterProperties
1051  // v12: renamed EParticleType m_particleType to EParticleSourceObject m_particleSource
1052  // v13: added m_momentumScale
1053  // v14: added m_jacobiMatrix
1054 
1055  friend class ParticleSubset;
1056  };
1057 
1059 } // end namespace Belle2
Provides a type-safe way to pass members of the chargedStableSet set.
Definition: Const.h:470
The ParticleType class for identifying different particle types.
Definition: Const.h:289
static const ParticleType neutron
neutron particle
Definition: Const.h:556
static const ChargedStable muon
muon particle
Definition: Const.h:541
static const ChargedStable pion
charged pion particle
Definition: Const.h:542
static const ParticleType Klong
K^0_L particle.
Definition: Const.h:558
static const ChargedStable proton
proton particle
Definition: Const.h:544
static const ChargedStable kaon
charged kaon particle
Definition: Const.h:543
static const ParticleType photon
photon particle
Definition: Const.h:554
static const ChargedStable electron
electron particle
Definition: Const.h:540
static const ChargedStable deuteron
deuteron particle
Definition: Const.h:545
ECL cluster data.
Definition: ECLCluster.h:27
EHypothesisBit
The hypothesis bits for this ECLCluster (Connected region (CR) is split using this hypothesis.
Definition: ECLCluster.h:31
@ c_nPhotons
CR is split into n photons (N1)
@ c_neutralHadron
CR is reconstructed as a neutral hadron (N2)
@ c_none
None as initializer.
KLM cluster data.
Definition: KLMCluster.h:28
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
Class to collect log likelihoods from TOP, ARICH, dEdx, ECL and KLM aimed for output to mdst includes...
Definition: PIDLikelihood.h:26
Specialised SelectSubset<Particle> that also fixes daughter indices and all ParticleLists.
Class to store reconstructed particles.
Definition: Particle.h:74
void setProperty(const int properties)
sets m_properties
Definition: Particle.h:328
void removeExtraInfo()
Remove all stored extra info fields.
Definition: Particle.cc:1237
void updateJacobiMatrix()
Propagate the photon energy scaling to jacobian elements that were calculated using energy.
Definition: Particle.cc:263
TMatrixFSym getVertexErrorMatrix() const
Returns the 3x3 position error sub-matrix.
Definition: Particle.cc:457
float getEnergy() const
Returns total energy.
Definition: Particle.h:467
bool isMostLikely() const
Returns true if the (track-based) particle is created with its most likely mass hypothesis.
Definition: Particle.cc:1344
const KLMCluster * getKLMCluster() const
Returns the pointer to the KLMCluster object that was used to create this Particle (ParticleType == c...
Definition: Particle.cc:895
float getY() const
Returns y component of vertex position.
Definition: Particle.h:569
const Track * getTrack() const
Returns the pointer to the Track object that was used to create this Particle (ParticleType == c_Trac...
Definition: Particle.cc:814
void setMomentumPositionErrorMatrix(const TrackFitResult *trackFit)
Sets the momentum, position and error matrix for this particle (created from charged Track)
Definition: Particle.cc:970
void set4Vector(const TLorentzVector &p4)
Sets Lorentz vector.
Definition: Particle.h:276
void storeErrorMatrix(const TMatrixFSym &errMatrix)
Stores 7x7 error matrix into private member m_errMatrix.
Definition: Particle.cc:1060
bool forEachDaughter(const std::function< bool(const Particle *)> &function, bool recursive=true, bool includeSelf=true) const
Apply a function to all daughters of this particle.
Definition: Particle.cc:1311
std::vector< const Belle2::Particle * > getFinalStateDaughters() const
Returns a vector of pointers to Final State daughter particles.
Definition: Particle.cc:657
const MCParticle * getMCParticle() const
Returns the pointer to the MCParticle object that was used to create this Particle (ParticleType == c...
Definition: Particle.cc:911
const ECLCluster * getECLCluster() const
Returns the pointer to the ECLCluster object that was used to create this Particle (if ParticleType =...
Definition: Particle.cc:860
void setPValue(float pValue)
Sets chi^2 probability of fit.
Definition: Particle.h:320
EParticleSourceObject
particle source enumerators
Definition: Particle.h:81
float m_mass
particle (invariant) mass
Definition: Particle.h:939
float getX() const
Returns x component of vertex position.
Definition: Particle.h:560
float getMomentumScalingFactor() const
Returns momentum scaling factor.
Definition: Particle.h:542
int m_pdgCodeUsedForFit
PDG code used for the track fit.
Definition: Particle.h:938
std::string getName() const override
Return name of this particle.
Definition: Particle.cc:1121
float getZ() const
Returns z component of vertex position.
Definition: Particle.h:578
bool overlapsWith(const Particle *oParticle) const
Returns true if final state ancestors of oParticle overlap.
Definition: Particle.cc:706
void writeExtraInfo(const std::string &name, const float value)
Sets the user defined extraInfo.
Definition: Particle.cc:1261
float getPy() const
Returns y component of momentum.
Definition: Particle.h:524
TClonesArray * getArrayPointer() const
Returns the pointer to the store array which holds the daughter particles.
Definition: Particle.h:866
float getAcoplanarity() const
Returns acoplanarity angle defined as the angle between the decay planes of the grand daughters in th...
Definition: Particle.cc:546
std::vector< std::string > getExtraInfoNames() const
get a list of the extra info names
Definition: Particle.cc:1131
bool isCopyOf(const Particle *oParticle, bool doDetailedComparison=false) const
Returns true if this Particle and oParticle are copies of each other.
Definition: Particle.cc:721
std::vector< int > getMdstArrayIndices(EParticleSourceObject type) const
Returns a vector of StoreArray indices of given MDST dataobjects.
Definition: Particle.cc:665
void setVertex(const TVector3 &vertex)
Sets position (decay vertex)
Definition: Particle.h:288
float getExtraInfo(const std::string &name) const
Return given value if set.
Definition: Particle.cc:1242
void resetJacobiMatrix()
Resets 4x6 error matrix All elements are set to 0.0.
Definition: Particle.cc:1054
float getPz() const
Returns z component of momentum.
Definition: Particle.h:533
float getPDGMass(void) const
Returns uncertainty on the invariant mass (requires valid momentum error matrix)
Definition: Particle.cc:621
void storeJacobiMatrix(const TMatrixF &jacobiMatrix)
Stores 4x6 Jacobi matrix into private member m_jacobiMatrix.
Definition: Particle.cc:1071
void updateMomentum(const TLorentzVector &p4, const TVector3 &vertex, const TMatrixFSym &errMatrix, float pValue)
Sets Lorentz vector, position, 7x7 error matrix and p-value.
Definition: Particle.h:340
unsigned m_mdstIndex
0-based index of MDST store array object
Definition: Particle.h:953
float getMass() const
Returns invariant mass (= nominal for FS particles)
Definition: Particle.h:445
void setFlavorType()
sets m_flavorType using m_pdgCode
Definition: Particle.cc:1106
int getMdstSource() const
Returns unique identifier of final state particle (needed in particle combiner)
Definition: Particle.cc:377
float m_errMatrix[c_SizeMatrix]
error matrix (1D representation)
Definition: Particle.h:947
float m_pValue
chi^2 probability of the fit.
Definition: Particle.h:949
bool hasExtraInfo(const std::string &name) const
Return whether the extra info with the given name is set.
Definition: Particle.cc:1219
std::string getInfoHTML() const override
Return a short summary of this object's contents in HTML format.
Definition: Particle.cc:1144
float getCosHelicity(const Particle *mother=nullptr) const
Returns cosine of the helicity angle The helicity angle is defined in the rest frame of the particle ...
Definition: Particle.cc:469
TVector3 getVertex() const
Returns vertex position (POCA for charged, IP for neutral FS particles)
Definition: Particle.h:551
float getPValue() const
Returns chi^2 probability of fit if done or -1.
Definition: Particle.h:587
void setMdstArrayIndex(const int arrayIndex)
set mdst array index
Definition: Particle.cc:356
TVector3 getMomentum() const
Returns momentum vector.
Definition: Particle.h:488
const Particle * getParticleFromGeneralizedIndexString(const std::string &generalizedIndex) const
Explores the decay tree of the particle and returns the (grand^n)daughter identified by a generalized...
Definition: Particle.cc:925
unsigned getMdstArrayIndex(void) const
Returns 0-based index of MDST store array object (0 for composite particles)
Definition: Particle.h:425
float m_jacobiMatrix[c_SizeMatrix]
error matrix (1D representation)
Definition: Particle.h:948
float m_py
momentum component y
Definition: Particle.h:941
EFlavorType getFlavorType() const
Returns flavor type of the decay (for FS particles: flavor type of particle)
Definition: Particle.h:407
~Particle()
Destructor.
void fillFSPDaughters(std::vector< const Belle2::Particle * > &fspDaughters) const
Fill final state particle daughters into a vector.
Definition: Particle.cc:1083
const PIDLikelihood * getPIDLikelihood() const
Returns the pointer to the PIDLikelihood object that is related to the Track, which was used to creat...
Definition: Particle.cc:840
const V0 * getV0() const
Returns the pointer to the V0 object that was used to create this Particle (if ParticleType == c_V0).
Definition: Particle.cc:849
TClonesArray * m_arrayPointer
Internal pointer to DataStore array containing the daughters of this particle.
Definition: Particle.h:980
EParticleSourceObject m_particleSource
(mdst) source of particle
Definition: Particle.h:952
void fillDecayChain(std::vector< int > &decayChain) const
Fill vector with (PDGCode, MdstSource) pairs for the entire decay chain.
Definition: Particle.cc:1096
int getPDGCode(void) const
Returns PDG code.
Definition: Particle.h:392
void addExtraInfo(const std::string &name, float value)
Sets the user-defined data of given name to the given value.
Definition: Particle.cc:1289
bool wasExactFitHypothesisUsed() const
Returns true if the type represented by this Particle object was used use as a mass hypothesis during...
Definition: Particle.h:888
int getProperty() const
Returns particle property as a bit pattern The values are defined in the PropertyFlags enum and descr...
Definition: Particle.h:436
void setMomentumScalingFactor(float momentumScalingFactor)
Sets momentum scaling.
Definition: Particle.h:299
float getCharge(void) const
Returns particle charge.
Definition: Particle.cc:630
float getP() const
Returns momentum magnitude (same as getMomentumMagnitude but with shorter name)
Definition: Particle.h:506
unsigned getNDaughters(void) const
Returns number of daughter particles.
Definition: Particle.h:647
int getPDGCodeUsedForFit()
Return the always positive PDG code which was used for the track fit (if there was a track fit) of th...
Definition: Particle.h:878
std::vector< Belle2::Particle * > getDaughters() const
Returns a vector of pointers to daughter particles.
Definition: Particle.cc:645
const std::vector< int > & getDaughterIndices() const
Returns a vector of store array indices of daughter particles.
Definition: Particle.h:656
void resetErrorMatrix()
Resets 7x7 error matrix All elements are set to 0.0.
Definition: Particle.cc:1048
EFlavorType m_flavorType
flavor type.
Definition: Particle.h:951
float m_pz
momentum component z
Definition: Particle.h:942
int generatePDGCodeFromCharge(const int chargedSign, const Const::ChargedStable &chargedStable)
Generate the PDG code with correct sign, using the charge.
Definition: Particle.cc:1335
void appendDaughter(int particleIndex, const bool updateType=true)
Appends index of daughter to daughters index array.
Definition: Particle.h:369
Particle()
Default constructor.
Definition: Particle.cc:43
TMatrixFSym getMomentumErrorMatrix() const
Returns the 4x4 momentum error matrix.
Definition: Particle.cc:445
std::vector< int > m_daughterProperties
daughter particle properties
Definition: Particle.h:955
float m_px
momentum component x
Definition: Particle.h:940
std::vector< int > m_daughterIndices
daughter particle indices
Definition: Particle.h:950
TLorentzVector get4Vector() const
Returns Lorentz vector.
Definition: Particle.h:477
void setJacobiMatrix(const TMatrixF &jacobiMatrix)
Sets 4x6 jacobi matrix.
Definition: Particle.cc:417
int getExtraInfoMap() const
Return the id of the associated ParticleExtraInfoMap or -1 if no map is set.
Definition: Particle.h:834
float m_y
position component y
Definition: Particle.h:945
void setMomentumVertexErrorMatrix(const TMatrixFSym &errMatrix)
Sets 7x7 error matrix.
Definition: Particle.cc:403
EParticleSourceObject getParticleSource() const
Returns particle source as defined with enum EParticleSourceObject.
Definition: Particle.h:416
void updateMass(const int pdgCode)
Updates particle mass with the mass of the particle corresponding to the given PDG.
Definition: Particle.cc:614
float getMomentumMagnitude() const
Returns momentum magnitude.
Definition: Particle.h:497
void print() const
Prints the contents of a Particle object to standard output.
Definition: Particle.cc:1126
EFlavorType
describes flavor type, see getFlavorType().
Definition: Particle.h:92
@ c_Unflavored
Is its own antiparticle or we don't know whether it is a particle/antiparticle.
Definition: Particle.h:93
@ c_Flavored
Is either particle or antiparticle.
Definition: Particle.h:94
int m_pdgCode
PDG code.
Definition: Particle.h:937
TMatrixFSym getMomentumVertexErrorMatrix() const
Returns 7x7 error matrix.
Definition: Particle.cc:430
PropertyFlags
Flags that describe the particle property, which are used in the MC matching.
Definition: Particle.h:114
@ c_IsIgnoreNeutrino
Is the particle MC matched with the ignore missing neutrino flag set?
Definition: Particle.h:120
@ c_IsIgnoreRadiatedPhotons
Is the particle MC matched with the ignore radiated photon flag set?
Definition: Particle.h:117
@ c_IsIgnoreGamma
Is the particle MC matched with the ignore missing gamma flag set?
Definition: Particle.h:121
@ c_IsUnspecified
Ordinary particles.
Definition: Particle.h:116
@ c_IsIgnoreBrems
Is the particle MC matched with the ignore added Brems gamma flag set?
Definition: Particle.h:122
@ c_IsIgnoreDecayInFlight
Is the particle MC matched with the ignore DecayInFlight flag set?
Definition: Particle.h:124
@ c_IsIgnoreMisID
Is the particle MC matched with the ignore MisID flag set?
Definition: Particle.h:123
@ c_IsIgnoreIntermediate
Is the particle MC matched with the ignore intermediate resonances flag set?
Definition: Particle.h:118
@ c_IsIgnoreMassive
Is the particle MC matched with the ignore missing massive particle flag set?
Definition: Particle.h:119
double getECLClusterEnergy() const
Returns the energy of the ECLCluster for the particle.
Definition: Particle.cc:888
const TrackFitResult * getTrackFitResult() const
Returns the pointer to the TrackFitResult that was used to create this Particle (ParticleType == c_Tr...
Definition: Particle.cc:823
void removeDaughter(const Particle *daughter, const bool updateType=true)
Removes index of daughter from daughters index array.
Definition: Particle.cc:689
float getCosHelicityDaughter(unsigned iDaughter, unsigned iGrandDaughter=0) const
Returns cosine of the helicity angle of the given daughter defined by given grand daughter.
Definition: Particle.cc:513
unsigned int getExtraInfoSize() const
Return the size of the extra info array.
Definition: Particle.h:840
int m_identifier
Identifier that can be used to identify whether the particle is unique or is a copy or representation...
Definition: Particle.h:964
float m_momentumScale
momentum scaling factor
Definition: Particle.h:943
void appendDaughter(const Particle *daughter, const bool updateType=true)
Appends index of daughter to daughters index array.
Definition: Particle.cc:677
const std::vector< int > & getDaughterProperties() const
Returns a vector of properties of daughter particles.
Definition: Particle.h:665
int m_properties
particle property
Definition: Particle.h:954
std::vector< float > m_extraInfo
Stores associated user defined values.
Definition: Particle.h:971
float m_z
position component z
Definition: Particle.h:946
ClassDefOverride(Particle, 14)
Class to store reconstructed particles.
float m_x
position component x
Definition: Particle.h:944
float getPx() const
Returns x component of momentum.
Definition: Particle.h:515
const Particle * getDaughter(unsigned i) const
Returns a pointer to the i-th daughter particle.
Definition: Particle.cc:639
ECLCluster::EHypothesisBit getECLClusterEHypothesisBit() const
Returns the ECLCluster EHypothesisBit for this Particle.
Definition: Particle.h:901
void setExtraInfo(const std::string &name, float value)
Sets the user-defined data of given name to the given value.
Definition: Particle.cc:1270
Defines interface for accessing relations of objects in StoreArray.
TClonesArray * getArrayPointer() const
Returns the pointer to the raw DataStore array holding this object (protected since these arrays are ...
Values of the result of a track fit with a given particle hypothesis.
Class that bundles various TrackFitResults.
Definition: Track.h:25
Object holding information for V0s.
Definition: V0.h:30
Abstract base class for different kinds of events.