Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
@@ -0,0 +1,90 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
/// \file ExGflash1DetectorConstruction.hh
/// \brief Definition of the ExGflash1DetectorConstruction class
//
#ifndef ExGflash1DetectorConstruction_h
#define ExGflash1DetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
class G4LogicalVolume;
class G4VPhysicalVolume;
class G4Region;
class GFlashHomoShowerParameterisation;
class GFlashShowerModel;
class GFlashHitMaker;
class GFlashParticleBounds;
class ExGflash1DetectorConstruction : public G4VUserDetectorConstruction
{
public:
ExGflash1DetectorConstruction();
~ExGflash1DetectorConstruction();
virtual G4VPhysicalVolume* Construct();
virtual void ConstructSDandField();
const G4VPhysicalVolume* GetCristal(int aNumCrystal)
{return fCrystalPhys[aNumCrystal];};
private:
G4LogicalVolume* fCrystalLog;
G4VPhysicalVolume* fCrystalPhys[100];
G4Region* fRegion;
static G4ThreadLocal GFlashShowerModel* fFastShowerModel;
static G4ThreadLocal GFlashHomoShowerParameterisation* fParameterisation;
static G4ThreadLocal GFlashParticleBounds* fParticleBounds;
static G4ThreadLocal GFlashHitMaker* fHitMaker;
};
#endif
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
/// \file ExGflash1SensitiveDetector.hh
/// \brief Definition of the ExGflash1SensitiveDetector class
//
#ifndef EXGFLASH1SENSITIVEDETECTOR_H
#define EXGFLASH1SENSITIVEDETECTOR_H
#include "G4VSensitiveDetector.hh"
#include "G4VGFlashSensitiveDetector.hh"
#include "ExGflashHitsCollection.hh"
#include "globals.hh"
class G4GFlashSpot;
class ExGflash1DetectorConstruction;
class G4Step;
class G4HCofThisEvent;
class G4TouchableHistory;
class ExGflash1SensitiveDetector: public G4VSensitiveDetector,
public G4VGFlashSensitiveDetector {
public:
ExGflash1SensitiveDetector(G4String, ExGflash1DetectorConstruction* det);
~ExGflash1SensitiveDetector();
virtual void Initialize(G4HCofThisEvent*);
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
virtual G4bool ProcessHits(G4GFlashSpot*aSpot,G4TouchableHistory*);
virtual void EndOfEvent(G4HCofThisEvent*);
private:
ExGflashHitsCollection* fCaloHitsCollection;
ExGflash1DetectorConstruction* fDetector;
G4int fHCID;
};
#endif
@@ -0,0 +1,50 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
/// \file ExGflashActionInitialization.hh
/// \brief Definition of the ExGflashActionInitialization class
#ifndef ExGflashActionInitialization_h
#define ExGflashActionInitialization_h 1
#include "G4VUserActionInitialization.hh"
/// Action initialization class.
///
class ExGflashActionInitialization : public G4VUserActionInitialization
{
public:
ExGflashActionInitialization();
virtual ~ExGflashActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
};
#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. *
// ********************************************************************
//
//
/// \file ExGflashEventAction.hh
/// \brief Definition of the ExGflashEventAction class
//
#ifndef ExGflashEventAction_h
#define ExGflashEventAction_h
#include "G4UserEventAction.hh"
#include "G4Timer.hh"
#include "globals.hh"
class ExGflashEventAction: public G4UserEventAction {
public:
ExGflashEventAction();
~ExGflashEventAction();
virtual void BeginOfEventAction(const G4Event*);
virtual void EndOfEventAction(const G4Event*);
private:
G4int fNevent;
G4double fDtime;
G4int fCalorimeterCollectionId;
G4Timer fTimerIntern;
};
#endif
@@ -0,0 +1,118 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
/// \file ExGflashHit.hh
/// \brief Definition of the ExGflashHit class
//
#ifndef ExGflashHit_h
#define ExGflashHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
#include "G4ThreeVector.hh"
#include "G4RotationMatrix.hh"
class G4LogicalVolume;
class ExGflashHit : public G4VHit
{
public:
ExGflashHit();
ExGflashHit(G4LogicalVolume* logVol);
~ExGflashHit();
ExGflashHit(const ExGflashHit &right);
const ExGflashHit& operator=(const ExGflashHit &right);
G4bool operator==(const ExGflashHit &right) const;
inline void *operator new(size_t);
inline void operator delete(void *aHit);
void *operator new(size_t,void*p){return p;}
#ifndef G4NOT_ISO_DELETES
void operator delete(void *,void*){}
#endif
virtual void Draw();
virtual void Print();
private:
G4double fEdep;
G4ThreeVector fPos;
G4int fCrystalNumber;
G4ThreeVector fStart;
G4RotationMatrix fRot;
const G4LogicalVolume* fLogV;
public:
inline void SetEdep(G4double de)
{ fEdep = de; };
inline void AddEdep(G4double de)
{ fEdep += de; };
inline G4double GetEdep()
{ return fEdep; };
inline void SetPos(G4ThreeVector xyz)
{ fPos = xyz; };
inline G4int GetCrystalNum()
{ return fCrystalNumber; };
inline void SetCrystalNum(G4int num)
{ fCrystalNumber=num; };
inline G4ThreeVector GetPos()
{ return fPos; };
inline void SetStart(G4ThreeVector xyz)
{ fStart = xyz; };
inline G4ThreeVector GetStart()
{ return fStart; };
inline void SetRot(G4RotationMatrix rmat)
{ fRot = rmat; };
inline G4RotationMatrix GetRot()
{ return fRot; };
inline const G4LogicalVolume * GetLogV()
{ return fLogV; };
};
typedef G4THitsCollection<ExGflashHit> ExGflashHitsCollection;
extern G4ThreadLocal G4Allocator<ExGflashHit>* ExGflashHitAllocator;
inline void* ExGflashHit::operator new(size_t)
{
if(!ExGflashHitAllocator) ExGflashHitAllocator = new G4Allocator<ExGflashHit>;
return (void *) ExGflashHitAllocator->MallocSingle();
}
inline void ExGflashHit::operator delete(void *aHit)
{
ExGflashHitAllocator->FreeSingle((ExGflashHit*) aHit);
}
#endif
@@ -0,0 +1,35 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
/// \file ExGflashHitsCollection.hh
/// \brief Definition of the ExGflashHitsCollection class
//
#ifndef ExGflashHitsCollection_h
#define ExGflashHitsCollection_h
#include "G4THitsCollection.hh"
class ExGflashHit;
typedef G4THitsCollection<ExGflashHit> ExGflashHitsCollection;
#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. *
// ********************************************************************
//
//
/// \file ExGflashPrimaryGeneratorAction.hh
/// \brief Definition of the ExGflashPrimaryGeneratorAction class
//
#ifndef ExGflashPrimaryGeneratorAction_h
#define ExGflashPrimaryGeneratorAction_h
#include "G4VUserPrimaryGeneratorAction.hh"
class G4Event;
class G4GeneralParticleSource;
class ExGflashPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
ExGflashPrimaryGeneratorAction();
~ExGflashPrimaryGeneratorAction();
virtual void GeneratePrimaries(G4Event* anEvent);
private:
G4GeneralParticleSource* fParticleGun;
};
#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. *
// ********************************************************************
//
//
/// \file ExGflashRunAction.hh
/// \brief Definition of the ExGflashRunAction class
//
#ifndef ExGflashRunAction_h
#define ExGflashRunAction_h
#include "G4UserRunAction.hh"
#include "globals.hh"
class G4Run;
class ExGflashRunAction : public G4UserRunAction
{
public:
ExGflashRunAction();
~ExGflashRunAction();
virtual void BeginOfRunAction(const G4Run* aRun);
virtual void EndOfRunAction(const G4Run* aRun);
private:
G4int fRunID;
};
#endif