Skip to content
Snippets Groups Projects
Commit 52c8dc10 authored by Tadej Novak's avatar Tadej Novak
Browse files

Merge branch 'PunchThroughToolBarcodes_main' into 'main'

PunchThroughTool does not need to set punch-through particle barcodes directly

See merge request atlas/athena!71425
parents d2bfad0a 27ca3774
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,6 @@ def PunchThroughClassifierCfg(flags, name="ISF_PunchThroughClassifier", **kwargs
def PunchThroughToolCfg(flags, name="ISF_PunchThroughTool", **kwargs):
from BarcodeServices.BarcodeServicesConfig import BarcodeSvcCfg
from SubDetectorEnvelopes.SubDetectorEnvelopesConfig import EnvelopeDefSvcCfg
acc = ComponentAccumulator()
if "PunchThroughClassifier" not in kwargs:
......@@ -39,7 +38,6 @@ def PunchThroughToolCfg(flags, name="ISF_PunchThroughTool", **kwargs):
kwargs.setdefault("FullCorrelationEnergy" , [ 100000., 100000., 100000., 100000., 0., 100000., 100000., 100000., 100000.] )
kwargs.setdefault("MinEnergy" , [ 938.3, 135.6, 50., 50., 105.7, 939.6, 493.7, 497.6, 497.6 ] )
kwargs.setdefault("MaxNumParticles" , [ -1, -1, -1, -1, -1, -1, -1, -1, -1 ] )
kwargs.setdefault("BarcodeSvc", acc.getPrimaryAndMerge(BarcodeSvcCfg(flags)).name)
kwargs.setdefault("EnvelopeDefSvc", acc.getPrimaryAndMerge(EnvelopeDefSvcCfg(flags)).name)
kwargs.setdefault("BeamPipeRadius", 500.)
acc.setPrivateTools(CompFactory.ISF.PunchThroughTool(name, **kwargs))
......
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( ISF_PunchThroughTools )
......@@ -17,4 +17,4 @@ atlas_add_component( ISF_PunchThroughTools
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${LWTNN_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIRS}
LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib ${EIGEN_LIBRARIES} ${LWTNN_LIBRARIES} ${LIBXML2_LIBRARIES} AthenaBaseComps AthenaKernel BarcodeInterfacesLib GeoPrimitives ISF_FastCaloSimInterfaces ISF_FastCaloSimEvent AthContainers GaudiKernel ISF_Event ISF_InterfacesLib PathResolver SubDetectorEnvelopesLib TruthUtils )
LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib ${EIGEN_LIBRARIES} ${LWTNN_LIBRARIES} ${LIBXML2_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives ISF_FastCaloSimInterfaces ISF_FastCaloSimEvent AthContainers GaudiKernel ISF_Event ISF_InterfacesLib PathResolver SubDetectorEnvelopesLib TruthUtils )
......@@ -141,13 +141,6 @@ StatusCode ISF::PunchThroughTool::initialize()
return StatusCode::FAILURE;
}
//barcode service
if (m_barcodeSvc.retrieve().isFailure() )
{
ATH_MSG_ERROR( "[ punchthrough ] Could not retrieve " << m_barcodeSvc );
return StatusCode::FAILURE;
}
//envelope definition service
if (m_envDefSvc.retrieve().isFailure() )
{
......@@ -1346,12 +1339,11 @@ ISF::ISFParticle* ISF::PunchThroughTool::createExitPs( const ISF::ISFParticle &i
charge *= (pdg > 0.) ? 1. : -1.;
const double pTime = 0; /** @TODO: fix */
//assign barcodes to the produced particles
const int secBC = m_barcodeSvc->newSecondaryParticle( isfp.barcode() );
const int status = 1 + HepMC::SIM_STATUS_THRESHOLD;
const int id = HepMC::UNDEFINED_ID;
// NB we are not considering the possibility that the punch-through
// particle is the incoming particle having survived an interaction.
ISF::ISFParticle* finalPar = new ISF::ISFParticle (pos, mom, mass, charge, pdg, 1 + HepMC::SIM_STATUS_THRESHOLD, pTime, isfp, secBC);
ISF::ISFParticle* finalPar = new ISF::ISFParticle ( pos, mom, mass, charge, pdg, status, pTime, isfp, id);
finalPar->setNextGeoID( AtlasDetDescr::fAtlasMS);
// return the punch-through particle
......
......@@ -13,9 +13,6 @@
// Athena Base
#include "AthenaBaseComps/AthAlgTool.h"
//Barcode
#include "BarcodeInterfaces/IBarcodeSvc.h"
//Geometry
#include "SubDetectorEnvelopes/IEnvelopeDefSvc.h"
......@@ -200,7 +197,6 @@ namespace ISF {
*---------------------------------------------------------------------*/
ServiceHandle<IPartPropSvc> m_particlePropSvc{this, "PartPropSvc", "PartPropSvc", "particle properties svc"};
ServiceHandle<IGeoIDSvc> m_geoIDSvc{this, "GeoIDSvc", "ISF::GeoIDSvc"};
ServiceHandle<Barcode::IBarcodeSvc> m_barcodeSvc{this, "BarcodeSvc", "BarcodeSvc"};
ServiceHandle<IEnvelopeDefSvc> m_envDefSvc{this, "EnvelopeDefSvc", "AtlasGeometry_EnvelopeDefSvc"};
/** beam pipe radius */
......
......@@ -16,7 +16,7 @@ references_map = {
"s4006": "v13",
"s4007": "v12",
"s4008": "v1",
"a913": "v9",
"a913": "v10",
# Digi
"d1920": "v2",
# Overlay
......
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