CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
ParticlePDG Class Reference

#include <ParticlePDG.h>

Public Member Functions

void AddChannel (DecayChannel &channel)
 
double GetBaryonNumber ()
 
double GetCharmAQNumber ()
 
double GetCharmness ()
 
double GetCharmQNumber ()
 
DecayChannelGetDecayChannel (int i)
 
double GetElectricCharge ()
 
double GetFullBranching ()
 
double GetIsospin ()
 
double GetIsospinZ ()
 
double GetLightAQNumber ()
 
double GetLightQNumber ()
 
double GetMass ()
 
char * GetName ()
 
int GetNDecayChannels ()
 
int GetPDG ()
 
double GetSpin ()
 
double GetStrangeAQNumber ()
 
double GetStrangeness ()
 
double GetStrangeQNumber ()
 
double GetWidth ()
 
 ParticlePDG ()
 
 ParticlePDG (char *name, int pdg, double mass, double width)
 
void SetCharmAQNumber (double value)
 
void SetCharmQNumber (double value)
 
void SetIsospin (double value)
 
void SetIsospinZ (double value)
 
void SetLightAQNumber (double value)
 
void SetLightQNumber (double value)
 
void SetMass (double value)
 
void SetName (char *name)
 
void SetPDG (int value)
 
void SetSpin (double value)
 
void SetStrangeAQNumber (double value)
 
void SetStrangeQNumber (double value)
 
void SetWidth (double value)
 
 ~ParticlePDG ()
 

Private Attributes

double fAntiCharmQuarkNumber
 
double fAntiLightQuarkNumber
 
double fAntiStrangeQuarkNumber
 
double fCharmQuarkNumber
 
DecayChannelfDecayChannels [kMaxDecayChannels]
 
double fIsospin
 
double fIsospinZ
 
double fLightQuarkNumber
 
double fMass
 
char fName [9]
 
int fNDecayChannels
 
int fPDG
 
double fSpin
 
double fStrangeQuarkNumber
 
double fWidth
 

Detailed Description

Definition at line 24 of file ParticlePDG.h.

Constructor & Destructor Documentation

ParticlePDG::ParticlePDG ( )

Definition at line 21 of file ParticlePDG.cc.

References mps_fire::i, kMaxDecayChannels, and kNonsensePDG.

21  {
23  fMass = -1.0;
24  fWidth = 0.0;
25  fNDecayChannels = 0;
26  for (int i = 0; i < kMaxDecayChannels; i++)
27  fDecayChannels[i] = new DecayChannel();
28 }
int fNDecayChannels
Definition: ParticlePDG.h:39
DecayChannel * fDecayChannels[kMaxDecayChannels]
Definition: ParticlePDG.h:40
double fWidth
Definition: ParticlePDG.h:29
const int kMaxDecayChannels
Definition: ParticlePDG.h:22
double fMass
Definition: ParticlePDG.h:28
const int kNonsensePDG
Definition: DecayChannel.h:20
ParticlePDG::ParticlePDG ( char *  name,
int  pdg,
double  mass,
double  width 
)

Definition at line 30 of file ParticlePDG.cc.

References isotrackTrainRegressor::fName, mps_fire::i, kMaxDecayChannels, and ResonanceBuilder::mass.

30  {
31  for (int i = 0; i < 9; i++)
32  if (*(name + i) != '\0')
33  fName[i] = *(name + i);
34  else
35  break;
36  fPDG = pdg;
37  fMass = mass;
38  fWidth = width;
39  fNDecayChannels = 0;
40  for (int i = 0; i < kMaxDecayChannels; i++)
41  fDecayChannels[i] = new DecayChannel();
42 }
int fNDecayChannels
Definition: ParticlePDG.h:39
char fName[9]
Definition: ParticlePDG.h:26
DecayChannel * fDecayChannels[kMaxDecayChannels]
Definition: ParticlePDG.h:40
double fWidth
Definition: ParticlePDG.h:29
const int kMaxDecayChannels
Definition: ParticlePDG.h:22
double fMass
Definition: ParticlePDG.h:28
ParticlePDG::~ParticlePDG ( )

Definition at line 44 of file ParticlePDG.cc.

References mps_fire::i, and kMaxDecayChannels.

44  {
45  for (int i = 0; i < kMaxDecayChannels; i++)
46  delete fDecayChannels[i];
47 }
DecayChannel * fDecayChannels[kMaxDecayChannels]
Definition: ParticlePDG.h:40
const int kMaxDecayChannels
Definition: ParticlePDG.h:22

Member Function Documentation

void ParticlePDG::AddChannel ( DecayChannel channel)

Definition at line 56 of file ParticlePDG.cc.

References DecayChannel::GetBranching(), DecayChannel::GetDaughters(), DecayChannel::GetMotherPDG(), and DecayChannel::GetNDaughters().

Referenced by DatabasePDG::LoadDecays().

56  {
57  if (channel.GetMotherPDG() != fPDG) {
58  edm::LogError("ParticlePDG") << " AddChannel() : You try to add a channel which has a different mother PDG";
59  return;
60  }
65 }
int fNDecayChannels
Definition: ParticlePDG.h:39
int GetNDaughters()
Definition: DecayChannel.h:41
void SetMotherPDG(int value)
Definition: DecayChannel.h:35
double GetBranching()
Definition: DecayChannel.h:40
DecayChannel * fDecayChannels[kMaxDecayChannels]
Definition: ParticlePDG.h:40
void SetBranching(double value)
Definition: DecayChannel.h:36
Log< level::Error, false > LogError
int * GetDaughters()
Definition: DecayChannel.h:42
void SetDaughters(int *values, int n)
Definition: DecayChannel.cc:50
int GetMotherPDG()
Definition: DecayChannel.h:39
double ParticlePDG::GetBaryonNumber ( )
inline
double ParticlePDG::GetCharmAQNumber ( )
inline
double ParticlePDG::GetCharmness ( )
inline
double ParticlePDG::GetCharmQNumber ( )
inline
DecayChannel* ParticlePDG::GetDecayChannel ( int  i)
inline

Definition at line 92 of file ParticlePDG.h.

References fDecayChannels, fNDecayChannels, and mps_fire::i.

Referenced by Decay(), and DatabasePDG::GetNAllowedChannels().

92  {
93  if (0 <= i && i < fNDecayChannels)
94  return fDecayChannels[i];
95  else
96  return nullptr;
97  }
int fNDecayChannels
Definition: ParticlePDG.h:39
DecayChannel * fDecayChannels[kMaxDecayChannels]
Definition: ParticlePDG.h:40
double ParticlePDG::GetElectricCharge ( )
inline
double ParticlePDG::GetFullBranching ( )

Definition at line 49 of file ParticlePDG.cc.

References mps_fire::i.

Referenced by Decay(), and GetDecayTime().

49  {
50  double fullBranching = 0.0;
51  for (int i = 0; i < fNDecayChannels; i++)
52  fullBranching += fDecayChannels[i]->GetBranching();
53  return fullBranching;
54 }
int fNDecayChannels
Definition: ParticlePDG.h:39
DecayChannel * fDecayChannels[kMaxDecayChannels]
Definition: ParticlePDG.h:40
double ParticlePDG::GetIsospin ( )
inline

Definition at line 74 of file ParticlePDG.h.

References fIsospin.

74 { return fIsospin; }
double fIsospin
Definition: ParticlePDG.h:31
double ParticlePDG::GetIsospinZ ( )
inline

Definition at line 75 of file ParticlePDG.h.

References fIsospinZ.

75 { return fIsospinZ; }
double fIsospinZ
Definition: ParticlePDG.h:32
double ParticlePDG::GetLightAQNumber ( )
inline

Definition at line 77 of file ParticlePDG.h.

References fAntiLightQuarkNumber.

77 { return fAntiLightQuarkNumber; }
double fAntiLightQuarkNumber
Definition: ParticlePDG.h:34
double ParticlePDG::GetLightQNumber ( )
inline

Definition at line 76 of file ParticlePDG.h.

References fLightQuarkNumber.

76 { return fLightQuarkNumber; }
double fLightQuarkNumber
Definition: ParticlePDG.h:33
double ParticlePDG::GetMass ( )
inline
char* ParticlePDG::GetName ( )
inline

Definition at line 68 of file ParticlePDG.h.

References fName.

68 { return fName; }
char fName[9]
Definition: ParticlePDG.h:26
int ParticlePDG::GetNDecayChannels ( )
inline

Definition at line 72 of file ParticlePDG.h.

References fNDecayChannels.

Referenced by Decay(), GetDecayTime(), and DatabasePDG::GetNAllowedChannels().

72 { return fNDecayChannels; }
int fNDecayChannels
Definition: ParticlePDG.h:39
int ParticlePDG::GetPDG ( )
inline
double ParticlePDG::GetSpin ( )
inline
double ParticlePDG::GetStrangeAQNumber ( )
inline

Definition at line 79 of file ParticlePDG.h.

References fAntiStrangeQuarkNumber.

79 { return fAntiStrangeQuarkNumber; }
double fAntiStrangeQuarkNumber
Definition: ParticlePDG.h:36
double ParticlePDG::GetStrangeness ( )
inline
double ParticlePDG::GetStrangeQNumber ( )
inline

Definition at line 78 of file ParticlePDG.h.

References fStrangeQuarkNumber.

78 { return fStrangeQuarkNumber; }
double fStrangeQuarkNumber
Definition: ParticlePDG.h:35
double ParticlePDG::GetWidth ( )
inline

Definition at line 71 of file ParticlePDG.h.

References fWidth.

Referenced by Decay(), and GetDecayTime().

71 { return fWidth; }
double fWidth
Definition: ParticlePDG.h:29
void ParticlePDG::SetCharmAQNumber ( double  value)
inline

Definition at line 66 of file ParticlePDG.h.

References fAntiCharmQuarkNumber, and relativeConstraints::value.

void ParticlePDG::SetCharmQNumber ( double  value)
inline

Definition at line 65 of file ParticlePDG.h.

References fCharmQuarkNumber, and relativeConstraints::value.

void ParticlePDG::SetIsospin ( double  value)
inline

Definition at line 59 of file ParticlePDG.h.

References fIsospin, and relativeConstraints::value.

void ParticlePDG::SetIsospinZ ( double  value)
inline

Definition at line 60 of file ParticlePDG.h.

References fIsospinZ, and relativeConstraints::value.

void ParticlePDG::SetLightAQNumber ( double  value)
inline

Definition at line 62 of file ParticlePDG.h.

References fAntiLightQuarkNumber, and relativeConstraints::value.

void ParticlePDG::SetLightQNumber ( double  value)
inline

Definition at line 61 of file ParticlePDG.h.

References fLightQuarkNumber, and relativeConstraints::value.

void ParticlePDG::SetMass ( double  value)
inline

Definition at line 56 of file ParticlePDG.h.

References fMass, and relativeConstraints::value.

56 { fMass = value; }
double fMass
Definition: ParticlePDG.h:28
void ParticlePDG::SetName ( char *  name)
inline

Definition at line 48 of file ParticlePDG.h.

References fName, and mps_fire::i.

48  {
49  for (int i = 0; i < 9; i++)
50  if (*(name + i) != '\0')
51  fName[i] = *(name + i);
52  else
53  break;
54  }
char fName[9]
Definition: ParticlePDG.h:26
void ParticlePDG::SetPDG ( int  value)
inline

Definition at line 55 of file ParticlePDG.h.

References fPDG, and relativeConstraints::value.

void ParticlePDG::SetSpin ( double  value)
inline

Definition at line 58 of file ParticlePDG.h.

References fSpin, and relativeConstraints::value.

58 { fSpin = value; }
double fSpin
Definition: ParticlePDG.h:30
void ParticlePDG::SetStrangeAQNumber ( double  value)
inline

Definition at line 64 of file ParticlePDG.h.

References fAntiStrangeQuarkNumber, and relativeConstraints::value.

void ParticlePDG::SetStrangeQNumber ( double  value)
inline

Definition at line 63 of file ParticlePDG.h.

References fStrangeQuarkNumber, and relativeConstraints::value.

void ParticlePDG::SetWidth ( double  value)
inline

Definition at line 57 of file ParticlePDG.h.

References fWidth, and relativeConstraints::value.

57 { fWidth = value; }
double fWidth
Definition: ParticlePDG.h:29

Member Data Documentation

double ParticlePDG::fAntiCharmQuarkNumber
private

Definition at line 38 of file ParticlePDG.h.

Referenced by GetBaryonNumber(), GetCharmAQNumber(), GetCharmness(), and SetCharmAQNumber().

double ParticlePDG::fAntiLightQuarkNumber
private

Definition at line 34 of file ParticlePDG.h.

Referenced by GetBaryonNumber(), GetLightAQNumber(), and SetLightAQNumber().

double ParticlePDG::fAntiStrangeQuarkNumber
private
double ParticlePDG::fCharmQuarkNumber
private

Definition at line 37 of file ParticlePDG.h.

Referenced by GetBaryonNumber(), GetCharmness(), GetCharmQNumber(), and SetCharmQNumber().

DecayChannel* ParticlePDG::fDecayChannels[kMaxDecayChannels]
private

Definition at line 40 of file ParticlePDG.h.

Referenced by GetDecayChannel().

double ParticlePDG::fIsospin
private

Definition at line 31 of file ParticlePDG.h.

Referenced by GetIsospin(), and SetIsospin().

double ParticlePDG::fIsospinZ
private

Definition at line 32 of file ParticlePDG.h.

Referenced by GetElectricCharge(), GetIsospinZ(), and SetIsospinZ().

double ParticlePDG::fLightQuarkNumber
private

Definition at line 33 of file ParticlePDG.h.

Referenced by GetBaryonNumber(), GetLightQNumber(), and SetLightQNumber().

double ParticlePDG::fMass
private

Definition at line 28 of file ParticlePDG.h.

Referenced by GetMass(), and SetMass().

char ParticlePDG::fName[9]
private

Definition at line 26 of file ParticlePDG.h.

Referenced by GetName(), and SetName().

int ParticlePDG::fNDecayChannels
private

Definition at line 39 of file ParticlePDG.h.

Referenced by GetDecayChannel(), and GetNDecayChannels().

int ParticlePDG::fPDG
private

Definition at line 27 of file ParticlePDG.h.

Referenced by GetPDG(), and SetPDG().

double ParticlePDG::fSpin
private

Definition at line 30 of file ParticlePDG.h.

Referenced by GetSpin(), and SetSpin().

double ParticlePDG::fStrangeQuarkNumber
private
double ParticlePDG::fWidth
private

Definition at line 29 of file ParticlePDG.h.

Referenced by GetWidth(), and SetWidth().