Belle II Software  release-05-02-19
Particle.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2012-2019 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Anze Zupanc, Marko Staric, Christian Pulvermacher, *
7  * Sam Cunliffe, Torben Ferber *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #pragma once
13 
14 #include <framework/datastore/RelationsObject.h>
15 #include <framework/gearbox/Const.h>
16 #include <mdst/dataobjects/ECLCluster.h>
17 
18 #include <TVector3.h>
19 #include <TLorentzVector.h>
20 #include <TMatrixFSymfwd.h>
21 
22 #include <vector>
23 
24 class TClonesArray;
25 
26 namespace Belle2 {
32  // forward declarations
33  class KLMCluster;
34  class Track;
35  class TrackFitResult;
36  class MCParticle;
37  class PIDLikelihood;
38  class V0;
39 
77  class Particle : public RelationsObject {
78 
79  public:
80 
85  c_Undefined = 0,
86  c_Track = 1,
87  c_ECLCluster = 2,
88  c_KLMCluster = 3,
89  c_V0 = 4,
90  c_MCParticle = 5,
91  c_Composite = 6
92  };
93 
95  enum EFlavorType {
97  c_Flavored = 1,
98  };
99 
103  enum {c_DimPosition = 3, c_DimMomentum = 4, c_DimMatrix = 7,
104  c_SizeMatrix = c_DimMatrix * (c_DimMatrix + 1) / 2
105  };
106 
111  enum {c_Px, c_Py, c_Pz, c_E, c_X, c_Y, c_Z};
112 
118  c_Ordinary = 0,
128  };
129 
134  Particle();
135 
142  Particle(const TLorentzVector& momentum, const int pdgCode);
143 
153  Particle(const TLorentzVector& momentum,
154  const int pdgCode,
155  EFlavorType flavorType,
156  const EParticleSourceObject particleType,
157  const unsigned mdstIndex);
158 
168  Particle(const TLorentzVector& momentum,
169  const int pdgCode,
170  EFlavorType flavorType,
171  const std::vector<int>& daughterIndices,
172  TClonesArray* arrayPointer = nullptr);
173 
184  Particle(const TLorentzVector& momentum,
185  const int pdgCode,
186  EFlavorType flavorType,
187  const std::vector<int>& daughterIndices,
188  int properties,
189  TClonesArray* arrayPointer = nullptr);
190 
202  Particle(const TLorentzVector& momentum,
203  const int pdgCode,
204  EFlavorType flavorType,
205  const std::vector<int>& daughterIndices,
206  int properties,
207  const std::vector<int>& daughterProperties,
208  TClonesArray* arrayPointer = nullptr);
209 
215  Particle(const Track* track,
216  const Const::ChargedStable& chargedStable);
217 
228  [[deprecated("Please use the constructor without the chargedStableUsedForFit")]]
229  Particle(const int trackArrayIndex,
230  const TrackFitResult* trackFit,
231  const Const::ChargedStable& chargedStable,
232  const Const::ChargedStable& chargedStableUsedForFit);
233 
242  Particle(int trackArrayIndex, const TrackFitResult* trackFit,
243  const Const::ChargedStable& chargedStable);
244 
250  explicit Particle(const ECLCluster* eclCluster,
251  const Const::ParticleType& type = Const::photon);
252 
258  explicit Particle(const KLMCluster* klmCluster, const int pdgCode = Const::Klong.getPDGCode());
259 
264  explicit Particle(const MCParticle* MCparticle);
265 
269  ~Particle();
270 
271  public:
272 
273  // setters
274 
279  void set4Vector(const TLorentzVector& p4)
280  {
281  m_px = p4.Px();
282  m_py = p4.Py();
283  m_pz = p4.Pz();
284  m_mass = p4.M();
285  }
286 
291  void setVertex(const TVector3& vertex)
292  {
293  m_x = vertex.X();
294  m_y = vertex.Y();
295  m_z = vertex.Z();
296  };
297 
302  void setMomentumVertexErrorMatrix(const TMatrixFSym& errMatrix);
303 
308  void setPValue(float pValue)
309  {
310  m_pValue = pValue;
311  }
312 
316  void setProperty(const int properties)
317  {
318  m_properties = properties;
319  }
320 
328  void updateMomentum(const TLorentzVector& p4,
329  const TVector3& vertex,
330  const TMatrixFSym& errMatrix,
331  float pValue)
332  {
333  set4Vector(p4);
334  setVertex(vertex);
335  setMomentumVertexErrorMatrix(errMatrix);
336  m_pValue = pValue;
337  }
338 
343  void updateMass(const int pdgCode);
344 
350  void appendDaughter(const Particle* daughter, const bool updateType = true);
351 
357  void appendDaughter(int particleIndex, const bool updateType = true)
358  {
359  if (updateType) {
360  // is it a composite particle or fsr corrected?
361  m_particleSource = c_Composite;
362  }
363  m_daughterIndices.push_back(particleIndex);
364  m_daughterProperties.push_back(Particle::PropertyFlags::c_Ordinary);
365  }
366 
372  void removeDaughter(const Particle* daughter, const bool updateType = true);
373 
374  // getters
375 
380  int getPDGCode(void) const
381  {
382  return m_pdgCode;
383  }
384 
389  float getCharge(void) const;
390 
396  {
397  return m_flavorType;
398  }
399 
405  {
406  return m_particleSource;
407  }
408 
413  unsigned getMdstArrayIndex(void) const
414  {
415  return m_mdstIndex;
416  }
417 
424  int getProperty() const
425  {
426  return m_properties;
427  }
428 
433  float getMass() const
434  {
435  return m_mass;
436  }
437 
443  //float getMassError() const;
444 
449  float getPDGMass(void) const;
450 
455  float getEnergy() const
456  {
457  return sqrt(m_px * m_px + m_py * m_py + m_pz * m_pz + m_mass * m_mass);
458  }
459 
464  TLorentzVector get4Vector() const
465  {
466  TLorentzVector vec;
467  vec.SetXYZM(m_px, m_py, m_pz, m_mass);
468  return vec;
469  }
470 
475  TVector3 getMomentum() const
476  {
477  return TVector3(m_px, m_py, m_pz);
478  };
479 
484  float getMomentumMagnitude() const
485  {
486  return sqrt(m_px * m_px + m_py * m_py + m_pz * m_pz);
487  };
488 
493  float getP() const
494  {
495  return sqrt(m_px * m_px + m_py * m_py + m_pz * m_pz);
496  };
497 
502  float getPx() const
503  {
504  return m_px;
505  }
506 
511  float getPy() const
512  {
513  return m_py;
514  }
515 
520  float getPz() const
521  {
522  return m_pz;
523  }
524 
529  TVector3 getVertex() const
530  {
531  return TVector3(m_x, m_y, m_z);
532  };
533 
538  float getX() const
539  {
540  return m_x;
541  }
542 
547  float getY() const
548  {
549  return m_y;
550  }
551 
556  float getZ() const
557  {
558  return m_z;
559  }
560 
565  float getPValue() const
566  {
567  return m_pValue;
568  }
569 
574  TMatrixFSym getMomentumVertexErrorMatrix() const;
575 
580  TMatrixFSym getMomentumErrorMatrix() const;
581 
586  TMatrixFSym getVertexErrorMatrix() const;
587 
597  float getCosHelicity(const Particle* mother = nullptr) const;
598 
605  float getCosHelicityDaughter(unsigned iDaughter, unsigned iGrandDaughter = 0) const;
606 
612  float getAcoplanarity() const;
613 
614 
619  int getMdstSource() const;
620 
625  unsigned getNDaughters(void) const
626  {
627  return m_daughterIndices.size();
628  }
629 
634  const std::vector<int>& getDaughterIndices() const
635  {
636  return m_daughterIndices;
637  }
638 
643  const std::vector<int>& getDaughterProperties() const
644  {
645  return m_daughterProperties;
646  }
647 
653  const Particle* getDaughter(unsigned i) const;
654 
664  bool forEachDaughter(const std::function<bool(const Particle*)>& function,
665  bool recursive = true, bool includeSelf = true) const;
666 
671  std::vector<Belle2::Particle*> getDaughters() const;
672  //Need namespace qualifier because ROOT CINT has troubles otherwise
673 
678  std::vector<const Belle2::Particle*> getFinalStateDaughters() const;
679  //Need namespace qualifier because ROOT CINT has troubles otherwise
680 
687  std::vector<int> getMdstArrayIndices(EParticleSourceObject type) const;
688 
694  bool overlapsWith(const Particle* oParticle) const;
695 
717  bool isCopyOf(const Particle* oParticle, bool doDetailedComparison = false) const;
718 
724  const Track* getTrack() const;
725 
731  const TrackFitResult* getTrackFitResult() const;
732 
739  const V0* getV0() const;
740 
749  const PIDLikelihood* getPIDLikelihood() const;
750 
757  const ECLCluster* getECLCluster() const;
758 
764  double getECLClusterEnergy() const;
765 
772  const KLMCluster* getKLMCluster() const;
773 
781  const MCParticle* getMCParticle() const;
782 
784  virtual std::string getName() const;
785 
787  virtual std::string getInfoHTML() const;
788 
792  void print() const;
793 
795  std::vector<std::string> getExtraInfoNames() const;
796 
800  void removeExtraInfo();
801 
806  float getExtraInfo(const std::string& name) const;
807 
809  bool hasExtraInfo(const std::string& name) const;
810 
812  int getExtraInfoMap() const
813  {
814  return !m_extraInfo.empty() ? m_extraInfo[0] : -1;
815  }
816 
818  unsigned int getExtraInfoSize() const
819  {
820  return m_extraInfo.size();
821  }
822 
826  void writeExtraInfo(const std::string& name, const float value);
827 
832  void setExtraInfo(const std::string& name, float value);
833 
838  void addExtraInfo(const std::string& name, float value);
839 
844  TClonesArray* getArrayPointer() const
845  {
846  if (!m_arrayPointer)
848  return m_arrayPointer;
849  }
850 
857  {
858  return std::abs(m_pdgCodeUsedForFit);
859  }
860 
867  {
868  return std::abs(m_pdgCodeUsedForFit) == std::abs(m_pdgCode);
869  }
870 
875  {
876  const int pdg = abs(getPDGCode());
877  if ((pdg == Const::photon.getPDGCode())
878  or (pdg == Const::electron.getPDGCode())
879  or (pdg == Const::muon.getPDGCode())
880  or (pdg == Const::pion.getPDGCode())
881  or (pdg == Const::kaon.getPDGCode())
882  or (pdg == Const::proton.getPDGCode())
883  or (pdg == Const::deuteron.getPDGCode())) {
885  } else if ((pdg == Const::Klong.getPDGCode())
886  or (pdg == Const::neutron.getPDGCode())) {
888  } else {
890  }
891  }
892 
900  const Particle* getParticleFromGeneralizedIndexString(const std::string& generalizedIndex) const;
901 
902 
903  private:
904 
905  // persistent data members
906  int m_pdgCode;
908  float m_mass;
909  float m_px;
910  float m_py;
911  float m_pz;
912  float m_x;
913  float m_y;
914  float m_z;
915  float m_errMatrix[c_SizeMatrix] = {};
916  float m_pValue;
917  std::vector<int> m_daughterIndices;
920  unsigned m_mdstIndex;
922  std::vector<int> m_daughterProperties;
931  int m_identifier = -1;
932 
938  std::vector<float> m_extraInfo;
939 
940  // transient data members
947  mutable TClonesArray* m_arrayPointer;
948 
949  // private methods
953  void setMomentumPositionErrorMatrix(const TrackFitResult* trackFit);
954 
959  void resetErrorMatrix();
960 
965  void storeErrorMatrix(const TMatrixFSym& errMatrix);
966 
973  void fillFSPDaughters(std::vector<const Belle2::Particle*>& fspDaughters) const;
974 
982  // TODO: this can be optimized for speed
983  void fillDecayChain(std::vector<int>& decayChain) const;
984 
988  void setFlavorType();
989 
993  void setMdstArrayIndex(const int arrayIndex);
994 
1000  int generatePDGCodeFromCharge(const int chargedSign, const Const::ChargedStable& chargedStable);
1001 
1002  ClassDef(Particle, 12);
1003  // v8: added identifier, changed getMdstSource
1004  // v9: added m_pdgCodeUsedForFit
1005  // v10: added m_properties
1006  // v11: added m_daughterProperties
1007  // v12: renamed EParticleType m_particleType to EParticleSourceObject m_particleSource
1008 
1009  friend class ParticleSubset;
1010  };
1011 
1013 } // end namespace Belle2
Belle2::Particle::getPx
float getPx() const
Returns x component of momentum.
Definition: Particle.h:502
Belle2::Particle::appendDaughter
void appendDaughter(int particleIndex, const bool updateType=true)
Appends index of daughter to daughters index array.
Definition: Particle.h:357
Belle2::Particle::getPDGCode
int getPDGCode(void) const
Returns PDG code.
Definition: Particle.h:380
Belle2::Const::photon
static const ParticleType photon
photon particle
Definition: Const.h:547
Belle2::ECLCluster::EHypothesisBit::c_none
@ c_none
None as initializer.
Belle2::Particle::getCosHelicityDaughter
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:469
Belle2::Particle::m_daughterProperties
std::vector< int > m_daughterProperties
daughter particle properties
Definition: Particle.h:922
Belle2::Particle::getArrayPointer
TClonesArray * getArrayPointer() const
Returns the pointer to the store array which holds the daughter particles.
Definition: Particle.h:844
Belle2::Particle::writeExtraInfo
void writeExtraInfo(const std::string &name, const float value)
Sets the user defined extraInfo.
Definition: Particle.cc:1196
Belle2::Particle::getExtraInfoSize
unsigned int getExtraInfoSize() const
Return the size of the extra info array.
Definition: Particle.h:818
Belle2::Particle::getProperty
int getProperty() const
Returns particle property as a bit pattern The values are defined in the PropertyFlags enum and descr...
Definition: Particle.h:424
Belle2::Particle::getDaughterIndices
const std::vector< int > & getDaughterIndices() const
Returns a vector of store array indices of daughter particles.
Definition: Particle.h:634
Belle2::Particle::getZ
float getZ() const
Returns z component of vertex position.
Definition: Particle.h:556
Belle2::Particle::set4Vector
void set4Vector(const TLorentzVector &p4)
Sets Lorentz vector.
Definition: Particle.h:279
Belle2::Particle::getPy
float getPy() const
Returns y component of momentum.
Definition: Particle.h:511
Belle2::RelationsInterface::getArrayPointer
TClonesArray * getArrayPointer() const
Returns the pointer to the raw DataStore array holding this object (protected since these arrays are ...
Definition: RelationsObject.h:420
Belle2::Particle::getExtraInfoMap
int getExtraInfoMap() const
Return the id of the associated ParticleExtraInfoMap or -1 if no map is set.
Definition: Particle.h:812
Belle2::Particle::getPz
float getPz() const
Returns z component of momentum.
Definition: Particle.h:520
Belle2::Particle::getTrackFitResult
const TrackFitResult * getTrackFitResult() const
Returns the pointer to the TrackFitResult that was used to create this Particle (ParticleType == c_Tr...
Definition: Particle.cc:779
Belle2::Particle::getVertex
TVector3 getVertex() const
Returns vertex position (POCA for charged, IP for neutral FS particles)
Definition: Particle.h:529
Belle2::V0
Object holding information for V0s.
Definition: V0.h:40
Belle2::Particle::c_IsUnspecified
@ c_IsUnspecified
Ordinary particles.
Definition: Particle.h:119
Belle2::ECLCluster
ECL cluster data.
Definition: ECLCluster.h:39
Belle2::Particle::generatePDGCodeFromCharge
int generatePDGCodeFromCharge(const int chargedSign, const Const::ChargedStable &chargedStable)
Generate the PDG code with correct sign, using the charge.
Definition: Particle.cc:1270
Belle2::Const::electron
static const ChargedStable electron
electron particle
Definition: Const.h:533
Belle2::Particle::print
void print() const
Prints the contents of a Particle object to standard output.
Definition: Particle.cc:1064
Belle2::Particle::getY
float getY() const
Returns y component of vertex position.
Definition: Particle.h:547
Belle2::Particle::m_px
float m_px
momentum component x
Definition: Particle.h:909
Belle2::ECLCluster::EHypothesisBit
EHypothesisBit
The hypothesis bits for this ECLCluster (Connected region (CR) is split using this hypothesis.
Definition: ECLCluster.h:43
Belle2::Particle::m_daughterIndices
std::vector< int > m_daughterIndices
daughter particle indices
Definition: Particle.h:917
Belle2::Const::Klong
static const ParticleType Klong
K^0_L particle.
Definition: Const.h:551
Belle2::Particle::m_pdgCode
int m_pdgCode
PDG code.
Definition: Particle.h:906
Belle2::Particle::addExtraInfo
void addExtraInfo(const std::string &name, float value)
Sets the user-defined data of given name to the given value.
Definition: Particle.cc:1224
Belle2::Particle::resetErrorMatrix
void resetErrorMatrix()
Resets 7x7 error matrix All elements are set to 0.0.
Definition: Particle.cc:1003
Belle2::Particle::c_IsIgnoreMisID
@ c_IsIgnoreMisID
Is the particle MC matched with the ignore MisID flag set?
Definition: Particle.h:126
Belle2::Particle::getMdstArrayIndices
std::vector< int > getMdstArrayIndices(EParticleSourceObject type) const
Returns a vector of StoreArray indices of given MDST dataobjects.
Definition: Particle.cc:621
Belle2::Particle::m_flavorType
EFlavorType m_flavorType
flavor type.
Definition: Particle.h:918
Belle2::Particle::c_IsIgnoreNeutrino
@ c_IsIgnoreNeutrino
Is the particle MC matched with the ignore missing neutrino flag set?
Definition: Particle.h:123
Belle2::Particle::m_extraInfo
std::vector< float > m_extraInfo
Stores associated user defined values.
Definition: Particle.h:938
Belle2::Particle::setExtraInfo
void setExtraInfo(const std::string &name, float value)
Sets the user-defined data of given name to the given value.
Definition: Particle.cc:1205
Belle2::ECLCluster::EHypothesisBit::c_nPhotons
@ c_nPhotons
CR is split into n photons (N1)
Belle2::Particle::m_mass
float m_mass
particle (invariant) mass
Definition: Particle.h:908
Belle2::Particle::m_pValue
float m_pValue
chi^2 probability of the fit.
Definition: Particle.h:916
Belle2::Particle::m_identifier
int m_identifier
Identifier that can be used to identify whether the particle is unique or is a copy or representation...
Definition: Particle.h:931
Belle2::Particle::m_z
float m_z
position component z
Definition: Particle.h:914
Belle2::PIDLikelihood
Class to collect log likelihoods from TOP, ARICH, dEdx, ECL and KLM aimed for output to mdst includes...
Definition: PIDLikelihood.h:37
Belle2::Particle::fillDecayChain
void fillDecayChain(std::vector< int > &decayChain) const
Fill vector with (PDGCode, MdstSource) pairs for the entire decay chain.
Definition: Particle.cc:1034
Belle2::Particle::storeErrorMatrix
void storeErrorMatrix(const TMatrixFSym &errMatrix)
Stores 7x7 error matrix into private member m_errMatrix.
Definition: Particle.cc:1009
Belle2::Particle::getParticleFromGeneralizedIndexString
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:880
Belle2::Particle::updateMomentum
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:328
Belle2::Particle::getDaughter
const Particle * getDaughter(unsigned i) const
Returns a pointer to the i-th daughter particle.
Definition: Particle.cc:595
Belle2::TrackFitResult
Values of the result of a track fit with a given particle hypothesis.
Definition: TrackFitResult.h:59
Belle2::Particle::getP
float getP() const
Returns momentum magnitude (same as getMomentumMagnitude but with shorter name)
Definition: Particle.h:493
Belle2::Particle::getMdstSource
int getMdstSource() const
Returns unique identifier of final state particle (needed in particle combiner)
Definition: Particle.cc:347
Belle2::Particle::c_Flavored
@ c_Flavored
Is either particle or antiparticle.
Definition: Particle.h:97
Belle2::Const::kaon
static const ChargedStable kaon
charged kaon particle
Definition: Const.h:536
Belle2::Particle::m_particleSource
EParticleSourceObject m_particleSource
(mdst) source of particle
Definition: Particle.h:919
Belle2::Particle::ClassDef
ClassDef(Particle, 12)
Class to store reconstructed particles.
Belle2::Particle::getKLMCluster
const KLMCluster * getKLMCluster() const
Returns the pointer to the KLMCluster object that was used to create this Particle (ParticleType == c...
Definition: Particle.cc:850
Belle2::Particle::m_properties
int m_properties
particle property
Definition: Particle.h:921
Belle2::Particle::m_pdgCodeUsedForFit
int m_pdgCodeUsedForFit
PDG code used for the track fit.
Definition: Particle.h:907
Belle2::Particle::getEnergy
float getEnergy() const
Returns total energy.
Definition: Particle.h:455
Belle2::Const::pion
static const ChargedStable pion
charged pion particle
Definition: Const.h:535
Belle2::Particle::removeExtraInfo
void removeExtraInfo()
Remove all stored extra info fields.
Definition: Particle.cc:1172
Belle2::Particle::getECLClusterEHypothesisBit
ECLCluster::EHypothesisBit getECLClusterEHypothesisBit() const
Returns the ECLCluster EHypothesisBit for this Particle.
Definition: Particle.h:874
Belle2::Particle::getFinalStateDaughters
std::vector< const Belle2::Particle * > getFinalStateDaughters() const
Returns a vector of pointers to Final State daughter particles.
Definition: Particle.cc:613
Belle2::Particle::getCharge
float getCharge(void) const
Returns particle charge.
Definition: Particle.cc:586
Belle2::Particle::getPIDLikelihood
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:796
Belle2::Particle::getMdstArrayIndex
unsigned getMdstArrayIndex(void) const
Returns 0-based index of MDST store array object (0 for composite particles)
Definition: Particle.h:413
Belle2::Particle::getDaughters
std::vector< Belle2::Particle * > getDaughters() const
Returns a vector of pointers to daughter particles.
Definition: Particle.cc:601
Belle2::Particle::getMass
float getMass() const
Returns invariant mass (= nominal for FS particles)
Definition: Particle.h:433
Belle2::Particle::EFlavorType
EFlavorType
describes flavor type, see getFlavorType().
Definition: Particle.h:95
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::Particle::overlapsWith
bool overlapsWith(const Particle *oParticle) const
Returns true if final state ancessors of oParticle overlap.
Definition: Particle.cc:662
Belle2::Particle::getECLCluster
const ECLCluster * getECLCluster() const
Returns the pointer to the ECLCluster object that was used to create this Particle (if ParticleType =...
Definition: Particle.cc:816
Belle2::Particle::getMomentumVertexErrorMatrix
TMatrixFSym getMomentumVertexErrorMatrix() const
Returns 7x7 error matrix.
Definition: Particle.cc:386
Belle2::Particle::getNDaughters
unsigned getNDaughters(void) const
Returns number of daughter particles.
Definition: Particle.h:625
Belle2::Const::deuteron
static const ChargedStable deuteron
deuteron particle
Definition: Const.h:538
Belle2::Particle::appendDaughter
void appendDaughter(const Particle *daughter, const bool updateType=true)
Appends index of daughter to daughters index array.
Definition: Particle.cc:633
Belle2::Particle::setMomentumVertexErrorMatrix
void setMomentumVertexErrorMatrix(const TMatrixFSym &errMatrix)
Sets 7x7 error matrix.
Definition: Particle.cc:373
Belle2::Particle::c_IsIgnoreRadiatedPhotons
@ c_IsIgnoreRadiatedPhotons
Is the particle MC matched with the ignore radiated photon flag set?
Definition: Particle.h:120
Belle2::Particle::m_y
float m_y
position component y
Definition: Particle.h:913
Belle2::Particle::c_Unflavored
@ c_Unflavored
Is its own antiparticle or we don't know whether it is a particle/antiparticle.
Definition: Particle.h:96
Belle2::Particle::getExtraInfo
float getExtraInfo(const std::string &name) const
Return given value if set.
Definition: Particle.cc:1177
Belle2::Particle::getMomentumMagnitude
float getMomentumMagnitude() const
Returns momentum magnitude.
Definition: Particle.h:484
Belle2::Particle::setVertex
void setVertex(const TVector3 &vertex)
Sets position (decay vertex)
Definition: Particle.h:291
Belle2::Particle::m_arrayPointer
TClonesArray * m_arrayPointer
Internal pointer to DataStore array containing the daughters of this particle.
Definition: Particle.h:947
Belle2::Const::neutron
static const ParticleType neutron
neutron particle
Definition: Const.h:549
Belle2::ParticleSubset
Specialised SelectSubset<Particle> that also fixes daughter indices and all ParticleLists.
Definition: ParticleSubset.h:15
Belle2::Particle::m_errMatrix
float m_errMatrix[c_SizeMatrix]
error matrix (1D representation)
Definition: Particle.h:915
Belle2::ECLCluster::EHypothesisBit::c_neutralHadron
@ c_neutralHadron
CR is reconstructed as a neutral hadron (N2)
Belle2::Particle::EParticleSourceObject
EParticleSourceObject
particle source enumerators
Definition: Particle.h:84
Belle2::KLMCluster
KLM cluster data.
Definition: KLMCluster.h:38
Belle2::Particle::getMomentum
TVector3 getMomentum() const
Returns momentum vector.
Definition: Particle.h:475
Belle2::Particle::isCopyOf
bool isCopyOf(const Particle *oParticle, bool doDetailedComparison=false) const
Returns true if this Particle and oParticle are copies of each other.
Definition: Particle.cc:677
Belle2::Particle::getTrack
const Track * getTrack() const
Returns the pointer to the Track object that was used to create this Particle (ParticleType == c_Trac...
Definition: Particle.cc:770
Belle2::Particle::c_IsIgnoreIntermediate
@ c_IsIgnoreIntermediate
Is the particle MC matched with the ignore intermediate resonances flag set?
Definition: Particle.h:121
Belle2::Particle::getX
float getX() const
Returns x component of vertex position.
Definition: Particle.h:538
Belle2::Particle
Class to store reconstructed particles.
Definition: Particle.h:77
Belle2::Particle::getVertexErrorMatrix
TMatrixFSym getVertexErrorMatrix() const
Returns the 3x3 position error sub-matrix.
Definition: Particle.cc:413
Belle2::Particle::m_x
float m_x
position component x
Definition: Particle.h:912
Belle2::Particle::updateMass
void updateMass(const int pdgCode)
Updates particle mass with the mass of the particle corresponding to the given PDG.
Definition: Particle.cc:570
Belle2::Const::ParticleType
The ParticleType class for identifying different particle types.
Definition: Const.h:284
Belle2::Const::proton
static const ChargedStable proton
proton particle
Definition: Const.h:537
Belle2::Particle::m_pz
float m_pz
momentum component z
Definition: Particle.h:911
Belle2::Particle::wasExactFitHypothesisUsed
bool wasExactFitHypothesisUsed() const
Returns true if the type represented by this Particle object was used use as a mass hypothesis during...
Definition: Particle.h:866
Belle2::Particle::PropertyFlags
PropertyFlags
Flags that describe the particle property, which are used in the MC matching.
Definition: Particle.h:117
Belle2::Particle::removeDaughter
void removeDaughter(const Particle *daughter, const bool updateType=true)
Removes index of daughter from daughters index array.
Definition: Particle.cc:645
Belle2::Const::ChargedStable
Provides a type-safe way to pass members of the chargedStableSet set.
Definition: Const.h:465
Belle2::Particle::getCosHelicity
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:425
Belle2::Particle::getFlavorType
EFlavorType getFlavorType() const
Returns flavor type of the decay (for FS particles: flavor type of particle)
Definition: Particle.h:395
Belle2::Particle::c_IsIgnoreBrems
@ c_IsIgnoreBrems
Is the particle MC matched with the ignore added Brems gamma flag set?
Definition: Particle.h:125
Belle2::Particle::getPDGMass
float getPDGMass(void) const
Returns uncertaint on the invariant mass (requiers valid momentum error matrix)
Definition: Particle.cc:577
Belle2::Particle::getDaughterProperties
const std::vector< int > & getDaughterProperties() const
Returns a vector of properties of daughter particles.
Definition: Particle.h:643
Belle2::Particle::m_mdstIndex
unsigned m_mdstIndex
0-based index of MDST store array object
Definition: Particle.h:920
Belle2::Particle::c_IsIgnoreDecayInFlight
@ c_IsIgnoreDecayInFlight
Is the particle MC matched with the ignore DecayInFlight flag set?
Definition: Particle.h:127
Belle2::Particle::setMdstArrayIndex
void setMdstArrayIndex(const int arrayIndex)
set mdst array index
Definition: Particle.cc:326
Belle2::Const::muon
static const ChargedStable muon
muon particle
Definition: Const.h:534
Belle2::Particle::setFlavorType
void setFlavorType()
sets m_flavorType using m_pdgCode
Definition: Particle.cc:1044
Belle2::Track
Class that bundles various TrackFitResults.
Definition: Track.h:35
Belle2::MCParticle
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:43
Belle2::Particle::m_py
float m_py
momentum component y
Definition: Particle.h:910
Belle2::Particle::Particle
Particle()
Default constructor.
Definition: Particle.cc:47
Belle2::Particle::get4Vector
TLorentzVector get4Vector() const
Returns Lorentz vector.
Definition: Particle.h:464
Belle2::Particle::c_IsIgnoreGamma
@ c_IsIgnoreGamma
Is the particle MC matched with the ignore missing gamma flag set?
Definition: Particle.h:124
Belle2::Particle::getPDGCodeUsedForFit
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:856
Belle2::Particle::c_IsIgnoreMassive
@ c_IsIgnoreMassive
Is the particle MC matched with the ignore missing massive particle flag set?
Definition: Particle.h:122
Belle2::Particle::getParticleSource
EParticleSourceObject getParticleSource() const
Returns particle source as defined with enum EParticleSourceObject.
Definition: Particle.h:404
Belle2::Particle::getECLClusterEnergy
double getECLClusterEnergy() const
Returns the energy of the ECLCluster for the particle.
Definition: Particle.cc:844
Belle2::Particle::getAcoplanarity
float getAcoplanarity() const
Returns acoplanarity angle defined as the angle between the decay planes of the grand daughters in th...
Definition: Particle.cc:502
Belle2::Particle::getV0
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:805
Belle2::Particle::setMomentumPositionErrorMatrix
void setMomentumPositionErrorMatrix(const TrackFitResult *trackFit)
Sets the momentum, position and error matrix for this particle (created from charged Track)
Definition: Particle.cc:925
Belle2::Particle::fillFSPDaughters
void fillFSPDaughters(std::vector< const Belle2::Particle * > &fspDaughters) const
Fill final state particle daughters into a vector.
Definition: Particle.cc:1021
Belle2::Particle::getMCParticle
const MCParticle * getMCParticle() const
Returns the pointer to the MCParticle object that was used to create this Particle (ParticleType == c...
Definition: Particle.cc:866
Belle2::Particle::setProperty
void setProperty(const int properties)
sets m_properties
Definition: Particle.h:316
Belle2::RelationsInterface
Defines interface for accessing relations of objects in StoreArray.
Definition: RelationsObject.h:102
Belle2::Particle::getName
virtual std::string getName() const
Return name of this particle.
Definition: Particle.cc:1059
Belle2::Particle::getMomentumErrorMatrix
TMatrixFSym getMomentumErrorMatrix() const
Returns the 4x4 momentum error matrix.
Definition: Particle.cc:401
Belle2::Particle::setPValue
void setPValue(float pValue)
Sets chi^2 probability of fit.
Definition: Particle.h:308
Belle2::Particle::getPValue
float getPValue() const
Returns chi^2 probability of fit if done or -1.
Definition: Particle.h:565
Belle2::Particle::getInfoHTML
virtual std::string getInfoHTML() const
Return a short summary of this object's contents in HTML format.
Definition: Particle.cc:1082
Belle2::Particle::getExtraInfoNames
std::vector< std::string > getExtraInfoNames() const
get a list of the extra info names
Definition: Particle.cc:1069
Belle2::Particle::~Particle
~Particle()
Destructor.
Belle2::Particle::hasExtraInfo
bool hasExtraInfo(const std::string &name) const
Return wether the extra info with the given name is set.
Definition: Particle.cc:1154
Belle2::Particle::forEachDaughter
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:1246