14 const std::string&
name,
32 for(
int i_saddress=0; i_saddress<s_saddress; i_saddress++) {
33 for(
int i_innerR=0; i_innerR<s_innerR; i_innerR++) {
34 m_NbinEta[i_saddress][i_innerR]=0;
35 m_EtaMin[i_saddress][i_innerR]=0;
36 m_EtaMax[i_saddress][i_innerR]=0;
37 m_EtaStep[i_saddress][i_innerR]=0;
38 m_NbinPhi[i_saddress][i_innerR]=0;
39 m_PhiMin[i_saddress][i_innerR]=0;
40 m_PhiMax[i_saddress][i_innerR]=0;
41 m_PhiStep[i_saddress][i_innerR]=0;
43 for(
int i_eta=0; i_eta<s_eta; i_eta++) {
44 for(
int i_phi=0; i_phi<s_phi; i_phi++) {
45 for(
int i_etaQ=0; i_etaQ<s_etaQ; i_etaQ++) {
46 m_dZ[i_saddress][i_innerR][i_eta][i_phi][i_etaQ] = 0;
53 file.open(lut_fileName.c_str());
55 ATH_MSG_INFO(
"Failed to open barrel alignment LUT file");
56 return StatusCode::FAILURE;
59 for(
int i_lut=0; i_lut<2; i_lut++) {
61 file >> saddress >> innerR;
62 file >> m_EtaMin[saddress][innerR] >> m_EtaMax[saddress][innerR]
63 >> m_PhiMin[saddress][innerR] >> m_PhiMax[saddress][innerR]
64 >> m_NbinEta[saddress][innerR] >> m_NbinPhi[saddress][innerR];
66 m_EtaStep[saddress][innerR] = (m_EtaMax[saddress][innerR] - m_EtaMin[saddress][innerR]) / (
float)m_NbinEta[saddress][innerR];
67 m_PhiStep[saddress][innerR] = (m_PhiMax[saddress][innerR] - m_PhiMin[saddress][innerR]) / (
float)m_NbinPhi[saddress][innerR];
69 for (
int i_eta=0; i_eta<s_eta; i_eta++) {
70 for (
int i_phi=0; i_phi<s_phi; i_phi++) {
71 for (
int i_etaQ=0; i_etaQ<s_etaQ; i_etaQ++) {
73 file >> N0 >>
N1 >>
N2 >> A0 >> A1 >> A2;
75 m_dZ[saddress][innerR][i_eta][i_phi][i_etaQ] = A0;
83 return StatusCode::SUCCESS;
97 int innerR = (sp1R > 5800)? 1: 0;
103 int iChamber=( std::abs(MFphi)>90*TMath::DegToRad() ) ? 1:0;
105 int iEta_inv=29-
iEta;
106 int iPhi_inv=29-
iPhi;
126 int sign_etam=(
iEta>14)?-1:1;
127 int sign_etap=-sign_etam;
129 return (m_dZ[saddress][innerR][iEta_bin][iPhi_bin][0]*sign_etam
130 + m_dZ[saddress][innerR][iEta_bin][iPhi_bin][1]*sign_etap) / 2.;
133 ATH_MSG_INFO(
"Barrel alignment is implemented only for Large-SP");
145 if(saddress > 3 || saddress < 0 || innerR < 0 || innerR > 1)
return std::make_pair(-5,-5);
147 int etaBin = (
int)((
etaMap - m_EtaMin[saddress][innerR])/m_EtaStep[saddress][innerR]);
148 int phiBin = (
int)((
phiMap - m_PhiMin[saddress][innerR])/m_PhiStep[saddress][innerR]);
151 if(
etaBin >= m_NbinEta[saddress][innerR])
etaBin = m_NbinEta[saddress][innerR] - 1;
154 if(
phiBin >= m_NbinPhi[saddress][innerR])
phiBin = m_NbinPhi[saddress][innerR] - 1;