CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DecayChannel Class Reference

#include <DecayChannel.h>

Public Member Functions

void AddDaughter (int pdg)
 
 DecayChannel ()
 
 DecayChannel (const DecayChannel &copy)
 
 DecayChannel (int mother, double branching, int nDaughters, int *daughters)
 
double GetBranching ()
 
int GetDaughterPDG (int i)
 
int * GetDaughters ()
 
int GetMotherPDG ()
 
int GetNDaughters ()
 
void SetBranching (double value)
 
void SetDaughters (int *values, int n)
 
void SetMotherPDG (int value)
 
 ~DecayChannel ()
 

Private Attributes

double fBranchingRatio
 
int fDaughtersPDG [kMaxDaughters]
 
int fMotherPDG
 
int fNDaughters
 

Detailed Description

Definition at line 22 of file DecayChannel.h.

Constructor & Destructor Documentation

◆ DecayChannel() [1/3]

DecayChannel::DecayChannel ( )

Definition at line 20 of file DecayChannel.cc.

20  {
22  fBranchingRatio = 0.0;
23  fNDaughters = 0;
24  for (int i = 0; i < kMaxDaughters; i++)
26 }

References Particle::fNDaughters, mps_fire::i, kMaxDaughters, and kNonsensePDG.

◆ DecayChannel() [2/3]

DecayChannel::DecayChannel ( const DecayChannel copy)

Definition at line 28 of file DecayChannel.cc.

28  {
29  fMotherPDG = copy.fMotherPDG;
30  fBranchingRatio = copy.fBranchingRatio;
31  fNDaughters = copy.fNDaughters;
32  for (int i = 0; i < fNDaughters; i++)
33  fDaughtersPDG[i] = copy.fDaughtersPDG[i];
34 }

References filterCSVwithJSON::copy, Particle::fNDaughters, and mps_fire::i.

◆ DecayChannel() [3/3]

DecayChannel::DecayChannel ( int  mother,
double  branching,
int  nDaughters,
int *  daughters 
)

Definition at line 36 of file DecayChannel.cc.

36  {
37  fMotherPDG = mother;
38  fBranchingRatio = branching;
39  fNDaughters = 0;
40  for (int i = 0; i < nDaughters; i++) {
41  if (i >= kMaxDaughters) {
42  edm::LogError("DecayChannel")
43  << "From explicit constructor: Number of daughters bigger than the maximum allowed one (" << kMaxDaughters
44  << ") !!";
45  }
47  }
48 }

References BPhysicsValidation_cfi::daughters, Particle::fNDaughters, mps_fire::i, and kMaxDaughters.

◆ ~DecayChannel()

DecayChannel::~DecayChannel ( )
inline

Definition at line 33 of file DecayChannel.h.

33 {}; // destructor

Member Function Documentation

◆ AddDaughter()

void DecayChannel::AddDaughter ( int  pdg)

Definition at line 60 of file DecayChannel.cc.

60  {
61  if (fNDaughters >= kMaxDaughters) {
62  edm::LogError("DecayChannel")
63  << "From AddDaughter(): Number of daughters is already >= than the maximum allowed one (" << kMaxDaughters
64  << ") !!";
65  }
67 }

References Particle::fNDaughters, kMaxDaughters, and dileptonTrigSettings_cff::pdg.

◆ GetBranching()

double DecayChannel::GetBranching ( )
inline

Definition at line 40 of file DecayChannel.h.

40 { return fBranchingRatio; }

References fBranchingRatio.

Referenced by ParticlePDG::AddChannel(), and Decay().

◆ GetDaughterPDG()

int DecayChannel::GetDaughterPDG ( int  i)

Definition at line 69 of file DecayChannel.cc.

69  {
70  if ((i >= fNDaughters) || (i < 0)) {
71  edm::LogError("DecayChannel")
72  << "From GetDaughterPDG(): Daughter index required is too big or less than zero!! There are only "
73  << fNDaughters << " secondaries in this channel !!";
74  return kNonsensePDG;
75  }
76  return fDaughtersPDG[i];
77 }

References Particle::fNDaughters, mps_fire::i, and kNonsensePDG.

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

◆ GetDaughters()

int* DecayChannel::GetDaughters ( )
inline

Definition at line 42 of file DecayChannel.h.

42 { return fDaughtersPDG; }

References fDaughtersPDG.

Referenced by ParticlePDG::AddChannel().

◆ GetMotherPDG()

int DecayChannel::GetMotherPDG ( )
inline

Definition at line 39 of file DecayChannel.h.

39 { return fMotherPDG; }

References fMotherPDG.

Referenced by ParticlePDG::AddChannel().

◆ GetNDaughters()

int DecayChannel::GetNDaughters ( )
inline

Definition at line 41 of file DecayChannel.h.

41 { return fNDaughters; }

References fNDaughters.

Referenced by ParticlePDG::AddChannel(), Decay(), and DatabasePDG::IsChannelAllowed().

◆ SetBranching()

void DecayChannel::SetBranching ( double  value)
inline

Definition at line 36 of file DecayChannel.h.

References fBranchingRatio, and relativeConstraints::value.

◆ SetDaughters()

void DecayChannel::SetDaughters ( int *  values,
int  n 
)

Definition at line 50 of file DecayChannel.cc.

50  {
51  for (int i = 0; i < n; i++) {
52  if (i >= kMaxDaughters) {
53  edm::LogError("DecayChannel") << "From SetDaughters(): Number of daughters bigger than the maximum allowed one ("
54  << kMaxDaughters << ") !!";
55  }
57  }
58 }

References BPhysicsValidation_cfi::daughters, Particle::fNDaughters, mps_fire::i, kMaxDaughters, and dqmiodumpmetadata::n.

◆ SetMotherPDG()

void DecayChannel::SetMotherPDG ( int  value)
inline

Definition at line 35 of file DecayChannel.h.

35 { fMotherPDG = value; }

References fMotherPDG, and relativeConstraints::value.

Member Data Documentation

◆ fBranchingRatio

double DecayChannel::fBranchingRatio
private

Definition at line 25 of file DecayChannel.h.

Referenced by GetBranching(), and SetBranching().

◆ fDaughtersPDG

int DecayChannel::fDaughtersPDG[kMaxDaughters]
private

Definition at line 27 of file DecayChannel.h.

Referenced by GetDaughters().

◆ fMotherPDG

int DecayChannel::fMotherPDG
private

Definition at line 24 of file DecayChannel.h.

Referenced by GetMotherPDG(), and SetMotherPDG().

◆ fNDaughters

int DecayChannel::fNDaughters
private

Definition at line 26 of file DecayChannel.h.

Referenced by GetNDaughters().

mps_fire.i
i
Definition: mps_fire.py:428
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
dileptonTrigSettings_cff.pdg
pdg
Definition: dileptonTrigSettings_cff.py:6
DecayChannel::fNDaughters
int fNDaughters
Definition: DecayChannel.h:26
kMaxDaughters
const int kMaxDaughters
Definition: DecayChannel.h:19
BPhysicsValidation_cfi.daughters
daughters
Definition: BPhysicsValidation_cfi.py:11
DecayChannel::fMotherPDG
int fMotherPDG
Definition: DecayChannel.h:24
DecayChannel::fBranchingRatio
double fBranchingRatio
Definition: DecayChannel.h:25
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DecayChannel::fDaughtersPDG
int fDaughtersPDG[kMaxDaughters]
Definition: DecayChannel.h:27
kNonsensePDG
const int kNonsensePDG
Definition: DecayChannel.h:20
relativeConstraints.value
value
Definition: relativeConstraints.py:53