Skip to content
Snippets Groups Projects
Commit 16c2f5bd authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'cleanupSeg' into 'master'

Some cleanup of properties etc in muon packages

See merge request atlas/athena!39145
parents 85e08afb 4a897d34
No related branches found
No related tags found
No related merge requests found
Showing
with 38 additions and 93 deletions
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id: MuonSegmentCnvAlg.cxx 298140 2013-11-19 11:32:49Z emoyse $
// Gaudi/Athena include(s):
#include "AthenaKernel/errorcheck.h"
#include "MuonSegmentCnvAlg.h"
// EDM include(s):
#include "xAODMuon/MuonSegmentAuxContainer.h"
#include "xAODMuon/MuonSegmentContainer.h"
#include "TrkSegment/SegmentCollection.h"
......@@ -15,19 +11,10 @@
#include "MuonSegment/MuonSegment.h"
#include "AthLinks/ElementLink.h"
// Local include(s):
#include "MuonSegmentCnvAlg.h"
namespace xAODMaker {
MuonSegmentCnvAlg::MuonSegmentCnvAlg( const std::string& name,
ISvcLocator* svcLoc )
: AthAlgorithm( name, svcLoc ),
m_muonSegmentConverterTool("Muon::MuonSegmentConverterTool/MuonSegmentConverterTool")
{
declareProperty( "SegmentContainerName", m_muonSegmentLocation = "MuonSegments" );
declareProperty( "xAODContainerName", m_xaodContainerName = "MuonSegments" );
MuonSegmentCnvAlg::MuonSegmentCnvAlg(const std::string& name, ISvcLocator* svcLoc) :
AthAlgorithm(name, svcLoc) {
}
StatusCode MuonSegmentCnvAlg::initialize() {
......@@ -44,7 +31,7 @@ namespace xAODMaker {
StatusCode MuonSegmentCnvAlg::execute() {
// Retrieve the AOD particles:
const Trk::SegmentCollection* segments = 0;
const Trk::SegmentCollection* segments = nullptr;
SG::ReadHandle<Trk::SegmentCollection> h_segments(m_muonSegmentLocation);
if(h_segments.isValid()) {
segments = h_segments.cptr();
......
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id: MuonSegmentCnvAlg.h 297747 2013-10-28 15:14:24Z krasznaa $
#ifndef XAODMUONCNV_MUONSEGMENTCNVALG_H
#define XAODMUONCNV_MUONSEGMENTCNVALG_H
// System include(s):
#include <string>
// Athena/Gaudi include(s):
#include "AthenaBaseComps/AthAlgorithm.h"
#include "GaudiKernel/ToolHandle.h"
// xAOD include
#include "xAODMuonCnv/IMuonSegmentConverterTool.h"
namespace Analysis {
class Muon;
}
#include <string>
namespace xAODMaker {
......@@ -46,10 +35,11 @@ namespace xAODMaker {
virtual StatusCode execute();
private:
SG::ReadHandleKey<Trk::SegmentCollection> m_muonSegmentLocation; //!< Location/Key for Muon::MuonSegment
SG::WriteHandleKey<xAOD::MuonSegmentContainer> m_xaodContainerName; //!< Location/Key for xAOD::MuonSegment
// the following segments do NOT contain MuGirl segments
SG::ReadHandleKey<Trk::SegmentCollection> m_muonSegmentLocation{this,"SegmentContainerName","MuonSegments"};
SG::WriteHandleKey<xAOD::MuonSegmentContainer> m_xaodContainerName{this,"xAODContainerName","MuonSegments"};
ToolHandle<xAODMaker::IMuonSegmentConverterTool> m_muonSegmentConverterTool;
ToolHandle<xAODMaker::IMuonSegmentConverterTool> m_muonSegmentConverterTool{this,"MuonSegmentConverterTool","Muon::MuonSegmentConverterTool/MuonSegmentConverterTool"};
}; // class MuonSegmentCnvAlg
} // namespace xAODMaker
......
......@@ -4,7 +4,6 @@
#include "MuonSegmentFinderAlg.h"
#include "CscSegmentMakers/ICscSegmentFinder.h"
#include "MuonPattern/MuonPatternChamberIntersect.h"
#include "MuonPattern/MuonPatternCombination.h"
#include "MuonPattern/MuonPatternCombinationCollection.h"
......@@ -17,21 +16,13 @@
#include "MuonSegment/MuonSegment.h"
#include "MuonSegment/MuonSegmentCombination.h"
#include "MuonSegment/MuonSegmentCombinationCollection.h"
#include "MuonSegmentMakerToolInterfaces/IMuonClusterSegmentFinder.h"
#include "TrkParameters/TrackParameters.h"
using HepGeom::Transform3D;
MuonSegmentFinderAlg::MuonSegmentFinderAlg(const std::string& name, ISvcLocator* pSvcLocator)
: AthReentrantAlgorithm(name, pSvcLocator)
{
declareProperty("PrintSummary", m_printSummary = false);
//
declareProperty("doTGCClust", m_doTGCClust = false);
declareProperty("doRPCClust", m_doRPCClust = false);
declareProperty("doClusterTruth", m_doClusterTruth = false);
}
MuonSegmentFinderAlg::~MuonSegmentFinderAlg() {}
MuonSegmentFinderAlg::MuonSegmentFinderAlg(const std::string& name, ISvcLocator* pSvcLocator) :
AthReentrantAlgorithm(name, pSvcLocator) {
}
StatusCode
MuonSegmentFinderAlg::initialize()
......
......@@ -20,24 +20,19 @@
#include "MuonRecToolInterfaces/IMuonTruthSummaryTool.h"
#include "MuonSegment/MuonSegmentCombinationCollection.h"
#include "MuonSegmentMakerToolInterfaces/IMuonClusterSegmentFinderTool.h"
#include "MuonSegmentMakerToolInterfaces/IMuonClusterSegmentFinder.h"
#include "MuonSegmentMakerToolInterfaces/IMuonPatternCalibration.h"
#include "MuonSegmentMakerToolInterfaces/IMuonPatternSegmentMaker.h"
#include "MuonSegmentMakerToolInterfaces/IMuonSegmentOverlapRemovalTool.h"
#include "TrkSegment/SegmentCollection.h"
#include "TrkTruthData/PRD_MultiTruthCollection.h"
namespace Muon {
class IMuonClusterSegmentFinder;
}
class MsgStream;
class ICscSegmentFinder;
#include "CscSegmentMakers/ICscSegmentFinder.h"
class MuonSegmentFinderAlg : public AthReentrantAlgorithm {
public:
MuonSegmentFinderAlg(const std::string& name, ISvcLocator* pSvcLocator);
virtual ~MuonSegmentFinderAlg();
virtual ~MuonSegmentFinderAlg()=default;
virtual StatusCode initialize() override;
virtual StatusCode execute(const EventContext& ctx) const override;
......@@ -166,15 +161,12 @@ class MuonSegmentFinderAlg : public AthReentrantAlgorithm {
const std::vector<const Muon::TgcPrepDataCollection*> tgcCols, const EventContext& ctx) const;
void createSegmentsFromClusters(const Muon::MuonPatternCombination* patt, Trk::SegmentCollection* segments) const;
bool m_printSummary;
Gaudi::Property<bool> m_printSummary{this,"PrintSummary",false};
Gaudi::Property<bool> m_doTGCClust{this,"doTGCClust",false,"selection flags for cluster based segment finding"};
Gaudi::Property<bool> m_doRPCClust{this,"doRPCClust",false,"selection flags for cluster based segment finding"};
Gaudi::Property<bool> m_doClusterTruth{this,"doClusterTruth",false,"selection flags for cluster based segment finding"};
/** selection flags for cluster based segment finding */
bool m_doTGCClust;
bool m_doRPCClust;
bool m_doClusterTruth;
};
#endif
/* LocalWords: ifndef
*/
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonCombinedAlg.h"
MuonCombinedAlg::MuonCombinedAlg(const std::string& name, ISvcLocator* pSvcLocator):
AthAlgorithm(name,pSvcLocator)
{}
MuonCombinedAlg::~MuonCombinedAlg(){}
AthAlgorithm(name,pSvcLocator) {
}
StatusCode MuonCombinedAlg::initialize()
{
......@@ -68,7 +66,3 @@ StatusCode MuonCombinedAlg::execute()
return StatusCode::SUCCESS;
}
StatusCode MuonCombinedAlg::finalize()
{
return StatusCode::SUCCESS;
}
......@@ -28,11 +28,10 @@ class MuonCombinedAlg : public AthAlgorithm
public:
MuonCombinedAlg(const std::string& name, ISvcLocator* pSvcLocator);
~MuonCombinedAlg();
~MuonCombinedAlg()=default;
StatusCode initialize();
StatusCode execute();
StatusCode finalize();
private:
......
......@@ -9,14 +9,8 @@
using namespace MuonCombined;
MuonCombinedInDetCandidateAlg::MuonCombinedInDetCandidateAlg(const std::string& name, ISvcLocator* pSvcLocator)
: AthReentrantAlgorithm(name, pSvcLocator), m_doSiliconForwardMuons(false)
{
declareProperty("TrackParticleLocation", m_indetTrackParticleLocation = {"InDetTrackParticles"});
declareProperty("ForwardParticleLocation", m_indetForwardTrackParticleLocation = "InDetForwardTrackParticles");
declareProperty("InDetCandidateLocation", m_candidateCollectionName = "InDetCandidates");
declareProperty("DoSiliconAssocForwardMuons", m_doSiliconForwardMuons = false);
declareProperty("ExtensionPtThreshold", m_extThreshold = 2500);
MuonCombinedInDetCandidateAlg::MuonCombinedInDetCandidateAlg(const std::string& name, ISvcLocator* pSvcLocator) :
AthReentrantAlgorithm(name, pSvcLocator) {
}
StatusCode
......@@ -27,9 +21,7 @@ MuonCombinedInDetCandidateAlg::initialize()
ATH_CHECK(m_indetTrackParticleLocation.initialize());
ATH_CHECK(m_indetForwardTrackParticleLocation.initialize(m_doSiliconForwardMuons));
ATH_CHECK(m_candidateCollectionName.initialize());
ATH_CHECK(m_forwardTrackSelector.retrieve(DisableTool{!m_doSiliconForwardMuons}));
return StatusCode::SUCCESS;
}
......
......@@ -25,13 +25,10 @@ class MuonCombinedInDetCandidateAlg : public AthReentrantAlgorithm {
StatusCode execute(const EventContext& ctx) const;
private:
bool m_doSiliconForwardMuons;
float m_extThreshold;
SG::ReadHandleKeyArray<xAOD::TrackParticleContainer> m_indetTrackParticleLocation;
SG::ReadHandleKey<xAOD::TrackParticleContainer> m_indetForwardTrackParticleLocation;
SG::WriteHandleKey<InDetCandidateCollection> m_candidateCollectionName;
SG::ReadHandleKeyArray<xAOD::TrackParticleContainer> m_indetTrackParticleLocation{this,"TrackParticleLocation",{"InDetTrackParticles"}};
SG::ReadHandleKey<xAOD::TrackParticleContainer> m_indetForwardTrackParticleLocation{this,"ForwardParticleLocation","InDetForwardTrackParticles"};
SG::WriteHandleKey<InDetCandidateCollection> m_candidateCollectionName{this,"InDetCandidateLocation","InDetCandidates"};
ToolHandle<Trk::ITrackSelectorTool> m_trackSelector{
this, "TrackSelector", "InDet::InDetDetailedTrackSelectorTool/MuonCombinedInDetDetailedTrackSelectorTool",
"Track selector tool"};
......@@ -56,6 +53,10 @@ class MuonCombinedInDetCandidateAlg : public AthReentrantAlgorithm {
void printTrackParticleInfo(const xAOD::TrackParticle* const tp, const std::string& what) const;
int getCount(const xAOD::TrackParticle& tp, xAOD::SummaryType type) const;
Gaudi::Property<bool> m_doSiliconForwardMuons {this,"DoSiliconAssocForwardMuons",false};
Gaudi::Property<float> m_extThreshold {this,"ExtensionPtThreshold",2500};
};
......
......@@ -6,8 +6,8 @@
#include "MuonCombinedEvent/MuonCandidateCollection.h"
MuonCombinedInDetExtensionAlg::MuonCombinedInDetExtensionAlg(const std::string& name, ISvcLocator* pSvcLocator)
: AthAlgorithm(name, pSvcLocator) {
MuonCombinedInDetExtensionAlg::MuonCombinedInDetExtensionAlg(const std::string& name, ISvcLocator* pSvcLocator) :
AthAlgorithm(name, pSvcLocator) {
}
StatusCode
......
......@@ -4,9 +4,8 @@
#include "MuonCombinedMuonCandidateAlg.h"
MuonCombinedMuonCandidateAlg::MuonCombinedMuonCandidateAlg(const std::string& name, ISvcLocator* pSvcLocator)
: AthAlgorithm(name, pSvcLocator)
{
MuonCombinedMuonCandidateAlg::MuonCombinedMuonCandidateAlg(const std::string& name, ISvcLocator* pSvcLocator) :
AthAlgorithm(name, pSvcLocator) {
}
StatusCode
......
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