Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: GB01ActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file GB01ActionInitialization.hh
|
||||
/// \brief Definition of the GB01ActionInitialization class
|
||||
|
||||
#ifndef GB01ActionInitialization_hh
|
||||
#define GB01ActionInitialization_hh 1
|
||||
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
|
||||
/// Action initialization class.
|
||||
///
|
||||
|
||||
class GB01ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
GB01ActionInitialization();
|
||||
virtual ~GB01ActionInitialization();
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: $
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// GB01BOptrChangeCrossSection
|
||||
//
|
||||
// Class Description:
|
||||
// A G4VBiasingOperator concrete implementation example to
|
||||
// illustrate how to bias physics processes cross-section for
|
||||
// one particle type.
|
||||
// The G4VBiasingOperation G4BOptnChangeCrossSection is
|
||||
// selected by this operator, and is sent to each process
|
||||
// calling the operator.
|
||||
// A simple constant bias to the cross-section is applied,
|
||||
// but more sophisticated changes can be applied.
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef GB01BOptrChangeCrossSection_hh
|
||||
#define GB01BOptrChangeCrossSection_hh 1
|
||||
|
||||
#include "G4VBiasingOperator.hh"
|
||||
class G4BOptnChangeCrossSection;
|
||||
class G4ParticleDefinition;
|
||||
class G4VProcess;
|
||||
#include <map>
|
||||
|
||||
|
||||
class GB01BOptrChangeCrossSection : public G4VBiasingOperator {
|
||||
public:
|
||||
// ------------------------------------------------------------
|
||||
// -- Constructor: takes the name of the particle type to bias:
|
||||
// ------------------------------------------------------------
|
||||
GB01BOptrChangeCrossSection(G4String particleToBias, G4String name = "ChangeXS");
|
||||
virtual ~GB01BOptrChangeCrossSection();
|
||||
|
||||
|
||||
private:
|
||||
// -----------------------------
|
||||
// -- Mandatory from base class:
|
||||
// -----------------------------
|
||||
// -- This method returns the biasing operation that will bias the physics process occurence.
|
||||
virtual G4VBiasingOperation*
|
||||
ProposeOccurenceBiasingOperation(const G4Track* track,
|
||||
const G4BiasingProcessInterface* callingProcess);
|
||||
// -- Methods not used:
|
||||
virtual G4VBiasingOperation*
|
||||
ProposeFinalStateBiasingOperation(const G4Track*, const G4BiasingProcessInterface*)
|
||||
{return 0;}
|
||||
virtual G4VBiasingOperation*
|
||||
ProposeNonPhysicsBiasingOperation(const G4Track*, const G4BiasingProcessInterface*)
|
||||
{return 0;}
|
||||
|
||||
private:
|
||||
// -- ("using" is avoid compiler complaining against (false) method shadowing.)
|
||||
using G4VBiasingOperator::OperationApplied;
|
||||
|
||||
// -- Optionnal base class method implementation.
|
||||
// -- This method is called to inform the operator that a proposed operation has been applied.
|
||||
// -- In the present case, it means that a physical interaction occured (interaction at
|
||||
// -- PostStepDoIt level):
|
||||
virtual void OperationApplied( const G4BiasingProcessInterface* callingProcess,
|
||||
G4BiasingAppliedCase biasingCase,
|
||||
G4VBiasingOperation* occurenceOperationApplied,
|
||||
G4double weightForOccurenceInteraction,
|
||||
G4VBiasingOperation* finalStateOperationApplied,
|
||||
const G4VParticleChange* particleChangeProduced );
|
||||
|
||||
private:
|
||||
// -- List of associations between processes and biasing operations:
|
||||
std::map< const G4BiasingProcessInterface*,
|
||||
G4BOptnChangeCrossSection* > fChangeCrossSectionOperations;
|
||||
const G4VProcess *fFirstProcess, *fLastProcess;
|
||||
G4bool fSetup;
|
||||
const G4ParticleDefinition* fParticleToBias;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,113 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: $
|
||||
//-----------------------------------------------------------------
|
||||
//
|
||||
// GB01BOptrMultiParticleChangeCrossSection
|
||||
//
|
||||
// Class Description:
|
||||
// A G4VBiasingOperator concrete implementation example to
|
||||
// illustrate how an operator can make use of an other operator.
|
||||
// In the present case, the GB01BOptrChangeCrossSection
|
||||
// operator, that is made to bias processes of one particle
|
||||
// type is instancied several times, one for each particle type
|
||||
// to bias.
|
||||
//
|
||||
//-----------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef GB01BOptrMultiParticleChangeCrossSection_hh
|
||||
#define GB01BOptrMultiParticleChangeCrossSection_hh 1
|
||||
|
||||
#include "G4VBiasingOperator.hh"
|
||||
class GB01BOptrChangeCrossSection;
|
||||
class G4ParticleDefinition;
|
||||
|
||||
#include <map>
|
||||
|
||||
class GB01BOptrMultiParticleChangeCrossSection : public G4VBiasingOperator {
|
||||
public:
|
||||
GB01BOptrMultiParticleChangeCrossSection();
|
||||
virtual ~GB01BOptrMultiParticleChangeCrossSection() {}
|
||||
|
||||
// ---------------------------------
|
||||
// -- Method specific to this class:
|
||||
// ---------------------------------
|
||||
// -- Each particle type for which its name is passed will be biased; *provided*
|
||||
// -- that the proper calls to biasingPhysics->Bias(particleName) have been done
|
||||
// -- in the main program.
|
||||
void AddParticle( G4String particleName );
|
||||
|
||||
|
||||
private:
|
||||
// -----------------------------
|
||||
// -- Mandatory from base class:
|
||||
// -----------------------------
|
||||
// -- This method returns a biasing operation that will bias the physics process occurence:
|
||||
virtual G4VBiasingOperation*
|
||||
ProposeOccurenceBiasingOperation(const G4Track* track,
|
||||
const G4BiasingProcessInterface* callingProcess);
|
||||
// -- Methods not used:
|
||||
virtual G4VBiasingOperation*
|
||||
ProposeFinalStateBiasingOperation(const G4Track*, const G4BiasingProcessInterface*)
|
||||
{return 0;}
|
||||
virtual G4VBiasingOperation*
|
||||
ProposeNonPhysicsBiasingOperation(const G4Track*, const G4BiasingProcessInterface*)
|
||||
{return 0;}
|
||||
|
||||
|
||||
private:
|
||||
// -- ("using" is to avoid compiler complaining against (false) method shadowing.)
|
||||
using G4VBiasingOperator::OperationApplied;
|
||||
|
||||
// -- Optionnal base class method implementation.
|
||||
// -- This method is called to inform the operator that a proposed operation has been applied.
|
||||
// -- In the present case, it means that a physical interaction occured (interaction at
|
||||
// -- PostStepDoIt level):
|
||||
virtual void OperationApplied( const G4BiasingProcessInterface* callingProcess,
|
||||
G4BiasingAppliedCase biasingCase,
|
||||
G4VBiasingOperation* occurenceOperationApplied,
|
||||
G4double weightForOccurenceInteraction,
|
||||
G4VBiasingOperation* finalStateOperationApplied,
|
||||
const G4VParticleChange* particleChangeProduced );
|
||||
|
||||
|
||||
public:
|
||||
// -- Optionnal base class method. It is called at the time a tracking of a particle starts:
|
||||
void StartTracking( const G4Track* track );
|
||||
|
||||
private:
|
||||
// -- List of associations between particle types and biasing operators:
|
||||
std::map < const G4ParticleDefinition*,
|
||||
GB01BOptrChangeCrossSection* > fBOptrForParticle;
|
||||
std::vector < const G4ParticleDefinition* > fParticlesToBias;
|
||||
GB01BOptrChangeCrossSection* fCurrentOperator;
|
||||
|
||||
// -- count number of biased interations for current track:
|
||||
G4int fnInteractions;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef GB01DetectorConstruction_h
|
||||
#define GB01DetectorConstruction_h 1
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Box;
|
||||
class G4LogicalVolume;
|
||||
class G4VPhysicalVolume;
|
||||
class G4Material;
|
||||
class G4UniformMagField;
|
||||
class DetectorMessenger;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class GB01DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
|
||||
GB01DetectorConstruction();
|
||||
~GB01DetectorConstruction();
|
||||
|
||||
public:
|
||||
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef GB01PrimaryGeneratorAction_h
|
||||
#define GB01PrimaryGeneratorAction_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4ParticleGun;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class GB01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
GB01PrimaryGeneratorAction();
|
||||
virtual ~GB01PrimaryGeneratorAction();
|
||||
|
||||
virtual void GeneratePrimaries(G4Event*);
|
||||
|
||||
private:
|
||||
G4ParticleGun* particleGun; //pointer a to G4 class
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user