Commit 2a2c5a1c authored by Atlas-Software Librarian's avatar Atlas-Software Librarian Committed by Graeme Stewart
Browse files

'CMakeLists.txt' (InDetZVTOP_Alg-00-01-00)

parent ace9e75e
################################################################################
# Package: InDetZVTOP_Alg
################################################################################
# Declare the package name:
atlas_subdir( InDetZVTOP_Alg )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaBaseComps
GaudiKernel
Tracking/TrkEvent/TrkParticleBase
PRIVATE
InnerDetector/InDetRecTools/InDetRecToolInterfaces
Tracking/TrkEvent/TrkTrack
Tracking/TrkEvent/VxVertex )
# Component(s) in the package:
atlas_add_component( InDetZVTOP_Alg
src/*.cxx
src/components/*.cxx
LINK_LIBRARIES AthenaBaseComps GaudiKernel TrkParticleBase InDetRecToolInterfaces TrkTrack VxVertex )
# Install files from the package:
atlas_install_headers( InDetZVTOP_Alg )
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// InDetZVTOP_Alg.h, (c) ATLAS Detector software
// begin : 30-10-2006
// authors : Tatjana Lenz
// email : tatjana.lenz@cern.ch
// changes :
///////////////////////////////////////////////////////////////////
#ifndef INDETZVTOP_ALG_H
#define INDETZVTOP_ALG_H
// Gaudi includes
#include "AthenaBaseComps/AthAlgorithm.h"
#include "GaudiKernel/ToolHandle.h"
#include "TrkParticleBase/TrackParticleBase.h"
namespace InDet
{
/** @class InDetZVTOP_Alg
---Topological Vertex Finder ---
This Algorithm reconstructs a set of topological vertices each
associated with an independent subset of the charged tracks.
Vertices are reconstructed by associating tracks with 3D spatial regions
according to the vertex probability function which is based on the trajectories
and position resolution of the tracks.
Docu: "A Topological Vertex Reconstruction Algorithm for Hadronic Jets"
by David J. Jackson, SLAC-PUB-7215, December 1996
@author Tatjana Lenz <tatjana.lenz@cern.ch>
*/
class IVertexFinder;
class InDetZVTOP_Alg : public AthAlgorithm
{
public:
/** Standard Athena-Algorithm Constructor */
InDetZVTOP_Alg(const std::string& name, ISvcLocator* pSvcLocator);
/** Default Destructor */
~InDetZVTOP_Alg();
/** standard Athena-Algorithm method */
StatusCode initialize();
/** standard Athena-Algorithm method */
StatusCode execute();
/** standard Athena-Algorithm method */
StatusCode finalize();
private:
/** member variables for algorithm properties: */
std::string m_tracksName; //!< Name of track container in StoreGate
std::string m_vxCollectionOutputName; //!< Name of output container to store results
ToolHandle <IVertexFinder> m_VertexFinderTool;
};
} // end of namespace
#endif
package InDetZVTOP_Alg
author Tatjana Lenz <tatjana.lenz@cern.ch>
##################################################
public
##################################################
use AthenaBaseComps AthenaBaseComps-* Control
use AtlasPolicy AtlasPolicy-*
use GaudiInterface GaudiInterface-* External
use TrkParticleBase TrkParticleBase-* Tracking/TrkEvent
##################################################
private
##################################################
use TrkTrack TrkTrack-* Tracking/TrkEvent
use InDetRecToolInterfaces InDetRecToolInterfaces-* InnerDetector/InDetRecTools
use VxVertex VxVertex-* Tracking/TrkEvent
##################################################
public
##################################################
library InDetZVTOP_Alg *.cxx components/*.cxx
apply_pattern component_library
#private
#macro cppdebugflags '$(cppdebugflags_s)'
#macro_remove componentshr_linkopts "-Wl,-s"
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
@mainpage ZVTOP_Algs Package
contains: <br>
- ConversionFinder.cxx <br>
@author Tatjana Lenz <tatjana.lenz@cern.ch>
@section ZVTOP_AlgsIntro Introduction
ZVTOP_Algs is a package which contains algorithm to reconstruct vertices. The only job is to call a vertex finder tool - InDetZVTOPVxFinder (see InnerDetector/InDetRecTools/InDetZVTOPVxFinder). The topological vertex finder has been developed by David J. Jackson, Nucl.Instrum.Meth.A388: 247-253, 1997 and now implemented to ATHENA and adjusted to ATLAS requirements. It reconstructs a set of vertices & associated subset of the charged tracks. The association accords to a vertex probability function which is based on the trajectories and position resolution of the tracks.
@section ZVTOP_AlgsReq Requirements
@include requirements
*/
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// InDetZVTOP_Alg.cxx, (c) ATLAS Detector software
// begin : 30-10-2006
// authors : Tatjana Lenz
// email : tatjana.lenz@cern.ch
// changes :
///////////////////////////////////////////////////////////////////
#include "InDetZVTOP_Alg/InDetZVTOP_Alg.h"
#include "InDetRecToolInterfaces/IVertexFinder.h"
#include "TrkTrack/TrackCollection.h"
#include "TrkParticleBase/TrackParticleBaseCollection.h"
#include "VxVertex/VxContainer.h"
//================ Constructor =================================================
InDet::InDetZVTOP_Alg::InDetZVTOP_Alg(const std::string& name, ISvcLocator* pSvcLocator)
:
AthAlgorithm(name,pSvcLocator),
m_tracksName("Tracks"),
m_vxCollectionOutputName("VxCollection"),
m_VertexFinderTool("InDet::ZVTOP_Tool")
{
// template for property declaration
declareProperty("TracksName",m_tracksName);
declareProperty("VxCollectionOutputName",m_vxCollectionOutputName);
declareProperty("VertexFinderTool",m_VertexFinderTool);
}
//================ Destructor =================================================
InDet::InDetZVTOP_Alg::~InDetZVTOP_Alg()
{}
//================ Initialisation =================================================
StatusCode InDet::InDetZVTOP_Alg::initialize()
{
// Code entered here will be executed once at program start.
msg (MSG::INFO) << MSG::INFO << name() << " initialize()" << endreq;
/* Get the VertexFinderTool */
if ( m_VertexFinderTool.retrieve().isFailure() ) {
msg( MSG::FATAL ) << "Failed to retrieve tool " << m_VertexFinderTool << endreq;
return StatusCode::FAILURE;
} else msg ( MSG::INFO ) << "Retrieved tool " << m_VertexFinderTool<< endreq;
msg ( MSG::INFO ) << "initialize() successful in " << name() << endreq;
return StatusCode::SUCCESS;
}
//================ Finalisation =================================================
StatusCode InDet::InDetZVTOP_Alg::finalize()
{
// Code entered here will be executed once at the end of the program run.
return StatusCode::SUCCESS;
}
//================ Execution ====================================================
StatusCode InDet::InDetZVTOP_Alg::execute()
{
VxContainer* theVxContainer(0);
//---- Retrieve tracks from StoreGate section ----------------------------------------//
if(evtStore()->contains<TrackCollection>(m_tracksName))
{
const TrackCollection *trackTES(0);
if (evtStore()->retrieve(trackTES, m_tracksName).isFailure())
{
if(msgLvl(MSG::DEBUG)) msg() << "Could not find TrackCollection " << m_tracksName << " in StoreGate." << endreq;
return StatusCode::SUCCESS;
} else if (msgLvl(MSG::VERBOSE)) msg() << "Find TrackCollection " << m_tracksName << " in StoreGate." << endreq;
if (msgLvl(MSG::VERBOSE)) msg() << "Number of tracks = " << trackTES->size() << endreq;
theVxContainer = m_VertexFinderTool->findVertex(trackTES);
}
else if(evtStore()->contains<Trk::TrackParticleBaseCollection>(m_tracksName))
{
const Trk::TrackParticleBaseCollection *trackParticleBaseCollection(0);
if(evtStore()->retrieve(trackParticleBaseCollection, m_tracksName).isFailure())
{
if(msgLvl(MSG::DEBUG)) msg() << "Could not find Trk::TrackParticleBaseCollection" << m_tracksName << " in StoreGate." << endreq;
return StatusCode::SUCCESS;
}
theVxContainer = m_VertexFinderTool->findVertex(trackParticleBaseCollection);
}
else {
if (msgLvl(MSG::DEBUG)) msg() << "Neither a TrackCollection nor a TrackParticleBaseCollection with key " << m_tracksName << " exist." << endreq;
}
//---- Recording section: write the results to StoreGate ---//
if (msgLvl(MSG::VERBOSE)) msg() << "Recording to StoreGate: " << m_vxCollectionOutputName << endreq;
if (evtStore()->record(theVxContainer,m_vxCollectionOutputName,false).isFailure())
{
if (msgLvl(MSG::INFO)) msg() << "Unable to record VxContainer in TDS" << endreq;
return StatusCode::FAILURE;
}
return StatusCode::SUCCESS;
}
//============================================================================================
#include "GaudiKernel/DeclareFactoryEntries.h"
#include "InDetZVTOP_Alg/InDetZVTOP_Alg.h"
using namespace InDet;
DECLARE_ALGORITHM_FACTORY( InDetZVTOP_Alg )
DECLARE_FACTORY_ENTRIES( InDetZVTOP_Alg )
{
DECLARE_ALGORITHM( InDetZVTOP_Alg )
}
#include "GaudiKernel/LoadFactoryEntries.h"
LOAD_FACTORY_ENTRIES( InDetZVTOP_Alg )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment