Skip to content
Snippets Groups Projects
Commit cd9b350b authored by Hass AbouZeid's avatar Hass AbouZeid
Browse files

Merge branch 'cherry-pick-d9e1b6eb' into '21.0'

Merge branch 'master-my-topic2' into '21.1' -- push to 21.0 (Fix out of bounds reported in ATR-16445)

See merge request !2722

Former-commit-id: a01810dff47fe7bb6220c37c02dc33db63ba93f8
parents eee1edd6 1b10a02a
No related merge requests found
......@@ -546,31 +546,39 @@ void TrigL2MuonSA::RpcPatFinder::abcal(unsigned int result_pat, size_t index[],
}//else
}//else
for(int i=1;i<3;i++){
if((Z[hot_max[i]] != Z[hot_min[i]])&&(hot_min[i]!=999)&&(hot_max[i]!=-999)){
aw[i] = (R[hot_max[i]]- R[hot_min[i]]) / (Z[hot_max[i]]-Z[hot_min[i]]);
bw[i] = R[hot_max[i]] - Z[hot_max[i]]*aw[i];
aw[i] = 1.0/aw[i];
for(int i=1;i<3;i++){
if(hot_max[i]!=999 && hot_min[i]!=-999){
if(Z[hot_max[i]]!=Z[hot_min[i]]){
aw[i] = (R[hot_max[i]]- R[hot_min[i]]) / (Z[hot_max[i]]-Z[hot_min[i]]);
bw[i] = R[hot_max[i]] - Z[hot_max[i]]*aw[i];
aw[i] = 1.0/aw[i];
}else if(i<2){
aw[i] = Z[hot_min[i]] / R[hot_min[i]];
bw[i] = 0.0;
} else{
aw[i] = Z[hot_max[i]] / R[hot_max[i]];
bw[i] = 0.0;
}
}else{
if(i <2){
if(hot_min[i]!=999){
aw[i] = Z[hot_min[i]] / R[hot_min[i]];
bw[i] = 0.0;
}else{
aw[i] = Z[hot_max[i]] / R[hot_max[i]];
bw[i] = 0.0;
}//else
if(hot_min[i]!=999){
aw[i] = Z[hot_min[i]] / R[hot_min[i]];
bw[i] = 0.0;
}else if(hot_max[i]!=-999){
aw[i] = Z[hot_max[i]] / R[hot_max[i]];
bw[i] = 0.0;
}
}else{
if(hot_max[i]!=-999){
aw[i] = Z[hot_max[i]] / R[hot_max[i]];
bw[i] = 0.0;
}else{
aw[i] = Z[hot_min[i]] / R[hot_min[i]];
bw[i] = 0.0;
}//else
}//else
}//else
}//for
if(hot_max[i]!=-999){
aw[i] = Z[hot_max[i]] / R[hot_max[i]];
bw[i] = 0.0;
}else if(hot_min[i]!=999){
aw[i] = Z[hot_min[i]] / R[hot_min[i]];
bw[i] = 0.0;
}
}
}
}
}//abcal()
// --------------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment