Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
@@ -46,8 +46,9 @@
#include "CCalSensitiveConfiguration.hh"
#include "CCalEcalOrganization.hh"
#include "CCalHcalOrganization.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4SDManager.hh"
#include "G4FieldManager.hh"
#include "G4ChordFinder.hh"
#include "G4Mag_UsualEqRhs.hh"
@@ -155,22 +156,22 @@ G4VPhysicalVolume* CCalDetectorConstruction::Construct() {
G4VPhysicalVolume* volume = testBeamHCal96->PhysicalVolume(0);
//Addsenistive detector types
G4bool result;
//G4bool result;
G4int sensitive;
sensitive = CCalSensitiveConfiguration::getInstance()->
getSensitiveFlag("HadronCalorimeter");
if (sensitive>0) result = CCalSensAssign::getInstance()->
if (sensitive>0) /*result =*/ CCalSensAssign::getInstance()->
addCaloSD("HadronCalorimeter", new CCalHcalOrganization);
sensitive = CCalSensitiveConfiguration::getInstance()->
getSensitiveFlag("CrystalMatrixModule");
if (sensitive>0) result = CCalSensAssign::getInstance()->
if (sensitive>0) /*result =*/ CCalSensAssign::getInstance()->
addCaloSD("CrystalMatrix", new CCalEcalOrganization);
//Assign the sensitive detectors
result = CCalSensAssign::getInstance()->assign();
/*result =*/ CCalSensAssign::getInstance()->assign();
//Create the stacking manager required by Calorimeter
result = CCalSensAssign::getInstance()->stackingAction();
/*result =*/ CCalSensAssign::getInstance()->stackingAction();
return volume;
@@ -37,6 +37,7 @@
#include "CCalSteppingAction.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4Event.hh"
#include "G4SDManager.hh"
#include "G4HCofThisEvent.hh"
@@ -29,6 +29,8 @@
// electromagnetic calorimeter
///////////////////////////////////////////////////////////////////////////////
#include <cmath>
#include "CCalG4Ecal.hh"
#include "CCalMaterialFactory.hh"
@@ -36,8 +38,8 @@
#include "CCalSensitiveDetectors.hh"
#include "CCalutils.hh"
#include <cmath>
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4Box.hh"
#include "G4Trd.hh"
@@ -37,6 +37,7 @@
#include "CCalutils.hh"
#include "G4SystemOfUnits.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
@@ -28,6 +28,8 @@
// Description: CCalG4Hcal Factory class to construct the G4 geometry of the
// hadron calorimeter
///////////////////////////////////////////////////////////////////////////////
#include <cmath>
#include "CCalG4Hcal.hh"
#include "CCalMaterialFactory.hh"
@@ -35,8 +37,8 @@
#include "CCalSensitiveDetectors.hh"
#include "CCalutils.hh"
#include <cmath>
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4Box.hh"
@@ -76,8 +76,8 @@ void CCalHit::setUnitID (unsigned int i) { theUnitID = i; }
double CCalHit::getTimeSlice() const {return theTimeSlice; }
void CCalHit::setTimeSlice (double d) { theTimeSlice = d; }
int CCalHit::getTimeSliceID() const {return (int)theTimeSlice;}
int CCalHit::getTimeSliceID() const { if ( theTimeSlice > 1.0E9 ) return 999999999;
return (int)theTimeSlice;}
void CCalHit::setEnergyDeposit(const double e) {
theEnergyDeposit = e;
@@ -27,10 +27,12 @@
// File: CCalMagneticField.cc
// Description: User Field class implementation.
///////////////////////////////////////////////////////////////////////////////
#include <fstream>
#include "CCalMagneticField.hh"
#include "CCalutils.hh"
#include "G4SystemOfUnits.hh"
#include "G4FieldManager.hh"
#include <fstream>
//#define ddebug
//#define debug
@@ -28,11 +28,14 @@
// Description: CCalMaterialFactory is a factory class to vuild G4Material
// from CCalMaterial and CCalAmaterial
///////////////////////////////////////////////////////////////////////////////
#include "CCalMaterialFactory.hh"
#include "CCalutils.hh"
#include <fstream>
#include <stdlib.h>
#include "CCalMaterialFactory.hh"
#include "CCalutils.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4Material.hh"
//#define ddebug
@@ -28,15 +28,18 @@
// Description: CCalPrimaryGeneratorAction Sets up particle beam
///////////////////////////////////////////////////////////////////////////////
#include <CLHEP/Random/RandFlat.h>
#include "CCalPrimaryGeneratorAction.hh"
#include "CCalPrimaryGeneratorMessenger.hh"
#include "G4HEPEvtInterface.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "CLHEP/Random/RandFlat.h"
#include "G4HEPEvtInterface.hh"
#include "G4RunManager.hh"
@@ -31,13 +31,14 @@
#include "CCalPrimaryGeneratorMessenger.hh"
#include "CCalPrimaryGeneratorAction.hh"
#include "globals.hh"
#include "G4PhysicalConstants.hh"
#include "G4UImanager.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithADouble.hh"
#include "G4UIcmdWithABool.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "globals.hh"
CCalPrimaryGeneratorMessenger::CCalPrimaryGeneratorMessenger(CCalPrimaryGeneratorAction* myGun) : myAction(myGun) {
@@ -28,12 +28,14 @@
// Description: CCalRotationFactory is a factory class to define all rotation
// matrices used in geometry building
///////////////////////////////////////////////////////////////////////////////
#include <fstream>
#include <stdlib.h>
#include "CCalRotationMatrixFactory.hh"
#include "CCalutils.hh"
#include <fstream>
#include <stdlib.h>
#include "G4SystemOfUnits.hh"
//#define debug
//#define ddebug
@@ -30,6 +30,7 @@
#include "CCalStackingAction.hh"
#include "G4StackManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4SDManager.hh"
#include "CCaloSD.hh"
#include "CCalSDList.hh"
@@ -27,13 +27,15 @@
// File: CCalSeppingAction.cc
// Description: Study profiling during the steps
///////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <cmath>
#include "CCalSteppingAction.hh"
#include "G4SystemOfUnits.hh"
#include "G4SDManager.hh"
#include "G4StepPoint.hh"
#include <iostream>
#include "G4ThreeVector.hh"
#include <cmath>
#ifdef G4ANALYSIS_USE
#include "CCalAnalysis.hh"
@@ -67,7 +69,8 @@ void CCalSteppingAction::UserSteppingAction(const G4Step* aStep){
G4StepPoint* PreStepPoint= aStep->GetPreStepPoint();
int TSliceID;
TSliceID = static_cast<int>( (PostStepPoint->GetGlobalTime() ) / nanosecond);
if ( PostStepPoint->GetGlobalTime() / nanosecond > 1.0E9 ) TSliceID = 999999999;
else TSliceID = static_cast<int>( PostStepPoint->GetGlobalTime() / nanosecond );
TSliceID = TSliceID<timeHistoMaxBin ? TSliceID : timeHistoMaxBin-1;
timeDeposit[TSliceID] += aStep->GetTotalEnergyDeposit() / GeV;
@@ -93,5 +96,7 @@ void CCalSteppingAction::endOfEvent(){
int i=0;
for (i=0; i<70; i++){LateralProfile[i] = 0.;}
for (i=0; i<200; i++){timeDeposit[i] = 0.;}
G4cout << " --- End of event --- " << G4endl;
}
@@ -29,6 +29,7 @@
///////////////////////////////////////////////////////////////////////////////
#include "CCaloSD.hh"
#include "G4SystemOfUnits.hh"
#include "G4VProcess.hh"
#include "G4SDManager.hh"
#include "G4VTouchable.hh"
@@ -122,8 +123,11 @@ void CCaloSD::getStepInfo(G4Step* aStep) {
EdepositEHAD = weight*(aStep->GetTotalEnergyDeposit());
}
TSlice = (PostStepPoint->GetGlobalTime() )/nanosecond;
TSliceID = (int) TSlice;
TSlice = PostStepPoint->GetGlobalTime() / nanosecond;
if ( TSlice > 1.0E9 ) TSliceID = 999999999;
else TSliceID = (int) TSlice;
if (theDescription!=0)
UnitID = theDescription->GetUnitID(aStep);
else