ATLAS Offline Software
Loading...
Searching...
No Matches
T2VertexBeamSpotTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
14/**********************************************************************************
15 * @project: HLT, PESA algorithms
16 * @package: TrigT2BeamSpot
17 * @class : T2VertexBeamSpot
18 *
19 * @brief PESA algorithm that measures and monitors beam spot position using vertices
20 *
21 * @author David W. Miller <David.W.Miller@cern.ch> - SLAC, Stanford University
22 **********************************************************************************/
23#ifndef TRIGT2BEAMSPOT_T2VERTEXBEAMSPOTTOOL_H
24#define TRIGT2BEAMSPOT_T2VERTEXBEAMSPOTTOOL_H
25#include <string>
26#include <vector>
27#include <memory>
28// Local tools
29#include "T2BSTrackFilterTool.h"
30#include "T2BeamSpot.h"
31#include "T2SplitVertex.h"
32#include "T2Track.h"
33#include "T2TrackClusterer.h"
34//Athena tools
36#include "GaudiKernel/ToolHandle.h"
39//Tracking
43//Data handles
46//Beam data
48//Monitoring tool
50
51namespace InDet {
52 class BeamSpotData;
53}
54
55namespace PESA {
56 class T2SplitVertex;
70 public:
71
72 using TrackVector = std::vector<const Trk::Track*>;
73
74 T2VertexBeamSpotTool( const std::string& type, const std::string& name, const IInterface* parent );
75
76 virtual StatusCode initialize() override final;
77
83 void updateBS(const TrackCollection& tracks, const EventContext& ctx) const;
84
85 private:
86
89 unsigned numHighPTTrack(const TrackVector& tracks) const;
90
91 unsigned int reconstructVertices(TrackVector& tracks,
92 TrigVertexCollection& myVertexCollection,
93 DataVector< TrigVertexCollection >& mySplitVertexCollections, const EventContext& ) const;
94
95 bool isGoodVertex ( const T2Vertex& vertex ) const;
96 bool isGoodVertexBCID( const T2Vertex& vertex ) const;
97
99 DataVector< TrigVertexCollection >& mySplitVertexCollections,
100 T2TrackClusterer& trackClusterer,
101 const InDet::BeamSpotData* indetBeamSpot,
102 const EventContext& ) const;
103
104 /* Monitor cluster parameters */
105 void monitor_cluster( const T2TrackClusterer& clusterer ) const;
106
107 /* Monitor parameters of tracks inside the cluster */
108 void monitor_cluster_tracks(T2TrackClusterer& clusterer, const Trk::Track & track ) const;
109
110 /* Monitor vertex parameters */
111 void monitor_vertex(const std::string& prefix, const std::string& suffix, const T2Vertex &vertex, int bcid=-1 ) const;
112
113 /* Monitor split vertex parameters */
114 void monitor_split_vertex(const std::string& prefix, const std::string& suffix, const T2SplitVertex& vertex) const;
115
116
117 /* Number of Z blocks */
123 std::string m_clusterPerigee = "original"; // one of "original", "beamspot", "beamline"
124 T2TrackClusterer::TrackPerigee m_clusterTrackPerigee = T2TrackClusterer::perigee_original;
125
126 /* Track selection criteria */
128
129 /* Vertex selection criteria */
130 unsigned int m_vtxNTrkMin;
131 unsigned int m_vtxNTrkMax;
143
145 unsigned int m_vtxBCIDNTrkMin;
146
148
149 bool m_filterBS; // if true then filter tracks against local beamspot estimate
150
151 //Data dependencies
152 SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
153
154 //The same as in Run2 (m_vertexCollName)
155 SG::WriteHandleKey<TrigVertexCollection> m_outputVertexCollectionKey{this, "OutputVertexCollection", "myVertices", "SG key for output vertex collection"};
156 //TODO: to be added SG::WriteHandleKeyArray<TrigVertexCollection> m_outputSplitVertexCollectionKey; /*Input list of track collection names which should be used for the algorithms*/
157
159 ToolHandle<ITrigPrimaryVertexFitter> m_primaryVertexFitterTool;
160
161 ToolHandle<T2BSTrackFilterTool> m_trackFilterTool{this, "TrackFilter", "PESA::T2BSTrackFilterTool/T2BSTrackFilterTool" };
162 ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
163
164 };
165
166} // end namespace
167
168#endif
DataVector adapter that acts like it holds const pointers.
An STL vector of pointers that by default owns its pointed-to elements.
Property holding a SG store/key/clid from which a WriteHandle is made.
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Derived DataVector<T>.
Definition DataVector.h:795
bool isGoodVertex(const T2Vertex &vertex) const
unsigned int reconstructVertices(TrackVector &tracks, TrigVertexCollection &myVertexCollection, DataVector< TrigVertexCollection > &mySplitVertexCollections, const EventContext &) const
void monitor_cluster(const T2TrackClusterer &clusterer) const
ToolHandle< T2BSTrackFilterTool > m_trackFilterTool
SG::WriteHandleKey< TrigVertexCollection > m_outputVertexCollectionKey
T2VertexBeamSpotTool(const std::string &type, const std::string &name, const IInterface *parent)
bool isGoodVertexBCID(const T2Vertex &vertex) const
void monitor_split_vertex(const std::string &prefix, const std::string &suffix, const T2SplitVertex &vertex) const
void reconstructSplitVertices(TrackVector &tracks, DataVector< TrigVertexCollection > &mySplitVertexCollections, T2TrackClusterer &trackClusterer, const InDet::BeamSpotData *indetBeamSpot, const EventContext &) const
ToolHandle< GenericMonitoringTool > m_monTool
void monitor_vertex(const std::string &prefix, const std::string &suffix, const T2Vertex &vertex, int bcid=-1) const
void updateBS(const TrackCollection &tracks, const EventContext &ctx) const
Update beam spot data with new track information.
T2TrackClusterer::TrackPerigee m_clusterTrackPerigee
ToolHandle< ITrigPrimaryVertexFitter > m_primaryVertexFitterTool
Primary Vertex Fitter Tool.
void monitor_cluster_tracks(T2TrackClusterer &clusterer, const Trk::Track &track) const
virtual StatusCode initialize() override final
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
unsigned numHighPTTrack(const TrackVector &tracks) const
Return count of high pT track in the track list, the total number of these high pT tracks is checked ...
std::vector< const Trk::Track * > TrackVector
unsigned int m_vtxBCIDNTrkMin
Additional vertex selection criteria for BCID measurements.
Property holding a SG store/key/clid from which a WriteHandle is made.
Primary Vertex Finder.
Local tools.
Definition idx.h:9
Forward declaration.
Ensure that the ATLAS eigen extensions are properly loaded.
STL namespace.
#define private