4#ifndef TRIGTOOLS_TRIGVRTSECINCLUSIVE_H
5#define TRIGTOOLS_TRIGVRTSECINCLUSIVE_H
16#include "Gaudi/Property.h"
43 virtual StatusCode
execute(
const EventContext& ctx)
const override;
44 virtual StatusCode
finalize()
override;
48 using xAODContainers = std::pair< std::unique_ptr<xAOD::VertexContainer>, std::unique_ptr<xAOD::VertexAuxContainer> >;
51 Gaudi::Property<int>
m_vtxAlgorithm{
this,
"vtxAlgorithm", 0,
"Vertexing algorithm. 0 : TrigVSI algorithm, 1 : Offline VSI like algorithm"};
53 Gaudi::Property<bool>
m_recordTrkPair {
this,
"recordTrkPair",
false,
"Output EDM : Flag for record TrkPair vertices"};
55 Gaudi::Property<int>
m_cutPixelHits {
this,
"CutPixelHits", 0,
"Track selection : Hit requirements"};
56 Gaudi::Property<int>
m_cutSctHits {
this,
"CutSctHits", 2,
"Track selection : Hit requirements"};
57 Gaudi::Property<int>
m_cutSharedHits {
this,
"CutSharedHits", 99,
"Track selection : Hit requirements"};
58 Gaudi::Property<int>
m_cutSiHits {
this,
"CutSiHits", 0,
"Track selection : Hit requirements"};
59 Gaudi::Property<int>
m_cutBLayHits {
this,
"CutBLayHits", 0,
"Track selection : Hit requirements"};
61 Gaudi::Property<double>
m_trkChi2Cut {
this,
"TrkChi2Cut", 50.0,
"Track selection : Chi2 requirements"};
62 Gaudi::Property<double>
m_trkPtCut {
this,
"TrkPtCut", (
m_vtxAlgorithm == 0)? 2000. : 1000.,
"Track selection : pT requirements. 2 GeV in TrigVSI, 1 GeV in VSI"};
64 Gaudi::Property<double>
m_d0TrkPVDstMinCut {
this,
"d0TrkPVDstMinCut", 2.0,
"Track selection : Impact parameter requirements [mm]"};
65 Gaudi::Property<double>
m_d0TrkPVDstMaxCut {
this,
"d0TrkPVDstMaxCut", 300.0,
"Track selection : Impact parameter requirements [mm]"};
66 Gaudi::Property<double>
m_z0TrkPVDstMinCut {
this,
"z0TrkPVDstMinCut", 0.0,
"Track selection : Impact parameter requirements [mm]"};
67 Gaudi::Property<double>
m_z0TrkPVDstMaxCut {
this,
"z0TrkPVDstMaxCut", 1500.0,
"Track selection : Impact parameter requirements [mm]"};
68 Gaudi::Property<double>
m_twoTrkVtxFormingD0Cut {
this,
"twoTrkVtxFormingD0Cut", 1.,
"Track selection : Impact parameter requirements [mm]"};
71 Gaudi::Property<double>
m_maxR {
this,
"maxR", 563.,
"Track-pair selection : Max value for R of vertex position"};
73 Gaudi::Property<bool>
m_doTwoCircRCut {
this,
"doTwoCircRCut",
false,
"Track-pair selection : Flag for R cut derived from two-circles-intersection-point"};
74 Gaudi::Property<bool>
m_doFastRCut {
this,
"doFastRCut",
false,
"Track-pair selection : Flag for R cut derived from VKalVrtFitFast"};
76 Gaudi::Property<double>
m_fastD0minCut {
this,
"fastD0minCut", 5.,
"Track-pair selection : Threshold for rough d0 cut"};
77 Gaudi::Property<double>
m_fastD0deltaCut{
this,
"fastD0deltaCut", 4.2,
"Track-pair selection : Threshold for rough d0 cut"};
78 Gaudi::Property<double>
m_fastZ0minCut {
this,
"fastZ0minCut", 120.,
"Track-pair selection : Threshold for rough z0 cut"};
79 Gaudi::Property<double>
m_fastZ0deltaCut{
this,
"fastZ0deltaCut", 8.,
"Track-pair selection : Threshold for rough z0 cut"};
81 Gaudi::Property<double>
m_selVrtChi2Cut {
this,
"SelVrtChi2Cut", 4.5,
"Track-pair selection : Threshold for the chi2 value of track pair fitting with VKalVrtFit"};
83 Gaudi::Property<bool>
m_doPVCompatibilityCut {
this,
"doPVCompatibilityCut",
false,
"Track-pair selection : When set to true, require track pairs to be compatible with PV"};
84 Gaudi::Property<double>
m_dphiPVCut {
this,
"dphiPVCut", -0.8,
"Track-pair selection : Threshold for the cos of angle of the tracks and the momentum of the track pair"};
85 Gaudi::Property<double>
m_pvCompatibilityCut {
this,
"PVcompatibilityCut", -20.,
"Track-pair selection : Threshold for the track pair position along the momentum vector"};
87 Gaudi::Property<bool>
m_doMaterialMapVeto {
this,
"doMaterialMapVeto",
false,
"Track-pair selection : When set to true, perform material map veto on track pairs"};
89 Gaudi::Property<bool>
m_skipLargeCluster {
this,
"skipLargeCluster",
true,
"Flag to skip vertexing on clusters with too many tracks"};
90 Gaudi::Property<size_t>
m_maxTrks {
this,
"maxTrks", 100,
"Max track number to run vertexing"};
92 Gaudi::Property<size_t>
m_minTrkPairsMerge {
this,
"minTrkPairsMerge", 6,
"Clusters with track pairs less than minTrkPairsMerge and tracks less than minTrksMerge will be merged into single vertex"};
93 Gaudi::Property<size_t>
m_minTrksMerge {
this,
"minTrksMerge", 4,
"Clusters with track pairs less than minTrkPairsMerge and tracks less than minTrksMerge will be merged into single vertex"};
96 Gaudi::Property<size_t>
m_maxWrkVertices {
this,
"maxWrkVertices", 10000,
"Offline VSI option"};
158 virtual double x()
const override {
return vertex.x(); }
159 virtual double y()
const override {
return vertex.y(); }
160 virtual double z()
const override {
return vertex.z(); }
201 ToolHandle<Trk::TrkVKalVrtFitter>
m_fitSvc {
this,
"VertexFitter",
"",
"VKalVrtFitter tool to fit tracks into the common vertex" };
202 ToolHandle<InDet::VertexPointEstimator>
m_vertexPointEstimator {
this,
"VertexPointEstimator",
"",
"tool to find starting point for the vertex fitter"};
204 ToolHandle<GenericMonitoringTool>
m_monTool{
this,
"MonTool",
"",
"Monitoring tool" };
224 template<
typename VrtType,
typename Coord>
227 StatusCode
fitVertexFromTracks ( WrkVrt&,
const std::vector<const xAOD::TrackParticle*>&,
const EventContext& )
const;
228 StatusCode
mergeVertexFromDiTrkVrt (
WrkVrtContainer&,
const std::vector<std::pair<size_t,size_t>>&,
const std::vector<size_t>&,
const std::vector<const xAOD::TrackParticle*>&,
const EventContext& )
const;
point classes for clustering
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Interface for vertex classes processed in VtxMap.
StatusCode fillVtxContainer(xAODContainers &, const WrkVrtContainer &, std::vector< const xAOD::TrackParticle * > &) const
SG::WriteHandleKey< xAOD::VertexContainer > m_vxCandidatesOutputName
bool selectTrack_d0Cut(const xAOD::TrackParticle *trk) const
Gaudi::Property< double > m_twoTrkVtxFormingD0Cut
virtual StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< size_t > m_minTrksMerge
Gaudi::Property< int > m_cutBLayHits
Gaudi::Property< bool > m_doPVCompatibilityCut
Gaudi::Property< double > m_selVrtChi2Cut
Gaudi::Property< double > m_fastD0minCut
Gaudi::Property< bool > m_doTwoCircRCut
bool selectTrack_hitPattern(const xAOD::TrackParticle *trk) const
Gaudi::Property< size_t > m_maxTrks
Gaudi::Property< size_t > m_maxWrkVertices
bool selectTrack_chi2Cut(const xAOD::TrackParticle *trk) const
virtual ~TrigVrtSecInclusive()
SG::WriteHandleKey< xAOD::VertexContainer > m_trkPairOutputName
Gaudi::Property< double > m_dphiPVCut
StatusCode findDiTrackVertex(WrkVrtContainer &, std::vector< std::pair< size_t, size_t > > &, std::vector< const xAOD::TrackParticle * > &, const EventContext &, const xAOD::Vertex *) const
StatusCode cleanUp(WrkVrtContainer &) const
Gaudi::Property< double > m_improveChi2ProbThreshold
virtual StatusCode finalize() override
std::string m_materialMapInnerHistName
std::string m_materialMapInnerFileName
Gaudi::Property< bool > m_doMaterialMapVeto
bool selectTrack_pTCut(const xAOD::TrackParticle *trk) const
StatusCode findNTrackVertex(WrkVrtContainer &, TrigVSI::VtxMap< VrtType, Coord > &, const std::vector< const xAOD::TrackParticle * > &, const EventContext &) const
Gaudi::Property< double > m_d0TrkPVDstMinCut
Gaudi::Property< double > m_maxR
std::string m_materialMapOuterFileName
virtual StatusCode initialize() override
Gaudi::Property< double > m_d0TrkPVDstMaxCut
Gaudi::Property< bool > m_doFastRCut
TrigVrtSecInclusive(const std::string &name, ISvcLocator *pSvcLocator)
std::string m_materialMapInnerMatrixName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_firstPassTracksName
Gaudi::Property< double > m_trkChi2Cut
Gaudi::Property< double > m_fastZ0deltaCut
std::vector< WrkVrt > WrkVrtContainer
StatusCode mergeVertexFromDiTrkVrt(WrkVrtContainer &, const std::vector< std::pair< size_t, size_t > > &, const std::vector< size_t > &, const std::vector< const xAOD::TrackParticle * > &, const EventContext &) const
Reconstruct multi-track vertices from incompatible track pair lists.
StatusCode findNtrackVerticesVSI(WrkVrtContainer &, std::vector< std::pair< size_t, size_t > > &, std::vector< const xAOD::TrackParticle * > &, const EventContext &) const
std::string m_materialMapOuterHistName
Gaudi::Property< double > m_pvCompatibilityCut
Gaudi::Property< bool > m_truncateWrkVertices
Gaudi::Property< int > m_vtxAlgorithm
bool selectTrack(const xAOD::TrackParticle *trk) const
Gaudi::Property< bool > m_skipLargeCluster
ToolHandle< InDet::VertexPointEstimator > m_vertexPointEstimator
Gaudi::Property< double > m_fastZ0minCut
StatusCode fitVertexFromTracks(WrkVrt &, const std::vector< const xAOD::TrackParticle * > &, const EventContext &) const
Reconstruct vertex from given tracks.
TH3S * m_materialMapInner
Gaudi::Property< int > m_cutSctHits
size_t nTrkCommon(WrkVrtContainer &, const std::pair< unsigned, unsigned > &) const
Gaudi::Property< bool > m_recordTrkPair
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_secondPassTracksName
Gaudi::Property< double > m_fastD0deltaCut
ToolHandle< Trk::TrkVKalVrtFitter > m_fitSvc
Gaudi::Property< size_t > m_minTrkPairsMerge
Gaudi::Property< int > m_cutPixelHits
ToolHandle< GenericMonitoringTool > m_monTool
std::pair< std::unique_ptr< xAOD::VertexContainer >, std::unique_ptr< xAOD::VertexAuxContainer > > xAODContainers
Gaudi::Property< int > m_cutSiHits
Gaudi::Property< double > m_z0TrkPVDstMinCut
Gaudi::Property< double > m_z0TrkPVDstMaxCut
TH3S * m_materialMapOuter
TMatrixT< double > * m_materialMapMatrix
Gaudi::Property< double > m_trkPtCut
StatusCode trackSelection(const xAOD::TrackParticleContainer *, const xAOD::TrackParticleContainer *, std::vector< const xAOD::TrackParticle * > &) const
Gaudi::Property< int > m_cutSharedHits
bool selectTrack_z0Cut(const xAOD::TrackParticle *trk) const
StatusCode findDiTrackVertexVSI(WrkVrtContainer &, std::vector< std::pair< size_t, size_t > > &, std::vector< const xAOD::TrackParticle * > &, const EventContext &, const xAOD::Vertex *) const
SG::ReadHandleKey< xAOD::VertexContainer > m_PrimaryVxInputName
The vertex map class to be used to find multi-track vertices.
Eigen::Matrix< double, 3, 1 > Vector3D
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
std::vector< float > vrtFast_trkd0
std::vector< float > vrtFast_trkz0
double fitQuality() const
Amg::Vector3D vertex
flaged true for track pair vertex
double ndof() const
stores the value of some observable to the closest WrkVrt ( observable = e.g. significance )
virtual double y() const override
unsigned nTracksTotal() const
std::vector< double > vertexCov
VKalVrt fit vertex 4-momentum.
virtual const std::deque< size_t > & selectedTrackIndices() const override
Return indices of tracks associated with the vertex.
std::deque< size_t > m_selectedTrackIndices
std::vector< std::vector< double > > trkAtVrt
total charge of the vertex
long int charge
list of VKalVrt fit chi2 for each track
double closestWrkVrtValue
stores the index of the closest WrkVrt in std::vector<WrkVrt>
bool isPair
flaged true for good vertex candidates
std::deque< size_t > m_associatedTrackIndices
list if indices in TrackParticleContainer for selectedBaseTracks
std::vector< double > chi2PerTrk
VKalVrt fit chi2 result.
TLorentzVector vertexMom
VKalVrt fit vertex position.
double chi2
VKalVrt fit covariance.
virtual double z() const override
virtual std::deque< size_t > & selectedTrackIndices() override
Return indices of tracks associated with the vertex.
double chi2Core
VKalVrt fit chi2 result.
virtual double x() const override
unsigned long closestWrkVrtIndex
list of track parameters wrt the reconstructed vertex