23 return StatusCode::SUCCESS;
34 const ToolHandle<RpcPatFinder>* rpcPatFinder,
36 const double roiEtaMinLow,
37 const double roiEtaMaxLow,
38 const double roiEtaMinHigh,
39 const double roiEtaMaxHigh)
const
43 if (m_use_rpc && !insideOut) {
44 std::array<std::reference_wrapper<double>, 3> aw {
47 std::array<std::reference_wrapper<double>, 3> bw {
50 rpcFitResult.
isSuccess = (*rpcPatFinder)->findPatternEta(aw, bw, rpcLayerHits);
58 if ( (*rpcPatFinder)->findPatternPhi(phi_middle, phi_outer, rpcLayerHits)) {
59 rpcFitResult.
phi = phi_middle;
63 rpcFitResult.
phi = p_roi->
phi();
65 ATH_MSG_DEBUG(
"RpcPatFinder: Found: " << rpcFitResult.
isSuccess <<
" Slopes: " << aw[0] <<
"," << aw[1] <<
"," << aw[2] <<
" Offsets: " << bw[0] <<
"," << bw[1] <<
"," << bw[2]);
80 muonRoad.
side = (p_roi->
phi()<0.)? 0 : 1;
83 const int PhysicsSector = ((p_roi->
getSectorID() + 1)/4 )%8 + 1;
86 if (muonRoad.
LargeSmall == 0 && (PhysicsSector == 6 || PhysicsSector == 8 )) special = 1;
87 if (muonRoad.
LargeSmall == 1 && (PhysicsSector == 6 || PhysicsSector == 7 )) special = 1;
90 auto fillAllLayersWith = [&muonRoad](
const int& station,
const double&
value) ->
void {
96 fillAllLayersWith(0, 500);
97 fillAllLayersWith(1, 650);
98 fillAllLayersWith(2, 800);
99 fillAllLayersWith(3, 500);
100 fillAllLayersWith(9, 650);
101 fillAllLayersWith(10, 650);
103 fillAllLayersWith(0, 250);
104 fillAllLayersWith(1, 400);
105 fillAllLayersWith(2, 600);
106 fillAllLayersWith(3, 300);
107 fillAllLayersWith(9, 400);
108 fillAllLayersWith(10, 400);
111 fillAllLayersWith(0, 400);
112 fillAllLayersWith(1, 200);
113 fillAllLayersWith(2, 400);
114 fillAllLayersWith(3, 400);
115 fillAllLayersWith(9, m_rWidth_RPC_Failed);
116 fillAllLayersWith(10, m_rWidth_RPC_Failed);
119 std::vector<IdentifierHash> mdtHashList;
122 IdContext context = m_idHelperSvc->mdtIdHelper().module_context();
128 if(phiMax >
M_PI) phiMax -=
M_PI*2.;
129 if(phiMin < -
M_PI) phiMin +=
M_PI*2.;
133 if (roi) m_regionSelector->lookup(ctx)->HashIDList( *roi, mdtHashList);
136 m_regionSelector->lookup(ctx)->HashIDList(fullscan_roi, mdtHashList);
140 sector_trigger = (PhysicsSector - 1)*2 + muonRoad.
LargeSmall;
146 if( m_idHelperSvc->mdtIdHelper().get_id(
hash,
id, &context) !=0 )
ATH_MSG_ERROR(
"problem converting hash list to id");
149 const int stationPhi = m_idHelperSvc->mdtIdHelper().stationPhi(
id);
150 const std::string
name = m_idHelperSvc->mdtIdHelper().stationNameString(m_idHelperSvc->mdtIdHelper().stationName(
id));
152 if (
name[1]==
'M' &&
name[2]==
'E' )
continue;
153 if (
name[1]==
'M' &&
name[2]==
'G' )
continue;
155 const int LargeSmall = (
name[2]==
'S' ||
name[2]==
'F' ||
name[2]==
'G' ) ? 1 : 0;
156 const int sector = (stationPhi-1)*2 + LargeSmall;
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");
163 auto fillAllSectorsWith = [&muonRoad](
const int& station,
const double& aw,
const double& bw) ->
void {
185 const double awLow = compute_aw(roiEtaMinLow, roiEtaMaxLow);
186 const double awHigh = compute_aw(roiEtaMinHigh, roiEtaMaxHigh);
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.);
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]);
208 return StatusCode::SUCCESS;