Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B4Analysis.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B4Analysis.hh
|
||||
/// \brief Selection of the analysis technology
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B4PrimaryGeneratorAction.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B4PrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the B4PrimaryGeneratorAction class
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B4RunAction.hh 74265 2013-10-02 14:41:20Z gcosmo $
|
||||
//
|
||||
/// \file B4RunAction.hh
|
||||
/// \brief Definition of the B4RunAction class
|
||||
|
||||
@@ -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: B4cActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B4cActionInitialization.hh
|
||||
/// \brief Definition of the B4cActionInitialization class
|
||||
|
||||
#ifndef B4cActionInitialization_h
|
||||
#define B4cActionInitialization_h 1
|
||||
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
|
||||
/// Action initialization class.
|
||||
///
|
||||
|
||||
class B4cActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
B4cActionInitialization();
|
||||
virtual ~B4cActionInitialization();
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B4cCalorHit.hh 69223 2013-04-23 12:36:10Z gcosmo $
|
||||
//
|
||||
/// \file B4cCalorHit.hh
|
||||
/// \brief Definition of the B4cCalorHit class
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "tls.hh"
|
||||
|
||||
/// Calorimeter hit class
|
||||
///
|
||||
@@ -76,20 +77,24 @@ class B4cCalorHit : public G4VHit
|
||||
|
||||
typedef G4THitsCollection<B4cCalorHit> B4cCalorHitsCollection;
|
||||
|
||||
extern G4Allocator<B4cCalorHit> B4cCalorHitAllocator;
|
||||
extern G4ThreadLocal G4Allocator<B4cCalorHit>* B4cCalorHitAllocator;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void* B4cCalorHit::operator new(size_t)
|
||||
{
|
||||
if(!B4cCalorHitAllocator)
|
||||
B4cCalorHitAllocator = new G4Allocator<B4cCalorHit>;
|
||||
void *hit;
|
||||
hit = (void *) B4cCalorHitAllocator.MallocSingle();
|
||||
hit = (void *) B4cCalorHitAllocator->MallocSingle();
|
||||
return hit;
|
||||
}
|
||||
|
||||
inline void B4cCalorHit::operator delete(void *hit)
|
||||
{
|
||||
B4cCalorHitAllocator.FreeSingle((B4cCalorHit*) hit);
|
||||
if(!B4cCalorHitAllocator)
|
||||
B4cCalorHitAllocator = new G4Allocator<B4cCalorHit>;
|
||||
B4cCalorHitAllocator->FreeSingle((B4cCalorHit*) hit);
|
||||
}
|
||||
|
||||
inline void B4cCalorHit::Add(G4double de, G4double dl) {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B4cCalorimeterSD.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B4cCalorimeterSD.hh
|
||||
/// \brief Definition of the B4cCalorimeterSD class
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B4cDetectorConstruction.hh 75215 2013-10-29 16:07:06Z gcosmo $
|
||||
//
|
||||
/// \file B4cDetectorConstruction.hh
|
||||
/// \brief Definition of the B4cDetectorConstruction class
|
||||
@@ -34,10 +34,8 @@
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Box;
|
||||
class G4VPhysicalVolume;
|
||||
class G4UniformMagField;
|
||||
class G4GenericMessenger;
|
||||
class G4GlobalMagFieldMessenger;
|
||||
|
||||
/// Detector construction class to define materials and geometry.
|
||||
/// The calorimeter is a box made of a given number of layers. A layer consists
|
||||
@@ -50,13 +48,10 @@ class G4GenericMessenger;
|
||||
/// - the number of layers,
|
||||
/// - the transverse size of the calorimeter (the input face is a square).
|
||||
///
|
||||
/// In DefineVolumes(), sensitive detectors of B4cCalorimeterSD type
|
||||
/// In ConstructSDandField() sensitive detectors of B4cCalorimeterSD type
|
||||
/// are created and associated with the Absorber and Gap volumes.
|
||||
///
|
||||
/// In addition a transverse uniform magnetic field is defined in
|
||||
/// SetMagField() method which can be activated
|
||||
/// via a command defined using G4GenericMessenger class:
|
||||
/// - /B4/det/setMagField value unit
|
||||
/// In addition a transverse uniform magnetic field is defined
|
||||
/// via G4GlobalMagFieldMessenger class.
|
||||
|
||||
class B4cDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
@@ -66,10 +61,7 @@ class B4cDetectorConstruction : public G4VUserDetectorConstruction
|
||||
|
||||
public:
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
|
||||
// set methods
|
||||
//
|
||||
void SetMagField(G4double fieldValue);
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
private:
|
||||
// methods
|
||||
@@ -79,10 +71,11 @@ class B4cDetectorConstruction : public G4VUserDetectorConstruction
|
||||
|
||||
// data members
|
||||
//
|
||||
G4GenericMessenger* fMessenger; // messenger
|
||||
G4UniformMagField* fMagField; // magnetic field
|
||||
static G4ThreadLocal G4GlobalMagFieldMessenger* fMagFieldMessenger;
|
||||
// magnetic field messenger
|
||||
|
||||
G4bool fCheckOverlaps; // option to activate checking of volumes overlaps
|
||||
G4int fNofLayers; // number of layers
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B4cEventAction.hh 75215 2013-10-29 16:07:06Z gcosmo $
|
||||
//
|
||||
/// \file B4cEventAction.hh
|
||||
/// \brief Definition of the B4cEventAction class
|
||||
@@ -37,18 +37,11 @@
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
class G4GenericMessenger;
|
||||
|
||||
/// Event action class
|
||||
///
|
||||
/// In EndOfEventAction(), it prints the accumulated quantities of the energy
|
||||
/// deposit and track lengths of charged particles in Absober and Gap layers
|
||||
/// stored in the hits collections.
|
||||
///
|
||||
/// The data member fPrintModulo defines the frequency of printing
|
||||
/// the accumulated quantities. Its value can be changed via a command
|
||||
/// defined using G4GenericMessenger class:
|
||||
/// - /B4/event/setPrintModulo value
|
||||
|
||||
class B4cEventAction : public G4UserEventAction
|
||||
{
|
||||
@@ -58,27 +51,18 @@ public:
|
||||
|
||||
virtual void BeginOfEventAction(const G4Event* event);
|
||||
virtual void EndOfEventAction(const G4Event* event);
|
||||
|
||||
// set methods
|
||||
void SetPrintModulo(G4int value);
|
||||
|
||||
private:
|
||||
// methods
|
||||
B4cCalorHitsCollection* GetHitsCollection(const G4String& hcName,
|
||||
B4cCalorHitsCollection* GetHitsCollection(G4int hcID,
|
||||
const G4Event* event) const;
|
||||
void PrintEventStatistics(G4double absoEdep, G4double absoTrackLength,
|
||||
G4double gapEdep, G4double gapTrackLength) const;
|
||||
|
||||
// data members
|
||||
G4GenericMessenger* fMessenger;
|
||||
G4int fPrintModulo;
|
||||
G4int fAbsHCID;
|
||||
G4int fGapHCID;
|
||||
};
|
||||
|
||||
// inline functions
|
||||
|
||||
inline void B4cEventAction::SetPrintModulo(G4int value) {
|
||||
fPrintModulo = value;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
Reference in New Issue
Block a user