Skip to content
Snippets Groups Projects
Commit 1b10a02a authored by Nicolas Berger's avatar Nicolas Berger Committed by Tim Martin
Browse files

Merge branch 'master-my-topic2' into '21.1'

Fix out of bounds reported in ATR-16445

See merge request !2682

Former-commit-id: 422eb936bc0e79d6d7e06af652762d1df4762497
parent 7756f1c9
No related branches found
No related tags found
No related merge requests found
...@@ -546,31 +546,39 @@ void TrigL2MuonSA::RpcPatFinder::abcal(unsigned int result_pat, size_t index[], ...@@ -546,31 +546,39 @@ void TrigL2MuonSA::RpcPatFinder::abcal(unsigned int result_pat, size_t index[],
}//else }//else
}//else }//else
for(int i=1;i<3;i++){ for(int i=1;i<3;i++){
if((Z[hot_max[i]] != Z[hot_min[i]])&&(hot_min[i]!=999)&&(hot_max[i]!=-999)){ if(hot_max[i]!=999 && hot_min[i]!=-999){
aw[i] = (R[hot_max[i]]- R[hot_min[i]]) / (Z[hot_max[i]]-Z[hot_min[i]]); if(Z[hot_max[i]]!=Z[hot_min[i]]){
bw[i] = R[hot_max[i]] - Z[hot_max[i]]*aw[i]; aw[i] = (R[hot_max[i]]- R[hot_min[i]]) / (Z[hot_max[i]]-Z[hot_min[i]]);
aw[i] = 1.0/aw[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{ }else{
if(i <2){ if(i <2){
if(hot_min[i]!=999){ if(hot_min[i]!=999){
aw[i] = Z[hot_min[i]] / R[hot_min[i]]; aw[i] = Z[hot_min[i]] / R[hot_min[i]];
bw[i] = 0.0; bw[i] = 0.0;
}else{ }else if(hot_max[i]!=-999){
aw[i] = Z[hot_max[i]] / R[hot_max[i]]; aw[i] = Z[hot_max[i]] / R[hot_max[i]];
bw[i] = 0.0; bw[i] = 0.0;
}//else }
}else{ }else{
if(hot_max[i]!=-999){ if(hot_max[i]!=-999){
aw[i] = Z[hot_max[i]] / R[hot_max[i]]; aw[i] = Z[hot_max[i]] / R[hot_max[i]];
bw[i] = 0.0; bw[i] = 0.0;
}else{ }else if(hot_min[i]!=999){
aw[i] = Z[hot_min[i]] / R[hot_min[i]]; aw[i] = Z[hot_min[i]] / R[hot_min[i]];
bw[i] = 0.0; bw[i] = 0.0;
}//else }
}//else }
}//else }
}//for }
}//abcal() }//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