40{
42
44 std::array<std::reference_wrapper<double>, 3> aw {
46 };
47 std::array<std::reference_wrapper<double>, 3> bw {
49 };
50 rpcFitResult.
isSuccess = (*rpcPatFinder)->findPatternEta(aw, bw, rpcLayerHits);
51
54 }
55
56 double phi_middle;
57 double phi_outer;
58 if ( (*rpcPatFinder)->findPatternPhi(phi_middle, phi_outer, rpcLayerHits)) {
59 rpcFitResult.
phi = phi_middle;
62 } else {
63 rpcFitResult.
phi = p_roi->
phi();
64 }
65 ATH_MSG_DEBUG(
"RpcPatFinder: Found: " << rpcFitResult.
isSuccess <<
" Slopes: " << aw[0] <<
"," << aw[1] <<
"," << aw[2] <<
" Offsets: " << bw[0] <<
"," << bw[1] <<
"," << bw[2]);
66 } else {
68 }
69
71 if(!insideOut) {
73 } else {
78 }
80 muonRoad.
side = (p_roi->
phi()<0.)? 0 : 1;
82
83 const int PhysicsSector = ((p_roi->
getSectorID() + 1)/4 )%8 + 1;
84
85 int special = 0;
86 if (muonRoad.
LargeSmall == 0 && (PhysicsSector == 6 || PhysicsSector == 8 )) special = 1;
87 if (muonRoad.
LargeSmall == 1 && (PhysicsSector == 6 || PhysicsSector == 7 )) special = 1;
89
90 auto fillAllLayersWith = [&muonRoad](
const int& station,
const double&
value) ->
void {
91 std::fill(std::begin(muonRoad.
rWidth[station]), std::end(muonRoad.
rWidth[station]), value);
92 };
93
95 if (!insideOut) {
96 fillAllLayersWith(0, 500);
97 fillAllLayersWith(1, 650);
98 fillAllLayersWith(2, 800);
99 fillAllLayersWith(3, 500);
100 fillAllLayersWith(9, 650);
101 fillAllLayersWith(10, 650);
102 } else {
103 fillAllLayersWith(0, 250);
104 fillAllLayersWith(1, 400);
105 fillAllLayersWith(2, 600);
106 fillAllLayersWith(3, 300);
107 fillAllLayersWith(9, 400);
108 fillAllLayersWith(10, 400);
109 }
110 } else {
111 fillAllLayersWith(0, 400);
112 fillAllLayersWith(1, 200);
113 fillAllLayersWith(2, 400);
114 fillAllLayersWith(3, 400);
117 }
118
119 std::vector<IdentifierHash> mdtHashList;
120
121
122 IdContext context =
m_idHelperSvc->mdtIdHelper().module_context();
123
128 if(phiMax >
M_PI) phiMax -=
M_PI*2.;
129 if(phiMin < -
M_PI) phiMin +=
M_PI*2.;
130
131 auto roi = std::make_unique<TrigRoiDescriptor>( p_roi->
eta(), etaMin, etaMax, muonRoad.
phiMiddle, phiMin, phiMax );
132
134 else {
137 }
138
140 sector_trigger = (PhysicsSector - 1)*2 + muonRoad.
LargeSmall;
141 sector_overlap = 99;
142
143 for( const IdentifierHash& hash : mdtHashList){
144
147
151
152 if ( name[1]=='M' && name[2]=='E' ) continue;
153 if ( name[1]=='M' && name[2]=='G' ) continue;
154
155 const int LargeSmall = (
name[2]==
'S' ||
name[2]==
'F' ||
name[2]==
'G' ) ? 1 : 0;
156 const int sector = (
stationPhi-1)*2 + LargeSmall;
157
158 if (sector != sector_trigger) sector_overlap = sector;
159 if (sector != sector_trigger and sector_overlap != 99 and sector != sector_overlap)
ATH_MSG_ERROR(
"Multiple sector overlaps not expected");
160 }
161
163 auto fillAllSectorsWith = [&muonRoad](const int& station, const double& aw, const double& bw) -> void {
164 std::fill(std::begin(muonRoad.
aw[station]), std::end(muonRoad.
aw[station]), aw);
165 std::fill(std::begin(muonRoad.
bw[station]), std::end(muonRoad.
bw[station]), bw);
166 };
167
168 if (!insideOut) {
176
177 } else {
181 const double theta = 2.* std::atan(std::exp(-std::abs(
eta)));
183 };
184
185 const double awLow = compute_aw(roiEtaMinLow, roiEtaMaxLow);
186 const double awHigh = compute_aw(roiEtaMinHigh, roiEtaMaxHigh);
187
188 fillAllSectorsWith(0, awLow, 0.);
189 fillAllSectorsWith(1, awLow, 0.);
190 fillAllSectorsWith(2, awHigh, 0.);
191 fillAllSectorsWith(3, awLow, 0.);
192 fillAllSectorsWith(9, awLow, 0.);
193 fillAllSectorsWith(10, awLow, 0.);
194 }
195 } else {
196
198 fillAllSectorsWith(0, muonRoad.
aw_ftf[0][0], muonRoad.
bw_ftf[0][0]);
199 fillAllSectorsWith(1, muonRoad.
aw_ftf[1][0], muonRoad.
bw_ftf[1][0]);
200 fillAllSectorsWith(2, muonRoad.
aw_ftf[2][0], muonRoad.
bw_ftf[2][0]);
201 fillAllSectorsWith(3, muonRoad.
aw_ftf[3][0], muonRoad.
bw_ftf[3][0]);
202 fillAllSectorsWith(9, muonRoad.
aw_ftf[9][0], muonRoad.
bw_ftf[9][0]);
203 fillAllSectorsWith(10, muonRoad.
aw_ftf[10][0], muonRoad.
bw_ftf[10][0]);
204 }
205
207
208 return StatusCode::SUCCESS;
209}
Scalar eta() const
pseudorapidity method
Scalar theta() const
theta method
Athena::TPCnvVers::Current TrigRoiDescriptor
std::vector< Identifier > stationList
double aw[N_STATION][N_SECTOR]
double bw_ftf[N_STATION][N_SECTOR]
double aw_ftf[N_STATION][N_SECTOR]
double bw[N_STATION][N_SECTOR]
double rWidth[N_STATION][N_LAYER]
ToolHandle< IRegSelTool > m_regionSelector
double m_rWidth_RPC_Failed
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
float eta() const
The pseudorapidity ( ) of the muon candidate.
float phi() const
The azimuthal angle ( ) of the muon candidate.
int getSectorID() const
Get the sector ID number.
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
constexpr uint8_t stationPhi
station Phi 1 to 8