Skip to content
Snippets Groups Projects
Commit 2d5c1ac6 authored by Christos Anastopoulos's avatar Christos Anastopoulos
Browse files

archive InDetZVTOPV

parent 7d6e7b00
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 1049 deletions
################################################################################
# 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 )
InnerDetector/InDetRecAlgs/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
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
@page InDetZVTOP_Alg_page ZVTOP_Algs Package
contains: <br>
- ConversionFinder.cxx <br>
@author Tatjana Lenz <tatjana.lenz@cern.ch>
@section InDetZVTOP_Alg_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.
*/
/*
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()" << endmsg;
/* Get the VertexFinderTool */
if ( m_VertexFinderTool.retrieve().isFailure() ) {
msg( MSG::FATAL ) << "Failed to retrieve tool " << m_VertexFinderTool << endmsg;
return StatusCode::FAILURE;
} else msg ( MSG::INFO ) << "Retrieved tool " << m_VertexFinderTool<< endmsg;
msg ( MSG::INFO ) << "initialize() successful in " << name() << endmsg;
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); --David S.
xAOD::VertexContainer* theXAODContainer = 0;
xAOD::VertexAuxContainer* theXAODAuxContainer = 0;
std::pair<xAOD::VertexContainer*,xAOD::VertexAuxContainer*> theXAODContainers
= std::make_pair( theXAODContainer, theXAODAuxContainer );
std::string vxContainerAuxName = m_vxCollectionOutputName + "Aux.";
//---- 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." << endmsg;
return StatusCode::SUCCESS;
} else if (msgLvl(MSG::VERBOSE)) msg() << "Find TrackCollection " << m_tracksName << " in StoreGate." << endmsg;
if (msgLvl(MSG::VERBOSE)) msg() << "Number of tracks = " << trackTES->size() << endmsg;
//theVxContainer = m_VertexFinderTool->findVertex(trackTES); --David S.
theXAODContainers = m_VertexFinderTool->findVertex(trackTES);
}
else {
if (msgLvl(MSG::DEBUG)) msg() << "Not TrackCollection with key " << m_tracksName << " exist." << endmsg;
//add check for xAOD::TrackParticleContainer --David S.
if(evtStore()->contains<xAOD::TrackParticleContainer>(m_tracksName))
{
if (msgLvl (MSG::DEBUG)) msg() << "xAOD::TrackParticleContainer with key " << m_tracksName << " found, but no findVertex method implemented yet for these objects." << endmsg;
}
}
//---- Recording section: write the results to StoreGate ---//
//if (msgLvl(MSG::VERBOSE)) msg() << "Recording to StoreGate: " << m_vxCollectionOutputName << endmsg; --David S.
if (msgLvl(MSG::VERBOSE)) msg() << "Recording to StoreGate: " << m_vxCollectionOutputName << " with AuxContainer " << vxContainerAuxName << endmsg;
//if (evtStore()->record(theVxContainer,m_vxCollectionOutputName,false).isFailure()) --David S.
if (evtStore()->record(theXAODContainers.first,m_vxCollectionOutputName,false).isFailure())
{
//if (msgLvl(MSG::INFO)) msg() << "Unable to record VxContainer in TDS" << endmsg; --David S.
if (msgLvl(MSG::INFO)) msg() << "Unable to record VertexContainer in TDS" << endmsg;
return StatusCode::FAILURE;
}
//add record AuxContainer to StoreGate --David S.
if (evtStore()->record(theXAODContainers.second,vxContainerAuxName).isFailure())
{
if (msgLvl(MSG::INFO)) msg() << "Unable to record VertexAuxContainer in TDS" << endmsg;
return StatusCode::FAILURE;
}
return StatusCode::SUCCESS;
}
//============================================================================================
#include "InDetZVTOP_Alg/InDetZVTOP_Alg.h"
using namespace InDet;
DECLARE_COMPONENT( InDetZVTOP_Alg )
################################################################################
# Package: InDetZVTOPVxFinder
################################################################################
# Declare the package name:
atlas_subdir( InDetZVTOPVxFinder )
# declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaBaseComps
GaudiKernel
InnerDetector/InDetRecTools/InDetRecToolInterfaces
Tracking/TrkEvent/VxVertex
Tracking/TrkEvent/TrkTrack
Reconstruction/Particle
Tracking/TrkEvent/TrkParticleBase
Tracking/TrkEvent/TrkParameters
Event/xAOD/xAODTracking
PRIVATE
Control/AthContainers
InnerDetector/InDetConditions/InDetBeamSpotService
Tracking/TrkExtrapolation/TrkExInterfaces
Tracking/TrkDetDescr/TrkSurfaces
Tracking/TrkVertexFitter/TrkVertexFitterInterfaces
Tracking/TrkEvent/VxSecVertex
Event/EventPrimitives
Generators/AtlasHepMC )
# External dependencies
# Component(s) in the package:
atlas_add_component( InDetZVTOPVxFinder
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS
LINK_LIBRARIES AtlasHepMCLib AthenaBaseComps GaudiKernel InDetRecToolInterfaces VxVertex Particle TrkParticleBase TrkParameters xAODTracking AthContainers TrkExInterfaces TrkSurfaces TrkVertexFitterInterfaces VxSecVertex EventPrimitives )
# Install files from the package:
atlas_install_headers( InDetZVTOPVxFinder )
InnerDetector/InDetRecTools/InDetZVTOPVxFinder
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// IZVTOP_AmbiguitySolver.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef IINDETZVTOP_AMBIGUITYSOLVER_H
#define IINDETZVTOP_AMBIGUITYSOLVER_H
#include "GaudiKernel/IAlgTool.h"
//xAOD includes --David S.
#include "xAODTracking/Vertex.h" //typedef
#include <vector>
namespace InDet
{
class IZVTOP_AmbiguitySolver : virtual public IAlgTool {
public:
DeclareInterfaceID (IZVTOP_AmbiguitySolver, 1, 0);
// enter declaration of your interface-defining member functions here
virtual std::vector< xAOD::Vertex* > solveAmbiguities(std::vector< xAOD::Vertex* > VertexContainer) const = 0;
};
} // end of namespace
#endif
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// IZVTOP_SimpleVtxProbCalc.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef IINDETZVTOP_SIMPLEVTXPROBCALC_H
#define IINDETZVTOP_SIMPLEVTXPROBCALC_H
#include "GaudiKernel/IAlgTool.h"
namespace InDet
{
class IZVTOP_SimpleVtxProbCalc : virtual public IAlgTool {
public:
DeclareInterfaceID (IZVTOP_SimpleVtxProbCalc, 1, 0);
// enter declaration of your interface-defining member functions here
virtual double calcVtxProb(double & trk_func_sum, double & trk_func_sum2) const = 0;
};
} // end of namespace
#endif
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// IZVTOP_SpatialPointFinder.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef IINDETZVTOP_SPATIALPOINTFINDER_H
#define IINDETZVTOP_SPATIALPOINTFINDER_H
#include "GaudiKernel/IAlgTool.h"
#include "TrkParameters/TrackParameters.h"
namespace Rec {
class TrackParticle;
}
namespace Trk {
class Track;
class TrackParticleBase;
class RecVertex;
class Vertex;
//class TrackParameters;
}
namespace InDet
{
class IZVTOP_SpatialPointFinder : virtual public IAlgTool {
public:
DeclareInterfaceID(IZVTOP_SpatialPointFinder, 1, 0);
// declaration of interface-defining member functions
virtual Trk::Vertex* findSpatialPoint(const Trk::Track* trk_1, const Trk::Track* trk_2) const = 0;
virtual Trk::Vertex* findSpatialPoint(const Rec::TrackParticle* trk_1, const Rec::TrackParticle* trk_2) const = 0;
virtual Trk::Vertex* findSpatialPoint(const Trk::TrackParticleBase* trk_1, const Trk::TrackParticleBase* trk_2) const = 0;
virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::Track* trk_1) const = 0;
virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Rec::TrackParticle* trk_1) const = 0;
virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParticleBase* trk_1) const = 0;
virtual Trk::Vertex* findSpatialPoint(const Trk::TrackParameters* perigee_1, const Trk::TrackParameters* perigee_2) const = 0;
virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParameters* perigee_1) const = 0;
};
} // end of namespace
#endif
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// IZVTOP_TrkProbTubeCalc.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef IINDETZVTOP_TRKPROBTUBECALC_H
#define IINDETZVTOP_TRKPROBTUBECALC_H
#include "GaudiKernel/IAlgTool.h"
#include "TrkParameters/TrackParameters.h"
namespace Trk
{
class Track;
class RecVertex;
class Vertex;
class TrackParticleBase;
}
namespace Rec {
class TrackParticle;
}
namespace InDet
{
class IZVTOP_TrkProbTubeCalc : virtual public IAlgTool {
public:
DeclareInterfaceID (IZVTOP_TrkProbTubeCalc, 1, 0);
// declaration of interface-defining member functions
//trk
virtual double calcProbTube(const Trk::Track& trk, Trk::Vertex& vec) const = 0;
virtual double calcProbTube(const Rec::TrackParticle& trk, Trk::Vertex& vec) const = 0;
virtual double calcProbTube(const Trk::TrackParticleBase& trk, Trk::Vertex& vec) const = 0;
virtual double calcProbTube(const Trk::Perigee* trk, Trk::Vertex& vec) const = 0;
//beam spot
virtual double calcProbTube(const Trk::RecVertex& vtx, Trk::Vertex& vec) const = 0;
};
} // end of namespace
#endif
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// ZVTOP_AmbiguitySolver.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef INDETZVTOP_AMBIGUITYSOLVER_H
#define INDETZVTOP_AMBIGUITYSOLVER_H
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "InDetZVTOPVxFinder/IZVTOP_AmbiguitySolver.h"
namespace Trk
{
//class VxCandidate; --David S.
class Track;
}
namespace InDet
{
class IZVTOP_TrkProbTubeCalc;
class IZVTOP_SimpleVtxProbCalc;
/** @class ZVTOP_AmbiguitySolver
This is for the Doxygen-Documentation.
Please delete these lines and fill in information about
the Algorithm!
Please precede every member function declaration with a
short Doxygen comment stating the purpose of this function.
@author Tatjana Lenz <tatjana.lenz@cern.ch>
*/
class ZVTOP_AmbiguitySolver : public extends<AthAlgTool, IZVTOP_AmbiguitySolver>
{
public:
ZVTOP_AmbiguitySolver(const std::string&,const std::string&,const IInterface*);
/** default destructor */
virtual ~ZVTOP_AmbiguitySolver ();
/** standard Athena-Algorithm method */
virtual StatusCode initialize() override;
/** standard Athena-Algorithm method */
virtual StatusCode finalize () override;
//std::vector<Trk::VxCandidate*> solveAmbiguities(std::vector<Trk::VxCandidate*> VxContainer); --David S.
virtual std::vector< xAOD::Vertex* > solveAmbiguities(std::vector< xAOD::Vertex* > VertexContainer) const override;
private:
ToolHandle <InDet::IZVTOP_TrkProbTubeCalc> m_TrkProbTubeCalc;
ToolHandle <InDet::IZVTOP_SimpleVtxProbCalc> m_VtxProbCalc;
};
} // end of namespace
#endif
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// ZVTOP_Tool.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef INDETZVTOP_SECVTXTOOL_H
#define INDETZVTOP_SECVTXTOOL_H
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "InDetRecToolInterfaces/ISecVertexInJetFinder.h"
/* Forward declarations */
namespace Trk
{
class Track;
class VxSecVertexInfo;
class RecVertex;
class TrackParticleBase;
class IVertexFitter;
}
namespace InDet
{
class ISecVertexInJetFinder;
class IZVTOP_SpatialPointFinder;
class IZVTOP_TrkProbTubeCalc;
class IZVTOP_SimpleVtxProbCalc;
class IZVTOP_AmbiguitySolver;
class ZVTOP_TrkPartBaseVertexState;
class ZVTOP_VertexState;
/** @class ZVTOP_Tool
---Topological Vertex Finder Tool ---
This tool 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
Following properties can be set/changed via jobOptions:
---Input: TrackCollection
- \c TrackParticleName: The name of the StoreGate input container from
which the TrackParticle are read. The default is "???", the container
from the legacy converters/ambiguity processor.
---Output: VxContainer
- \c VxCollectionOutputName: The name of the StoreGate container where the fit
results are put. default is "VxCollection".
---Vertex Fitter: Billoir FullVertexFitter
- \c FitRoutine: The routine which should be used for the fitting. The
default is "FullVertexFitter".
@author Tatjana Lenz <tatjana.lenz@NOSPAMcern.ch>
*/
class ZVTOP_SecVtxTool : virtual public ISecVertexInJetFinder, public AthAlgTool
{
public:
ZVTOP_SecVtxTool(const std::string&,const std::string&,const IInterface*);
/** default destructor */
virtual ~ZVTOP_SecVtxTool ();
/** standard Athena-Algorithm method */
virtual StatusCode initialize();
/** standard Athena-Algorithm method */
virtual StatusCode finalize ();
virtual Trk::VxSecVertexInfo* findSecVertex(const Trk::RecVertex & primaryVertex,const TLorentzVector & jetMomentum,const std::vector<const Trk::TrackParticleBase*> & inputTracks) const;
//Added purely to satisfy new inheritance in ISecVertexInJetFinder, not yet implemented --David S.
virtual Trk::VxSecVertexInfo* findSecVertex(const xAOD::Vertex & primaryVertex, const TLorentzVector & jetMomentum,const std::vector<const xAOD::IParticle*> & inputTracks) const;
virtual Trk::VxSecVertexInfo* findSecVertex(const Trk::RecVertex & primaryVertex,const TLorentzVector & jetMomentum,const std::vector<const Trk::Track*> & inputTracks) const;
private:
ToolHandle <Trk::IVertexFitter> m_iVertexFitter;
ToolHandle <InDet::IZVTOP_SpatialPointFinder> m_iSpatialPointFinder;
ToolHandle <InDet::IZVTOP_TrkProbTubeCalc> m_iTrkProbTubeCalc;
ToolHandle <InDet::IZVTOP_SimpleVtxProbCalc> m_iVtxProbCalc;
ToolHandle <InDet::IZVTOP_AmbiguitySolver> m_iAmbiguitySolver;
double m_resolvingCut;
double m_resolvingStep;
double m_vtxProb_cut;
double m_trk_chi2_cut;
};
} // end of namespace
#endif
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// ZVTOP_SimpleVtxProbCalc.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef INDETZVTOP_SIMPLEVTXPROBCALC_H
#define INDETZVTOP_SIMPLEVTXPROBCALC_H
#include "AthenaBaseComps/AthAlgTool.h"
#include "InDetZVTOPVxFinder/IZVTOP_SimpleVtxProbCalc.h"
namespace InDet
{
/** @class ZVTOP_SimpleVtxProbCalc
@author Tatjana Lenz <tatjana.lenz@cern.ch>
*/
class ZVTOP_SimpleVtxProbCalc : public extends<AthAlgTool, IZVTOP_SimpleVtxProbCalc>
{
public:
ZVTOP_SimpleVtxProbCalc(const std::string&,const std::string&,const IInterface*);
/** default destructor */
virtual ~ZVTOP_SimpleVtxProbCalc ();
/** standard Athena-Algorithm method */
virtual StatusCode initialize() override;
/** standard Athena-Algorithm method */
virtual StatusCode finalize () override;
virtual double calcVtxProb(double & trk_func_sum, double & trk_func_sum2) const override;
};
} // end of namespace
#endif
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// ZVTOP_SlowSpatialPointFinder.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef INDETZVTOP_SLOWSPATIALPOINTFINDER_H
#define INDETZVTOP_SLOWSPATIALPOINTFINDER_H
#include "AthenaBaseComps/AthAlgTool.h"
#include "InDetZVTOPVxFinder/IZVTOP_SpatialPointFinder.h"
#include "GaudiKernel/ToolHandle.h"
#include "TrkParameters/TrackParameters.h"
namespace Trk
{
class Track;
class RecVertex;
class TrackParticleBase;
class IVertexLinearizedTrackFactory;
class Vertex;
}
namespace Rec
{
class TrackParticle;
}
namespace InDet
{
/** @class ZVTOP_SlowSpatialPointFinder
HelperClass for Topological Vertex Finder -ZVTOP-
Calculates the spatial point, which define the region of interest,
the region where we later look for the maxima of the vertex probability
function. Since at least two of the tracks (or RecVertex and Trk::Track)
must contribute to a maximum in the vertex probability function,
we calculate for each track pair the spatial point.
The found spatial point is rejected if chi² of this point is larger as chi²_cut.
@author Tatjana Lenz <tatjana.lenz@cern.ch>
*/
class ZVTOP_SlowSpatialPointFinder : public extends<AthAlgTool, IZVTOP_SpatialPointFinder>
{
public:
ZVTOP_SlowSpatialPointFinder(const std::string&,const std::string&,const IInterface*);
/** default destructor */
virtual ~ZVTOP_SlowSpatialPointFinder ();
/** standard Athena-Algorithm method */
virtual StatusCode initialize() override;
/** standard Athena-Algorithm method */
virtual StatusCode finalize () override;
virtual Trk::Vertex* findSpatialPoint(const Trk::Track* trk_1, const Trk::Track* trk_2) const override;
virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::Track* trk_1) const override;
virtual Trk::Vertex* findSpatialPoint(const Rec::TrackParticle* trk_1, const Rec::TrackParticle* trk_2) const override;
virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Rec::TrackParticle* trk_1) const override;
virtual Trk::Vertex* findSpatialPoint(const Trk::TrackParticleBase* trk_1, const Trk::TrackParticleBase* trk_2) const override;
virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParticleBase* trk_1) const override;
virtual Trk::Vertex* findSpatialPoint(const Trk::TrackParameters* perigee_1, const Trk::TrackParameters* perigee_2) const override;
virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParameters* perigee_1) const override;
private:
ToolHandle< Trk::IVertexLinearizedTrackFactory > m_linFactory;
double m_chi2;
};
} // end of namespace
#endif
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// ZVTOP_SpatialPointFinder.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef INDETZVTOP_SPATIALPOINTFINDER_H
#define INDETZVTOP_SPATIALPOINTFINDER_H
#include "AthenaBaseComps/AthAlgTool.h"
#include "InDetZVTOPVxFinder/IZVTOP_SpatialPointFinder.h"
namespace Trk
{
class Track;
class RecVertex;
class TrackParticleBase;
class Vertex;
}
namespace Rec {
class TrackParticle;
}
namespace InDet
{
/** @class ZVTOP_SpatialPointFinder
HelperClass for Topological Vertex Finder -ZVTOP-
Calculates the spatial point, which define the region of interest,
the region where we later look for the maxima of the vertex probability
function. Since at least two of the tracks (or RecVertex and Trk::Track)
must contribute to a maximum in the vertex probability function,
we calculate for each track pair the spatial point.
The found spatial point is rejected if chi² of this point is larger as chi²_cut.
@author Tatjana Lenz <tatjana.lenz@cern.ch>
*/
class ZVTOP_SpatialPointFinder : public extends<AthAlgTool, IZVTOP_SpatialPointFinder>
{
public:
ZVTOP_SpatialPointFinder(const std::string&,const std::string&,const IInterface*);
/** default destructor */
virtual ~ZVTOP_SpatialPointFinder ();
/** standard Athena-Algorithm method */
virtual StatusCode initialize() override;
/** standard Athena-Algorithm method */
virtual StatusCode finalize () override;
virtual Trk::Vertex* findSpatialPoint(const Trk::Track* trk_1, const Trk::Track* trk_2) const override;
virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::Track* trk_1) const override;
virtual Trk::Vertex* findSpatialPoint(const Rec::TrackParticle* trk_1, const Rec::TrackParticle* trk_2) const override;
virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Rec::TrackParticle* trk_1) const override;
virtual Trk::Vertex* findSpatialPoint(const Trk::TrackParticleBase* trk_1, const Trk::TrackParticleBase* trk_2) const override;
virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParticleBase* trk_1) const override;
virtual Trk::Vertex* findSpatialPoint(const Trk::TrackParameters* perigee_1, const Trk::TrackParameters* perigee_2) const override;
virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParameters* perigee_1) const override;
private:
double m_chi2;
};
} // end of namespace
#endif
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// ZVTOP_Tool.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef INDETZVTOP_TOOL_H
#define INDETZVTOP_TOOL_H
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "GaudiKernel/ServiceHandle.h"
#include "InDetRecToolInterfaces/IVertexFinder.h"
#include "xAODTracking/Vertex.h"
#include "xAODTracking/TrackParticle.h"
#include "xAODTracking/VertexContainer.h"
#include "xAODTracking/TrackParticleContainer.h"
class IBeamCondSvc;
namespace Trk
{
class IVertexFitter;
}
namespace InDet
{
class IZVTOP_SpatialPointFinder;
class IZVTOP_TrkProbTubeCalc;
class IZVTOP_SimpleVtxProbCalc;
/** @class ZVTOP_Tool
---Topological Vertex Finder Tool ---
This tool 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
Following properties can be set/changed via jobOptions:
---Input: TrackCollection
- \c TracksName: The name of the StoreGate input container from
which the tracks are read. The default is "Tracks", the container
from the legacy converters/ambiguity processor.
---Output: VxContainer
- \c VxCollectionOutputName: The name of the StoreGate container where the fit
results are put. default is "VxCollection".
---Vertex Fitter: Billoir FullVertexFitter
- \c FitRoutine: The routine which should be used for the fitting. The
default is "FullVertexFitter".
@author Tatjana Lenz <tatjana.lenz@cern.ch>
*/
class ZVTOP_Tool : virtual public IVertexFinder, public AthAlgTool
{
public:
ZVTOP_Tool(const std::string&,const std::string&,const IInterface*);
/** default destructor */
virtual ~ZVTOP_Tool ();
/** standard Athena-Algorithm method */
virtual StatusCode initialize() override ;
/** standard Athena-Algorithm method */
virtual StatusCode finalize () override ;
using IVertexFinder::findVertex;
virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
const TrackCollection* trackTES) const override ;
virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
const xAOD::TrackParticleContainer* trackParticles) const override;
private:
ToolHandle <Trk::IVertexFitter> m_iVertexFitter;
ToolHandle <InDet::IZVTOP_SpatialPointFinder> m_iSpatialPointFinder;
ToolHandle <InDet::IZVTOP_TrkProbTubeCalc> m_iTrkProbTubeCalc;
ToolHandle <InDet::IZVTOP_SimpleVtxProbCalc> m_iVtxProbCalc;
double m_resolvingCut;
double m_resolvingStep;
double m_vtxProb_cut;
double m_trk_chi2_cut;
ServiceHandle<IBeamCondSvc> m_iBeamCondSvc; //!< pointer to the beam condition service
};
} // end of namespace
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef IINDETZVTOP_TRKPARTBASEVERTEXSTATE_H
#define IINDETZVTOP_TRKPARTBASEVERTEXSTATE_H
#include "VxVertex/Vertex.h"
#include <vector>
namespace Trk{
class TrackParticleBase;
}
/**
* ZVTOP_Tool helper class
* to store the full vertex/tracks & vtx_probability
* information
* @author: Tatjana Lenz <Tatjana.Lenz@cern.ch>
*/
namespace InDet
{
class ZVTOP_TrkPartBaseVertexState
{
public:
/**Default Constructor */
ZVTOP_TrkPartBaseVertexState();
ZVTOP_TrkPartBaseVertexState(double& vtx_prob, Trk::Vertex& vertex, bool& beam_spot, std::vector<const Trk::TrackParticleBase*>& tracks);
/**virtual destructor of a class*/
virtual ~ZVTOP_TrkPartBaseVertexState();
/**Copy Constructor */
ZVTOP_TrkPartBaseVertexState (const ZVTOP_TrkPartBaseVertexState& vs); //copy-constructor
ZVTOP_TrkPartBaseVertexState &operator= (const ZVTOP_TrkPartBaseVertexState &) = default;
//(sroe): why do these return references to protected data?
double& vtx_prob(void);
Trk::Vertex& vertex(void);
bool& beam_spot(void);
std::vector<const Trk::TrackParticleBase*>& tracks(void);
inline void set_beam_spot(bool);
protected:
//vertex probability
double m_vtx_prob;
//associated vertex
Trk::Vertex m_vertex;
bool m_beam_spot;
// associated tracks
std::vector<const Trk::TrackParticleBase*> m_tracks;
};//end of class definitions
inline double& ZVTOP_TrkPartBaseVertexState::vtx_prob(void)
{
return m_vtx_prob;
}
inline Trk::Vertex& ZVTOP_TrkPartBaseVertexState::vertex(void)
{
return m_vertex;
}
inline std::vector<const Trk::TrackParticleBase*>& ZVTOP_TrkPartBaseVertexState::tracks(void)
{
return m_tracks;
}
inline bool& ZVTOP_TrkPartBaseVertexState::beam_spot(void)
{
return m_beam_spot;
}
inline void ZVTOP_TrkPartBaseVertexState::set_beam_spot(bool beam_spot)
{
m_beam_spot = beam_spot;
}
}//end of namespace definitions
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef IINDETZVTOP_TRKPARTVERTEXSTATE_H
#define IINDETZVTOP_TRKPARTVERTEXSTATE_H
#include "VxVertex/Vertex.h"
#include <vector>
namespace Rec{
class TrackParticle;
}
/**
* ZVTOP_Tool helper class
* to store the full vertex/tracks & vtx_probability
* information
* @author: Tatjana Lenz <Tatjana.Lenz@cern.ch>
*/
namespace InDet
{
class ZVTOP_TrkPartVertexState
{
public:
/**Default Constructor */
ZVTOP_TrkPartVertexState();
ZVTOP_TrkPartVertexState(double& vtx_prob, Trk::Vertex& vertex, bool& IP, std::vector<const Rec::TrackParticle*>& tracks);
/**virtual destructor of a class*/
virtual ~ZVTOP_TrkPartVertexState();
/**Copy Constructor */
ZVTOP_TrkPartVertexState (const ZVTOP_TrkPartVertexState& vs); //copy-constructor
ZVTOP_TrkPartVertexState &operator= (const ZVTOP_TrkPartVertexState &) = default;
double& vtx_prob(void);
Trk::Vertex& vertex(void);
bool& IP(void);
std::vector<const Rec::TrackParticle*>& tracks(void);
inline void set_IP(bool);
protected:
//vertex probability
double m_vtx_prob;
//associated vertex
Trk::Vertex m_vertex;
bool m_IP;
// associated tracks
std::vector<const Rec::TrackParticle*> m_tracks;
};//end of class definitions
inline double& ZVTOP_TrkPartVertexState::vtx_prob(void)
{
return m_vtx_prob;
}
inline Trk::Vertex& ZVTOP_TrkPartVertexState::vertex(void)
{
return m_vertex;
}
inline std::vector<const Rec::TrackParticle*>& ZVTOP_TrkPartVertexState::tracks(void)
{
return m_tracks;
}
inline bool& ZVTOP_TrkPartVertexState::IP(void)
{
return m_IP;
}
inline void ZVTOP_TrkPartVertexState::set_IP(bool IP)
{
m_IP = IP;
}
}//end of namespace definitions
#endif
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