15 const std::string&
name,
27 m_use_mcLUT = use_mcLUT;
42 for (
int i_station=0; i_station<3; i_station++) {
43 superPoints[i_station] = &(trackPattern.
superPoints[i_station]);
46 int etabin,phibin,neweta,newphi,
ch,
add;
47 float phistep,etastep,pstep,dist,distp,disteta,distphi;
48 float A0[6]={0.,0.,0.,0.,0.,0.},A1[6]={0.,0.,0.,0.,0.,0.};
50 const float scale = 0.1;
57 if(etabin<=-1) etabin = 0;
58 if(etabin>=
lut.NbinEta[
add]) etabin =
lut.NbinEta[
add]-1;
59 if(phibin<=-1) phibin = 0;
60 if(phibin>=
lut.NbinPhi[
add]) phibin =
lut.NbinPhi[
add]-1;
62 trackPattern.
etaBin = etabin;
63 trackPattern.
phiBin = phibin;
65 disteta = trackPattern.
etaMap - (etabin*
lut.EtaStep[
add] +
67 distphi = trackPattern.
phiMap - (phibin*
lut.PhiStep[
add] +
69 neweta = (disteta >= 0.) ? etabin+1 : etabin-1;
70 newphi = (distphi >= 0.) ? phibin+1 : phibin-1;
71 etastep = (disteta >= 0.) ?
lut.EtaStep[
add] : -
lut.EtaStep[
add];
72 phistep = (distphi >= 0.) ?
lut.PhiStep[
add] : -
lut.PhiStep[
add];
74 ch = (trackPattern.
charge>=0.)? 1 : 0;
79 int iR = ( superPoints[0]->
R > 5800 )? 1: 0;
80 int qeta = ( trackPattern.
charge*trackPattern.
etaMap >= 0.)? 1 : 0;
89 A0[0] =
lut.table[
add][
ch][etabin][phibin][0];
90 A1[0] =
lut.table[
add][
ch][etabin][phibin][1];
91 if((neweta<0||neweta>=
lut.NbinEta[
add])&&
92 (newphi<0||newphi>=
lut.NbinPhi[
add])) {
94 }
else if (neweta<0||neweta>=
lut.NbinEta[
add]) {
95 A0[1] =
lut.table[
add][
ch][etabin][newphi][0];
96 A1[1] =
lut.table[
add][
ch][etabin][newphi][1];
97 A0[2] = A0[0] + ((A0[1] - A0[0])/phistep)*distphi;
98 A1[2] = A1[0] + ((A1[1] - A1[0])/phistep)*distphi;
100 }
else if (newphi<0||newphi>=
lut.NbinPhi[
add]) {
101 A0[1] =
lut.table[
add][
ch][neweta][phibin][0];
102 A1[1] =
lut.table[
add][
ch][neweta][phibin][1];
103 A0[2] = A0[0] + ((A0[1] - A0[0])/etastep)*disteta;
104 A1[2] = A1[0] + ((A1[1] - A1[0])/etastep)*disteta;
107 if(disteta >= distphi*
lut.EtaStep[
add]/
lut.PhiStep[
add]) {
108 A0[1] =
lut.table[
add][
ch][neweta][phibin][0];
109 A1[1] =
lut.table[
add][
ch][neweta][phibin][1];
110 A0[2] =
lut.table[
add][
ch][neweta][newphi][0];
111 A1[2] =
lut.table[
add][
ch][neweta][newphi][1];
112 A0[3] = A0[0] + ((A0[1] - A0[0])/etastep)*disteta;
113 A1[3] = A1[0] + ((A1[1] - A1[0])/etastep)*disteta;
114 dist = std::sqrt(phistep*phistep + etastep*etastep);
115 distp = std::sqrt(disteta*disteta + distphi*distphi);
116 A0[4] = A0[0] + ((A0[2] - A0[0])/dist)*distp;
117 A1[4] = A1[0] + ((A1[2] - A1[0])/dist)*distp;
118 pstep = (phistep/dist)*distp;
119 A0[5] = A0[3] + ((A0[4] - A0[3])/pstep)*distphi;
120 A1[5] = A1[3] + ((A1[4] - A1[3])/pstep)*distphi;
123 A0[1] =
lut.table[
add][
ch][etabin][newphi][0];
124 A1[1] =
lut.table[
add][
ch][etabin][newphi][1];
125 A0[2] =
lut.table[
add][
ch][neweta][newphi][0];
126 A1[2] =
lut.table[
add][
ch][neweta][newphi][1];
127 A0[3] = A0[0] + ((A0[1] - A0[0])/phistep)*distphi;
128 A1[3] = A1[0] + ((A1[1] - A1[0])/phistep)*distphi;
129 dist = std::sqrt(phistep*phistep + etastep*etastep);
130 distp = std::sqrt(disteta*disteta + distphi*distphi);
131 A0[4] = A0[0] + ((A0[2] - A0[0])/dist)*distp;
132 A1[4] = A1[0] + ((A1[2] - A1[0])/dist)*distp;
133 pstep = (etastep/dist)*distp;
134 A0[5] = A0[3] + ((A0[4] - A0[3])/pstep)*disteta;
135 A1[5] = A1[3] + ((A1[4] - A1[3])/pstep)*disteta;
142 ATH_MSG_DEBUG(
"pT determined from radius: barrelRadius/barrelSagitta/pT/charge/s_address="
144 << trackPattern.
pt <<
"/" << trackPattern.
charge <<
"/" << trackPattern.
s_address);
147 return StatusCode::SUCCESS;