Import Geant4 2.0.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DecayTable.hh,v 1.3.2.1 1999/12/07 20:49:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4DecayTable.hh,v 1.5 2000/02/25 07:36:14 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -16,22 +16,30 @@
|
||||
// CERN, CN Division, ASD group
|
||||
// History: first implementation, based on object model of
|
||||
// 7 July 1996 H.Kurashige
|
||||
// 14 June 1997 H.Kurashige
|
||||
//
|
||||
// ----------------------------------------
|
||||
// implementation for STL 14 Feb. 2000 H.Kurashige
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4DecayTable_h
|
||||
#define G4DecayTable_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "g4rw/tpsrtvec.h"
|
||||
#include "g4std/vector"
|
||||
#include "globals.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4VDecayChannel.hh"
|
||||
|
||||
class G4DecayTable
|
||||
{
|
||||
// Class Description
|
||||
// G4DecayTable is the table of pointer to G4VDecayChannel.
|
||||
// Decay channels inside is sorted by using decay branching ratio
|
||||
//
|
||||
|
||||
public:
|
||||
typedef G4RWTPtrSortedVector<G4VDecayChannel> G4VDecayChannelVector;
|
||||
typedef G4std::vector<G4VDecayChannel*> G4VDecayChannelVector;
|
||||
|
||||
//constructors
|
||||
public:
|
||||
@@ -49,14 +57,22 @@ class G4DecayTable
|
||||
G4int operator==(const G4DecayTable &right) const {return (this == &right);};
|
||||
G4int operator!=(const G4DecayTable &right) const {return (this != &right);};
|
||||
|
||||
public:
|
||||
public: // With Description
|
||||
void Insert( G4VDecayChannel* aChannel);
|
||||
G4int entries() const;
|
||||
// Insert a decay channel at proper position
|
||||
// (i.e. sorted by using branching ratio )
|
||||
|
||||
public:
|
||||
G4int entries() const;
|
||||
// Returns number of decay channels inside
|
||||
|
||||
public: // With Description
|
||||
G4VDecayChannel* SelectADecayChannel();
|
||||
// A decay channel is selected at random according to the branching ratio
|
||||
|
||||
G4VDecayChannel* GetDecayChannel(G4int index) const;
|
||||
G4VDecayChannel* operator[](G4int index);
|
||||
// Get index-th Decay channel
|
||||
|
||||
void DumpInfo() const;
|
||||
|
||||
private:
|
||||
@@ -67,21 +83,22 @@ class G4DecayTable
|
||||
inline
|
||||
G4int G4DecayTable::entries() const
|
||||
{
|
||||
return channels->entries();
|
||||
return channels->size();
|
||||
}
|
||||
|
||||
inline
|
||||
G4VDecayChannel* G4DecayTable::operator[](G4int index)
|
||||
{
|
||||
return (*channels)(index);
|
||||
return (*channels)[index];
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
G4VDecayChannel* G4DecayTable::GetDecayChannel(G4int index) const
|
||||
{
|
||||
G4VDecayChannel* selectedChannel = 0;
|
||||
if ( (index>=0) && (index<channels->entries()) ){
|
||||
selectedChannel = (*channels)(index);
|
||||
if ( (index>=0) && (index<channels->size()) ){
|
||||
selectedChannel = (*channels)[index];
|
||||
}
|
||||
return selectedChannel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user