ATLAS Offline Software
MSVertexTrackletTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MSVERTEXTRACKLETTOOL_H
6 #define MSVERTEXTRACKLETTOOL_H
7 
8 #include <utility>
9 #include <vector>
10 
12 #include "GaudiKernel/ServiceHandle.h"
15 #include "MSVertexUtils/Tracklet.h"
22 
23 namespace Muon {
24 
25  class MSVertexTrackletTool : virtual public IMSVertexTrackletTool, public AthAlgTool {
26  public:
27  MSVertexTrackletTool(const std::string& type, const std::string& name, const IInterface* parent);
28  virtual ~MSVertexTrackletTool() = default;
29 
30  virtual StatusCode initialize() override;
31 
32  StatusCode findTracklets(std::vector<Tracklet>& traklets, const EventContext& ctx) const override;
33 
34  private:
35  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
36 
42 
44 
45  int SortMDThits(std::vector<std::vector<const Muon::MdtPrepData*> >& SortedMdt, const EventContext& ctx) const;
46  bool SortMDT(Identifier& i1, Identifier& i2) const;
47  std::vector<TrackletSegment> TrackletSegmentFitter(std::vector<const Muon::MdtPrepData*>& mdts) const;
48  std::vector<TrackletSegment> TrackletSegmentFitterCore(std::vector<const Muon::MdtPrepData*>& mdts,
49  std::vector<std::pair<float, float> >& SeedParams) const;
50  std::vector<std::pair<float, float> > SegSeeds(std::vector<const Muon::MdtPrepData*>& mdts) const;
51  static float SeedResiduals(std::vector<const Muon::MdtPrepData*>& mdts, float slope, float inter) ;
52  std::vector<TrackletSegment> CleanSegments(std::vector<TrackletSegment>& segs) const;
53  bool DeltabCalc(TrackletSegment& ML1seg, TrackletSegment& ML2seg) const;
54  static float TrackMomentum(int chamber, float deltaAlpha) ;
55  static float TrackMomentumError(TrackletSegment& ml1, TrackletSegment& ml2) ;
56  static float TrackMomentumError(TrackletSegment& ml1) ;
57  std::vector<Tracklet> ResolveAmbiguousTracklets(std::vector<Tracklet>& tracks) const;
58  static void convertToTrackParticles(std::vector<Tracklet>& tracklets, SG::WriteHandle<xAOD::TrackParticleContainer>& container) ;
59 
60  void addMDTHits(std::vector<const Muon::MdtPrepData*>& hits, std::vector<std::vector<const Muon::MdtPrepData*> >& SortedMdt) const;
61 
62  SG::ReadHandleKey<Muon::MdtPrepDataContainer> m_mdtTESKey{this, "mdtTES", "MDT_DriftCircles"};
63  SG::WriteHandleKey<xAOD::TrackParticleContainer> m_TPContainer{this, "xAODTrackParticleContainer", "MSonlyTracklets"};
64  };
65 
66 } // namespace Muon
67 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
Muon::MSVertexTrackletTool::DeltabCalc
bool DeltabCalc(TrackletSegment &ML1seg, TrackletSegment &ML2seg) const
Definition: MSVertexTrackletTool.cxx:952
IMSVertexTrackletTool.h
Muon::MSVertexTrackletTool::m_TPContainer
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_TPContainer
Definition: MSVertexTrackletTool.h:63
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
Muon::MSVertexTrackletTool::m_minSegFinderChi2
float m_minSegFinderChi2
Definition: MSVertexTrackletTool.h:38
Muon::MSVertexTrackletTool::m_SeedResidual
float m_SeedResidual
Definition: MSVertexTrackletTool.h:37
Muon::MSVertexTrackletTool::m_tightTrackletRequirement
bool m_tightTrackletRequirement
Definition: MSVertexTrackletTool.h:43
Muon::MSVertexTrackletTool::findTracklets
StatusCode findTracklets(std::vector< Tracklet > &traklets, const EventContext &ctx) const override
Definition: MSVertexTrackletTool.cxx:76
calibdata.chamber
chamber
Definition: calibdata.py:32
Muon::MSVertexTrackletTool::~MSVertexTrackletTool
virtual ~MSVertexTrackletTool()=default
Muon::MSVertexTrackletTool::initialize
virtual StatusCode initialize() override
Definition: MSVertexTrackletTool.cxx:66
Muon::MSVertexTrackletTool::TrackletSegmentFitter
std::vector< TrackletSegment > TrackletSegmentFitter(std::vector< const Muon::MdtPrepData * > &mdts) const
Definition: MSVertexTrackletTool.cxx:500
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::MSVertexTrackletTool::MSVertexTrackletTool
MSVertexTrackletTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: MSVertexTrackletTool.cxx:46
Muon::MSVertexTrackletTool::m_EndcapDeltaAlphaCut
float m_EndcapDeltaAlphaCut
Definition: MSVertexTrackletTool.h:41
Muon::MSVertexTrackletTool::convertToTrackParticles
static void convertToTrackParticles(std::vector< Tracklet > &tracklets, SG::WriteHandle< xAOD::TrackParticleContainer > &container)
Definition: MSVertexTrackletTool.cxx:367
GeoPrimitives.h
MdtPrepDataContainer.h
Muon::MSVertexTrackletTool::TrackMomentum
static float TrackMomentum(int chamber, float deltaAlpha)
Definition: MSVertexTrackletTool.cxx:985
Muon::MSVertexTrackletTool::SeedResiduals
static float SeedResiduals(std::vector< const Muon::MdtPrepData * > &mdts, float slope, float inter)
Definition: MSVertexTrackletTool.cxx:615
Muon::MSVertexTrackletTool::m_maxDeltabCut
float m_maxDeltabCut
Definition: MSVertexTrackletTool.h:40
SG::WriteHandleKey< xAOD::TrackParticleContainer >
TrackletSegment
New segment class for single ML segments.
Definition: TrackletSegment.h:17
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
Muon::IMSVertexTrackletTool
The IMSVertexTrackletTool is a pure virtual interface.
Definition: IMSVertexTrackletTool.h:19
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Muon::MSVertexTrackletTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MSVertexTrackletTool.h:35
Muon::MSVertexTrackletTool::m_mdtTESKey
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_mdtTESKey
Definition: MSVertexTrackletTool.h:62
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
Muon::MSVertexTrackletTool::SortMDT
bool SortMDT(Identifier &i1, Identifier &i2) const
Definition: MSVertexTrackletTool.cxx:490
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Muon::MSVertexTrackletTool::SortMDThits
int SortMDThits(std::vector< std::vector< const Muon::MdtPrepData * > > &SortedMdt, const EventContext &ctx) const
Definition: MSVertexTrackletTool.cxx:398
Muon::MSVertexTrackletTool::SegSeeds
std::vector< std::pair< float, float > > SegSeeds(std::vector< const Muon::MdtPrepData * > &mdts) const
Definition: MSVertexTrackletTool.cxx:511
Muon::MSVertexTrackletTool::addMDTHits
void addMDTHits(std::vector< const Muon::MdtPrepData * > &hits, std::vector< std::vector< const Muon::MdtPrepData * > > &SortedMdt) const
Definition: MSVertexTrackletTool.cxx:469
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
Muon::MSVertexTrackletTool::CleanSegments
std::vector< TrackletSegment > CleanSegments(std::vector< TrackletSegment > &segs) const
Definition: MSVertexTrackletTool.cxx:800
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Muon::MSVertexTrackletTool
Definition: MSVertexTrackletTool.h:25
Muon::MSVertexTrackletTool::TrackMomentumError
static float TrackMomentumError(TrackletSegment &ml1, TrackletSegment &ml2)
Definition: MSVertexTrackletTool.cxx:1015
Muon::MSVertexTrackletTool::ResolveAmbiguousTracklets
std::vector< Tracklet > ResolveAmbiguousTracklets(std::vector< Tracklet > &tracks) const
Definition: MSVertexTrackletTool.cxx:1077
Muon::MSVertexTrackletTool::m_BarrelDeltaAlphaCut
float m_BarrelDeltaAlphaCut
Definition: MSVertexTrackletTool.h:39
AthAlgTool
Definition: AthAlgTool.h:26
Muon::MSVertexTrackletTool::TrackletSegmentFitterCore
std::vector< TrackletSegment > TrackletSegmentFitterCore(std::vector< const Muon::MdtPrepData * > &mdts, std::vector< std::pair< float, float > > &SeedParams) const
Definition: MSVertexTrackletTool.cxx:631
TrackParticleContainer.h
IMuonIdHelperSvc.h
Tracklet.h
TrackletSegment.h
ServiceHandle< Muon::IMuonIdHelperSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14