ATLAS Offline Software
LeadTracksRoISeedTool.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2020-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
8 // (c) ATLAS Detector software
10 // Class for Z-window RoI from leading two track middle vertex z-.
12 
13 #ifndef SiSpacePointsSeedTool_xk_LeadTracksRoISeedTool_h
14 #define SiSpacePointsSeedTool_xk_LeadTracksRoISeedTool_h
15 
17 #include "GaudiKernel/EventContext.h"
21 #include "TrkTrack/Track.h"
23 
24 #include <vector>
25 #include <string>
26 
27 namespace InDet {
28 
29  class LeadTracksRoISeedTool final:
30  public extends<AthAlgTool, IZWindowRoISeedTool>
31  {
32 
34  // Public methods:
36 
37  public:
38 
42 
43  LeadTracksRoISeedTool(const std::string&,const std::string&,const IInterface*);
44  virtual ~LeadTracksRoISeedTool() = default;
45  virtual StatusCode initialize() override;
47 
49  virtual std::vector<ZWindow> getRoIs(const EventContext& ctx) const override;
50 
51  protected:
52 
57 
61 
62 
63  SG::ReadHandleKey<TrackCollection> m_inputTracksCollectionKey{this, "InputTracksCollection", "ExtendedTracks", "Input Track collection."};
64  FloatProperty m_trkLeadingPt{this, "LeadingMinTrackPt", 18000., "min. p_{T} of leading track"};
65  FloatProperty m_trkSubLeadingPt{this, "SubleadingMinTrackPt", 12500., "min. p_{T} of sub-leading track"};
66  FloatProperty m_trkEtaMax{this, "TracksMaxEta", 2.5, "max |eta| for tracks consideration"};
67  FloatProperty m_trkD0Max{this, "TracksMaxD0", 9999., "max |d0| for tracks consideration"};
68  FloatProperty m_maxDeltaZ{this, "MaxDeltaZTracksPair", 1.0, "maximum delta z0 between leading tracks pair"};
69  FloatProperty m_z0Window{this, "TrackZ0Window", 30.0, "width of z0 window"};
70  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
71  ToolHandle< Reco::ITrackToVertex > m_trackToVertex{this, "TrackToVertexTool", "Reco::TrackToVertex/TrackToVertex", "Track-to-Vertex extrapolation tool"};
72 
75  static bool tracksPtGreaterThan(const Trk::Track* const &track1, const Trk::Track* const &track2)
76  {
77  float theta1 = track1->perigeeParameters()->parameters()[Trk::theta];
78  float ptinv1 = std::abs(track1->perigeeParameters()->parameters()[Trk::qOverP]) / std::sin(theta1);
79  float theta2 = track2->perigeeParameters()->parameters()[Trk::theta];
80  float ptinv2 = std::abs(track2->perigeeParameters()->parameters()[Trk::qOverP]) / std::sin(theta2);
81  //return less than of inverse
82  return (ptinv1 < ptinv2);
83  }
84 
85  }; // LeadTracksRoISeedTool
86 } //InDet namespace
87 
88 #endif // SiSpacePointsSeedMaker_LeadTracksRoISeedTool
89 
InDet::LeadTracksRoISeedTool::m_z0Window
FloatProperty m_z0Window
Definition: LeadTracksRoISeedTool.h:69
InDet::LeadTracksRoISeedTool
Definition: LeadTracksRoISeedTool.h:31
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet::LeadTracksRoISeedTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: LeadTracksRoISeedTool.h:70
InDet::LeadTracksRoISeedTool::LeadTracksRoISeedTool
LeadTracksRoISeedTool(const LeadTracksRoISeedTool &)=delete
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::LeadTracksRoISeedTool::m_maxDeltaZ
FloatProperty m_maxDeltaZ
Definition: LeadTracksRoISeedTool.h:68
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
InDet::LeadTracksRoISeedTool::m_trkSubLeadingPt
FloatProperty m_trkSubLeadingPt
Definition: LeadTracksRoISeedTool.h:65
Track.h
InDet::LeadTracksRoISeedTool::initialize
virtual StatusCode initialize() override
Definition: LeadTracksRoISeedTool.cxx:36
InDet::LeadTracksRoISeedTool::m_inputTracksCollectionKey
SG::ReadHandleKey< TrackCollection > m_inputTracksCollectionKey
Definition: LeadTracksRoISeedTool.h:63
InDet::LeadTracksRoISeedTool::getRoIs
virtual std::vector< ZWindow > getRoIs(const EventContext &ctx) const override
Compute RoI.
Definition: LeadTracksRoISeedTool.cxx:52
Trk::theta
@ theta
Definition: ParamDefs.h:66
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
TrackCollection.h
ITrackToVertex.h
Trk::Track::perigeeParameters
const Perigee * perigeeParameters() const
return Perigee.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:163
InDet::LeadTracksRoISeedTool::m_trkD0Max
FloatProperty m_trkD0Max
Definition: LeadTracksRoISeedTool.h:67
InDet::LeadTracksRoISeedTool::tracksPtGreaterThan
static bool tracksPtGreaterThan(const Trk::Track *const &track1, const Trk::Track *const &track2)
Definition: LeadTracksRoISeedTool.h:75
InDet::LeadTracksRoISeedTool::m_trackToVertex
ToolHandle< Reco::ITrackToVertex > m_trackToVertex
Definition: LeadTracksRoISeedTool.h:71
SG::ReadCondHandleKey< InDet::BeamSpotData >
InDet::LeadTracksRoISeedTool::operator=
LeadTracksRoISeedTool & operator=(const LeadTracksRoISeedTool &)=delete
InDet::LeadTracksRoISeedTool::m_trkLeadingPt
FloatProperty m_trkLeadingPt
Definition: LeadTracksRoISeedTool.h:64
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
BeamSpotData.h
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
IZWindowRoISeedTool.h
InDet::LeadTracksRoISeedTool::~LeadTracksRoISeedTool
virtual ~LeadTracksRoISeedTool()=default
InDet::LeadTracksRoISeedTool::m_trkEtaMax
FloatProperty m_trkEtaMax
Definition: LeadTracksRoISeedTool.h:66
InDet::LeadTracksRoISeedTool::LeadTracksRoISeedTool
LeadTracksRoISeedTool()=delete