Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4QDecayChan Class Reference

#include <G4QDecayChan.hh>

Public Member Functions

 G4QDecayChan ()
 
 G4QDecayChan (G4double pLev, G4int PDG1, G4int PDG2, G4int PDG3=0)
 
 G4QDecayChan (const G4QDecayChan &right)
 
 G4QDecayChan (G4QDecayChan *right)
 
 ~G4QDecayChan ()
 
const G4QDecayChanoperator= (const G4QDecayChan &right)
 
G4bool operator== (const G4QDecayChan &rhs) const
 
G4bool operator!= (const G4QDecayChan &rhs) const
 
G4double GetDecayChanLimit () const
 
G4double GetMinMass () const
 
G4QPDGCodeVector GetVecOfSecHadrons ()
 
void SetDecayChanLimit (G4double newDecChanLim)
 
void SetMinMass (G4double newMinMass)
 
void SetVecOfSecHadrons (G4QPDGCodeVector hadV)
 

Detailed Description

Definition at line 48 of file G4QDecayChan.hh.

Constructor & Destructor Documentation

◆ G4QDecayChan() [1/4]

G4QDecayChan::G4QDecayChan ( )

Definition at line 47 of file G4QDecayChan.cc.

47 :aDecayChanLimit(0.),theMinMass(0.)
48{}

◆ G4QDecayChan() [2/4]

G4QDecayChan::G4QDecayChan ( G4double  pLev,
G4int  PDG1,
G4int  PDG2,
G4int  PDG3 = 0 
)

Definition at line 50 of file G4QDecayChan.cc.

50 :
51 aDecayChanLimit(pLev)
52{
53 G4QPDGCode* firstPDG = new G4QPDGCode(PDG1);
54 theMinMass =firstPDG->GetMass();
55 aVecOfSecHadrons.push_back(firstPDG);
56 G4QPDGCode* secondPDG = new G4QPDGCode(PDG2);
57 theMinMass+=secondPDG->GetMass();
58 aVecOfSecHadrons.push_back(secondPDG);
59 if(PDG3)
60 {
61 G4QPDGCode* thirdPDG = new G4QPDGCode(PDG3);
62 theMinMass+=thirdPDG->GetMass();
63 aVecOfSecHadrons.push_back(thirdPDG);
64 }
65#ifdef debug
66 G4cout<<"G4QDecayChan is defined with pL="<<pLev<<",1="<<PDG1<<",2="<<PDG2<<",3="<<PDG3
67 <<",m1="<<firstPDG->GetMass()<<",m2="<<secondPDG->GetMass()<<",minM="<<theMinMass<<G4endl;
68#endif
69}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
G4double GetMass()
Definition: G4QPDGCode.cc:693

◆ G4QDecayChan() [3/4]

G4QDecayChan::G4QDecayChan ( const G4QDecayChan right)

Definition at line 71 of file G4QDecayChan.cc.

72{
73 aDecayChanLimit = right.aDecayChanLimit;
74 theMinMass = right.theMinMass;
75 //aVecOfSecHadrons (Vector)
76 G4int nSH = right.aVecOfSecHadrons.size();
77 if(nSH) for(G4int ih=0; ih<nSH; ih++)
78 {
79 G4QPDGCode* curPC = new G4QPDGCode(right.aVecOfSecHadrons[ih]);
80 aVecOfSecHadrons.push_back(curPC);
81 }
82}
int G4int
Definition: G4Types.hh:66

◆ G4QDecayChan() [4/4]

G4QDecayChan::G4QDecayChan ( G4QDecayChan right)

Definition at line 84 of file G4QDecayChan.cc.

85{
86 aDecayChanLimit = right->aDecayChanLimit;
87 theMinMass = right->theMinMass;
88 //aVecOfSecHadrons (Vector)
89 G4int nSH = right->aVecOfSecHadrons.size();
90 if(nSH) for(G4int ih=0; ih<nSH; ih++)
91 {
92 G4QPDGCode* curPC = new G4QPDGCode(right->aVecOfSecHadrons[ih]);
93 aVecOfSecHadrons.push_back(curPC);
94 }
95}

◆ ~G4QDecayChan()

G4QDecayChan::~G4QDecayChan ( )

Definition at line 97 of file G4QDecayChan.cc.

98{
99 G4int nSH=aVecOfSecHadrons.size();
100 //G4cout<<"G4QDecayChan::Destructor: Before nSH="<<nSH<<G4endl; // TMP
101 if(nSH)std::for_each(aVecOfSecHadrons.begin(), aVecOfSecHadrons.end(), DeleteQPDGCode());
102 //G4cout<<"G4QDecayChan::Destructor: After"<<G4endl; // TMP
103 aVecOfSecHadrons.clear();
104}

Member Function Documentation

◆ GetDecayChanLimit()

G4double G4QDecayChan::GetDecayChanLimit ( ) const
inline

Definition at line 92 of file G4QDecayChan.hh.

92{return aDecayChanLimit;}

Referenced by G4Quasmon::DecayQHadron(), and operator<<().

◆ GetMinMass()

G4double G4QDecayChan::GetMinMass ( ) const
inline

Definition at line 93 of file G4QDecayChan.hh.

93{return theMinMass;}

Referenced by G4Quasmon::DecayQHadron().

◆ GetVecOfSecHadrons()

G4QPDGCodeVector G4QDecayChan::GetVecOfSecHadrons ( )
inline

Definition at line 94 of file G4QDecayChan.hh.

94{return aVecOfSecHadrons;}

Referenced by operator<<().

◆ operator!=()

G4bool G4QDecayChan::operator!= ( const G4QDecayChan rhs) const
inline

Definition at line 90 of file G4QDecayChan.hh.

90{return this!=&rhs;}

◆ operator=()

const G4QDecayChan & G4QDecayChan::operator= ( const G4QDecayChan right)

Definition at line 107 of file G4QDecayChan.cc.

108{
109 if(this != &right) // Beware of self assignment
110 {
111 aDecayChanLimit = right.aDecayChanLimit;
112 theMinMass = right.theMinMass;
113 //aVecOfSecHadrons (Vector)
114 G4int iSH = aVecOfSecHadrons.size();
115 if(iSH) for(G4int ii=0; ii<iSH; ii++) delete aVecOfSecHadrons[ii];
116 aVecOfSecHadrons.clear();
117 G4int nSH = right.aVecOfSecHadrons.size();
118 if(nSH) for(G4int ih=0; ih<nSH; ih++)
119 {
120 G4QPDGCode* curPC = new G4QPDGCode(right.aVecOfSecHadrons[ih]);
121 aVecOfSecHadrons.push_back(curPC);
122 }
123 }
124 return *this;
125}

◆ operator==()

G4bool G4QDecayChan::operator== ( const G4QDecayChan rhs) const
inline

Definition at line 89 of file G4QDecayChan.hh.

89{return this==&rhs;}

◆ SetDecayChanLimit()

void G4QDecayChan::SetDecayChanLimit ( G4double  newDecChanLim)
inline

Definition at line 96 of file G4QDecayChan.hh.

96{aDecayChanLimit=DCL;}

◆ SetMinMass()

void G4QDecayChan::SetMinMass ( G4double  newMinMass)
inline

Definition at line 97 of file G4QDecayChan.hh.

97{theMinMass=minMass;}

◆ SetVecOfSecHadrons()

void G4QDecayChan::SetVecOfSecHadrons ( G4QPDGCodeVector  hadV)
inline

Definition at line 98 of file G4QDecayChan.hh.

98{aVecOfSecHadrons=VSH;}

The documentation for this class was generated from the following files: