CMS 3D CMS Logo

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() [1/2]

ParticlePDG::ParticlePDG ( )

Definition at line 21 of file ParticlePDG.cc.

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 }

References mps_fire::i, kMaxDecayChannels, and kNonsensePDG.

◆ ParticlePDG() [2/2]

ParticlePDG::ParticlePDG ( char *  name,
int  pdg,
double  mass,
double  width 
)

Definition at line 30 of file ParticlePDG.cc.

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 }

References MainPageGenerator::fName, mps_fire::i, kMaxDecayChannels, EgHLTOffHistBins_cfi::mass, Skims_PA_cff::name, dileptonTrigSettings_cff::pdg, and ApeEstimator_cff::width.

◆ ~ParticlePDG()

ParticlePDG::~ParticlePDG ( )

Definition at line 44 of file ParticlePDG.cc.

44  {
45  for (int i = 0; i < kMaxDecayChannels; i++)
46  delete fDecayChannels[i];
47 }

References mps_fire::i, and kMaxDecayChannels.

Member Function Documentation

◆ AddChannel()

void ParticlePDG::AddChannel ( DecayChannel channel)

Definition at line 56 of file ParticlePDG.cc.

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 }

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

Referenced by DatabasePDG::LoadDecays().

◆ GetBaryonNumber()

double ParticlePDG::GetBaryonNumber ( )
inline

◆ GetCharmAQNumber()

double ParticlePDG::GetCharmAQNumber ( )
inline

◆ GetCharmness()

double ParticlePDG::GetCharmness ( )
inline

◆ GetCharmQNumber()

double ParticlePDG::GetCharmQNumber ( )
inline

◆ GetDecayChannel()

DecayChannel* ParticlePDG::GetDecayChannel ( int  i)
inline

Definition at line 92 of file ParticlePDG.h.

92  {
93  if (0 <= i && i < fNDecayChannels)
94  return fDecayChannels[i];
95  else
96  return nullptr;
97  }

References fDecayChannels, fNDecayChannels, and mps_fire::i.

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

◆ GetElectricCharge()

double ParticlePDG::GetElectricCharge ( )
inline

◆ GetFullBranching()

double ParticlePDG::GetFullBranching ( )

Definition at line 49 of file ParticlePDG.cc.

49  {
50  double fullBranching = 0.0;
51  for (int i = 0; i < fNDecayChannels; i++)
52  fullBranching += fDecayChannels[i]->GetBranching();
53  return fullBranching;
54 }

References mps_fire::i.

Referenced by Decay(), and GetDecayTime().

◆ GetIsospin()

double ParticlePDG::GetIsospin ( )
inline

Definition at line 74 of file ParticlePDG.h.

74 { return fIsospin; }

References fIsospin.

◆ GetIsospinZ()

double ParticlePDG::GetIsospinZ ( )
inline

Definition at line 75 of file ParticlePDG.h.

75 { return fIsospinZ; }

References fIsospinZ.

◆ GetLightAQNumber()

double ParticlePDG::GetLightAQNumber ( )
inline

Definition at line 77 of file ParticlePDG.h.

77 { return fAntiLightQuarkNumber; }

References fAntiLightQuarkNumber.

◆ GetLightQNumber()

double ParticlePDG::GetLightQNumber ( )
inline

Definition at line 76 of file ParticlePDG.h.

76 { return fLightQuarkNumber; }

References fLightQuarkNumber.

◆ GetMass()

double ParticlePDG::GetMass ( )
inline

◆ GetName()

char* ParticlePDG::GetName ( )
inline

Definition at line 68 of file ParticlePDG.h.

68 { return fName; }

References fName.

◆ GetNDecayChannels()

int ParticlePDG::GetNDecayChannels ( )
inline

Definition at line 72 of file ParticlePDG.h.

72 { return fNDecayChannels; }

References fNDecayChannels.

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

◆ GetPDG()

int ParticlePDG::GetPDG ( )
inline

◆ GetSpin()

double ParticlePDG::GetSpin ( )
inline

◆ GetStrangeAQNumber()

double ParticlePDG::GetStrangeAQNumber ( )
inline

Definition at line 79 of file ParticlePDG.h.

79 { return fAntiStrangeQuarkNumber; }

References fAntiStrangeQuarkNumber.

◆ GetStrangeness()

double ParticlePDG::GetStrangeness ( )
inline

◆ GetStrangeQNumber()

double ParticlePDG::GetStrangeQNumber ( )
inline

Definition at line 78 of file ParticlePDG.h.

78 { return fStrangeQuarkNumber; }

References fStrangeQuarkNumber.

◆ GetWidth()

double ParticlePDG::GetWidth ( )
inline

Definition at line 71 of file ParticlePDG.h.

71 { return fWidth; }

References fWidth.

Referenced by Decay(), and GetDecayTime().

◆ SetCharmAQNumber()

void ParticlePDG::SetCharmAQNumber ( double  value)
inline

Definition at line 66 of file ParticlePDG.h.

References fAntiCharmQuarkNumber, and relativeConstraints::value.

◆ SetCharmQNumber()

void ParticlePDG::SetCharmQNumber ( double  value)
inline

Definition at line 65 of file ParticlePDG.h.

References fCharmQuarkNumber, and relativeConstraints::value.

◆ SetIsospin()

void ParticlePDG::SetIsospin ( double  value)
inline

Definition at line 59 of file ParticlePDG.h.

59 { fIsospin = value; }

References fIsospin, and relativeConstraints::value.

◆ SetIsospinZ()

void ParticlePDG::SetIsospinZ ( double  value)
inline

Definition at line 60 of file ParticlePDG.h.

60 { fIsospinZ = value; }

References fIsospinZ, and relativeConstraints::value.

◆ SetLightAQNumber()

void ParticlePDG::SetLightAQNumber ( double  value)
inline

Definition at line 62 of file ParticlePDG.h.

References fAntiLightQuarkNumber, and relativeConstraints::value.

◆ SetLightQNumber()

void ParticlePDG::SetLightQNumber ( double  value)
inline

Definition at line 61 of file ParticlePDG.h.

References fLightQuarkNumber, and relativeConstraints::value.

◆ SetMass()

void ParticlePDG::SetMass ( double  value)
inline

Definition at line 56 of file ParticlePDG.h.

56 { fMass = value; }

References fMass, and relativeConstraints::value.

◆ SetName()

void ParticlePDG::SetName ( char *  name)
inline

Definition at line 48 of file ParticlePDG.h.

48  {
49  for (int i = 0; i < 9; i++)
50  if (*(name + i) != '\0')
51  fName[i] = *(name + i);
52  else
53  break;
54  }

References fName, mps_fire::i, and Skims_PA_cff::name.

◆ SetPDG()

void ParticlePDG::SetPDG ( int  value)
inline

Definition at line 55 of file ParticlePDG.h.

55 { fPDG = value; }

References fPDG, and relativeConstraints::value.

◆ SetSpin()

void ParticlePDG::SetSpin ( double  value)
inline

Definition at line 58 of file ParticlePDG.h.

58 { fSpin = value; }

References fSpin, and relativeConstraints::value.

◆ SetStrangeAQNumber()

void ParticlePDG::SetStrangeAQNumber ( double  value)
inline

Definition at line 64 of file ParticlePDG.h.

References fAntiStrangeQuarkNumber, and relativeConstraints::value.

◆ SetStrangeQNumber()

void ParticlePDG::SetStrangeQNumber ( double  value)
inline

Definition at line 63 of file ParticlePDG.h.

References fStrangeQuarkNumber, and relativeConstraints::value.

◆ SetWidth()

void ParticlePDG::SetWidth ( double  value)
inline

Definition at line 57 of file ParticlePDG.h.

57 { fWidth = value; }

References fWidth, and relativeConstraints::value.

Member Data Documentation

◆ fAntiCharmQuarkNumber

double ParticlePDG::fAntiCharmQuarkNumber
private

Definition at line 38 of file ParticlePDG.h.

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

◆ fAntiLightQuarkNumber

double ParticlePDG::fAntiLightQuarkNumber
private

Definition at line 34 of file ParticlePDG.h.

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

◆ fAntiStrangeQuarkNumber

double ParticlePDG::fAntiStrangeQuarkNumber
private

◆ fCharmQuarkNumber

double ParticlePDG::fCharmQuarkNumber
private

Definition at line 37 of file ParticlePDG.h.

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

◆ fDecayChannels

DecayChannel* ParticlePDG::fDecayChannels[kMaxDecayChannels]
private

Definition at line 40 of file ParticlePDG.h.

Referenced by GetDecayChannel().

◆ fIsospin

double ParticlePDG::fIsospin
private

Definition at line 31 of file ParticlePDG.h.

Referenced by GetIsospin(), and SetIsospin().

◆ fIsospinZ

double ParticlePDG::fIsospinZ
private

Definition at line 32 of file ParticlePDG.h.

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

◆ fLightQuarkNumber

double ParticlePDG::fLightQuarkNumber
private

Definition at line 33 of file ParticlePDG.h.

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

◆ fMass

double ParticlePDG::fMass
private

Definition at line 28 of file ParticlePDG.h.

Referenced by GetMass(), and SetMass().

◆ fName

char ParticlePDG::fName[9]
private

Definition at line 26 of file ParticlePDG.h.

Referenced by GetName(), and SetName().

◆ fNDecayChannels

int ParticlePDG::fNDecayChannels
private

Definition at line 39 of file ParticlePDG.h.

Referenced by GetDecayChannel(), and GetNDecayChannels().

◆ fPDG

int ParticlePDG::fPDG
private

Definition at line 27 of file ParticlePDG.h.

Referenced by GetPDG(), and SetPDG().

◆ fSpin

double ParticlePDG::fSpin
private

Definition at line 30 of file ParticlePDG.h.

Referenced by GetSpin(), and SetSpin().

◆ fStrangeQuarkNumber

double ParticlePDG::fStrangeQuarkNumber
private

◆ fWidth

double ParticlePDG::fWidth
private

Definition at line 29 of file ParticlePDG.h.

Referenced by GetWidth(), and SetWidth().

ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
mps_fire.i
i
Definition: mps_fire.py:355
ParticlePDG::fMass
double fMass
Definition: ParticlePDG.h:28
ParticlePDG::fAntiStrangeQuarkNumber
double fAntiStrangeQuarkNumber
Definition: ParticlePDG.h:36
dileptonTrigSettings_cff.pdg
pdg
Definition: dileptonTrigSettings_cff.py:6
ParticlePDG::fNDecayChannels
int fNDecayChannels
Definition: ParticlePDG.h:39
ParticlePDG::fAntiCharmQuarkNumber
double fAntiCharmQuarkNumber
Definition: ParticlePDG.h:38
DecayChannel::GetDaughters
int * GetDaughters()
Definition: DecayChannel.h:42
ParticlePDG::fName
char fName[9]
Definition: ParticlePDG.h:26
DecayChannel::SetDaughters
void SetDaughters(int *values, int n)
Definition: DecayChannel.cc:50
ParticlePDG::fPDG
int fPDG
Definition: ParticlePDG.h:27
DecayChannel
Definition: DecayChannel.h:22
ParticlePDG::GetStrangeness
double GetStrangeness()
Definition: ParticlePDG.h:87
DecayChannel::SetMotherPDG
void SetMotherPDG(int value)
Definition: DecayChannel.h:35
ParticlePDG::fDecayChannels
DecayChannel * fDecayChannels[kMaxDecayChannels]
Definition: ParticlePDG.h:40
ParticlePDG::fCharmQuarkNumber
double fCharmQuarkNumber
Definition: ParticlePDG.h:37
ParticlePDG::fLightQuarkNumber
double fLightQuarkNumber
Definition: ParticlePDG.h:33
edm::LogError
Definition: MessageLogger.h:183
ParticlePDG::GetCharmness
double GetCharmness()
Definition: ParticlePDG.h:88
ParticlePDG::fIsospinZ
double fIsospinZ
Definition: ParticlePDG.h:32
kMaxDecayChannels
const int kMaxDecayChannels
Definition: ParticlePDG.h:22
ParticlePDG::fWidth
double fWidth
Definition: ParticlePDG.h:29
DecayChannel::GetMotherPDG
int GetMotherPDG()
Definition: DecayChannel.h:39
ParticlePDG::fSpin
double fSpin
Definition: ParticlePDG.h:30
kNonsensePDG
const int kNonsensePDG
Definition: DecayChannel.h:20
ParticlePDG::fStrangeQuarkNumber
double fStrangeQuarkNumber
Definition: ParticlePDG.h:35
relativeConstraints.value
value
Definition: relativeConstraints.py:53
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
DecayChannel::GetBranching
double GetBranching()
Definition: DecayChannel.h:40
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
ParticlePDG::GetBaryonNumber
double GetBaryonNumber()
Definition: ParticlePDG.h:82
DecayChannel::SetBranching
void SetBranching(double value)
Definition: DecayChannel.h:36
ParticlePDG::fAntiLightQuarkNumber
double fAntiLightQuarkNumber
Definition: ParticlePDG.h:34
DecayChannel::GetNDaughters
int GetNDaughters()
Definition: DecayChannel.h:41
ParticlePDG::fIsospin
double fIsospin
Definition: ParticlePDG.h:31