Import Geant4 10.3.0.beta source tree
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
#include "G4RegionStore.hh"
|
||||
#include "G4GDMLParser.hh"
|
||||
#include "G4AutoDelete.hh"
|
||||
#include "G4GlobalMagFieldMessenger.hh"
|
||||
#include "G4AutoDelete.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -63,12 +65,15 @@ G4VPhysicalVolume* Par02DetectorConstruction::Construct() {
|
||||
if ( ( myvol->GetName() ).find( "Tracker" ) != std::string::npos ) {
|
||||
fTrackerList.push_back( new G4Region( myvol->GetName() ) );
|
||||
fTrackerList.back()->AddRootLogicalVolume( myvol );
|
||||
G4cout << G4endl << "tracker !!!" << G4endl;
|
||||
} else if ( ( myvol->GetName() ).find( "HCal" ) != std::string::npos ) {
|
||||
fHCalList.push_back( new G4Region( myvol->GetName() ) );
|
||||
fHCalList.back()->AddRootLogicalVolume( myvol );
|
||||
G4cout << G4endl << "hcal !!!" << G4endl;
|
||||
} else if ( ( myvol->GetName() ).find( "ECal" ) != std::string::npos ) {
|
||||
fECalList.push_back( new G4Region( myvol->GetName() ) );
|
||||
fECalList.back()->AddRootLogicalVolume( myvol );
|
||||
G4cout << G4endl << "ecal !!!" << G4endl;
|
||||
} else if ( ( myvol->GetName() ).find( "Muon" ) != std::string::npos ) {
|
||||
fMuonList.push_back( new G4Region( myvol->GetName() ) );
|
||||
fMuonList.back()->AddRootLogicalVolume( myvol );
|
||||
@@ -117,7 +122,7 @@ void Par02DetectorConstruction::ConstructSDandField() {
|
||||
// to all the corresponding Geant4 regions
|
||||
Par02FastSimModelTracker* fastSimModelTracker
|
||||
= new Par02FastSimModelTracker( "fastSimModelTracker", fTrackerList[ iterTracker ],
|
||||
Par02DetectorParametrisation::eCMS );
|
||||
Par02DetectorParametrisation::eCMS );
|
||||
|
||||
// Register the fast simulation model for deleting
|
||||
G4AutoDelete::Register(fastSimModelTracker);
|
||||
@@ -127,7 +132,7 @@ void Par02DetectorConstruction::ConstructSDandField() {
|
||||
// to all the corresponding Geant4 regions
|
||||
Par02FastSimModelEMCal* fastSimModelEMCal
|
||||
= new Par02FastSimModelEMCal( "fastSimModelEMCal", fECalList[ iterECal ],
|
||||
Par02DetectorParametrisation::eCMS );
|
||||
Par02DetectorParametrisation::eCMS );
|
||||
|
||||
// Register the fast simulation model for deleting
|
||||
G4AutoDelete::Register(fastSimModelEMCal);
|
||||
@@ -137,15 +142,20 @@ void Par02DetectorConstruction::ConstructSDandField() {
|
||||
// to all the corresponding Geant4 regions
|
||||
Par02FastSimModelHCal* fastSimModelHCal
|
||||
= new Par02FastSimModelHCal( "fastSimModelHCal", fHCalList[ iterHCal ],
|
||||
Par02DetectorParametrisation::eCMS );
|
||||
Par02DetectorParametrisation::eCMS );
|
||||
|
||||
// Register the fast simulation model for deleting
|
||||
G4AutoDelete::Register(fastSimModelHCal);
|
||||
G4AutoDelete::Register( fastSimModelHCal );
|
||||
}
|
||||
// Currently we don't have a fast muon simulation model to be bound
|
||||
// to all the corresponding Geant4 regions.
|
||||
// But it could be added in future, in a similar way as done above for
|
||||
// the tracker subdetector and the electromagnetic and hadronic calorimeters.
|
||||
|
||||
// Add global magnetic field
|
||||
G4ThreeVector fieldValue = G4ThreeVector();
|
||||
fMagFieldMessenger = new G4GlobalMagFieldMessenger( fieldValue );
|
||||
fMagFieldMessenger->SetVerboseLevel(1);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -91,22 +91,16 @@ G4bool Par02FastSimModelTracker::ModelTrigger( const G4FastTrack& /*aFastTrack*/
|
||||
|
||||
void Par02FastSimModelTracker::DoIt( const G4FastTrack& aFastTrack,
|
||||
G4FastStep& aFastStep ) {
|
||||
//G4cout << " ________Tracker model triggered _________" << G4endl;
|
||||
|
||||
G4cout << " ________Tracker model triggered _________" << G4endl;
|
||||
|
||||
// Calculate the final position (at the outer boundary of the tracking detector)
|
||||
// of the particle with the momentum at the entrance of the tracking detector.
|
||||
G4ThreeVector spin = aFastTrack.GetPrimaryTrack()->GetPolarization() ;
|
||||
G4FieldTrack theFieldTrack =
|
||||
G4FieldTrack( aFastTrack.GetPrimaryTrack()->GetPosition(),
|
||||
aFastTrack.GetPrimaryTrack()->GetMomentumDirection(),
|
||||
0.0,
|
||||
aFastTrack.GetPrimaryTrack()->GetKineticEnergy(),
|
||||
aFastTrack.GetPrimaryTrack()->GetDynamicParticle()->
|
||||
GetDefinition()->GetPDGMass(),
|
||||
0.0, // UNUSED: aFastTrack.GetPrimaryTrack().GetVelocity(),
|
||||
aFastTrack.GetPrimaryTrack()->GetGlobalTime(), // Lab.
|
||||
aFastTrack.GetPrimaryTrack()->GetProperTime(), // Part.
|
||||
&spin );
|
||||
|
||||
G4Track track = * aFastTrack.GetPrimaryTrack();
|
||||
G4FieldTrack aFieldTrack( '0' );
|
||||
G4FieldTrackUpdator::Update( &aFieldTrack, &track );
|
||||
|
||||
G4double retSafety = -1.0;
|
||||
ELimited retStepLimited;
|
||||
G4FieldTrack endTrack( 'a' );
|
||||
@@ -114,14 +108,15 @@ void Par02FastSimModelTracker::DoIt( const G4FastTrack& aFastTrack,
|
||||
// to particle momentum.
|
||||
G4PathFinder* fPathFinder = G4PathFinder::GetInstance();
|
||||
/*G4double lengthAlongCurve = */
|
||||
fPathFinder->ComputeStep( theFieldTrack,
|
||||
fPathFinder->ComputeStep( aFieldTrack,
|
||||
currentMinimumStep,
|
||||
0,
|
||||
aFastTrack.GetPrimaryTrack()->GetCurrentStepNumber(),
|
||||
retSafety,
|
||||
retStepLimited,
|
||||
endTrack,
|
||||
aFastTrack.GetPrimaryTrack()->GetVolume() ) ;
|
||||
aFastTrack.GetPrimaryTrack()->GetVolume() );
|
||||
|
||||
// Place the particle at the tracking detector exit
|
||||
// (at the place it would reach without the change of its momentum).
|
||||
aFastStep.ProposePrimaryTrackFinalPosition( endTrack.GetPosition() );
|
||||
|
||||
Reference in New Issue
Block a user