23 return StatusCode::SUCCESS;
33 const ToolHandle<RpcPatFinder>* rpcPatFinder,
35 const double roiEtaMinLow,
36 const double roiEtaMaxLow,
37 const double roiEtaMinHigh,
38 const double roiEtaMaxHigh)
const
42 if (m_use_rpc && !insideOut) {
43 std::array<std::reference_wrapper<double>, 3> aw {
46 std::array<std::reference_wrapper<double>, 3> bw {
49 rpcFitResult.
isSuccess = (*rpcPatFinder)->findPatternEta(aw, bw, rpcLayerHits);
57 if ( (*rpcPatFinder)->findPatternPhi(phi_middle, phi_outer, rpcLayerHits)) {
58 rpcFitResult.
phi = phi_middle;
62 rpcFitResult.
phi = p_roi->
phi();
64 ATH_MSG_DEBUG(
"RpcPatFinder: Found: " << rpcFitResult.
isSuccess <<
" Slopes: " << aw[0] <<
"," << aw[1] <<
"," << aw[2] <<
" Offsets: " << bw[0] <<
"," << bw[1] <<
"," << bw[2]);
79 muonRoad.
side = (p_roi->
phi()<0.)? 0 : 1;
82 const int PhysicsSector = ((p_roi->
getSectorID() + 1)/4 )%8 + 1;
85 if (muonRoad.
LargeSmall == 0 && (PhysicsSector == 6 || PhysicsSector == 8 )) special = 1;
86 if (muonRoad.
LargeSmall == 1 && (PhysicsSector == 6 || PhysicsSector == 7 )) special = 1;
89 auto fillAllLayersWith = [&muonRoad](
const int& station,
const double&
value) ->
void {
95 fillAllLayersWith(0, 500);
96 fillAllLayersWith(1, 650);
97 fillAllLayersWith(2, 800);
98 fillAllLayersWith(3, 500);
99 fillAllLayersWith(9, 650);
100 fillAllLayersWith(10, 650);
102 fillAllLayersWith(0, 250);
103 fillAllLayersWith(1, 400);
104 fillAllLayersWith(2, 600);
105 fillAllLayersWith(3, 300);
106 fillAllLayersWith(9, 400);
107 fillAllLayersWith(10, 400);
110 fillAllLayersWith(0, 400);
111 fillAllLayersWith(1, 200);
112 fillAllLayersWith(2, 400);
113 fillAllLayersWith(3, 400);
114 fillAllLayersWith(9, m_rWidth_RPC_Failed);
115 fillAllLayersWith(10, m_rWidth_RPC_Failed);
118 std::vector<IdentifierHash> mdtHashList;
121 IdContext context = m_idHelperSvc->mdtIdHelper().module_context();
127 if(phiMax >
M_PI) phiMax -=
M_PI*2.;
128 if(phiMin < -
M_PI) phiMin +=
M_PI*2.;
132 if (roi) m_regionSelector->lookup( Gaudi::Hive::currentContext() )->HashIDList( *roi, mdtHashList);
135 m_regionSelector->lookup( Gaudi::Hive::currentContext() )->HashIDList(fullscan_roi, mdtHashList);
139 sector_trigger = (PhysicsSector - 1)*2 + muonRoad.
LargeSmall;
145 if( m_idHelperSvc->mdtIdHelper().get_id(
hash,
id, &context) !=0 )
ATH_MSG_ERROR(
"problem converting hash list to id");
148 const int stationPhi = m_idHelperSvc->mdtIdHelper().stationPhi(
id);
149 const std::string
name = m_idHelperSvc->mdtIdHelper().stationNameString(m_idHelperSvc->mdtIdHelper().stationName(
id));
151 if (
name[1]==
'M' &&
name[2]==
'E' )
continue;
152 if (
name[1]==
'M' &&
name[2]==
'G' )
continue;
154 const int LargeSmall = (
name[2]==
'S' ||
name[2]==
'F' ||
name[2]==
'G' ) ? 1 : 0;
155 const int sector = (stationPhi-1)*2 + LargeSmall;
157 if (sector != sector_trigger) sector_overlap = sector;
158 if (sector != sector_trigger and sector_overlap != 99 and sector != sector_overlap)
ATH_MSG_ERROR(
"Multiple sector overlaps not expected");
162 auto fillAllSectorsWith = [&muonRoad](
const int& station,
const double& aw,
const double& bw) ->
void {
181 return std::tan(theta) * (eta / std::abs(eta));
184 const double awLow = compute_aw(roiEtaMinLow, roiEtaMaxLow);
185 const double awHigh = compute_aw(roiEtaMinHigh, roiEtaMaxHigh);
187 fillAllSectorsWith(0, awLow, 0.);
188 fillAllSectorsWith(1, awLow, 0.);
189 fillAllSectorsWith(2, awHigh, 0.);
190 fillAllSectorsWith(3, awLow, 0.);
191 fillAllSectorsWith(9, awLow, 0.);
192 fillAllSectorsWith(10, awLow, 0.);
197 fillAllSectorsWith(0, muonRoad.
aw_ftf[0][0], muonRoad.
bw_ftf[0][0]);
198 fillAllSectorsWith(1, muonRoad.
aw_ftf[1][0], muonRoad.
bw_ftf[1][0]);
199 fillAllSectorsWith(2, muonRoad.
aw_ftf[2][0], muonRoad.
bw_ftf[2][0]);
200 fillAllSectorsWith(3, muonRoad.
aw_ftf[3][0], muonRoad.
bw_ftf[3][0]);
201 fillAllSectorsWith(9, muonRoad.
aw_ftf[9][0], muonRoad.
bw_ftf[9][0]);
202 fillAllSectorsWith(10, muonRoad.
aw_ftf[10][0], muonRoad.
bw_ftf[10][0]);
207 return StatusCode::SUCCESS;