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::DecayChannel ( )

Definition at line 20 of file DecayChannel.cc.

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

20  {
22  fBranchingRatio = 0.0;
23  fNDaughters = 0;
24  for (int i = 0; i < kMaxDaughters; i++)
26 }
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 mps_fire::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 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, mps_fire::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")
43  << "From explicit constructor: Number of daughters bigger than the maximum allowed one (" << kMaxDaughters
44  << ") !!";
45  }
47  }
48 }
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 60 of file DecayChannel.cc.

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

Referenced by SetBranching().

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 }
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 69 of file DecayChannel.cc.

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

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

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 }
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, GetDaughterPDG(), and mps_fire::i.

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
void DecayChannel::SetDaughters ( int *  values,
int  n 
)

Definition at line 50 of file DecayChannel.cc.

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

Referenced by SetBranching().

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 }
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 relativeConstraints::value.

Member Data Documentation

double DecayChannel::fBranchingRatio
private

Definition at line 25 of file DecayChannel.h.

Referenced by DecayChannel(), and GetBranching().

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(), and GetMotherPDG().

int DecayChannel::fNDaughters
private

Definition at line 26 of file DecayChannel.h.

Referenced by DecayChannel(), and GetNDaughters().