Skip to content
Snippets Groups Projects
Commit 25832f83 authored by Atlas-Software Librarian's avatar Atlas-Software Librarian Committed by Graeme Stewart
Browse files

'CMakeLists.txt' (ISF_Geant4CommonTools-00-03-08)

	* src/EntryLayerTool.cxx: minor code style improvements (ATLASSIM-2263)
	* Tagging: ISF_Geant4CommonTools-00-03-08
parent f4446c3a
No related merge requests found
################################################################################
# Package: ISF_Geant4CommonTools
################################################################################
# Declare the package name:
atlas_subdir( ISF_Geant4CommonTools )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
GaudiKernel
PRIVATE
Control/AthenaBaseComps
Simulation/G4Sim/TrackRecord
Simulation/ISF/ISF_Core/ISF_Event
Simulation/ISF/ISF_Core/ISF_Interfaces )
# Component(s) in the package:
atlas_add_component( ISF_Geant4CommonTools
src/*.cxx
src/components/*.cxx
LINK_LIBRARIES GaudiKernel AthenaBaseComps ISF_Event ISF_Interfaces )
# Install files from the package:
atlas_install_headers( ISF_Geant4CommonTools )
atlas_install_python_modules( python/*.py )
......@@ -197,7 +197,6 @@ ISF::EntryLayer ISF::EntryLayerTool::registerParticle(const ISF::ISFParticle& pa
// (2.) check whether the particle lies on any entry surface
// -> this goes second because computation intensive routines
// are used for this
if ( layerHit == ISF::fUnsetEntryLayer) {
layerHit = identifyEntryLayer( particle);
}
......@@ -207,15 +206,19 @@ ISF::EntryLayer ISF::EntryLayerTool::registerParticle(const ISF::ISFParticle& pa
if ( layerHit != ISF::fUnsetEntryLayer) {
ATH_MSG_VERBOSE( "Particle >>" << particle << "<< hit boundary surface, "
"adding it to '" << m_SGName[layerHit] << "' TrackRecord collection");
const Amg::Vector3D &pos = particle.position();
const Amg::Vector3D &mom = particle.momentum();
CLHEP::Hep3Vector hepPos( pos.x(), pos.y(), pos.z() ); // not optimal, but required by TrackRecord
CLHEP::Hep3Vector hepMom( mom.x(), mom.y(), mom.z() ); // not optimal, but required by TrackRecord
double mass = particle.mass();
CLHEP::Hep3Vector mom( particle.momentum().x(), particle.momentum().y(), particle.momentum().z() );// not optimal, but required by TrackRecord
CLHEP::Hep3Vector pos( particle.position().x(), particle.position().y(), particle.position().z() );// not optimal, but required by TrackRecord
double energy = sqrt(mass*mass + mom.mag2());
m_collection[layerHit]->Emplace(particle.pdgCode(),
energy,
mom,
pos,
hepMom,
hepPos,
particle.timeStamp(),
particle.barcode(),
m_volumeName[layerHit] );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment