42 {
43 MuonClusterOnTrack* MClT = nullptr;
44
45
47
49
50
52
55 } else {
57 locpar = Trk::LocalParameters(radiusPar);
59 }
60
62 double positionAlongStrip{0};
63 double positionAlongZ{0};
64
65 const Trk::Surface& rio_surface =
EL->surface(RIO.
identify());
68
70 std::abs(std::abs(lpos.z())-0.02)>1e-6) {
71 ATH_MSG_WARNING(
"Extrapolated GlobalPosition not on detector surface! Distance " << lpos.z());
72 }
73 lp = lpos.block<2,1>(0,0);
74 positionAlongZ = lpos.z();
75 }
76
78
84
85
86
89 if (MClus->localCovariance().cols() == 2) {
90 loce = MClus->localCovariance();
96 mat(0, 0) = fixedError * fixedError;
98 }
99
100 const MuonGM::RpcReadoutElement*
re = MClus->detectorElement();
102
103
104 double timeAlongStrip = 0;
105 if (!measphi) {
106 timeAlongStrip =
re->distanceToEtaReadout(GP) / 1000. * SIG_VEL;
107 } else {
108 timeAlongStrip =
re->distanceToPhiReadout(GP) / 1000. * SIG_VEL;
109 }
110 if (positionAlongZ) {
111 timeAlongStrip = 0;
112 }
113
114 double assignedTimFromPrd = 0;
115 if (!measphi) {
116 assignedTimFromPrd =
re->distanceToEtaReadout(clusPos) / 1000. * SIG_VEL;
117 } else {
118 assignedTimFromPrd =
re->distanceToPhiReadout(clusPos) / 1000. * SIG_VEL;
119 }
120
121
122 double real_TOF_onRPCgap = GP.mag() / 1000. * C_VEL;
123 double nominal_TOF_onRPCgap = clusPos.mag() / 1000. * C_VEL;
124
125
126 double correct_time_tot = real_TOF_onRPCgap
127 - nominal_TOF_onRPCgap
128 + timeAlongStrip
129 - assignedTimFromPrd;
130
131 MClT = new RpcClusterOnTrack(MClus, std::move(locpar), std::move(loce),
132 positionAlongStrip, MClus->time() - correct_time_tot);
133
134 ATH_MSG_DEBUG(
" correct_time_along_strip " << timeAlongStrip <<
" assignedTimFromPrd "
135 << assignedTimFromPrd << " real_TOF_onRPCgap " << real_TOF_onRPCgap
136 << " nominal_TOF_onRPCgap " << nominal_TOF_onRPCgap << " MClus->time() "
137 << MClus->time() << " correct_time_tot " << correct_time_tot);
138 break;
139
141
142
143
144
145
148
149
153
154 const MuonGM::TgcReadoutElement* ele = MClus->detectorElement();
155
160
162
163 double phistereo = lStripDir.phi() - 90.*Gaudi::Units::deg;
164 double Sn = std::sin(phistereo);
165 double Sn2 = Sn * Sn;
166 double Cs2 = 1. - Sn2;
167
168 double V0 = stripWidth * stripWidth / 12;
170 double V1 = stripLength * stripLength / 12;
171 mat(0, 0) = (Cs2 *
V0 + Sn2 *
V1);
172 mat.fillSymmetric(1, 0, (Sn * std::sqrt(Cs2) * (V0 - V1)));
173 mat(1, 1) = (Sn2 *
V0 + Cs2 *
V1);
175 } else {
180 }
181 }
182
183 MClT = new TgcClusterOnTrack(MClus, std::move(locpar), std::move(loce),
184 positionAlongStrip);
185 break;
186
188
189
190
191
192
195
196
198 MClus->detectorElement()->isEtaZero(MClus->identify(), lp)) {
201 return nullptr;
202 }
203
208 return nullptr;
209 }
210 MClT = new sTgcClusterOnTrack(MClus, std::move(locpar),
211 std::move(loce), positionAlongStrip);
212 break;
213
215
216
217
219 MClT = new MMClusterOnTrack(mmPRD, std::move(locpar), std::move(loce),
220 positionAlongStrip, {}, {});
221 break;
222 } default:
225 }
226
227 return MClT;
228 }
const boost::regex re(r_e)
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
Amg::Vector3D stripDir(int gasGap, int strip) const
Returns the direction of a strip.
double stripLength() const
Returns the length of each strip which is equal to the height of the chamber.
double stripPitch(int gasGap, int strip) const
Returns the pitch of the given strip in gasGap i.
Gaudi::Property< bool > m_doFixedErrorRpcEta
Gaudi::Property< bool > m_doFixedErrorTgcEta
Gaudi::Property< bool > m_doFixedErrorRpcPhi
Gaudi::Property< double > m_fixedErrorTgcEta
Gaudi::Property< bool > m_restrictWarnings
Gaudi::Property< double > m_fixedErrorRpcEta
Gaudi::Property< double > m_fixedErrorRpcPhi
Gaudi::Property< bool > m_doFixedErrorTgcPhi
Gaudi::Property< double > m_fixedErrorTgcPhi
int channel(const Identifier &id) const override
int gasGap(const Identifier &id) const override
get the hashes
bool measuresPhi(const Identifier &id) const override
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const =0
Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean chec...
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const =0
virtual methods to be overwritten by the inherited surfaces
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.