Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/particles/management/include/G4VDecayChannel.hh

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /particles/management/include/G4VDecayChannel.hh (Version 11.3.0) and /particles/management/include/G4VDecayChannel.hh (Version 10.0.p1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // G4VDecayChannel                             << 
 27 //                                                 26 //
 28 // Class description:                          <<  27 // $Id: G4VDecayChannel.hh 73762 2013-09-10 12:53:56Z gcosmo $
 29 //                                                 28 //
 30 // Abstract class to describe decay kinematics <<  29 //
 31                                                <<  30 // ------------------------------------------------------------
 32 // Author: H.Kurashige, 27 July 1996           <<  31 //      GEANT 4 class header file
 33 // ------------------------------------------- <<  32 //
 34 #ifndef G4VDecayChannel_hh                     <<  33 //      History: first implementation, based on object model of
 35 #define G4VDecayChannel_hh 1                   <<  34 //      27 July 1996 H.Kurashige
 36                                                <<  35 //      30 May  1997 H.Kurashige
 37 #include "G4AutoLock.hh"                       <<  36 //      23 Mar. 2000 H.Weber      : add GetAngularMomentum()
 38 #include "G4Threading.hh"                      <<  37 // ------------------------------------------------------------
 39 #include "G4ThreeVector.hh"                    <<  38 #ifndef G4VDecayChannel_h
 40 #include "G4ios.hh"                            <<  39 #define G4VDecayChannel_h 1
 41 #include "globals.hh"                          << 
 42                                                    40 
 43 #include <cmath>                                   41 #include <cmath>
 44                                                    42 
 45 class G4ParticleDefinition;                    <<  43 #include "G4ios.hh"
 46 class G4DecayProducts;                         <<  44 #include "globals.hh"
 47 class G4ParticleTable;                         <<  45 /////@@#include "G4PDefSplitter.hh"
 48                                                    46 
                                                   >>  47 class    G4ParticleDefinition;
                                                   >>  48 class    G4DecayProducts;
                                                   >>  49 class    G4ParticleTable;
                                                   >>  50 
                                                   >>  51 /////@@class G4DecayChannelData
                                                   >>  52 /////@@{
                                                   >>  53 /////@@  // Encapsulates the fields associated to the class G4VDecayChannel that
                                                   >>  54 /////@@  // may not be read-only.
                                                   >>  55 /////@@
                                                   >>  56 /////@@  public:
                                                   >>  57 /////@@
                                                   >>  58 /////@@    void initialize()
                                                   >>  59 /////@@    {
                                                   >>  60 /////@@      parent = 0;
                                                   >>  61 /////@@      daughters = 0;
                                                   >>  62 /////@@      parent_mass = 0.0;
                                                   >>  63 /////@@      daughters_mass = 0;
                                                   >>  64 /////@@    }
                                                   >>  65 /////@@
                                                   >>  66 /////@@    G4ParticleDefinition*  parent;
                                                   >>  67 /////@@    G4ParticleDefinition** daughters;
                                                   >>  68 /////@@    G4double               parent_mass;
                                                   >>  69 /////@@    G4double*              daughters_mass;
                                                   >>  70 /////@@};
                                                   >>  71 /////@@
                                                   >>  72 /////@@// The type G4DecayChannelManager is introduced to encapsulate the methods used
                                                   >>  73 /////@@// by both the master thread and worker threads to allocate memory space for
                                                   >>  74 /////@@// the fields encapsulated by the class G4DecayChannelData. When each thread
                                                   >>  75 /////@@// initializes the value for these fields, it refers to them using a macro
                                                   >>  76 /////@@// definition defined below. For every G4DecayChannel instance, there is
                                                   >>  77 /////@@// a corresponding G4DecayChannelData instance. All G4DecayChannelData
                                                   >>  78 /////@@// instances are organized by the class G4DecayChannelManager as an array.
                                                   >>  79 /////@@// The field "int instanceID" is added to the class G4DecayChannel.
                                                   >>  80 /////@@// The value of this field in each G4DecayChannel instance is the subscript
                                                   >>  81 /////@@// of the corresponding G4DecayChannelData instance.
                                                   >>  82 /////@@// In order to use the class G4DecayChannelManager, we add a static member in
                                                   >>  83 /////@@// G4DecayChannel as follows: "static G4DecayChannelManager subInstanceManager".
                                                   >>  84 /////@@// For the master thread, the array for G4DecayChannelData instances grows
                                                   >>  85 /////@@// dynamically along with G4DecayChannel instances are created.
                                                   >>  86 /////@@// For each worker thread, it copies the array of  G4DecayChannelData instances
                                                   >>  87 /////@@// from the master thread.
                                                   >>  88 /////@@// In addition, it invokes a method similiar to the constructor explicitly
                                                   >>  89 /////@@// to achieve the partial effect for each instance in the array.
                                                   >>  90 /////@@//
                                                   >>  91 /////@@typedef G4PDefSplitter<G4DecayChannelData> G4DecayChannelManager;
                                                   >>  92 /////@@
                                                   >>  93 /////@@// These macros change the references to fields that are now encapsulated
                                                   >>  94 /////@@// in the class G4DecayChannelData.
                                                   >>  95 /////@@//
                                                   >>  96 /////@@#define G4MT_parent ((G4VDecayChannel::subInstanceManager.offset[instanceID]).parent)
                                                   >>  97 /////@@#define G4MT_daughters ((G4VDecayChannel::subInstanceManager.offset[instanceID]).daughters)
                                                   >>  98 /////@@#define G4MT_parent_mass ((G4VDecayChannel::subInstanceManager.offset[instanceID]).parent_mass)
                                                   >>  99 /////@@#define G4MT_daughters_mass ((G4VDecayChannel::subInstanceManager.offset[instanceID]).daughters_mass)
                                                   >> 100 /////@@
 49 class G4VDecayChannel                             101 class G4VDecayChannel
 50 {                                                 102 {
 51   public:                                      << 103   // Class Description:
 52     // Constructors                            << 104   //
 53     G4VDecayChannel(const G4String& aName, G4i << 105   // Abstract class to describe decay kinematics
 54     G4VDecayChannel(const G4String& aName, con << 106 
 55                     G4int theNumberOfDaughters << 107   public:  // with description
 56                     const G4String& theDaughte << 108 
 57                     const G4String& theDaughte << 109     // Constructors 
                                                   >> 110     G4VDecayChannel(const G4String &aName, G4int Verbose = 1);
                                                   >> 111     G4VDecayChannel(const G4String  &aName, 
                                                   >> 112         const G4String& theParentName,
                                                   >> 113         G4double        theBR,
                                                   >> 114         G4int           theNumberOfDaughters,
                                                   >> 115         const G4String& theDaughterName1,
                                                   >> 116         const G4String& theDaughterName2 = "",
                                                   >> 117         const G4String& theDaughterName3 = "",
                                                   >> 118         const G4String& theDaughterName4 = "" );
 58                                                   119 
 59     // Destructor                                 120     // Destructor
 60     virtual ~G4VDecayChannel();                   121     virtual ~G4VDecayChannel();
 61                                                   122 
 62     // Equality operators                      << 123     // equality operators
 63     G4bool operator==(const G4VDecayChannel& r << 124     G4int operator==(const G4VDecayChannel &right) const {return (this == &right);}
 64     G4bool operator!=(const G4VDecayChannel& r << 125     G4int operator!=(const G4VDecayChannel &right) const {return (this != &right);}
 65                                                   126 
 66     // Less-than operator is defined for G4Dec << 127     // less-than operator is defined for G4DecayTable
 67     inline G4bool operator<(const G4VDecayChan << 128     G4int operator<(const G4VDecayChannel &right) const;
 68                                                   129 
 69     virtual G4DecayProducts* DecayIt(G4double     130     virtual G4DecayProducts* DecayIt(G4double parentMass = -1.0) = 0;
 70                                                   131 
 71     // Get kinematics name                     << 132     // get kinematics name
 72     inline const G4String& GetKinematicsName() << 133     const G4String&  GetKinematicsName() const;
 73                                                << 134     // get branching ratio
 74     // Get branching ratio                     << 135     G4double   GetBR() const;
 75     inline G4double GetBR() const;             << 136     // get number of daughter particles
                                                   >> 137     G4int      GetNumberOfDaughters() const;     
                                                   >> 138 
                                                   >> 139     // get the pointer to the parent particle
                                                   >> 140     G4ParticleDefinition * GetParent();
                                                   >> 141     // get the pointer to a daughter particle 
                                                   >> 142     G4ParticleDefinition * GetDaughter(G4int anIndex);
 76                                                   143 
 77     // Get number of daughter particles        << 144     // get the angular momentum of the decay
 78     inline G4int GetNumberOfDaughters() const; << 
 79                                                << 
 80     // Get the pointer to the parent particle  << 
 81     inline G4ParticleDefinition* GetParent();  << 
 82                                                << 
 83     // Get the pointer to a daughter particle  << 
 84     inline G4ParticleDefinition* GetDaughter(G << 
 85                                                << 
 86     // Get the angular momentum of the decay   << 
 87     G4int GetAngularMomentum();                   145     G4int GetAngularMomentum();
                                                   >> 146     // get the name of the parent particle
                                                   >> 147     const G4String& GetParentName() const;
                                                   >> 148     //get the name of a daughter particle
                                                   >> 149     const G4String& GetDaughterName(G4int anIndex) const;
                                                   >> 150 
                                                   >> 151     // get mass of parent
                                                   >> 152     G4double GetParentMass() const; 
                                                   >> 153     G4double GetDaughterMass(G4int anIndex) const; 
                                                   >> 154 
                                                   >> 155     // set the parent particle (by name or by pointer) 
                                                   >> 156     void SetParent(const G4ParticleDefinition * particle_type);
                                                   >> 157     void SetParent(const G4String &particle_name);
                                                   >> 158     // set branching ratio
                                                   >> 159     void SetBR(G4double value); 
                                                   >> 160     // set number of daughter particles
                                                   >> 161     void SetNumberOfDaughters(G4int value);     
                                                   >> 162     // set a daughter particle (by name or by pointer) 
                                                   >> 163     void SetDaughter(G4int anIndex, 
                                                   >> 164                      const G4ParticleDefinition * particle_type);
                                                   >> 165     void SetDaughter(G4int anIndex, 
                                                   >> 166                      const G4String &particle_name);
                                                   >> 167 
                                                   >> 168     void  SetVerboseLevel(G4int value);
                                                   >> 169     G4int GetVerboseLevel()  const;
                                                   >> 170     void  DumpInfo();
                                                   >> 171 
                                                   >> 172 /////@@  public:  // without description
                                                   >> 173 /////@@
                                                   >> 174 /////@@    // returns the instance ID.
                                                   >> 175 /////@@    inline G4int GetInstanceID() const;
                                                   >> 176 /////@@    // returns the private data instance manager.
                                                   >> 177 /////@@    static const G4DecayChannelManager& GetSubInstanceManager();
 88                                                   178 
 89     // Get the name of the parent particle     << 179   protected: // with description
 90     inline const G4String& GetParentName() con << 
 91                                                << 
 92     // Get the name of a daughter particle     << 
 93     inline const G4String& GetDaughterName(G4i << 
 94                                                << 
 95     // Get mass of parent                      << 
 96     inline G4double GetParentMass() const;     << 
 97                                                << 
 98     // Get mass of daughter                    << 
 99     inline G4double GetDaughterMass(G4int anIn << 
100                                                << 
101     // Set the parent particle (by name or by  << 
102     void SetParent(const G4ParticleDefinition* << 
103     inline void SetParent(const G4String& part << 
104                                                << 
105     // Set branching ratio                     << 
106     void SetBR(G4double value);                << 
107                                                << 
108     // Set number of daughter particles        << 
109     void SetNumberOfDaughters(G4int value);    << 
110                                                   180 
111     // Set a daughter particle (by name or by  << 181     // clear daughters array
112     void SetDaughter(G4int anIndex, const G4Pa << 182     void ClearDaughtersName();
113     void SetDaughter(G4int anIndex, const G4St << 
114                                                << 
115     inline void SetVerboseLevel(G4int value);  << 
116     inline G4int GetVerboseLevel() const;      << 
117     void DumpInfo();                           << 
118                                                   183 
119     inline G4double GetRangeMass() const;      << 184     // fill daughters array
120     inline void SetRangeMass(G4double val);    << 185     void FillDaughters();
121     virtual G4bool IsOKWithParentMass(G4double << 186     // fill parent
                                                   >> 187     void FillParent();
122                                                   188 
123     void SetPolarization(const G4ThreeVector&) << 189   protected: // without description
124     inline const G4ThreeVector& GetPolarizatio << 
125                                                   190 
126   protected:                                   << 191     // default constructor
127     // Default constructor                     << 
128     G4VDecayChannel();                            192     G4VDecayChannel();
129                                                   193 
130     // Copy constructor and assignment operato << 194     // copy constructor and assignment operator
131     G4VDecayChannel(const G4VDecayChannel&);   << 195     G4VDecayChannel(const G4VDecayChannel &);
132     G4VDecayChannel& operator=(const G4VDecayC << 196     G4VDecayChannel & operator=(const G4VDecayChannel &);
133                                                   197 
134     // Clear daughters array                   << 198   private:
135     void ClearDaughtersName();                 << 
136                                                << 
137     inline void CheckAndFillDaughters();       << 
138     inline void CheckAndFillParent();          << 
139                                                   199 
140     G4double DynamicalMass(G4double massPDG, G << 200     const G4String& GetNoName() const;
141                                                   201 
142   protected:                                      202   protected:
143     // Kinematics name                         << 
144     G4String kinematics_name = "";             << 
145     // Branching ratio  [0.0 - 1.0]            << 
146     G4double rbranch = 0.0;                    << 
147     // Parent particle                         << 
148     G4String* parent_name = nullptr;           << 
149     // Daughter particles                      << 
150     G4String** daughters_name = nullptr;       << 
151                                                   203 
152     // Range of mass allowed in decay          << 204     // kinematics name
153     G4double rangeMass = 2.5;                  << 205     G4String   kinematics_name;
                                                   >> 206     // branching ratio  [0.0 - 1.0]
                                                   >> 207     G4double   rbranch;
                                                   >> 208     // number of daughters
                                                   >> 209     G4int      numberOfDaughters;
                                                   >> 210     // parent particle
                                                   >> 211     G4String*  parent_name;
                                                   >> 212     // daughter particles
                                                   >> 213     G4String** daughters_name;
154                                                   214 
155     // Polarization of the parent particle     << 215     // pointer to particle table
156     G4ThreeVector parent_polarization;         << 216     G4ParticleTable*       particletable;
157                                                   217 
158     // Pointer to particle table               << 218     // control flag for output message
159     G4ParticleTable* particletable = nullptr;  << 219     G4int verboseLevel;
160                                                << 
161     static const G4String noName;              << 
162                                                << 
163     G4ParticleDefinition* G4MT_parent = nullpt << 
164     G4ParticleDefinition** G4MT_daughters = nu << 
165     G4double G4MT_parent_mass = 0.0;           << 
166     G4double* G4MT_daughters_mass = nullptr;   << 
167     G4double* G4MT_daughters_width = nullptr;  << 
168     G4Mutex daughtersMutex;                    << 
169     G4Mutex parentMutex;                       << 
170                                                << 
171     // Number of daughters                     << 
172     G4int numberOfDaughters = 0;               << 
173                                                << 
174     // Control flag for output message         << 
175     //  0: Silent                                 220     //  0: Silent
176     //  1: Warning message                        221     //  1: Warning message
177     //  2: More                                   222     //  2: More
178     G4int verboseLevel = 1;                    << 
179                                                   223 
180   private:                                     << 224     static const G4String noName;
181     // Fill daughters array                    << 
182     void FillDaughters();                      << 
183                                                << 
184     // Fill parent                             << 
185     void FillParent();                         << 
186                                                   225 
187     const G4String& GetNoName() const;         << 226 /////@@    // This field is used as instance ID.
                                                   >> 227 /////@@    G4int instanceID;
                                                   >> 228 /////@@    // This field helps to use the class G4DecayChannelManager introduced above.
                                                   >> 229 /////@@    G4PART_DLL static G4DecayChannelManager subInstanceManager;
                                                   >> 230     G4ParticleDefinition*  G4MT_parent;
                                                   >> 231     G4ParticleDefinition** G4MT_daughters;
                                                   >> 232     G4double               G4MT_parent_mass;
                                                   >> 233     G4double*              G4MT_daughters_mass;
188 };                                                234 };
189                                                   235 
190 // -------------------------------------------    236 // ------------------------------------------------------------
191 // Inline methods                                 237 // Inline methods
192 // -------------------------------------------    238 // ------------------------------------------------------------
193                                                   239 
194 inline G4bool G4VDecayChannel::operator<(const << 240 inline
                                                   >> 241  G4int G4VDecayChannel::operator<(const G4VDecayChannel &right) const
195 {                                                 242 {
196   return (this->rbranch < right.rbranch);         243   return (this->rbranch < right.rbranch);
197 }                                                 244 }
198                                                   245 
199 inline G4ParticleDefinition* G4VDecayChannel:: << 246 inline 
200 {                                              << 247   G4ParticleDefinition* G4VDecayChannel::GetDaughter(G4int anIndex)
201   // pointers to daughter particles are filled << 248  { 
202   CheckAndFillDaughters();                     << 249   // pointers to daughter particles are filled, if they are not set yet 
                                                   >> 250   if (G4MT_daughters == 0) FillDaughters();
203                                                   251 
204   // get the pointer to a daughter particle       252   // get the pointer to a daughter particle
205   if ((anIndex >= 0) && (anIndex < numberOfDau << 253   if ( (anIndex>=0) && (anIndex<numberOfDaughters) ) {
206     return G4MT_daughters[anIndex];               254     return G4MT_daughters[anIndex];
                                                   >> 255   } else {
                                                   >> 256     if (verboseLevel>0)
                                                   >> 257       G4cout << "G4VDecayChannel::GetDaughter  index out of range "<<anIndex<<G4endl;
                                                   >> 258     return 0;
207   }                                               259   }
208                                                << 
209   if (verboseLevel > 0)                        << 
210     G4cout << "G4VDecayChannel::GetDaughter  i << 
211   return nullptr;                              << 
212 }                                                 260 }
213                                                   261 
214 inline const G4String& G4VDecayChannel::GetDau << 262 inline
                                                   >> 263  const G4String& G4VDecayChannel::GetDaughterName(G4int anIndex) const
215 {                                                 264 {
216   if ((anIndex >= 0) && (anIndex < numberOfDau << 265   if ( (anIndex>=0) && (anIndex<numberOfDaughters) ) {
217     return *daughters_name[anIndex];              266     return *daughters_name[anIndex];
                                                   >> 267   } else {
                                                   >> 268     if (verboseLevel>0){
                                                   >> 269       G4cout << "G4VDecayChannel::GetDaughterName ";
                                                   >> 270       G4cout << "index out of range " << anIndex << G4endl;
                                                   >> 271     }
                                                   >> 272     return GetNoName();
218   }                                               273   }
219                                                << 
220   if (verboseLevel > 0) {                      << 
221     G4cout << "G4VDecayChannel::GetDaughterNam << 
222     G4cout << "index out of range " << anIndex << 
223   }                                            << 
224   return GetNoName();                          << 
225 }                                                 274 }
226                                                   275 
227 inline G4double G4VDecayChannel::GetDaughterMa << 276 inline
                                                   >> 277  G4double G4VDecayChannel::GetDaughterMass(G4int anIndex) const
228 {                                                 278 {
229   if ((anIndex >= 0) && (anIndex < numberOfDau << 279   if ( (anIndex>=0) && (anIndex<numberOfDaughters) ) {
230     return G4MT_daughters_mass[anIndex];          280     return G4MT_daughters_mass[anIndex];
                                                   >> 281   } else {
                                                   >> 282     if (verboseLevel>0){
                                                   >> 283       G4cout << "G4VDecayChannel::GetDaughterMass ";
                                                   >> 284       G4cout << "index out of range " << anIndex << G4endl;
                                                   >> 285     }
                                                   >> 286     return 0.0;
231   }                                               287   }
232                                                << 
233   if (verboseLevel > 0) {                      << 
234     G4cout << "G4VDecayChannel::GetDaughterMas << 
235     G4cout << "index out of range " << anIndex << 
236   }                                            << 
237   return 0.0;                                  << 
238 }                                                 288 }
239                                                   289 
240 inline G4ParticleDefinition* G4VDecayChannel:: << 290 inline 
241 {                                              << 291   G4ParticleDefinition* G4VDecayChannel::GetParent()
242   // the pointer to the parent particle is fil << 292 { 
243   CheckAndFillParent();                        << 293   // the pointer to the parent particle is filled, if it is not set yet 
                                                   >> 294   if (G4MT_parent == 0) FillParent();
244   // get the pointer to the parent particle       295   // get the pointer to the parent particle
245   return G4MT_parent;                             296   return G4MT_parent;
246 }                                                 297 }
247                                                   298 
248 inline const G4String& G4VDecayChannel::GetPar << 299 inline
                                                   >> 300  const G4String& G4VDecayChannel::GetParentName() const
249 {                                                 301 {
250   return *parent_name;                            302   return *parent_name;
251 }                                                 303 }
252                                                   304 
253 inline G4double G4VDecayChannel::GetParentMass << 305 inline
                                                   >> 306  G4double G4VDecayChannel::GetParentMass() const
254 {                                                 307 {
255   return G4MT_parent_mass;                        308   return G4MT_parent_mass;
256 }                                                 309 }
257                                                   310 
258 inline void G4VDecayChannel::SetParent(const G << 311 inline
                                                   >> 312   void G4VDecayChannel::SetParent(const G4String &particle_name)
259 {                                                 313 {
260   delete parent_name;                          << 314   if (parent_name != 0) delete parent_name;
261   parent_name = new G4String(particle_name);      315   parent_name = new G4String(particle_name);
262   G4MT_parent = nullptr;                       << 316   G4MT_parent = 0;
263 }                                              << 
264                                                << 
265 inline G4int G4VDecayChannel::GetNumberOfDaugh << 
266 {                                              << 
267   return numberOfDaughters;                    << 
268 }                                              << 
269                                                << 
270 inline const G4String& G4VDecayChannel::GetKin << 
271 {                                              << 
272   return kinematics_name;                      << 
273 }                                              << 
274                                                << 
275 inline G4double G4VDecayChannel::GetBR() const << 
276 {                                              << 
277   return rbranch;                              << 
278 }                                                 317 }
279                                                   318 
280 inline void G4VDecayChannel::SetVerboseLevel(G << 319 inline
281 {                                              << 320  G4int G4VDecayChannel::GetNumberOfDaughters() const 
282   verboseLevel = value;                        << 321 { 
                                                   >> 322   return  numberOfDaughters;
283 }                                                 323 }
284                                                   324 
285 inline G4int G4VDecayChannel::GetVerboseLevel( << 325 inline
286 {                                              << 326  const G4String& G4VDecayChannel::GetKinematicsName() const { return kinematics_name; }
287   return verboseLevel;                         << 
288 }                                              << 
289                                                   327 
290 inline G4double G4VDecayChannel::GetRangeMass( << 328 inline
291 {                                              << 329  void  G4VDecayChannel::SetBR(G4double value){ rbranch = value; }
292   return rangeMass;                            << 
293 }                                              << 
294                                                   330 
295 inline void G4VDecayChannel::SetRangeMass(G4do << 331 inline
296 {                                              << 332  G4double G4VDecayChannel::GetBR() const { return rbranch; }
297   if (val >= 0.) rangeMass = val;              << 
298 }                                              << 
299                                                << 
300 inline void G4VDecayChannel::SetPolarization(c << 
301 {                                              << 
302   parent_polarization = polar;                 << 
303 }                                              << 
304                                                   333 
305 inline const G4ThreeVector& G4VDecayChannel::G << 334 inline
306 {                                              << 335  void  G4VDecayChannel::SetVerboseLevel(G4int value){ verboseLevel = value; }
307   return parent_polarization;                  << 
308 }                                              << 
309                                                   336 
310 inline void G4VDecayChannel::CheckAndFillDaugh << 337 inline
311 {                                              << 338  G4int G4VDecayChannel::GetVerboseLevel() const { return verboseLevel; }
312   G4AutoLock l(&daughtersMutex);               << 
313   if (G4MT_daughters == nullptr) {             << 
314     l.unlock();                                << 
315     FillDaughters();                           << 
316   }                                            << 
317 }                                              << 
318                                                   339 
319 inline void G4VDecayChannel::CheckAndFillParen << 340 /////@@inline
320 {                                              << 341 /////@@ G4int G4VDecayChannel::GetInstanceID() const { return instanceID; }
321   G4AutoLock l(&parentMutex);                  << 
322   if (G4MT_parent == nullptr) {                << 
323     l.unlock();                                << 
324     FillParent();                              << 
325   }                                            << 
326 }                                              << 
327                                                   342 
328 #endif                                            343 #endif
329                                                   344