ATLAS Offline Software
RpcRoadDefiner.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGL2MUONSA_RPCROADDEFINER_H
6 #define TRIGL2MUONSA_RPCROADDEFINER_H
7 
9 #include "GaudiKernel/ServiceHandle.h"
10 #include "GaudiKernel/ToolHandle.h"
11 
13 #include "RpcData.h"
14 #include "RpcPatFinder.h"
15 #include "MuonRoad.h"
16 #include "RpcFitResult.h"
17 #include "BarrelRoadData.h"
19 #include "xAODTrigger/MuonRoI.h"
22 
23 #include <string>
24 
25 namespace TrigL2MuonSA {
26 
27 // --------------------------------------------------------------------------------
28 // --------------------------------------------------------------------------------
29 
31 {
32  public:
33 
34  RpcRoadDefiner(const std::string& type,
35  const std::string& name,
36  const IInterface* parent);
37 
38  virtual StatusCode initialize() override;
39 
40  public:
42  const bool insideOut,
43  TrigL2MuonSA::MuonRoad& muonRoad,
44  TrigL2MuonSA::RpcHits& rpcHits,
45  const TrigL2MuonSA::RpcLayerHits& rpcLayerHits,
46  const ToolHandle<RpcPatFinder>* rpcPatFinder,
47  TrigL2MuonSA::RpcFitResult& rpcFitResult,
48  double roiEtaMinLow,
49  double roiEtaMaxLow,
50  double roiEtaMinHigh,
51  double roiEtaMaxHigh) const;
52 
53  StatusCode defineRoad(const xAOD::MuonRoI* p_roi,
54  const bool insideOut,
55  TrigL2MuonSA::MuonRoad& muonRoad,
56  TrigL2MuonSA::RpcHits& rpcHits,
57  const TrigL2MuonSA::RpcLayerHits& rpcLayerHits,
58  const ToolHandle<RpcPatFinder>* rpcPatFinder,
59  TrigL2MuonSA::RpcFitResult& rpcFitResult,
60  double roiEtaMinLow,
61  double roiEtaMaxLow,
62  double roiEtaMinHigh,
63  double roiEtaMaxHigh) const;
64 
65  void setRoadWidthForFailure(double rWidth_RPC_Failed){ m_rWidth_RPC_Failed = rWidth_RPC_Failed; };
66  void setRpcGeometry(bool use_rpc){ m_use_rpc = use_rpc; };
67 
68  protected:
69  float f(float x, float c0, float c1, float c2, float c3) const;
70  float fp(float x, float c33, float c22, float c1) const;
71 
72  private:
74  bool m_use_rpc{true};
75 
76  ToolHandle<IRegSelTool> m_regionSelector{this, "RegionSelectionTool", "RegSelTool/RegSelTool_MDT", "MDT Region Selector Tool"};
77  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
78 };
79 
80 // --------------------------------------------------------------------------------
81 // --------------------------------------------------------------------------------
82 
83  inline float TrigL2MuonSA::RpcRoadDefiner::f(float x, float c0, float c1, float c2, float c3) const
84  {
85  return c0 + x * (c1 + x * (c2 + x * c3)); // faster
86  }
87 
88 // --------------------------------------------------------------------------------
89 // --------------------------------------------------------------------------------
90  inline float TrigL2MuonSA::RpcRoadDefiner::fp(float x, float c33, float c22, float c1) const
91  {
92  return c1 + x * (c22 + x * c33); // faster
93  }
94 
95 // --------------------------------------------------------------------------------
96 // --------------------------------------------------------------------------------
97 }
98 
99 #endif // TRIGL2MUONSA_RPCROADDEFINER_H
IRegSelTool.h
MuonRoad.h
RpcPatFinder.h
ITrigMuonBackExtrapolator.h
TrigL2MuonSA::RpcRoadDefiner::m_rWidth_RPC_Failed
double m_rWidth_RPC_Failed
Definition: RpcRoadDefiner.h:73
TrigL2MuonSA::RpcRoadDefiner::defineRoad
StatusCode defineRoad(const LVL1::RecMuonRoI *p_roi, const bool insideOut, TrigL2MuonSA::MuonRoad &muonRoad, TrigL2MuonSA::RpcHits &rpcHits, const TrigL2MuonSA::RpcLayerHits &rpcLayerHits, const ToolHandle< RpcPatFinder > *rpcPatFinder, TrigL2MuonSA::RpcFitResult &rpcFitResult, double roiEtaMinLow, double roiEtaMaxLow, double roiEtaMinHigh, double roiEtaMaxHigh) const
Definition: RpcRoadDefiner.cxx:37
TrigL2MuonSA::RpcHits
std::vector< RpcHitData > RpcHits
Definition: RpcData.h:57
TrigL2MuonSA::RpcFitResult
Definition: RpcFitResult.h:14
TrigL2MuonSA::RpcRoadDefiner::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: RpcRoadDefiner.h:77
TrigL2MuonSA::RpcRoadDefiner::setRpcGeometry
void setRpcGeometry(bool use_rpc)
Definition: RpcRoadDefiner.h:66
TrigL2MuonSA::RpcRoadDefiner::m_regionSelector
ToolHandle< IRegSelTool > m_regionSelector
Definition: RpcRoadDefiner.h:76
extractSporadic.c1
c1
Definition: extractSporadic.py:134
RecMuonRoI.h
BarrelRoadData.h
x
#define x
TrigL2MuonSA::RpcRoadDefiner::initialize
virtual StatusCode initialize() override
Definition: RpcRoadDefiner.cxx:24
RpcData.h
hotSpotInTAG.c0
c0
Definition: hotSpotInTAG.py:192
python.DataFormatRates.c3
c3
Definition: DataFormatRates.py:127
LVL1::RecMuonRoI
This class defines the reconstructed Muon ROI.
Definition: RecMuonRoI.h:60
TrigL2MuonSA::RpcRoadDefiner::RpcRoadDefiner
RpcRoadDefiner(const std::string &type, const std::string &name, const IInterface *parent)
Definition: RpcRoadDefiner.cxx:14
TrigL2MuonSA::MuonRoad
Definition: MuonRoad.h:20
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
xAOD::MuonRoI_v1
Class describing a LVL1 muon region of interest.
Definition: MuonRoI_v1.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
RpcFitResult.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrigL2MuonSA::RpcRoadDefiner::m_use_rpc
bool m_use_rpc
Definition: RpcRoadDefiner.h:74
TrigL2MuonSA::RpcLayerHits
Definition: RpcPatFinder.h:20
python.DataFormatRates.c2
c2
Definition: DataFormatRates.py:123
TrigL2MuonSA::RpcRoadDefiner::setRoadWidthForFailure
void setRoadWidthForFailure(double rWidth_RPC_Failed)
Definition: RpcRoadDefiner.h:65
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonRoI.h
TrigL2MuonSA::RpcRoadDefiner::fp
float fp(float x, float c33, float c22, float c1) const
Definition: RpcRoadDefiner.h:90
AthAlgTool
Definition: AthAlgTool.h:26
TrigL2MuonSA::RpcRoadDefiner::f
float f(float x, float c0, float c1, float c2, float c3) const
Definition: RpcRoadDefiner.h:83
TrigL2MuonSA::RpcRoadDefiner
Definition: RpcRoadDefiner.h:31
IMuonIdHelperSvc.h
TrigL2MuonSA
Definition: AlignmentBarrelLUT.h:13
ServiceHandle< Muon::IMuonIdHelperSvc >