CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::DecayChannel ( )

Definition at line 20 of file DecayChannel.cc.

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

20  {
22  fBranchingRatio = 0.0;
23  fNDaughters = 0;
24  for(int i=0; i<kMaxDaughters; i++)
26 }
int i
Definition: DBlmapReader.cc:9
int fDaughtersPDG[kMaxDaughters]
Definition: DecayChannel.h:27
const int kMaxDaughters
Definition: DecayChannel.h:19
double fBranchingRatio
Definition: DecayChannel.h:25
const int kNonsensePDG
Definition: DecayChannel.h:20
DecayChannel::DecayChannel ( const DecayChannel copy)

Definition at line 28 of file DecayChannel.cc.

References fBranchingRatio, fDaughtersPDG, fMotherPDG, fNDaughters, Particle::fNDaughters, and i.

28  {
29  fMotherPDG = copy.fMotherPDG;
31  fNDaughters = copy.fNDaughters;
32  for(int i=0; i<fNDaughters; i++)
33  fDaughtersPDG[i] = copy.fDaughtersPDG[i];
34 }
int i
Definition: DBlmapReader.cc:9
int fDaughtersPDG[kMaxDaughters]
Definition: DecayChannel.h:27
double fBranchingRatio
Definition: DecayChannel.h:25
DecayChannel::DecayChannel ( int  mother,
double  branching,
int  nDaughters,
int *  daughters 
)

Definition at line 36 of file DecayChannel.cc.

References Particle::fNDaughters, i, and kMaxDaughters.

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")<<"From explicit constructor: Number of daughters bigger than the maximum allowed one (" << kMaxDaughters << ") !!";
43  }
44  fDaughtersPDG[fNDaughters++] = *(daughters+i);
45  }
46 }
int i
Definition: DBlmapReader.cc:9
int fDaughtersPDG[kMaxDaughters]
Definition: DecayChannel.h:27
const int kMaxDaughters
Definition: DecayChannel.h:19
double fBranchingRatio
Definition: DecayChannel.h:25
DecayChannel::~DecayChannel ( )
inline

Definition at line 33 of file DecayChannel.h.

33 {}; // destructor

Member Function Documentation

void DecayChannel::AddDaughter ( int  pdg)

Definition at line 57 of file DecayChannel.cc.

References Particle::fNDaughters, and kMaxDaughters.

57  {
58  if(fNDaughters >= kMaxDaughters) {
59  edm::LogError("DecayChannel")<<"From AddDaughter(): Number of daughters is already >= than the maximum allowed one (" << kMaxDaughters << ") !!";
60  }
61  fDaughtersPDG[fNDaughters++] = pdg;
62 }
int fDaughtersPDG[kMaxDaughters]
Definition: DecayChannel.h:27
const int kMaxDaughters
Definition: DecayChannel.h:19
double DecayChannel::GetBranching ( )
inline

Definition at line 40 of file DecayChannel.h.

References fBranchingRatio.

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

40 {return fBranchingRatio;}
double fBranchingRatio
Definition: DecayChannel.h:25
int DecayChannel::GetDaughterPDG ( int  i)

Definition at line 64 of file DecayChannel.cc.

References Particle::fNDaughters, i, and kNonsensePDG.

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

64  {
65  if((i >= fNDaughters) || (i<0)) {
66  edm::LogError("DecayChannel")<<"From GetDaughterPDG(): Daughter index required is too big or less than zero!! There are only " << fNDaughters << " secondaries in this channel !!";
67  return kNonsensePDG;
68  }
69  return fDaughtersPDG[i];
70 }
int i
Definition: DBlmapReader.cc:9
int fDaughtersPDG[kMaxDaughters]
Definition: DecayChannel.h:27
const int kNonsensePDG
Definition: DecayChannel.h:20
int* DecayChannel::GetDaughters ( )
inline

Definition at line 42 of file DecayChannel.h.

References fDaughtersPDG.

Referenced by ParticlePDG::AddChannel().

42 {return fDaughtersPDG;}
int fDaughtersPDG[kMaxDaughters]
Definition: DecayChannel.h:27
int DecayChannel::GetMotherPDG ( )
inline

Definition at line 39 of file DecayChannel.h.

References fMotherPDG.

Referenced by ParticlePDG::AddChannel().

39 {return fMotherPDG;}
int DecayChannel::GetNDaughters ( )
inline

Definition at line 41 of file DecayChannel.h.

References fNDaughters.

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

41 {return fNDaughters;}
void DecayChannel::SetBranching ( double  value)
inline

Definition at line 36 of file DecayChannel.h.

References fBranchingRatio, and relativeConstraints::value.

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

Definition at line 48 of file DecayChannel.cc.

References Particle::fNDaughters, i, kMaxDaughters, and n.

48  {
49  for(int i=0; i<n; i++) {
50  if(i >= kMaxDaughters) {
51  edm::LogError("DecayChannel")<<"From SetDaughters(): Number of daughters bigger than the maximum allowed one (" << kMaxDaughters << ") !!";
52  }
53  fDaughtersPDG[fNDaughters++] = *(daughters+i);
54  }
55 }
int i
Definition: DBlmapReader.cc:9
int fDaughtersPDG[kMaxDaughters]
Definition: DecayChannel.h:27
const int kMaxDaughters
Definition: DecayChannel.h:19
void DecayChannel::SetMotherPDG ( int  value)
inline

Definition at line 35 of file DecayChannel.h.

References fMotherPDG, and relativeConstraints::value.

Member Data Documentation

double DecayChannel::fBranchingRatio
private

Definition at line 25 of file DecayChannel.h.

Referenced by DecayChannel(), GetBranching(), and SetBranching().

int DecayChannel::fDaughtersPDG[kMaxDaughters]
private

Definition at line 27 of file DecayChannel.h.

Referenced by DecayChannel(), and GetDaughters().

int DecayChannel::fMotherPDG
private

Definition at line 24 of file DecayChannel.h.

Referenced by DecayChannel(), GetMotherPDG(), and SetMotherPDG().

int DecayChannel::fNDaughters
private

Definition at line 26 of file DecayChannel.h.

Referenced by DecayChannel(), and GetNDaughters().