ATLAS Offline Software
MuonSegmentMomentumFromField.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MuonSegmentMomentumFromField_MuonSegmentMomentumFromField_H
6 #define MuonSegmentMomentumFromField_MuonSegmentMomentumFromField_H
7 
10 #include "GaudiKernel/ServiceHandle.h"
11 #include "GaudiKernel/ToolHandle.h"
18 
19 namespace Muon {
20  class MuonSegment;
21 }
22 
24 {
25  public:
27  MuonSegmentMomentumFromField(const std::string&,const std::string&,const IInterface*);
29 
31  virtual StatusCode initialize();
32 
34  virtual void fitMomentum2Segments( const EventContext& ctx, const Muon::MuonSegment* segment1, const Muon::MuonSegment* segment2, double & signedMomentum ) const;
35  virtual void fitMomentum2Segments_old( const EventContext& ctx, const Muon::MuonSegment* segment1, const Muon::MuonSegment* segment2, double & signedMomentum ) const;
36 
38  virtual void fitMomentumVectorSegments( const EventContext&, const std::vector <const Muon::MuonSegment*> & , double & signedMomentum ) const;
39  private:
40  double fieldIntegralEstimate(const EventContext& ctx, const Muon::MuonSegment* segment1, const Muon::MuonSegment* segment2) const;
41  double fieldIntegralEstimate_old(const EventContext& ctx, const Muon::MuonSegment* segment1, const Muon::MuonSegment* segment2) const;
42 
43  ToolHandle<Trk::IPropagator> m_propagator{this, "PropagatorTool",
44  "Trk::STEP_Propagator/MuonPropagator"};
45  ToolHandle<Trk::INavigator> m_navigator {this, "NavigatorTool",
46  "Trk::Navigator/MuonNavigator"};
47  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
48  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj"};
49 
50  Gaudi::Property<bool> m_doOld {this, "DoOld", false, "Use old fitMomentum2Segments"};
51 };
52 
53 #endif // MuonSegmentMomentumFromField_H
MuonSegmentMomentumFromField::operator=
MuonSegmentMomentumFromField & operator=(const MuonSegmentMomentumFromField &)=delete
MuonSegmentMomentumFromField::fitMomentum2Segments
virtual void fitMomentum2Segments(const EventContext &ctx, const Muon::MuonSegment *segment1, const Muon::MuonSegment *segment2, double &signedMomentum) const
fits a momentum to 2 segments
Definition: MuonSegmentMomentumFromField.cxx:104
MuonSegmentMomentumFromField::fieldIntegralEstimate_old
double fieldIntegralEstimate_old(const EventContext &ctx, const Muon::MuonSegment *segment1, const Muon::MuonSegment *segment2) const
Definition: MuonSegmentMomentumFromField.cxx:244
Muon::IMuonSegmentMomentumEstimator
Definition: IMuonSegmentMomentumEstimator.h:16
MuonSegmentMomentumFromField::fieldIntegralEstimate
double fieldIntegralEstimate(const EventContext &ctx, const Muon::MuonSegment *segment1, const Muon::MuonSegment *segment2) const
Definition: MuonSegmentMomentumFromField.cxx:66
AtlasFieldCacheCondObj.h
MuonSegmentMomentumFromField::initialize
virtual StatusCode initialize()
to initiate private members
Definition: MuonSegmentMomentumFromField.cxx:26
MuonSegmentMomentumFromField::m_propagator
ToolHandle< Trk::IPropagator > m_propagator
Definition: MuonSegmentMomentumFromField.h:43
IPropagator.h
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
xAOD::MuonSegment
MuonSegment_v1 MuonSegment
Reference the current persistent version:
Definition: Event/xAOD/xAODMuon/xAODMuon/MuonSegment.h:13
MuonSegmentMomentumFromField::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonSegmentMomentumFromField.h:47
MuonSegmentMomentumFromField
Definition: MuonSegmentMomentumFromField.h:24
MuonSegmentMomentumFromField::MuonSegmentMomentumFromField
MuonSegmentMomentumFromField(const std::string &, const std::string &, const IInterface *)
constructor
Definition: MuonSegmentMomentumFromField.cxx:20
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
AtlasFieldCache.h
MuonSegmentMomentumFromField::m_doOld
Gaudi::Property< bool > m_doOld
Definition: MuonSegmentMomentumFromField.h:50
MuonSegmentMomentumFromField::m_fieldCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Definition: MuonSegmentMomentumFromField.h:48
ReadCondHandleKey.h
MuonSegmentMomentumFromField::m_navigator
ToolHandle< Trk::INavigator > m_navigator
Definition: MuonSegmentMomentumFromField.h:45
IMuonSegmentMomentumEstimator.h
MuonSegmentMomentumFromField::fitMomentum2Segments_old
virtual void fitMomentum2Segments_old(const EventContext &ctx, const Muon::MuonSegment *segment1, const Muon::MuonSegment *segment2, double &signedMomentum) const
Definition: MuonSegmentMomentumFromField.cxx:277
MuonSegmentMomentumFromField::fitMomentumVectorSegments
virtual void fitMomentumVectorSegments(const EventContext &, const std::vector< const Muon::MuonSegment * > &, double &signedMomentum) const
fits a momentum to a vector of segments
Definition: MuonSegmentMomentumFromField.cxx:38
SG::ReadCondHandleKey< AtlasFieldCacheCondObj >
INavigator.h
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
AthAlgTool
Definition: AthAlgTool.h:26
IMuonIdHelperSvc.h
ServiceHandle< Muon::IMuonIdHelperSvc >