ATLAS Offline Software
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 
51 namespace InDet {
52  class BeamSpotData;
53 }
54 
55 namespace 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 
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 */
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 */
127  unsigned m_totalNTrkMin;
128 
129  /* Vertex selection criteria */
130  unsigned int m_vtxNTrkMin;
131  unsigned int m_vtxNTrkMax;
132  double m_vtxQualMin;
133  double m_vtxQualMax;
135  double m_vtxMassMin;
137  double m_vtxXposMax;
138  double m_vtxXerrMax;
139  double m_vtxYposMax;
140  double m_vtxYerrMax;
141  double m_vtxZposMax;
142  double m_vtxZerrMax;
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
PESA::T2VertexBeamSpotTool::isGoodVertex
bool isGoodVertex(const T2Vertex &vertex) const
Definition: T2VertexBeamSpotTool.cxx:473
PESA::T2VertexBeamSpotTool::TrackVector
std::vector< const Trk::Track * > TrackVector
Definition: T2VertexBeamSpotTool.h:72
PESA::T2VertexBeamSpotTool::m_filterBS
bool m_filterBS
Definition: T2VertexBeamSpotTool.h:149
PESA::T2VertexBeamSpotTool::m_trackFilterTool
ToolHandle< T2BSTrackFilterTool > m_trackFilterTool
Definition: T2VertexBeamSpotTool.h:161
PESA::T2VertexBeamSpotTool::m_vtxMassMin
double m_vtxMassMin
Definition: T2VertexBeamSpotTool.h:135
hotSpotInTAG.suffix
string suffix
Definition: hotSpotInTAG.py:186
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
PESA::T2VertexBeamSpotTool::m_vtxQualMax
double m_vtxQualMax
Definition: T2VertexBeamSpotTool.h:133
PESA::T2VertexBeamSpotTool::m_vtxQualMin
double m_vtxQualMin
Definition: T2VertexBeamSpotTool.h:132
PESA::T2Vertex
Definition: T2Vertex.h:100
T2BeamSpot.h
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
PESA::T2VertexBeamSpotTool::numHighPTTrack
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 ...
Definition: T2VertexBeamSpotTool.cxx:176
PESA::T2VertexBeamSpotTool::monitor_split_vertex
void monitor_split_vertex(const std::string &prefix, const std::string &suffix, const T2SplitVertex &vertex) const
Definition: T2VertexBeamSpotTool.cxx:556
PESA::T2VertexBeamSpotTool::m_vtxNTrkMin
unsigned int m_vtxNTrkMin
Definition: T2VertexBeamSpotTool.h:130
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
PESA::T2VertexBeamSpotTool::T2VertexBeamSpotTool
T2VertexBeamSpotTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: T2VertexBeamSpotTool.cxx:67
PESA::T2VertexBeamSpotTool::isGoodVertexBCID
bool isGoodVertexBCID(const T2Vertex &vertex) const
Definition: T2VertexBeamSpotTool.cxx:494
PESA::T2VertexBeamSpotTool::m_reclusterSplit
bool m_reclusterSplit
Definition: T2VertexBeamSpotTool.h:121
PESA::T2VertexBeamSpotTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: T2VertexBeamSpotTool.h:152
PESA
Local tools.
Definition: T2BeamSpot.cxx:13
GenericMonitoringTool.h
PESA::T2VertexBeamSpotTool::m_vtxXposMax
double m_vtxXposMax
Definition: T2VertexBeamSpotTool.h:137
PESA::T2VertexBeamSpotTool::m_vtxYposMax
double m_vtxYposMax
Definition: T2VertexBeamSpotTool.h:139
PESA::T2VertexBeamSpotTool::monitor_cluster
void monitor_cluster(const T2TrackClusterer &clusterer) const
Definition: T2VertexBeamSpotTool.cxx:504
SG::WriteHandleKey< TrigVertexCollection >
PESA::T2VertexBeamSpotTool::m_clusterTrackPerigee
T2TrackClusterer::TrackPerigee m_clusterTrackPerigee
Definition: T2VertexBeamSpotTool.h:124
PESA::T2VertexBeamSpotTool
This class uses primary vertex reconstruction to measure and monitor the LHC beam as seen by the ATLA...
Definition: T2VertexBeamSpotTool.h:69
PESA::T2VertexBeamSpotTool::m_vtxZerrMax
double m_vtxZerrMax
Definition: T2VertexBeamSpotTool.h:142
T2SplitVertex.h
PESA::T2VertexBeamSpotTool::m_primaryVertexFitterTool
ToolHandle< ITrigPrimaryVertexFitter > m_primaryVertexFitterTool
Primary Vertex Fitter Tool.
Definition: T2VertexBeamSpotTool.h:159
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PESA::T2VertexBeamSpotTool::m_vtxBCIDNTrkMin
unsigned int m_vtxBCIDNTrkMin
Additional vertex selection criteria for BCID measurements.
Definition: T2VertexBeamSpotTool.h:145
PESA::T2VertexBeamSpotTool::m_splitWholeCluster
bool m_splitWholeCluster
Definition: T2VertexBeamSpotTool.h:120
AthAlgTool.h
TrackCollection.h
T2Track.h
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
test_pyathena.parent
parent
Definition: test_pyathena.py:15
PESA::T2VertexBeamSpotTool::reconstructVertices
unsigned int reconstructVertices(TrackVector &tracks, TrigVertexCollection &myVertexCollection, DataVector< TrigVertexCollection > &mySplitVertexCollections, const EventContext &) const
Definition: T2VertexBeamSpotTool.cxx:193
PESA::T2TrackClusterer
Definition: T2TrackClusterer.h:42
PESA::T2VertexBeamSpotTool::m_trackSeedPt
double m_trackSeedPt
Definition: T2VertexBeamSpotTool.h:122
DataVector< Trk::Track >
PESA::T2VertexBeamSpotTool::m_vtxNTrkMax
unsigned int m_vtxNTrkMax
Definition: T2VertexBeamSpotTool.h:131
ReadCondHandleKey.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
T2BSTrackFilterTool.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
PESA::T2SplitVertex
Definition: T2SplitVertex.h:52
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
PESA::T2VertexBeamSpotTool::m_vtxZposMax
double m_vtxZposMax
Definition: T2VertexBeamSpotTool.h:141
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
PESA::T2VertexBeamSpotTool::m_vtxYerrMax
double m_vtxYerrMax
Definition: T2VertexBeamSpotTool.h:140
TrigVertexCollection
Definition: TrigVertexCollection.h:13
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
PESA::T2VertexBeamSpotTool::m_vtxChi2ProbMin
double m_vtxChi2ProbMin
Definition: T2VertexBeamSpotTool.h:134
PESA::T2VertexBeamSpotTool::reconstructSplitVertices
void reconstructSplitVertices(TrackVector &tracks, DataVector< TrigVertexCollection > &mySplitVertexCollections, T2TrackClusterer &trackClusterer, const InDet::BeamSpotData *indetBeamSpot, const EventContext &) const
Definition: T2VertexBeamSpotTool.cxx:379
PESA::T2VertexBeamSpotTool::m_weightSeed
bool m_weightSeed
Definition: T2VertexBeamSpotTool.h:119
PESA::T2VertexBeamSpotTool::m_totalNTrkMin
unsigned m_totalNTrkMin
Definition: T2VertexBeamSpotTool.h:127
PESA::T2VertexBeamSpotTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: T2VertexBeamSpotTool.h:162
PESA::T2VertexBeamSpotTool::m_vtxXerrMax
double m_vtxXerrMax
Definition: T2VertexBeamSpotTool.h:138
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
PESA::T2VertexBeamSpotTool::initialize
virtual StatusCode initialize() override final
Definition: T2VertexBeamSpotTool.cxx:109
ITrigPrimaryVertexFitter.h
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
T2TrackClusterer.h
BeamSpotData.h
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
AthAlgTool
Definition: AthAlgTool.h:26
PESA::T2VertexBeamSpotTool::m_trackClusDZ
double m_trackClusDZ
Definition: T2VertexBeamSpotTool.h:118
PESA::T2VertexBeamSpotTool::m_outputVertexCollectionKey
SG::WriteHandleKey< TrigVertexCollection > m_outputVertexCollectionKey
Definition: T2VertexBeamSpotTool.h:155
PESA::T2VertexBeamSpotTool::m_vtxSumPtMin
double m_vtxSumPtMin
Definition: T2VertexBeamSpotTool.h:136
PESA::T2VertexBeamSpotTool::m_clusterPerigee
std::string m_clusterPerigee
Definition: T2VertexBeamSpotTool.h:123
PESA::T2VertexBeamSpotTool::monitor_vertex
void monitor_vertex(const std::string &prefix, const std::string &suffix, const T2Vertex &vertex, int bcid=-1) const
Definition: T2VertexBeamSpotTool.cxx:526
PESA::T2VertexBeamSpotTool::m_nSplitVertices
unsigned m_nSplitVertices
Definition: T2VertexBeamSpotTool.h:147
PESA::T2VertexBeamSpotTool::monitor_cluster_tracks
void monitor_cluster_tracks(T2TrackClusterer &clusterer, const Trk::Track &track) const
Definition: T2VertexBeamSpotTool.cxx:513
TrigVertexCollection.h
PESA::T2VertexBeamSpotTool::updateBS
void updateBS(const TrackCollection &tracks, const EventContext &ctx) const
Update beam spot data with new track information.
Definition: T2VertexBeamSpotTool.cxx:127