Commit e12b4558 authored by Elmar Ritsch's avatar Elmar Ritsch Committed by Graeme Stewart
Browse files

take BarcodeService from ISF_Flags (ATLASSIM-1658) (ISF_Services-00-03-17)

	* take BarcodeService from ISF_Flags (ATLASSIM-1658)
	* ISF_Services-00-03-17

2014-10-22  John Chapman  <John.Chapman@cern.ch>

	* python/ISF_ServicesConfig.py - made
	ISF_LongLivedParticleBrokerSvc derive from
	ISF_ParticleBrokerSvcNoOrdering rather than
	ISF_ParticleBrokerSvc. ATLASSIM-526. Plus some tidying.
	* ISF_Services-00-03-16

2014-10-21  Elmar Ritsch  <Elmar.Ritsch@cern.ch>

	* src/AFIIEnvelopeDefSvc.cxx, src/ISFEnvelopeDefSvc.cxx: adapting to change
	in IEnvelopeDefSvc interface (ATLASSIM-1601, Coverity #17631)
	* ISF_Services-00-03-15

2014-10-21  Elmar Ritsch  <Elmar.Ritsch@cern.ch>

...
(Long ChangeLog diff - truncated)
parent 7723cfcf
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// AFIIEnvelopeDefSvc.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef AFIIENVELOPEDEFSVC_H
#define AFIIENVELOPEDEFSVC_H
// STL includes
#include <string>
#include <vector>
#include <utility>
// GaudiKernel & Athena
#include "AthenaBaseComps/AthService.h"
// interface header file
#include "SubDetectorEnvelopes/IEnvelopeDefSvc.h"
namespace ISF {
class AFIIEnvelopeDefSvc : public IEnvelopeDefSvc, virtual public AthService {
public:
/** public AthService constructor */
AFIIEnvelopeDefSvc(const std::string& name, ISvcLocator* svc);
/** Destructor */
~AFIIEnvelopeDefSvc();
/** Query the interfaces. */
StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
/** AthService initialize method.*/
StatusCode initialize();
/** AthService finalize method */
StatusCode finalize();
/** return a vector of (r,z) pairs, defining the respective envelope */
const RZPairVector& getRZBoundary( AtlasDetDescr::AtlasRegion region ) const;
/** return a vector of (r,z) pairs, defining the envelope on the z>0 region */
const RZPairVector &getRPositiveZBoundary( AtlasDetDescr::AtlasRegion region ) const;
private:
/** return boundary with shifted z values */
RZPairVector getShiftedBoundary( AtlasDetDescr::AtlasRegion region, double shiftFromZ, double shiftToZ ) const;
/** ServiceHandle to the standard ISF envelope definition service */
ServiceHandle<IEnvelopeDefSvc> m_isfEnvDefSvc;
/** internal tolerance on coordinates */
double m_tolerance;
/** maximum desired extent (halfz) of the modified inner detector volume */
double m_idMaxExtentZ;
/** internal (r,z) representation for BeamPipe, InnerDetector and calo volumes */
RZPairVector m_rzBeamPipe;
RZPairVector m_rzInDet;
RZPairVector m_rzCalo;
/** internal (r,z) representation for the positive z-side only,
* one RZPairVector for BeamPipe and InnerDetector each */
RZPairVector m_rposzBeamPipe;
RZPairVector m_rposzInDet;
RZPairVector m_rposzCalo;
};
} // namespace ISF
#endif // AFIIENVELOPEDEFSVC_H
......@@ -40,7 +40,7 @@ namespace ISF {
/** @class GeoIDSvc
@TODO
A fast Athena service identifying the AtlasRegion a given position/particle is in.
@author Elmar.Ritsch -at- cern.ch
*/
......@@ -80,6 +80,7 @@ namespace ISF {
template <typename T> inline int sign(T val);
/** (estimated) tolerance within which coordinates are considered equal */
double m_tolerance;
/** */
......@@ -99,6 +100,6 @@ template <typename T> inline int ISF::GeoIDSvc::sign(T val) {
return (T(0) < val) - (val < T(0));
}
}
} // ISF namespace
#endif //> !ISF_SERVICES_GEOIDSVC_H
......@@ -5,8 +5,8 @@
///////////////////////////////////////////////////////////////////
// ISFEnvelopeDefSvc.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef DETDESCRDBENVELOPESVC_H
#define DETDESCRDBENVELOPESVC_H
#ifndef ISFENVELOPEDEFSVC_H
#define ISFENVELOPEDEFSVC_H
// STL includes
#include <string>
......@@ -48,7 +48,7 @@ namespace ISF {
/** ServiceHandle to the common ATLAS envelope definition service */
ServiceHandle<IEnvelopeDefSvc> m_atlasEnvDefSvc;
/** internal (r,z) representation for BeamPipe and InnerDetector volues */
/** internal (r,z) representation for BeamPipe and InnerDetector volumes */
RZPairVector m_rzBeamPipe;
RZPairVector m_rzInDet;
/** internal (r,z) representation for the positive z-side only,
......@@ -61,5 +61,5 @@ namespace ISF {
} // namespace ISF
#endif // DETDESCRDBENVELOPESVC_H
#endif // ISFENVELOPEDEFSVC_H
......@@ -15,34 +15,34 @@ from AthenaCommon.DetFlags import DetFlags
from ISF_Config.ISF_jobProperties import ISF_Flags # IMPORTANT: Flags must be set before tools are retrieved
def getParticleBrokerSvc(name="ISF_ParticleBrokerSvc", **kwargs):
kwargs.setdefault('StackFiller' , getPublicTool('ISF_StackFiller') )
kwargs.setdefault('EntryLayerTool' , getPublicTool('ISF_EntryLayerTool') )
#kwargs.setdefault('ParticleOrderingTool' , getPublicTool('ISF_InToOutSubDetOrderingTool') )
kwargs.setdefault('ParticleOrderingTool' , getPublicTool('ISF_ParticleOrderingTool') )
kwargs.setdefault('GeoIDSvc' , getService('ISF_G4PolyconeGeoIDSvc') )
kwargs.setdefault('AlwaysUseGeoIDSvc' , False )
kwargs.setdefault('ValidateGeoIDs' , ISF_Flags.ValidationMode() )
kwargs.setdefault('ValidationOutput' , ISF_Flags.ValidationMode() )
kwargs.setdefault('ValidationStreamName' , "ParticleBroker" )
def getParticleBrokerSvcNoOrdering(name="ISF_ParticleBrokerSvcNoOrdering", **kwargs):
kwargs.setdefault('StackFiller' , 'ISF_StackFiller' )
kwargs.setdefault('EntryLayerTool' , 'ISF_EntryLayerTool' )
kwargs.setdefault('GeoIDSvc' , 'ISF_GeoIDSvc' )
kwargs.setdefault('AlwaysUseGeoIDSvc' , False )
kwargs.setdefault('ValidateGeoIDs' , ISF_Flags.ValidationMode() )
kwargs.setdefault('ValidationOutput' , ISF_Flags.ValidationMode() )
kwargs.setdefault('ValidationStreamName' , "ParticleBroker" )
kwargs.setdefault('BarcodeService' , ISF_Flags.BarcodeService() )
from ISF_Services.ISF_ServicesConf import ISF__ParticleBrokerDynamicOnReadIn
return ISF__ParticleBrokerDynamicOnReadIn(name, **kwargs)
def getParticleBrokerSvcNoOrdering(name="ISF_ParticleBrokerSvcNoOrdering", **kwargs):
kwargs.setdefault('StackFiller' , getPublicTool('ISF_StackFiller') )
kwargs.setdefault('EntryLayerTool' , getPublicTool('ISF_EntryLayerTool') )
kwargs.setdefault('GeoIDSvc' , getService('ISF_G4PolyconeGeoIDSvc') )
kwargs.setdefault('AlwaysUseGeoIDSvc' , False )
kwargs.setdefault('ValidateGeoIDs' , ISF_Flags.ValidationMode() )
kwargs.setdefault('ValidationOutput' , ISF_Flags.ValidationMode() )
kwargs.setdefault('ValidationStreamName' , "ParticleBroker" )
def getParticleBrokerSvc(name="ISF_ParticleBrokerSvc", **kwargs):
#kwargs.setdefault('ParticleOrderingTool' , 'ISF_InToOutSubDetOrderingTool' )
kwargs.setdefault('ParticleOrderingTool' , 'ISF_ParticleOrderingTool' )
return getParticleBrokerSvcNoOrdering(name, **kwargs)
from ISF_Services.ISF_ServicesConf import ISF__ParticleBrokerDynamicOnReadIn
return ISF__ParticleBrokerDynamicOnReadIn(name, **kwargs)
def getLongLivedParticleBrokerSvc(name="ISF_LongLivedParticleBrokerSvc", **kwargs):
kwargs.setdefault('StackFiller' , 'ISF_LongLivedStackFiller' )
return getParticleBrokerSvcNoOrdering(name, **kwargs)
def getAFIIParticleBrokerSvc(name="ISF_AFIIParticleBrokerSvc", **kwargs):
kwargs.setdefault('EntryLayerTool' , 'ISF_AFIIEntryLayerTool' )
return getParticleBrokerSvc(name, **kwargs)
def getSimHitService(name="ISF_SimHitService", **kwargs):
kwargs.setdefault('ValidationOutput' , ISF_Flags.ValidationMode())
kwargs.setdefault('ValidationOutput' , ISF_Flags.ValidationMode() )
from G4AtlasApps.SimFlags import simFlags
......@@ -57,14 +57,29 @@ def getSimHitService(name="ISF_SimHitService", **kwargs):
def getISFEnvelopeDefSvc(name="ISF_ISFEnvelopeDefSvc", **kwargs):
# ATLAS common envlope definitions
kwargs.setdefault("ATLASEnvelopeDefSvc" , getService("AtlasGeometry_EnvelopeDefSvc"))
kwargs.setdefault("ATLASEnvelopeDefSvc" , "AtlasGeometry_EnvelopeDefSvc")
from ISF_Services.ISF_ServicesConf import ISF__ISFEnvelopeDefSvc
return ISF__ISFEnvelopeDefSvc(name, **kwargs)
def getAFIIEnvelopeDefSvc(name="ISF_AFIIEnvelopeDefSvc", **kwargs):
from AthenaCommon.SystemOfUnits import mm
# ATLAS common envlope definitions
kwargs.setdefault("ISFEnvelopeDefSvc" , "ISF_ISFEnvelopeDefSvc" )
kwargs.setdefault("InDetMaxExtentZ" , 3550.*mm )
from ISF_Services.ISF_ServicesConf import ISF__AFIIEnvelopeDefSvc
return ISF__AFIIEnvelopeDefSvc(name, **kwargs)
def getGeoIDSvc(name="ISF_GeoIDSvc", **kwargs):
# with ISF volume definitions
kwargs.setdefault("EnvelopeDefSvc" , getService("ISF_ISFEnvelopeDefSvc"))
kwargs.setdefault("EnvelopeDefSvc" , "ISF_ISFEnvelopeDefSvc" )
from ISF_Services.ISF_ServicesConf import ISF__GeoIDSvc
return ISF__GeoIDSvc(name, **kwargs)
def getAFIIGeoIDSvc(name="ISF_AFIIGeoIDSvc", **kwargs):
kwargs.setdefault("EnvelopeDefSvc" , "ISF_AFIIEnvelopeDefSvc" )
return getGeoIDSvc(name, **kwargs)
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// AFIIEnvelopeDefSvc.cxx, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
// class header include
#include "ISF_Services/AFIIEnvelopeDefSvc.h"
// STL
#include <limits>
// AtlasDetDescr
#include "AtlasDetDescr/AtlasRegionHelper.h"
/** Constructor */
ISF::AFIIEnvelopeDefSvc::AFIIEnvelopeDefSvc(const std::string& name, ISvcLocator* svc) :
AthService(name,svc),
m_isfEnvDefSvc("ISF_ISFEnvelopeDefSvc", name),
m_tolerance(1e-4),
m_idMaxExtentZ(3550.),
m_rzBeamPipe(),
m_rzInDet(),
m_rposzBeamPipe(),
m_rposzInDet()
{
declareProperty( "ISFEnvelopeDefSvc",
m_isfEnvDefSvc,
"The ISF EnvelopeDefinition Service");
declareProperty( "Tolerance",
m_tolerance,
"Tolerance on coordinates.");
declareProperty( "InDetMaxExtentZ",
m_idMaxExtentZ,
"The desired InnerDetector maximum extension in |z|");
}
ISF::AFIIEnvelopeDefSvc::~AFIIEnvelopeDefSvc()
{
// free memory
// TODO :)
}
/** Athena AthService initialize hook */
StatusCode ISF::AFIIEnvelopeDefSvc::initialize()
{
ATH_MSG_INFO("Initializing ...");
// retrieve ATLAS common envelope definition service
if ( m_isfEnvDefSvc.retrieve().isFailure() ){
ATH_MSG_FATAL( "Could not retrieve EnvelopeDefinition service ('" << m_isfEnvDefSvc.typeAndName() << "'). Abort.");
return StatusCode::FAILURE;
}
//
// identify highest z extent in the ID volume
//
m_rposzInDet = m_isfEnvDefSvc->getRPositiveZBoundary( AtlasDetDescr::fAtlasID );
double zMax = std::numeric_limits<double>::min();
{
// find the greatest z value of the ID volume
for ( unsigned int curPos=0; curPos<m_rposzInDet.size(); curPos++ ) {
double curZ = m_rposzInDet[curPos].second;
if (curZ > zMax) {
zMax = curZ;
}
}
}
//
// shift ID/BeamPipe/Calo boundaries according to the desired new ID extent
//
m_rposzInDet = getShiftedBoundary( AtlasDetDescr::fAtlasID , zMax, m_idMaxExtentZ);
m_rposzBeamPipe = getShiftedBoundary( AtlasDetDescr::fAtlasForward, zMax, m_idMaxExtentZ);
m_rposzCalo = getShiftedBoundary( AtlasDetDescr::fAtlasCalo , zMax, m_idMaxExtentZ);
// mirror the RZPairs provided in m_rposz to describe all corner points
// in (r,z) space for the BeamPipe/Forward and the InnerDetector envelopes
mirrorRZ( m_rposzBeamPipe, m_rzBeamPipe );
mirrorRZ( m_rposzInDet , m_rzInDet );
mirrorRZ( m_rposzCalo , m_rzCalo );
// debugging output: print volume definitions
if (msgLvl(MSG::VERBOSE)) {
ATH_MSG_VERBOSE( "Envelope: complete region=" << AtlasDetDescr::fAtlasForward);
for ( unsigned int num = 0; num<m_rzBeamPipe.size(); num++) {
ATH_MSG_VERBOSE(" pos=" << num << " r=" << m_rzBeamPipe[num].first << " z="<< m_rzBeamPipe[num].second);
}
ATH_MSG_VERBOSE( "Envelope: complete region=" << AtlasDetDescr::fAtlasID);
for ( unsigned int num = 0; num<m_rzInDet.size(); num++) {
ATH_MSG_VERBOSE(" pos=" << num << " r=" << m_rzInDet[num].first << " z="<< m_rzInDet[num].second);
}
ATH_MSG_VERBOSE( "Envelope: complete region=" << AtlasDetDescr::fAtlasCalo);
for ( unsigned int num = 0; num<m_rzCalo.size(); num++) {
ATH_MSG_VERBOSE(" pos=" << num << " r=" << m_rzCalo[num].first << " z="<< m_rzCalo[num].second);
}
}
ATH_MSG_INFO("Initialize successful.");
return StatusCode::SUCCESS;
}
/** Athena AthService finalize hook */
StatusCode ISF::AFIIEnvelopeDefSvc::finalize()
{
return StatusCode::SUCCESS;
}
/** return a vector of (r,z) pairs, defining the respective envelope */
const RZPairVector &ISF::AFIIEnvelopeDefSvc::getRZBoundary( AtlasDetDescr::AtlasRegion region ) const {
// treat Forward/BeamPipe and InnerDetector regions separately
if ( region == AtlasDetDescr::fAtlasForward ) return m_rzBeamPipe;
else if ( region == AtlasDetDescr::fAtlasID ) return m_rzInDet;
else if ( region == AtlasDetDescr::fAtlasCalo ) return m_rzCalo;
else return m_isfEnvDefSvc->getRZBoundary( region );
}
/** return a vector of (r,z) pairs, defining the envelope on the z>0 region */
const RZPairVector &ISF::AFIIEnvelopeDefSvc::getRPositiveZBoundary( AtlasDetDescr::AtlasRegion region ) const {
// treat Forward/BeamPipe and InnerDetector regions separately
if ( region == AtlasDetDescr::fAtlasForward ) return m_rposzBeamPipe;
else if ( region == AtlasDetDescr::fAtlasID ) return m_rposzInDet;
else if ( region == AtlasDetDescr::fAtlasCalo ) return m_rposzCalo;
else return m_isfEnvDefSvc->getRPositiveZBoundary( region );
}
/** Query the interfaces. */
StatusCode ISF::AFIIEnvelopeDefSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
if ( IID_IEnvelopeDefSvc == riid )
*ppvInterface = (IEnvelopeDefSvc*)this;
else {
// Interface is not directly available: try out a base class
return Service::queryInterface(riid, ppvInterface);
}
addRef();
return StatusCode::SUCCESS;
}
/** return boundary with shifted z values */
RZPairVector ISF::AFIIEnvelopeDefSvc::getShiftedBoundary( AtlasDetDescr::AtlasRegion region,
double shiftFromZ,
double shiftToZ ) const {
const char *volName = AtlasDetDescr::AtlasRegionHelper::getName(region);
ATH_MSG_DEBUG("Will shift '" << volName << "' boundary at |z|="<<shiftFromZ<<" to |z|="<<shiftToZ<<"");
RZPairVector rposzPairs = m_isfEnvDefSvc->getRPositiveZBoundary(region);
for ( unsigned int curPos=0; curPos<rposzPairs.size(); curPos++ ) {
double curR = rposzPairs[curPos].first;
double curZ = rposzPairs[curPos].second;
// is current boundary point to be shifted?
if ( fabs(curZ-shiftFromZ) < m_tolerance ) {
ATH_MSG_VERBOSE("Found boundary point in '" << volName <<"' volume." <<
" Shifting (r,|z|)=("<<curR<<","<<curZ<<") to (r,|z|)=("<<curR<<","<<shiftToZ<<")");
rposzPairs[curPos].second = shiftToZ;
}
}
return rposzPairs;
}
......@@ -29,8 +29,12 @@ ISF::GeoIDSvc::GeoIDSvc(const std::string& name,ISvcLocator* svc) :
m_radiusBins(0),
m_maxRBins(AtlasDetDescr::fNumAtlasRegions+1)
{
declareProperty("EnvelopeDefSvc" , m_envDefSvc );
declareProperty("Tolerance" , m_tolerance=1e-5 );
declareProperty("EnvelopeDefSvc",
m_envDefSvc,
"The EnvelopeDefinitionService describing the AtlasRegion boundaries.");
declareProperty("Tolerance",
m_tolerance=1e-5,
"Estimated tolerance within which coordinates are considered being equal.");
}
......@@ -271,16 +275,34 @@ StatusCode ISF::GeoIDSvc::finalize() {
ISF::InsideType ISF::GeoIDSvc::inside(const Amg::Vector3D &pos, AtlasDetDescr::AtlasRegion geoID) const {
AtlasDetDescr::AtlasRegion identifiedGeoID = identifyGeoID(pos);
// geoIDs differ -> not inside, need to check if on surface
if ( identifiedGeoID != geoID ) {
// TOOD: check if 'surface'
ATH_MSG_WARNING("ISF::GeoIDSvc::inside() does not support ISF::fSurface yet (will return ISF::fOutside)");
return ISF::fOutside;
// an arbitrary unitary direction with +1 in x,y,z
// (following this direction will cross any AtlasRegion boundary if position is close to it in the first place)
const Amg::Vector3D dir(1., 1., 1.);
const Amg::Vector3D dirUnit( dir.unit() );
// create particle positions which are a bit forward and a bit aft of the current position
const Amg::Vector3D posFwd( pos + dirUnit*m_tolerance );
const Amg::Vector3D posAft( pos - dirUnit*m_tolerance );
AtlasDetDescr::AtlasRegion geoIDFwd = identifyGeoID(posFwd);
AtlasDetDescr::AtlasRegion geoIDAft = identifyGeoID(posAft);
// default case: particle is outside given geoID
ISF::InsideType where = ISF::fOutside;
// only if either the fwd or the aft step is inside the given geoID,
// inside/surface cases need to be resolved
if ( (geoID == geoIDFwd) || (geoID == geoIDAft) ) {
// 1. inside
if ( (geoIDFwd == geoIDAft) ) {
where = ISF::fInside;
// 2. surface
} else if ( geoIDFwd != geoIDAft ) {
where = ISF::fSurface;
}
}
return ISF::fInside;
return where;
}
......
......@@ -39,7 +39,7 @@ StatusCode ISF::ISFEnvelopeDefSvc::initialize()
// retrieve ATLAS common envelope definition service
if ( m_atlasEnvDefSvc.retrieve().isFailure() ){
ATH_MSG_FATAL( "Could not retrieve EnvelopeDefinition service. Abort.");
ATH_MSG_FATAL( "Could not retrieve EnvelopeDefinition service ('" << m_atlasEnvDefSvc.typeAndName() << "'). Abort.");
return StatusCode::FAILURE;
}
......@@ -67,7 +67,7 @@ StatusCode ISF::ISFEnvelopeDefSvc::initialize()
}
// set the lowest radius of the ID volume to ZERO
ATH_MSG_DEBUG("Will shift ID boundary (r,|z|)=("<<rMin<<","<<zAtRMin<<") to (r,z)=("<<0.<<","<<zAtRMin<<")");
ATH_MSG_DEBUG("Will shift ID boundary (r,|z|)=("<<rMin<<","<<zAtRMin<<") to (r,|z|)=("<<0.<<","<<zAtRMin<<")");
m_rposzInDet[rMinPos].first = 0.;
}
......@@ -83,7 +83,7 @@ StatusCode ISF::ISFEnvelopeDefSvc::initialize()
// if the current radius and z-coordinate are the same as the identified lowest ID radius
// set this radius to ZERO too
if ( (fabs(curR-rMin) < 1e-4) && (fabs(curZ-zAtRMin)<1e-4) ) {
ATH_MSG_VERBOSE("Found boundary point in BeamPipe volume. Shifting (r,|z|)=("<<curR<<","<<curZ<<") to (r,z)=("<<0.<<","<<curZ<<")");
ATH_MSG_VERBOSE("Found boundary point in BeamPipe volume. Shifting (r,|z|)=("<<curR<<","<<curZ<<") to (r,|z|)=("<<0.<<","<<curZ<<")");
foundShiftPoint = true;
m_rposzBeamPipe[curPos].first = 0.;
}
......@@ -99,8 +99,8 @@ StatusCode ISF::ISFEnvelopeDefSvc::initialize()
// mirror the RZPairs provided in m_rposz to describe all corner points
// in (r,z) space for the BeamPipe/Forward and the InnerDetector envelopes
m_rzBeamPipe = *mirrorRZ( m_rposzBeamPipe );
m_rzInDet = *mirrorRZ( m_rposzInDet );
mirrorRZ( m_rposzBeamPipe, m_rzBeamPipe );
mirrorRZ( m_rposzInDet , m_rzInDet );
// debugging output:
if (msgLvl(MSG::VERBOSE)) {
......
......@@ -40,7 +40,7 @@ ISF::ParticleBrokerDynamicOnReadIn::ParticleBrokerDynamicOnReadIn(const std::str
m_entryLayerToolQuick(0),
m_orderingTool(""),
m_orderingToolQuick(0),
m_geoIDSvc("iGeant4::GeoIDSvc/ISF_GeoIDSvc", name),
m_geoIDSvc("", name),
m_geoIDSvcQuick(0),
m_forceGeoIDSvc(false),
m_validateGeoID(false),
......@@ -50,7 +50,7 @@ ISF::ParticleBrokerDynamicOnReadIn::ParticleBrokerDynamicOnReadIn(const std::str
m_simSelectorSet(),
m_screenOutputPrefix("isf >> "),
m_screenEmptyPrefix(),
m_barcodeSvc("ISF_MC12BarcodeSvc", name),
m_barcodeSvc("", name),
m_doSelectorCPUMon(false),
m_benchPDGCode(0),
m_benchGeoID(0),
......@@ -471,7 +471,7 @@ StatusCode ISF::ParticleBrokerDynamicOnReadIn::initializeEvent()
// - if a Selector selects a particle -> it is pushed onto the active stack
// - if it is not selected -> pushed onto the hold stack
selectAndStore( *particleIter);
if (!m_orderingTool) {
if (!m_orderingToolQuick) {
(*particleIter)->setOrder(iparticle);
}
}
......@@ -494,7 +494,8 @@ StatusCode ISF::ParticleBrokerDynamicOnReadIn::finalizeEvent() {
for ( ; fSimSelIter != fSimSelIterEnd; ++fSimSelIter )
(*fSimSelIter)->endEvent();
for (int i=0;i<(int)m_extraParticles.size();i++) delete m_extraParticles[i];
for (size_t i=0;i<m_extraParticles.size();i++) {delete m_extraParticles[i];}
m_extraParticles.clear();
return StatusCode::SUCCESS;
}
......@@ -549,7 +550,7 @@ const ISF::ConstISFParticleVector& ISF::ParticleBrokerDynamicOnReadIn::popVector
// if this particle has a different order or the maximum size of the return vector is reached
// -> don't add any more particles to the m_popParticles std::vector
if ( m_orderingTool && ((curOrder != returnOrder) || (m_popParticles.size()>=maxVectorSize) ) ) break;
if ( m_orderingToolQuick && ((curOrder != returnOrder) || (m_popParticles.size()>=maxVectorSize) ) ) break;
// add this particle to the, later returned, m_popParticles std::vector
m_popParticles.push_back( curParticle);
......
......@@ -285,9 +285,7 @@ StatusCode ISF::SimHitSvc::initializeEvent()
m_tileHitVecHits = m_hitCollectionHelper->RetrieveNonconstCollection<TileHitVector>(m_tileHitVecHitCollectionName);
m_mbtsHits = m_hitCollectionHelper->RetrieveNonconstCollection<TileHitVector>(m_mbtsHitCollectionName);
if (!m_doTileCalibHits)
m_tileHitVecHits = m_hitCollectionHelper->RetrieveNonconstCollection<TileHitVector>(m_tileHitVecHitCollectionName);
else {
if (m_doTileCalibHits) {
m_tileActiveCellCalibHits = m_hitCollectionHelper->RetrieveNonconstCollection<CaloCalibrationHitContainer>(m_tileActiveCellCalibHitCollectionName);
m_tileInactiveCellCalibHits = m_hitCollectionHelper->RetrieveNonconstCollection<CaloCalibrationHitContainer>(m_tileInactiveCellCalibHitCollectionName);
m_tileDeadMaterialCalibHits = m_hitCollectionHelper->RetrieveNonconstCollection<CaloCalibrationHitContainer>(m_tileDeadMaterialCalibHitCollectionName);
......@@ -596,11 +594,7 @@ StatusCode ISF::SimHitSvc::releaseEvent()
m_hitCollectionHelper->SetConstCollection< TileHitVector >(m_mbtsHits);
m_tileHitVecHits=0;
m_mbtsHits=0;
if (!m_doTileCalibHits) {
m_hitCollectionHelper->SetConstCollection< TileHitVector >(m_tileHitVecHits);
m_tileHitVecHits=0;
}
else {
if (m_doTileCalibHits) {
m_hitCollectionHelper->SetConstCollection< CaloCalibrationHitContainer >(m_tileActiveCellCalibHits);
m_hitCollectionHelper->SetConstCollection< CaloCalibrationHitContainer >(m_tileInactiveCellCalibHits);
m_hitCollectionHelper->SetConstCollection< CaloCalibrationHitContainer >(m_tileDeadMaterialCalibHits);
......
......@@ -3,12 +3,14 @@
#include "ISF_Services/SimHitSvc.h"
#include "ISF_Services/ParticleKillerSimSvc.h"
#include "ISF_Services/ISFEnvelopeDefSvc.h"
#include "ISF_Services/AFIIEnvelopeDefSvc.h"
#include "ISF_Services/GeoIDSvc.h"
DECLARE_NAMESPACE_SERVICE_FACTORY( ISF , ParticleBrokerDynamicOnReadIn )
DECLARE_NAMESPACE_SERVICE_FACTORY( ISF , SimHitSvc )
DECLARE_NAMESPACE_SERVICE_FACTORY( ISF , ParticleKillerSimSvc )
DECLARE_NAMESPACE_SERVICE_FACTORY( ISF , ISFEnvelopeDefSvc )
DECLARE_NAMESPACE_SERVICE_FACTORY( ISF , AFIIEnvelopeDefSvc )
DECLARE_NAMESPACE_SERVICE_FACTORY( ISF , GeoIDSvc )
DECLARE_FACTORY_ENTRIES( ISF_Services ) {
......@@ -16,5 +18,6 @@ DECLARE_FACTORY_ENTRIES( ISF_Services ) {
DECLARE_NAMESPACE_SERVICE( ISF , SimHitSvc )
DECLARE_NAMESPACE_SERVICE( ISF , ParticleKillerSimSvc )
DECLARE_NAMESPACE_SERVICE( ISF , ISFEnvelopeDefSvc )
DECLARE_NAMESPACE_SERVICE( ISF , AFIIEnvelopeDefSvc )
DECLARE_NAMESPACE_SERVICE( ISF , GeoIDSvc )
}