Import Geant4 10.4.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 103005 2017-03-08 08:08:35Z gcosmo $
|
||||
$Id: History 105924 2017-08-29 12:28:09Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,13 +17,16 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
August 29th, 2017 Gabriele Cosmo (procbiasing-V10-03-03)
|
||||
- Removed duplicate class definition G4TrackTerminator.hh, which is part
|
||||
of the processes/transportation module.
|
||||
|
||||
July 14th, 2017 Gabriele Cosmo (procbiasing-V10-03-02)
|
||||
- G4ImportanceConfigurator: removed debug printout in destructor.
|
||||
|
||||
March 7th, 2017 Alexander Howard (procbiasing-V10-03-01)
|
||||
- G4GeometrySampler: removed unnecessary ClearSampling from the destructor
|
||||
|
||||
Mar 7th, 2015 Alexander Howard (procbiasing-V10-03-00)
|
||||
- G4ImportanceConfigurator: adjusted the ProcessPlacer in the destructor
|
||||
of the G4ImportanceConfigurator so that it didn't cause an error in MT-mode
|
||||
|
||||
Mar 10th, 2015 Gabriele Cosmo (procbiasing-V10-01-00)
|
||||
- G4ImportanceProcess, G4WeightCutOffProcess, G4WeightWindowProcess: made
|
||||
static thread-local variables into class data members.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 101363 2016-11-15 15:27:42Z gcosmo $
|
||||
$Id: History 107595 2017-11-24 16:17:37Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,14 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
November 24th, 2017 M. Verderi
|
||||
- Fix G4BiasingProcessInterface for wrong setting of first/last
|
||||
GPIL/DoIt flags in case charged particles. As the msc became
|
||||
a pure along, this broke the initial logic based on the fact
|
||||
that, before, physics processes always had a PostStepDoIt method.
|
||||
- proc-biasgen-V10-03-00
|
||||
|
||||
|
||||
November 15th, 2016, M. Verderi
|
||||
- Fix one Coverity warning in G4ParallelGeometriesLimiterProcess.
|
||||
- proc-biasgen-V10-02-06
|
||||
|
||||
@@ -71,9 +71,9 @@ G4BiasingProcessInterface::G4BiasingProcessInterface(G4String name)
|
||||
{
|
||||
for (G4int i = 0 ; i < 8 ; i++) fFirstLastFlags[i] = false;
|
||||
fResetInteractionLaws.Put( true );
|
||||
fCommonStart.Put(true);
|
||||
fCommonEnd.Put(true);
|
||||
fDoCommonConfigure.Put(true);
|
||||
fCommonStart .Put( true );
|
||||
fCommonEnd .Put( true );
|
||||
fDoCommonConfigure .Put( true );
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ void G4BiasingProcessInterface::StartTracking(G4Track* track)
|
||||
if ( fCommonStart.Get() )
|
||||
{
|
||||
fCommonStart.Put( false );// = false;
|
||||
fCommonEnd.Put(true);// = true;
|
||||
fCommonEnd .Put( true );// = true;
|
||||
|
||||
fSharedData-> fCurrentBiasingOperator = 0;
|
||||
fSharedData->fPreviousBiasingOperator = 0;
|
||||
@@ -190,8 +190,8 @@ void G4BiasingProcessInterface::EndTracking()
|
||||
// -- Inform operators of end of tracking:
|
||||
if ( fCommonEnd.Get() )
|
||||
{
|
||||
fCommonEnd.Put( false );// = false;
|
||||
fCommonStart.Put( true );// = true;
|
||||
fCommonEnd .Put( false );// = false;
|
||||
fCommonStart.Put( true );// = true;
|
||||
|
||||
for ( size_t optr = 0 ; optr < ( G4VBiasingOperator::GetBiasingOperators() ).size() ; optr ++)
|
||||
( G4VBiasingOperator::GetBiasingOperators() )[optr]->EndTracking( );
|
||||
@@ -389,8 +389,6 @@ G4double G4BiasingProcessInterface::PostStepGetPhysicalInteractionLength( const
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------
|
||||
// -- A biasing operator exists. Proceed with
|
||||
// -- treating non-physics and physics biasing cases:
|
||||
@@ -449,7 +447,6 @@ G4double G4BiasingProcessInterface::PostStepGetPhysicalInteractionLength( const
|
||||
G4VParticleChange* G4BiasingProcessInterface::PostStepDoIt(const G4Track& track,
|
||||
const G4Step& step)
|
||||
{
|
||||
|
||||
// ---------------------------------------
|
||||
// -- case outside of volume with biasing:
|
||||
// ---------------------------------------
|
||||
@@ -922,16 +919,20 @@ G4bool G4BiasingProcessInterface::IsFirstPostStepGPILInterface(G4bool physOnly)
|
||||
const G4ProcessVector* pv = fProcessManager->GetPostStepProcessVector(typeGPIL);
|
||||
G4int thisIdx(-1);
|
||||
for (G4int i = 0; i < pv->size(); i++ ) if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
if ( thisIdx < 0 ) return false; // -- to ignore pure along processes
|
||||
for ( size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); i++ )
|
||||
{
|
||||
if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
|
||||
{
|
||||
G4int thatIdx(-1);
|
||||
for (G4int j = 0; j < pv->size(); j++ ) if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j; break; }
|
||||
if ( thisIdx > thatIdx )
|
||||
if ( thatIdx >= 0 ) // -- to ignore pure along processes
|
||||
{
|
||||
isFirst = false;
|
||||
break;
|
||||
if ( thisIdx > thatIdx )
|
||||
{
|
||||
isFirst = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -945,16 +946,20 @@ G4bool G4BiasingProcessInterface::IsLastPostStepGPILInterface(G4bool physOnly) c
|
||||
const G4ProcessVector* pv = fProcessManager->GetPostStepProcessVector(typeGPIL);
|
||||
G4int thisIdx(-1);
|
||||
for (G4int i = 0; i < pv->size(); i++ ) if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
if ( thisIdx < 0 ) return false; // -- to ignore pure along processes
|
||||
for ( size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); i++ )
|
||||
{
|
||||
if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
|
||||
{
|
||||
G4int thatIdx(-1);
|
||||
for (G4int j = 0; j < pv->size(); j++ ) if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j; break; }
|
||||
if ( thisIdx < thatIdx )
|
||||
if ( thatIdx >= 0 ) // -- to ignore pure along processes
|
||||
{
|
||||
isLast = false;
|
||||
break;
|
||||
if ( thisIdx < thatIdx )
|
||||
{
|
||||
isLast = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -968,16 +973,20 @@ G4bool G4BiasingProcessInterface::IsFirstPostStepDoItInterface(G4bool physOnly)
|
||||
const G4ProcessVector* pv = fProcessManager->GetPostStepProcessVector(typeDoIt);
|
||||
G4int thisIdx(-1);
|
||||
for (G4int i = 0; i < pv->size(); i++ ) if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
if ( thisIdx < 0 ) return false; // -- to ignore pure along processes
|
||||
for ( size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); i++ )
|
||||
{
|
||||
if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
|
||||
{
|
||||
G4int thatIdx(-1);
|
||||
for (G4int j = 0; j < pv->size(); j++ ) if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j; break; }
|
||||
if ( thisIdx > thatIdx )
|
||||
if ( thatIdx >= 0 ) // -- to ignore pure along processes
|
||||
{
|
||||
isFirst = false;
|
||||
break;
|
||||
if ( thisIdx > thatIdx )
|
||||
{
|
||||
isFirst = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -991,16 +1000,20 @@ G4bool G4BiasingProcessInterface::IsLastPostStepDoItInterface(G4bool physOnly) c
|
||||
const G4ProcessVector* pv = fProcessManager->GetPostStepProcessVector(typeDoIt);
|
||||
G4int thisIdx(-1);
|
||||
for (G4int i = 0; i < pv->size(); i++ ) if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
if ( thisIdx < 0 ) return false; // -- to ignore pure along processes
|
||||
for ( size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); i++ )
|
||||
{
|
||||
if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
|
||||
{
|
||||
G4int thatIdx(-1);
|
||||
for (G4int j = 0; j < pv->size(); j++ ) if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j; break; }
|
||||
if ( thisIdx < thatIdx )
|
||||
for (G4int j = 0; j < pv->size(); j++ ) if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j; break; }
|
||||
if ( thatIdx >= 0 ) // -- to ignore pure along processes
|
||||
{
|
||||
isLast = false;
|
||||
break;
|
||||
if ( thisIdx < thatIdx )
|
||||
{
|
||||
isLast = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4TrackTerminator.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4TrackTerminator
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// This is an interface for an object which can be called to kill a track.
|
||||
// The type it provides is needed in case importance biasing and scoring
|
||||
// is done at the same time.
|
||||
// For navigation in the parallel geometry which is done by the importance
|
||||
// biasing process (it derives from G4ParallelTransport), importance
|
||||
// biasing has to be done before scoring (to score the correct volume).
|
||||
// But since scoring would not be called if the importance biasing kills
|
||||
// a track, it only tells a G4TrackTerminator to kill the track.
|
||||
// The scoring process implements the interface G4TrackTerminator
|
||||
// and is now able to kill the track after it has performed the scoring.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
#ifndef G4TrackTerminator_hh
|
||||
#define G4TrackTerminator_hh G4TrackTerminator_hh
|
||||
|
||||
#include "G4Types.hh"
|
||||
|
||||
class G4TrackTerminator
|
||||
{
|
||||
|
||||
public: // without description
|
||||
|
||||
G4TrackTerminator()
|
||||
: fKillTrack(false) {}
|
||||
~G4TrackTerminator();
|
||||
|
||||
void SetKillTrack(){fKillTrack = true;}
|
||||
G4bool GetKillTrack() const {return fKillTrack;}
|
||||
|
||||
private:
|
||||
|
||||
G4bool fKillTrack;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: sources.cmake 77477 2013-11-25 09:42:24Z gcosmo $
|
||||
# $Id: sources.cmake 105924 2017-08-29 12:28:09Z gcosmo $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@@ -50,7 +50,6 @@ GEANT4_DEFINE_MODULE(NAME G4biasing_imp
|
||||
G4ImportanceProcess.hh
|
||||
G4PlaceOfAction.hh
|
||||
G4SamplingPostStepAction.hh
|
||||
G4TrackTerminator.hh
|
||||
G4VSampler.hh
|
||||
G4VSamplerConfigurator.hh
|
||||
G4WeightCutOffConfigurator.hh
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ImportanceConfigurator.cc 103005 2017-03-08 08:08:35Z gcosmo $
|
||||
// $Id: G4ImportanceConfigurator.cc 105159 2017-07-14 09:17:32Z gcosmo $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ImportanceConfigurator
|
||||
@@ -76,7 +76,6 @@ G4ImportanceConfigurator(G4String worldvolumeName,
|
||||
|
||||
G4ImportanceConfigurator::~G4ImportanceConfigurator()
|
||||
{
|
||||
G4cout << "G4ImportanceConfigurator:: destructor " << G4endl;
|
||||
if (fImportanceProcess)
|
||||
{
|
||||
fPlacer.RemoveProcess(fImportanceProcess);
|
||||
|
||||
Reference in New Issue
Block a user