Skip to content
Snippets Groups Projects
Commit 5629f0b7 authored by Savannah Rose Shively's avatar Savannah Rose Shively
Browse files

Merge remote-tracking branch 'upstream/master'

SimHitAlg modifications
parents 7c868f65 62207ba4
No related branches found
No related tags found
No related merge requests found
Showing
with 756 additions and 312 deletions
...@@ -20,3 +20,5 @@ ...@@ -20,3 +20,5 @@
*.lib *.lib
*.root *.root
tmp.* tmp.*
.idea/**
cmake-debug-build/**
...@@ -27,7 +27,7 @@ build_image: ...@@ -27,7 +27,7 @@ build_image:
- set +e && source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh; set -e - set +e && source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh; set -e
- set +e && asetup --input=../../calypso/asetup.faser master,latest,Athena; set -e - set +e && asetup --input=../../calypso/asetup.faser master,latest,Athena; set -e
- cmake ../../calypso - cmake ../../calypso
- make -j - make -j 3
artifacts: artifacts:
paths: paths:
- build/ - build/
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "GaudiKernel/IAlgTool.h" #include "GaudiKernel/IAlgTool.h"
#include "AthenaKernel/IOVSvcDefs.h" #include "AthenaKernel/IOVSvcDefs.h"
#include "CxxUtils/checker_macros.h"
static const InterfaceID IID_IGeoModelTool( "IGeoModelTool", 1, 0 ); static const InterfaceID IID_IGeoModelTool( "IGeoModelTool", 1, 0 );
...@@ -25,7 +26,7 @@ public: ...@@ -25,7 +26,7 @@ public:
virtual StatusCode clear() = 0; virtual StatusCode clear() = 0;
// Register callback function on ConDB object // Register callback function on ConDB object
virtual StatusCode registerCallback() = 0; virtual StatusCode registerCallback ATLAS_NOT_THREAD_SAFE () = 0;
// Callback function itself // Callback function itself
virtual StatusCode align(IOVSVC_CALLBACK_ARGS) = 0; virtual StatusCode align(IOVSVC_CALLBACK_ARGS) = 0;
......
...@@ -33,7 +33,7 @@ public: ...@@ -33,7 +33,7 @@ public:
virtual StatusCode clear() override final; virtual StatusCode clear() override final;
// Register callback function on ConDB object // Register callback function on ConDB object
virtual StatusCode registerCallback() override final; virtual StatusCode registerCallback ATLAS_NOT_THREAD_SAFE () override final;
// Callback function itself // Callback function itself
virtual StatusCode align(IOVSVC_CALLBACK_ARGS) override; virtual StatusCode align(IOVSVC_CALLBACK_ARGS) override;
......
...@@ -33,7 +33,7 @@ public: ...@@ -33,7 +33,7 @@ public:
virtual StatusCode clear() override final; virtual StatusCode clear() override final;
// Register callback function on ConDB object // Register callback function on ConDB object
virtual StatusCode registerCallback() override final; virtual StatusCode registerCallback ATLAS_NOT_THREAD_SAFE () override final;
// Callback function itself // Callback function itself
virtual StatusCode align(IOVSVC_CALLBACK_ARGS) override; virtual StatusCode align(IOVSVC_CALLBACK_ARGS) override;
......
...@@ -33,7 +33,7 @@ public: ...@@ -33,7 +33,7 @@ public:
virtual StatusCode clear() override final; virtual StatusCode clear() override final;
// Register callback function on ConDB object // Register callback function on ConDB object
virtual StatusCode registerCallback() override final; virtual StatusCode registerCallback ATLAS_NOT_THREAD_SAFE () override final;
// Callback function itself // Callback function itself
virtual StatusCode align(IOVSVC_CALLBACK_ARGS) override; virtual StatusCode align(IOVSVC_CALLBACK_ARGS) override;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include "ScintWaveformCnv_p0.h" #include "ScintWaveformCnv_p0.h"
void void
ScintWaveformCnv_p0::persToTrans(const ScintWaveform_p0* persObj, ScintWaveform* transObj, MsgStream& log) { ScintWaveformCnv_p0::persToTrans(const ScintWaveform_p0* persObj, ScintWaveform* transObj, MsgStream& /*log*/) {
// Just fill available data here // Just fill available data here
// Rest of it patched up in ScintWaveformContainerCnv_p0 // Rest of it patched up in ScintWaveformContainerCnv_p0
...@@ -16,7 +16,7 @@ ScintWaveformCnv_p0::persToTrans(const ScintWaveform_p0* persObj, ScintWaveform* ...@@ -16,7 +16,7 @@ ScintWaveformCnv_p0::persToTrans(const ScintWaveform_p0* persObj, ScintWaveform*
} }
void void
ScintWaveformCnv_p0::transToPers(const ScintWaveform* transObj, ScintWaveform_p0* persObj, MsgStream& log) { ScintWaveformCnv_p0::transToPers(const ScintWaveform* transObj, ScintWaveform_p0* persObj, MsgStream& /*log*/) {
// log << MSG::DEBUG << "ScintWaveformCnv_p0::transToPers called" << endmsg; // log << MSG::DEBUG << "ScintWaveformCnv_p0::transToPers called" << endmsg;
// log << MSG::DEBUG << "Transient waveform:" << endmsg; // log << MSG::DEBUG << "Transient waveform:" << endmsg;
......
...@@ -115,7 +115,7 @@ G4OpticalSurface* Geo2G4OpticalSurfaceFactory::Build(const GeoOpticalSurface* ge ...@@ -115,7 +115,7 @@ G4OpticalSurface* Geo2G4OpticalSurfaceFactory::Build(const GeoOpticalSurface* ge
// Create material properties table // Create material properties table
Geo2G4MatPropTableFactory* tFactory = Geo2G4MatPropTableFactory::instance(); Geo2G4MatPropTableFactory* tFactory = Geo2G4MatPropTableFactory::instance();
GeoMaterialPropertiesTable* geoPropTable = geoOpticalSurface->GetMaterialPropertiesTable(); const GeoMaterialPropertiesTable* geoPropTable = geoOpticalSurface->GetMaterialPropertiesTable();
if(geoPropTable){ if(geoPropTable){
G4MaterialPropertiesTable* g4PropTable = tFactory->Build(geoPropTable); G4MaterialPropertiesTable* g4PropTable = tFactory->Build(geoPropTable);
......
...@@ -30,7 +30,7 @@ public: ...@@ -30,7 +30,7 @@ public:
virtual StatusCode clear() override final; virtual StatusCode clear() override final;
// Register callback function on ConDB object // Register callback function on ConDB object
virtual StatusCode registerCallback() override final; virtual StatusCode registerCallback ATLAS_NOT_THREAD_SAFE () override final;
// Callback function itself // Callback function itself
virtual StatusCode align(IOVSVC_CALLBACK_ARGS) override; virtual StatusCode align(IOVSVC_CALLBACK_ARGS) override;
......
...@@ -4,17 +4,20 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration ...@@ -4,17 +4,20 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
""" """
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentFactory import CompFactory
Tracker__TruthSeededTrackFinder, THistSvc=CompFactory.getComps("Tracker::TruthSeededTrackFinder", "THistSvc") Tracker__TruthSeededTrackFinder, THistSvc=CompFactory.getComps("Tracker::TruthSeededTrackFinder", "THistSvc")
from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
def TruthSeededTrackFinderBasicCfg(flags, **kwargs): def TruthSeededTrackFinderBasicCfg(flags, **kwargs):
"""Return ComponentAccumulator for TruthSeededTrackFinder""" """Return ComponentAccumulator for TruthSeededTrackFinder"""
acc = ComponentAccumulator() acc = ComponentAccumulator()
kwargs.setdefault("SpacePointsSCTName", "SCT_SpacePointContainer") kwargs.setdefault("SpacePointsSCTName", "SCT_SpacePointContainer")
kwargs.setdefault("SpacePointsSeedsName", "Seeds_SpacePointContainer") kwargs.setdefault("FaserSpacePointsSeedsName", "Seeds_SpacePointContainer")
acc.addEventAlgo(Tracker__TruthSeededTrackFinder(**kwargs)) acc.addEventAlgo(Tracker__TruthSeededTrackFinder(**kwargs))
# attach ToolHandles
return acc return acc
def TruthSeededTrackFinder_OutputCfg(flags): def TruthSeededTrackFinder_OutputCfg(flags):
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "TrackerReadoutGeometry/SiDetectorElementCollection.h" #include "TrackerReadoutGeometry/SiDetectorElementCollection.h"
#include "TrkSpacePoint/SpacePoint.h" #include "TrkSpacePoint/SpacePoint.h"
#include "TrkSpacePoint/SpacePointContainer.h" #include "TrkSpacePoint/SpacePointContainer.h"
#include "TrackerSpacePoint/SpacePointForSeedCollection.h"
#include "TrkSpacePoint/SpacePointOverlapCollection.h" #include "TrkSpacePoint/SpacePointOverlapCollection.h"
#include "TrackerSimEvent/FaserSiHitCollection.h" #include "TrackerSimEvent/FaserSiHitCollection.h"
#include "TrackerRawData/FaserSCT_RDO_Container.h" #include "TrackerRawData/FaserSCT_RDO_Container.h"
...@@ -26,6 +27,7 @@ ...@@ -26,6 +27,7 @@
#include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ServiceHandle.h"
#include "GaudiKernel/ITHistSvc.h" #include "GaudiKernel/ITHistSvc.h"
#include "GaudiKernel/ToolHandle.h"
#include <string> #include <string>
#include <vector> #include <vector>
...@@ -63,7 +65,7 @@ class TruthSeededTrackFinder:public AthReentrantAlgorithm { ...@@ -63,7 +65,7 @@ class TruthSeededTrackFinder:public AthReentrantAlgorithm {
TruthSeededTrackFinder &operator=(const TruthSeededTrackFinder&) = delete; TruthSeededTrackFinder &operator=(const TruthSeededTrackFinder&) = delete;
SG::ReadHandleKey<SpacePointContainer> m_Sct_spcontainerKey{this, "SpacePointsSCTName", "SCT spContainer"}; SG::ReadHandleKey<SpacePointContainer> m_Sct_spcontainerKey{this, "SpacePointsSCTName", "SCT spContainer"};
SG::WriteHandleKey<SpacePointContainer> m_seed_spcontainerKey{this, "SpacePointsSeedsName", "TrackerSpacePointContainer", "output seeds"}; SG::WriteHandleKey<SpacePointForSeedCollection> m_seed_spcontainerKey{this, "FaserSpacePointsSeedsName", "SpacePointForSeedCollection", "SpacePointForSeedCollection"};
SG::ReadCondHandleKey<TrackerDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}; SG::ReadCondHandleKey<TrackerDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
...@@ -109,9 +111,13 @@ class TruthSeededTrackFinder:public AthReentrantAlgorithm { ...@@ -109,9 +111,13 @@ class TruthSeededTrackFinder:public AthReentrantAlgorithm {
TH1* m_hist_sp_plane; TH1* m_hist_sp_plane;
TH1* m_hist_sp_layer; TH1* m_hist_sp_layer;
TH1* m_hist_sp_station; TH1* m_hist_sp_station;
//!!!!!!!!!!!!!!!!!!!!!
TH1* m_hist_InitReso_px;
TH1* m_hist_InitReso_py;
TH1* m_hist_InitReso_pz;
//!!!!!!!!!!!!!!!!!!!!!
ServiceHandle<ITHistSvc> m_thistSvc; ServiceHandle<ITHistSvc> m_thistSvc;
}; };
} }
......
#include "../TruthSeededTrackFinder.h" #include "../TruthSeededTrackFinder.h"
DECLARE_COMPONENT( Tracker::TruthSeededTrackFinder ) DECLARE_COMPONENT( Tracker::TruthSeededTrackFinder )
...@@ -28,6 +28,7 @@ ConfigFlags.Input.Files = ['my.RDO.pool.root'] ...@@ -28,6 +28,7 @@ ConfigFlags.Input.Files = ['my.RDO.pool.root']
ConfigFlags.Output.ESDFileName = "mySeeds.ESD.pool.root" ConfigFlags.Output.ESDFileName = "mySeeds.ESD.pool.root"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX"
ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.GeoModel.Align.Dynamic = False
#ConfigFlags.Concurrency.NumThreads = 1
ConfigFlags.Beam.NumberOfCollisions = 0. ConfigFlags.Beam.NumberOfCollisions = 0.
ConfigFlags.lock() ConfigFlags.lock()
...@@ -48,15 +49,15 @@ acc.merge(TruthSeededTrackFinderCfg(ConfigFlags)) ...@@ -48,15 +49,15 @@ acc.merge(TruthSeededTrackFinderCfg(ConfigFlags))
#acc.merge(MergeRecoTimingObjCfg(ConfigFlags)) #acc.merge(MergeRecoTimingObjCfg(ConfigFlags))
# Dump config # Dump config
# logging.getLogger('forcomps').setLevel(VERBOSE) logging.getLogger('forcomps').setLevel(VERBOSE)
# acc.foreach_component("*").OutputLevel = VERBOSE acc.foreach_component("*").OutputLevel = VERBOSE
# acc.foreach_component("*ClassID*").OutputLevel = INFO acc.foreach_component("*ClassID*").OutputLevel = INFO
# acc.getCondAlgo("FaserSCT_AlignCondAlg").OutputLevel = VERBOSE # acc.getCondAlgo("FaserSCT_AlignCondAlg").OutputLevel = VERBOSE
# acc.getCondAlgo("FaserSCT_DetectorElementCondAlg").OutputLevel = VERBOSE # acc.getCondAlgo("FaserSCT_DetectorElementCondAlg").OutputLevel = VERBOSE
# acc.getService("StoreGateSvc").Dump = True acc.getService("StoreGateSvc").Dump = True
# acc.getService("ConditionStore").Dump = True acc.getService("ConditionStore").Dump = True
# acc.printConfig(withDetails=True) acc.printConfig(withDetails=True)
# ConfigFlags.dump() ConfigFlags.dump()
# Execute and finish # Execute and finish
sc = acc.run(maxEvents=-1) sc = acc.run(maxEvents=-1)
......
#ifndef SpacePointForSeed_h
#define SpacePointForSeed_h
#include "TrkSpacePoint/SpacePoint.h"
namespace Trk{
class SpacePoint;
}
class SpacePointForSeed{
public:
SpacePointForSeed() = delete;
SpacePointForSeed(const Trk::SpacePoint* sp) : m_spacepoint(sp) {};
~SpacePointForSeed() = default;
const Trk::SpacePoint* SpacePoint() const {
return m_spacepoint;
}
private:
const Trk::SpacePoint * m_spacepoint;
};
#endif
#ifndef SPACEPOINTFORSEED_SPACEPOINTCOLLECTION_H
#define SPACEPOINTFORSEED_SPACEPOINTCOLLECTION_H
// Base classes
#include "AthContainers/DataVector.h"
#include "GaudiKernel/DataObject.h"
//class SpacePoint;
#include "TrackerSpacePoint/SpacePointForSeed.h"
typedef DataVector<SpacePointForSeed> SpacePointForSeedCollection;
#include "AthenaKernel/CLASS_DEF.h"
CLASS_DEF(SpacePointForSeedCollection,1123314789,1)
#endif // TRKSPACEPOINT_SPACEPOINTCOLLECTION_H
//#include "TrackerSpacePoint/SpacePointForSeed.h"
//SpacePointForSeed::SpacePointForSeed(const Trk::SpacePoint* sp): m_spacepoint( sp) {}
//SpacePointForSeed::~SpacePointForSeed() {}
//const Trk::SpacePoint* SpacePointForSeed::SpacePoint() const {
// return m_spacepoint;
//}
\ No newline at end of file
################################################################################
# Package: FaserSiSpacePointTool
################################################################################
# Declare the package name:
atlas_subdir( TruthSeededTrackFinderTool)
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaBaseComps
Control/AthenaKernel
DetectorDescription/GeoPrimitives
Tracker/TrackerRecEvent/TrackerPrepRawData
DetectorDescription/Identifier
PRIVATE
GaudiKernel
Tracker/TrackerDetDescr/TrackerReadoutGeometry
Tracker/TrackerDetDescr/TrackerIdentifier
Tracker/TrackerRecEvent/TrackerSpacePoint
)
# External dependencies:
find_package( Eigen )
# Component(s) in the package:
atlas_add_library( TruthSeededTrackFinderToolLib
TruthSeededTrackFinderTool/*.h src/*.cxx src/*.h
PUBLIC_HEADERS TruthSeededTrackFinderTool
INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives TrackerPrepRawData
PRIVATE_LINK_LIBRARIES GaudiKernel TrackerIdentifier TrackerReadoutGeometry TrackerSpacePoint )
atlas_add_component( TruthSeededTrackFinderTool
src/components/*.cxx
INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives TrackerPrepRawData GaudiKernel TrackerIdentifier TrackerReadoutGeometry TrackerSpacePoint TruthSeededTrackFinderToolLib )
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TruthSeededTrackFinderTool_H
#define TruthSeededTrackFinderTool_H
#include "AthenaBaseComps/AthAlgTool.h"
#include "AthenaKernel/SlotSpecificObj.h"
#include "GeoPrimitives/GeoPrimitives.h"
#include "TrackerPrepRawData/FaserSCT_ClusterCollection.h"
#include "TrkSpacePoint/SpacePoint.h"
#include <mutex>
#include <string>
class SpacePointCollection;
class SpacePointOverlapCollection;
namespace Tracker {
class TrackerCluster;
}
namespace Tracker
{
class TruthSeededTrackFinderTool : public AthAlgTool {
public:
/// Constructor
TruthSeededTrackFinderTool(const std::string& type, const std::string& name, const IInterface* parent);
/// Default destructor
virtual ~TruthSeededTrackFinderTool() = default;
/// Return interfaceID
static const InterfaceID& interfaceID();
/// Initialize
virtual StatusCode initialize() override;
/// Finalize
virtual StatusCode finalize() override;
/// Convert clusters to space points: SCT_Clusters -> SCT_SpacePoints
void fillSCT_SpacePointCollection(const SpacePointCollection* clusters1,
SpacePointCollection* clusters2) const;
private:
/// @name Cut parameters
//@{
};
}
#endif //TrackerSpacePointMakerTool_H
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "TruthSeededTrackFinderTool/TruthSeededTrackFinderTool.h"
// Cluster and space point collections
#include "TrkSpacePoint/SpacePointCollection.h"
#include "TrkSpacePoint/SpacePointOverlapCollection.h"
#include "TrackerSpacePoint/FaserSCT_SpacePoint.h"
namespace Tracker
{
static const InterfaceID IID_ITruthSeededTrackFinderTool
("TruthSeededTrackFinderTool", 99490493, 0);
const InterfaceID& TruthSeededTrackFinderTool::interfaceID() {
return IID_ITruthSeededTrackFinderTool;
}
// Constructor with parameters:
TruthSeededTrackFinderTool::TruthSeededTrackFinderTool(const std::string& type,
const std::string& name,
const IInterface* parent) :
AthAlgTool(type, name, parent) {
declareInterface< TruthSeededTrackFinderTool>(this);
}
//--------------------------------------------------------------------------
StatusCode TruthSeededTrackFinderTool::initialize() {
// Get the SCT Helper
return StatusCode::SUCCESS;
}
//--------------------------------------------------------------------------
StatusCode TruthSeededTrackFinderTool::finalize() {
return StatusCode::SUCCESS;
}
//--------------------------------------------------------------------------
void TruthSeededTrackFinderTool::fillSCT_SpacePointCollection(const SpacePointCollection* clusters1,
SpacePointCollection* clusters2
) const {
SpacePointCollection::const_iterator clusters1Next = clusters1->begin();
SpacePointCollection::const_iterator clusters1Finish = clusters1->end();
for (; clusters1Next!= clusters1Finish; ++clusters1Next){
const Trk::SpacePoint* sp=&(**clusters1Finish);
clusters2->push_back(const_cast<Trk::SpacePoint*>(sp));
}
}
}
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