ATLAS Offline Software
Loading...
Searching...
No Matches
RpcRoadDefiner.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
25namespace TrigL2MuonSA {
26
27// --------------------------------------------------------------------------------
28// --------------------------------------------------------------------------------
29
31{
32 public:
34
35 virtual StatusCode initialize() override;
36
37 public:
38 StatusCode defineRoad(const EventContext& ctx,
39 const xAOD::MuonRoI* p_roi,
40 const bool insideOut,
41 TrigL2MuonSA::MuonRoad& muonRoad,
42 const TrigL2MuonSA::RpcLayerHits& rpcLayerHits,
43 const ToolHandle<RpcPatFinder>* rpcPatFinder,
44 TrigL2MuonSA::RpcFitResult& rpcFitResult,
45 const double roiEtaMinLow,
46 const double roiEtaMaxLow,
47 const double roiEtaMinHigh,
48 const double roiEtaMaxHigh) const;
49
50 void setRoadWidthForFailure(double rWidth_RPC_Failed){ m_rWidth_RPC_Failed = rWidth_RPC_Failed; };
51 void setRpcGeometry(bool use_rpc){ m_use_rpc = use_rpc; };
52
53 protected:
54 float f(float x, float c0, float c1, float c2, float c3) const;
55 float fp(float x, float c33, float c22, float c1) const;
56
57 private:
59 bool m_use_rpc{true};
60
61 ToolHandle<IRegSelTool> m_regionSelector{this, "RegionSelectionTool", "RegSelTool/RegSelTool_MDT", "MDT Region Selector Tool"};
62 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
63};
64
65// --------------------------------------------------------------------------------
66// --------------------------------------------------------------------------------
67
68 inline float TrigL2MuonSA::RpcRoadDefiner::f(float x, float c0, float c1, float c2, float c3) const
69 {
70 return c0 + x * (c1 + x * (c2 + x * c3)); // faster
71 }
72
73// --------------------------------------------------------------------------------
74// --------------------------------------------------------------------------------
75 inline float TrigL2MuonSA::RpcRoadDefiner::fp(float x, float c33, float c22, float c1) const
76 {
77 return c1 + x * (c22 + x * c33); // faster
78 }
79
80// --------------------------------------------------------------------------------
81// --------------------------------------------------------------------------------
82}
83
84#endif // TRIGL2MUONSA_RPCROADDEFINER_H
#define x
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
float fp(float x, float c33, float c22, float c1) const
StatusCode defineRoad(const EventContext &ctx, const xAOD::MuonRoI *p_roi, const bool insideOut, TrigL2MuonSA::MuonRoad &muonRoad, const TrigL2MuonSA::RpcLayerHits &rpcLayerHits, const ToolHandle< RpcPatFinder > *rpcPatFinder, TrigL2MuonSA::RpcFitResult &rpcFitResult, const double roiEtaMinLow, const double roiEtaMaxLow, const double roiEtaMinHigh, const double roiEtaMaxHigh) const
ToolHandle< IRegSelTool > m_regionSelector
virtual StatusCode initialize() override
void setRpcGeometry(bool use_rpc)
void setRoadWidthForFailure(double rWidth_RPC_Failed)
float f(float x, float c0, float c1, float c2, float c3) const
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
MuonRoI_v1 MuonRoI
Definition MuonRoI.h:15