96   theDEDXTable(aDEDXTable), theRangeTable(aRangeTable),
 
   97   theInverseRangeTable(anInverseRangeTable),
 
   98   theLabTimeTable(aLabTimeTable),
 
   99   theProperTimeTable(aProperTimeTable),
 
  100   theLowestKineticEnergy(aLowestKineticEnergy),
 
  101   theHighestKineticEnergy(aHighestKineticEnergy),
 
  102   theMassRatio(aMassRatio),
 
  103   theNumberOfBins(aNumberOfBins)
 
  135                     tLabTime,tProperTime,lowestKineticEnergy,
 
  136                     highestKineticEnergy, massRatio,NumberOfBins);
 
  154   helper_map::iterator it;
 
  155   if((it=
dict->find(p))==
dict->end()) 
return 0;
 
  156   return (*it).second.theDEDXTable;
 
  165   helper_map::iterator it;
 
  166   if((it=
dict->find(p))==
dict->end()) 
return 0;
 
  167   return (*it).second.theRangeTable;
 
  176   helper_map::iterator it;
 
  177   if((it=
dict->find(p))==
dict->end()) 
return 0;
 
  178   return (*it).second.theInverseRangeTable;
 
  187   helper_map::iterator it;
 
  188   if((it=
dict->find(p))==
dict->end()) 
return 0;
 
  189   return (*it).second.theLabTimeTable;
 
  198   helper_map::iterator it;
 
  199   if((it=
dict->find(p))==
dict->end()) 
return 0;
 
  200   return (*it).second.theProperTimeTable;
 
  211   helper_map::iterator it;
 
  212   if ((it=
dict->find(p))==
dict->end()) {
 
  248   if (scaledKineticEnergy<t->theLowestKineticEnergy) {
 
  250      dEdx =(*dEdxTable)(materialIndex)->GetValue(
 
  256      dEdx = (*dEdxTable)(materialIndex)->GetValue(
 
  261     dEdx = (*dEdxTable)(materialIndex)->GetValue(
 
  262                scaledKineticEnergy,isOut);
 
  291   const G4double parlowen=0.4 , ppar=0.5-parlowen ;
 
  297   if (scaledKineticEnergy<t->theLowestKineticEnergy) {
 
  300             (*labtimeTable)(materialIndex)->GetValue(
 
  306      time = (*labtimeTable)(materialIndex)->GetValue(
 
  311     time = (*labtimeTable)(materialIndex)->GetValue(
 
  312                scaledKineticEnergy,isOut);
 
  342   const G4double parlowen=0.4 , ppar=0.5-parlowen ;
 
  343   const G4double dToverT = 0.05 , facT = 1. -dToverT ;
 
  344   G4double timestart,timeend,deltatime,dTT;
 
  350   if (scaledKineticEnergy<t->theLowestKineticEnergy) {
 
  353                 (*labtimeTable)(materialIndex)->GetValue(
 
  359      timestart = (*labtimeTable)(materialIndex)->GetValue(
 
  364     timestart = (*labtimeTable)(materialIndex)->GetValue(
 
  365                 scaledKineticEnergy,isOut);
 
  369   dTT = (KineticEnergyStart - KineticEnergyEnd)/KineticEnergyStart ;
 
  372     scaledKineticEnergy = facT*KineticEnergyStart*
t->
theMassRatio;
 
  376   if (scaledKineticEnergy<t->theLowestKineticEnergy) {
 
  379                 (*labtimeTable)(materialIndex)->GetValue(
 
  385      timeend = (*labtimeTable)(materialIndex)->GetValue(
 
  390     timeend = (*labtimeTable)(materialIndex)->GetValue(
 
  391                 scaledKineticEnergy,isOut);
 
  395   deltatime = timestart - timeend ;
 
  398     deltatime *= dTT/dToverT;
 
  420   if (!propertimeTable) {
 
  425   const G4double parlowen=0.4 , ppar=0.5-parlowen ;
 
  431   if (scaledKineticEnergy<t->theLowestKineticEnergy) {
 
  434             (*propertimeTable)(materialIndex)->GetValue(
 
  440      time = (*propertimeTable)(materialIndex)->GetValue(
 
  445     time = (*propertimeTable)(materialIndex)->GetValue(
 
  446                scaledKineticEnergy,isOut);
 
  471   if (!propertimeTable) {
 
  476   const G4double parlowen=0.4 , ppar=0.5-parlowen ;
 
  477   const G4double dToverT = 0.05 , facT = 1. -dToverT ;
 
  478   G4double timestart,timeend,deltatime,dTT;
 
  484   if (scaledKineticEnergy<t->theLowestKineticEnergy) {
 
  487                 (*propertimeTable)(materialIndex)->GetValue(
 
  493      timestart = (*propertimeTable)(materialIndex)->GetValue(
 
  498     timestart = (*propertimeTable)(materialIndex)->GetValue(
 
  499                 scaledKineticEnergy,isOut);
 
  503   dTT = (KineticEnergyStart - KineticEnergyEnd)/KineticEnergyStart ;
 
  506     scaledKineticEnergy = facT*KineticEnergyStart*
t->
theMassRatio;
 
  510   if (scaledKineticEnergy<t->theLowestKineticEnergy) {
 
  513                 (*propertimeTable)(materialIndex)->GetValue(
 
  519      timeend = (*propertimeTable)(materialIndex)->GetValue(
 
  524     timeend = (*propertimeTable)(materialIndex)->GetValue(
 
  525                 scaledKineticEnergy,isOut);
 
  529   deltatime = timestart - timeend ;
 
  532     deltatime *= dTT/dToverT ;
 
  568   if (scaledKineticEnergy<t->theLowestKineticEnergy) {
 
  571             (*rangeTable)(materialIndex)->GetValue(
 
  576     Range = (*rangeTable)(materialIndex)->GetValue(
 
  579             (*dEdxTable)(materialIndex)->GetValue(
 
  584     Range = (*rangeTable)(materialIndex)->GetValue(
 
  585                scaledKineticEnergy,isOut);
 
  614   if (!inverseRangeTable) {
 
  619   G4double scaledrange,scaledKineticEnergy ;
 
  627     rmin = (*inverseRangeTable)(materialIndex)->
 
  628                               GetLowEdgeEnergy(0) ;
 
  629     rmax = (*inverseRangeTable)(materialIndex)->
 
  631     Thigh = (*inverseRangeTable)(materialIndex)->
 
  632                               GetValue(
rmax,isOut) ;
 
  637   if(scaledrange < 
rmin)
 
  640                    scaledrange*scaledrange/(
rmin*
rmin) ;
 
  644     if(scaledrange < 
rmax)
 
  646       scaledKineticEnergy = (*inverseRangeTable)(materialIndex)->
 
  647                               GetValue( scaledrange,isOut) ;
 
  651       scaledKineticEnergy = 
Thigh +
 
  653                       (*dEdxTable)(materialIndex)->
 
  654                                  GetValue(
Thigh,isOut) ;
 
  691   if (scaledKineticEnergy<t->theLowestKineticEnergy) {
 
  694             *(*dEdxTable)(materialIndex)->GetValue(
 
  699      dEdx = (*dEdxTable)(materialIndex)->GetValue(
 
  704       dEdx = (*dEdxTable)(materialIndex)->GetValue(
 
  705                           scaledKineticEnergy,isOut) ;
 
  740                    (*rangeTable)(materialIndex)->
 
  741                    GetLowEdgeEnergy(1) ;
 
  747   if (scaledKineticEnergy<t->theLowestKineticEnergy) {
 
  750             (*rangeTable)(materialIndex)->GetValue(
 
  753   } 
else if (scaledKineticEnergy>Thighr) {
 
  755     Range = (*rangeTable)(materialIndex)->GetValue(
 
  757             (scaledKineticEnergy-Thighr)/
 
  758             (*dEdxTable)(materialIndex)->GetValue(
 
  763      Range = (*rangeTable)(materialIndex)->GetValue(
 
  764                        scaledKineticEnergy,isOut) ;
 
  803   if (scaledKineticEnergy<t->theLowestKineticEnergy) {
 
  805      dEdx =(*dEdxTable)(materialIndex)->GetValue(
 
  811      dEdx = (*dEdxTable)(materialIndex)->GetValue(
 
  816     dEdx = (*dEdxTable)(materialIndex)->GetValue(
 
  817                scaledKineticEnergy,isOut);
 
  856   if (scaledKineticEnergy<t->theLowestKineticEnergy) {
 
  859             (*rangeTable)(materialIndex)->GetValue(
 
  864     Range = (*rangeTable)(materialIndex)->GetValue(
 
  867             (*dEdxTable)(materialIndex)->GetValue(
 
  872     Range = (*rangeTable)(materialIndex)->GetValue(
 
  873                scaledKineticEnergy,isOut);
 
  903   if (!inverseRangeTable) {
 
  909   G4double scaledrange,scaledKineticEnergy ;
 
  917     rmin = (*inverseRangeTable)(materialIndex)->
 
  918                               GetLowEdgeEnergy(0) ;
 
  919     rmax = (*inverseRangeTable)(materialIndex)->
 
  921     Thigh = (*inverseRangeTable)(materialIndex)->
 
  922                               GetValue(
rmax,isOut) ;
 
  927   if(scaledrange < 
rmin)
 
  930                    scaledrange*scaledrange/(
rmin*
rmin) ;
 
  934     if(scaledrange < 
rmax)
 
  936       scaledKineticEnergy = (*inverseRangeTable)(materialIndex)->
 
  937                               GetValue( scaledrange,isOut) ;
 
  941       scaledKineticEnergy = 
Thigh +
 
  943                       (*dEdxTable)(materialIndex)->
 
  944                                  GetValue(
Thigh,isOut) ;
 
  978   if (scaledKineticEnergy<t->theLowestKineticEnergy) {
 
  981             *(*dEdxTable)(materialIndex)->GetValue(
 
  986      dEdx = (*dEdxTable)(materialIndex)->GetValue(
 
  991       dEdx = (*dEdxTable)(materialIndex)->GetValue(
 
  992                           scaledKineticEnergy,isOut) ;
 
 1019   if ( !dEdxTable || !rangeTable)
 
 1025                    (*rangeTable)(materialIndex)->
 
 1026                    GetLowEdgeEnergy(1) ;
 
 1032   if (scaledKineticEnergy<t->theLowestKineticEnergy) {
 
 1035             (*rangeTable)(materialIndex)->GetValue(
 
 1038   } 
else if (scaledKineticEnergy>Thighr) {
 
 1040     Range = (*rangeTable)(materialIndex)->GetValue(
 
 1042             (scaledKineticEnergy-Thighr)/
 
 1043             (*dEdxTable)(materialIndex)->GetValue(
 
 1048      Range = (*rangeTable)(materialIndex)->GetValue(
 
 1049                        scaledKineticEnergy,isOut) ;
 
 1063     G4cout << 
"##### G4EnergyLossTable WARNING: The obsolete interface is used!" << 
G4endl;
 
 1064     G4cout << 
"##### RESULTS ARE NOT GARANTEED!" << 
G4endl;
 
 1065     G4cout << 
"##### Please, substitute G4Material by G4MaterialCutsCouple" << 
G4endl;
 
 1066     G4cout << 
"##### Obsolete interface will be removed soon" << 
G4endl;
 
 1072     G4cout << 
"##### G4EnergyLossTable WARNING closed" << 
G4endl;
 
static G4double GetDeltaProperTime(const G4ParticleDefinition *aParticle, G4double KineticEnergyStart, G4double KineticEnergyEnd, const G4Material *aMaterial)
 
const G4PhysicsTable * theProperTimeTable
 
static G4EnergyLossTablesHelper * null_loss
 
static G4LossTableManager * Instance()
 
G4double GetDEDX(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
 
static const G4PhysicsTable * GetDEDXTable(const G4ParticleDefinition *p)
 
const G4PhysicsTable * theDEDXTable
 
static void ParticleHaveNoLoss(const G4ParticleDefinition *aParticle, const G4String &)
 
const G4PhysicsTable * theRangeTable
 
static G4EnergyLossTablesHelper * t
 
static G4double GetDeltaLabTime(const G4ParticleDefinition *aParticle, G4double KineticEnergyStart, G4double KineticEnergyEnd, const G4Material *aMaterial)
 
G4EnergyLossTablesHelper()
 
static G4double QQPositron
 
G4GLOB_DLL std::ostream G4cout
 
const G4PhysicsTable * theLabTimeTable
 
static G4double GetLabTime(const G4ParticleDefinition *aParticle, G4double KineticEnergy, const G4Material *aMaterial)
 
static G4double GetPreciseRangeFromEnergy(const G4ParticleDefinition *aParticle, G4double KineticEnergy, const G4Material *aMaterial)
 
static G4EnergyLossTablesHelper GetTables(const G4ParticleDefinition *p)
 
G4double GetEnergy(const G4ParticleDefinition *aParticle, G4double range, const G4MaterialCutsCouple *couple)
 
static const G4PhysicsTable * GetLabTimeTable(const G4ParticleDefinition *p)
 
std::map< K, G4EnergyLossTablesHelper, std::less< K > > helper_map
 
static const G4PhysicsTable * GetRangeTable(const G4ParticleDefinition *p)
 
G4double theHighestKineticEnergy
 
static G4double GetDEDX(const G4ParticleDefinition *aParticle, G4double KineticEnergy, const G4Material *aMaterial)
 
static G4double GetProperTime(const G4ParticleDefinition *aParticle, G4double KineticEnergy, const G4Material *aMaterial)
 
const G4PhysicsTable * theInverseRangeTable
 
static void Register(const G4ParticleDefinition *p, const G4PhysicsTable *tDEDX, const G4PhysicsTable *tRange, const G4PhysicsTable *tInverseRange, const G4PhysicsTable *tLabTime, const G4PhysicsTable *tProperTime, G4double lowestKineticEnergy, G4double highestKineticEnergy, G4double massRatio, G4int NumberOfBins)
 
static const G4PhysicsTable * GetInverseRangeTable(const G4ParticleDefinition *p)
 
static G4ParticleDefinition * lastParticle
 
G4double GetPDGCharge() const 
 
static G4double GetPreciseEnergyFromRange(const G4ParticleDefinition *aParticle, G4double range, const G4Material *aMaterial)
 
static G4double GetPreciseDEDX(const G4ParticleDefinition *aParticle, G4double KineticEnergy, const G4Material *aMaterial)
 
G4double GetRange(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
 
static const G4PhysicsTable * GetProperTimeTable(const G4ParticleDefinition *p)
 
static G4double GetRange(const G4ParticleDefinition *aParticle, G4double KineticEnergy, const G4Material *aMaterial)
 
static G4double Chargesquare
 
G4double theLowestKineticEnergy
 
static G4int let_max_num_warnings