Import Geant4 11.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2023-12-08 10:43:34 +01:00
parent dd1f179cda
commit 860a2b92bf
3962 changed files with 139318 additions and 164259 deletions
@@ -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. *
// ********************************************************************
//
// Authors: Susanna Guatelli and Francesco Romano
// susanna@uow.edu.au, francesco.romano@ct.infn.it
#ifndef ActionInitialization_h
#define ActionInitialization_h 1
#include "G4VUserActionInitialization.hh"
#include "AnalysisManager.hh"
#include "DetectorMessenger.hh"
class AnalysisManager;
class G4GeneralParticleSource;
class ActionInitialization: public G4VUserActionInitialization
{
public:
ActionInitialization(AnalysisManager* analysisMan, DetectorMessenger* detectorMess);
virtual ~ActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
private:
AnalysisManager* analysis;
DetectorMessenger* detector;
};
#endif
@@ -0,0 +1,81 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Authors: Susanna Guatelli and Francesco Romano
// susanna@uow.edu.au, francesco.romano@ct.infn.it
//
#ifndef ANALYSISMANAGER_HH
#define ANALYSISMANAGER_HH
#include "globals.hh"
#include "G4AnalysisManager.hh"
#include "AnalysisMessenger.hh"
class AnalysisMessenger;
// Define the total number of columns in the ntuple
const G4int MaxNtCol = 9;
class AnalysisManager
{
public:
AnalysisManager(AnalysisMessenger* messenger);
~AnalysisManager();
void book(G4bool addExtraNt); // booking the ROOT file
void SetPrimaryEnergy(G4double energy); // Store the energy of the primary particles
void StoreEnergyDeposition(G4double edep, G4double path, G4int eid);
// Fill the ntuple with energy deposition and path length per event
void FillSecondaries(G4int AA, G4double charge, G4double energy);
// Information about secondary particles
void StoreSecondStageEnergyDeposition(G4double edep, G4int eid);
// Fill the ntuple with energy and event ID of the second stage (telescope detector only)
void finish();
// Close the ROOT file with all the results stored in nutples
private:
G4bool factoryOn;
G4int fNtColId[MaxNtCol];
AnalysisMessenger* messenger;
G4bool usingRoot;
G4bool extraNt;
};
#endif
@@ -0,0 +1,56 @@
//
// ********************************************************************
// * 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 AnalysisMessenger_h
#define AnalysisMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
#include "G4String.hh"
class G4UIdirectory;
class G4UIcmdWithABool;
class AnalysisMessenger: public G4UImessenger
{
public:
AnalysisMessenger();
~AnalysisMessenger();
void SetNewValue(G4UIcommand*, G4String);
// functions to read parameters
G4bool IsRootOutput() { return rootOutput; }
private:
G4UIdirectory *analysisDir; // UI directory
G4UIcmdWithABool *useRootForOutput;
// parameters to store
G4bool rootOutput;
};
#endif
@@ -0,0 +1,82 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Authors: Susanna Guatelli and Francesco Romano
// susanna@uow.edu.au, francesco.romano@ct.infn.it
// Modified by Jacopo Magini: j.magini@surrey.ac.uk
#ifndef DetectorConstruction_H
#define DetectorConstruction_H 1
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
#include "AnalysisManager.hh"
#include "DetectorMessenger.hh"
#include "G4NistManager.hh"
class G4VPhysicalVolume;
class DetectorMessenger;
class G4LogicalVolume;
class G4Material;
class DetectorConstruction : public G4VUserDetectorConstruction
{
public:
DetectorConstruction(AnalysisManager* analysis, DetectorMessenger* messenger);
~DetectorConstruction();
G4VPhysicalVolume* Construct();
void ConstructSDandField();
private:
AnalysisManager* analysis;
DetectorMessenger* messenger;
G4String detectorType;
G4double detectorSizeWidth;
G4double detectorSizeThickness;
G4double secondStageSizeDim;
G4double secondStageSizeThickness;
G4bool usingWaterPhantom;
G4double detectorPositionDepth;
// Methods called by Construct() depending on the chosen setup
void ConstructWorldWithWaterPhantom();
void ConstructVacuumWorld();
void ConstructDiamondDetector();
void ConstructMicroDiamondDetector();
void ConstructSiliconDetector();
void ConstructSiliconBridgeDetector();
void ConstructDiamondTelescope();
// store these variable across various Construct*() above
G4VPhysicalVolume* physical_world;
G4LogicalVolume* logical_motherVolumeForDetector;
G4Material* materialOfMotherVolume;
G4NistManager* nistMan;
};
#endif
@@ -0,0 +1,101 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Authors: Susanna Guatelli and Francesco Romano
// susanna@uow.edu.au, francesco.romano@ct.infn.it
//
// Adapted from Hadrontherapy example
// by Jacopo Magini: j.magini@surrey.ac.uk
#ifndef DetectorMessenger_h
#define DetectorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
#include "G4String.hh"
#include "AnalysisManager.hh"
class G4UIdirectory;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithAString;
class G4UIcmdWithoutParameter;
class G4UIcmdWithABool;
class DetectorMessenger: public G4UImessenger
{
public:
DetectorMessenger(AnalysisManager* analysis);
~DetectorMessenger();
void SetNewValue(G4UIcommand*, G4String);
// functions to read parameters
G4String GetDetectorType() { return detectorType; }
G4double GetDetectorSizeWidth() { return detectorWidth; }
G4double GetDetectorSizeThickness() { return detectorThickness; }
G4double GetSecondStageSizeWidth() { return secondStageWidth; }
G4double GetSecondStageSizeThickness() { return secondStageThickness; }
G4bool IsPhantomEnabled() { return phantomEnabled; }
G4double GetDetectorPositionDepth() { return detectorDepth; }
G4bool AreTherePendingChanges() { return geometryHasChanged; }
private:
G4UIdirectory* changeTheGeometryDir; // UI directory for the geometry control
// subdirectories
G4UIdirectory* changeDetectorDimensionDir;
G4UIdirectory* changeDetectorPositionDir;
G4UIdirectory* changeSecondStageDimensionDir;
// commands
G4UIcmdWithAString* changeTheDetectorCmd;
G4UIcmdWithADoubleAndUnit* changeDetectorSizeWidthCmd;
G4UIcmdWithADoubleAndUnit* changeDetectorSizeThicknessCmd;
G4UIcmdWithADoubleAndUnit* changeSecondStageSizeWidthCmd;
G4UIcmdWithADoubleAndUnit* changeSecondStageSizeThicknessCmd;
G4UIcmdWithABool* enableWaterPhantomCmd;
G4UIcmdWithADoubleAndUnit* changeDetectorPositionDepthCmd;
G4UIcmdWithoutParameter *applyChangesToGeometryCmd; // applies changes to detector
// parameters to store
G4String detectorType;
G4double detectorWidth;
G4double detectorThickness;
G4double secondStageWidth;
G4double secondStageThickness;
G4bool phantomEnabled;
G4double detectorDepth;
G4bool geometryHasChanged;
AnalysisManager* analysis;
};
#endif
@@ -0,0 +1,84 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Authors: Susanna Guatelli and Francesco Romano
// susanna@uow.edu.au, francesco.romano@ct.infn.it
//
// Code based on the hadrontherapy advanced example
#ifndef PhysicsList_h
#define PhysicsList_h 1
#include "G4VModularPhysicsList.hh"
#include "G4EmConfigurator.hh"
#include "globals.hh"
class G4VPhysicsConstructor;
class HadrontherapyStepMax;
class PhysicsListMessenger;
class PhysicsList: public G4VModularPhysicsList
{
public:
PhysicsList();
virtual ~PhysicsList();
void ConstructParticle();
void SetCutForGamma(G4double);
void SetCutForElectron(G4double);
void SetCutForPositron(G4double);
void AddPhysicsList(const G4String& name);
void ConstructProcess();
void AddStepMax();// At the moment this is not used
void AddPackage(const G4String& name);
private:
G4EmConfigurator em_config;
G4double cutForGamma;
G4double cutForElectron;
G4double cutForPositron;
G4bool helIsRegisted;
G4bool bicIsRegisted;
G4bool biciIsRegisted;
G4bool locIonIonInelasticIsRegistered;
G4bool radioactiveDecayIsRegisted;
G4String emName;
G4VPhysicsConstructor* emPhysicsList;
G4VPhysicsConstructor* decPhysicsList;
std::vector<G4VPhysicsConstructor*> hadronPhys;
PhysicsListMessenger* pMessenger;
};
#endif
@@ -0,0 +1,70 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Authors: Susanna Guatelli and Francesco Romano
// susanna@uow.edu.au, francesco.romano@ct.infn.it
//
// Code based on the hadrontherapy advanced example
#ifndef PhysicsListMessenger_h
#define PhysicsListMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class PhysicsList;
class G4UIdirectory;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithAString;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class PhysicsListMessenger: public G4UImessenger
{
public:
PhysicsListMessenger(PhysicsList* );
~PhysicsListMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
PhysicsList* pPhysicsList;
G4UIdirectory* physDir;
G4UIcmdWithADoubleAndUnit* gammaCutCmd;
G4UIcmdWithADoubleAndUnit* electCutCmd;
G4UIcmdWithADoubleAndUnit* protoCutCmd;
G4UIcmdWithADoubleAndUnit* allCutCmd;
G4UIcmdWithAString* pListCmd;
G4UIcmdWithAString* packageListCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -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. *
// ********************************************************************
//
// Authors: Susanna Guatelli and Francesco Romano
// susanna@uow.edu.au, francesco.romano@ct.infn.it
#ifndef PrimaryGeneratorAction_hh
#define PrimaryGeneratorAction_hh 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
#include "AnalysisManager.hh"
class G4GeneralParticleSource;
class G4Event;
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
PrimaryGeneratorAction(AnalysisManager*);
~PrimaryGeneratorAction();
void GeneratePrimaries(G4Event* anEvent);
private:
G4GeneralParticleSource* gun;
AnalysisManager* analysis;
};
#endif
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Authors: Susanna Guatelli and Francesco Romano
// susanna@uow.edu.au, francesco.romano@ct.infn.it
//
#ifndef RunAction_h
#define RunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
#include "AnalysisManager.hh"
#include "DetectorMessenger.hh"
#include <map>
class RunAction : public G4UserRunAction
{
public:
#ifdef ANALYSIS_USE
RunAction(AnalysisManager* analysis, DetectorMessenger* detector);
#else
RunAction(DetectorMessenger* detector);
#endif
~RunAction();
public:
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run*);
private:
#ifdef ANALYSIS_USE
AnalysisManager* analysisMan;
#endif
DetectorMessenger* detectorMess;
};
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Authors: Susanna Guatelli and Francesco Romano
// susanna@uow.edu.au, francesco.romano@ct.infn.it
//
// Code based on basic example B2
#ifndef SensitiveDetector_h
#define SensitiveDetector_h 1
#include "G4VSensitiveDetector.hh"
#include "SensitiveDetectorHit.hh"
#include "AnalysisManager.hh"
#include <vector>
class G4Step;
class G4HCofThisEvent;
class SensitiveDetector : public G4VSensitiveDetector
{
public:
SensitiveDetector(const G4String& name,
const G4String& hitsCollectionName,
G4bool isThisAMicrodosimeter,
AnalysisManager*);
virtual ~SensitiveDetector();
// methods from base class
virtual void Initialize(G4HCofThisEvent* hitCollection);
virtual G4bool ProcessHits(G4Step* step, G4TouchableHistory* history);
virtual void EndOfEvent(G4HCofThisEvent* hitCollection);
private:
SensitiveDetectorHitsCollection* fHitsCollection;
AnalysisManager* analysis;
G4bool isMicrod;
};
#endif
@@ -0,0 +1,87 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Authors: Susanna Guatelli and Francesco Romano
// susanna@uow.edu.au, francesco.romano@ct.infn.it
//
// Code based on the basic example B02
#ifndef SensitiveDetectorHit_h
#define SensitiveDetectorHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
#include "G4ThreeVector.hh"
#include "tls.hh" // FOR MT
class SensitiveDetectorHit : public G4VHit
{
public:
SensitiveDetectorHit();
SensitiveDetectorHit(const SensitiveDetectorHit&);
virtual ~SensitiveDetectorHit();
// operators
const SensitiveDetectorHit& operator=(const SensitiveDetectorHit&);
G4bool operator==(const SensitiveDetectorHit&) const;
inline void* operator new(size_t);
inline void operator delete(void*);
// methods from base class
virtual void Draw();
virtual void Print();
// Set methods
void SetEdep (G4double de) { fEdep = de; };
G4double GetEdep() const { return fEdep; };
void SetPath(G4double len) { fPath = len; };
G4double GetPath() const { return fPath; };
private:
G4double fEdep;
G4double fPath;
};
typedef G4THitsCollection<SensitiveDetectorHit> SensitiveDetectorHitsCollection;
extern G4ThreadLocal G4Allocator<SensitiveDetectorHit>* SensitiveDetectorHitAllocator;
inline void* SensitiveDetectorHit::operator new(size_t)
{
if(!SensitiveDetectorHitAllocator)
SensitiveDetectorHitAllocator = new G4Allocator<SensitiveDetectorHit>;
return (void *) SensitiveDetectorHitAllocator->MallocSingle();
}
inline void SensitiveDetectorHit::operator delete(void *hit)
{
SensitiveDetectorHitAllocator->FreeSingle((SensitiveDetectorHit*) hit);
}
#endif
@@ -0,0 +1,54 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Authors: Susanna Guatelli and Francesco Romano
// susanna@uow.edu.au, francesco.romano@ct.infn.it
//
#ifndef SteppingAction_h
#define SteppingAction_h 1
#include "G4UserSteppingAction.hh"
#include "AnalysisManager.hh"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4ios.hh"
#include "globals.hh"
class G4Step;
class SteppingAction: public G4UserSteppingAction
{
public:
SteppingAction(AnalysisManager* analysis);
~SteppingAction();
void UserSteppingAction(const G4Step* aStep);
private:
AnalysisManager* analysis;
G4TrackVector* fSecondary;
};
#endif