25 const IInterface*
p ) :
28 declareInterface< ITrigSpacePointConversionTool >(
this );
81 ATH_MSG_FATAL(
"Both usePixelSpacePoints and useSctSpacePoints set to False. At least one needs to be True");
82 return StatusCode::FAILURE;
89 ATH_MSG_INFO(
"TrigSpacePointConversionTool initialized ");
102 std::vector<TrigSiSpacePointBase>&
output,
int& nPix,
int& nSct,
const EventContext& ctx, std::map<
Identifier, std::vector<long int> > *clustermap)
const {
110 pixelSpacePointsContainer = pixHandle.
ptr();
116 sctSpacePointsContainer = sctHandle.
ptr();
119 std::vector<IdentifierHash> listOfPixIds;
120 std::vector<IdentifierHash> listOfSctIds;
141 if ( clustermap!=
nullptr ) {
143 ATH_MSG_DEBUG(
"LRT Mode: clustermap supplied and being used to remove spacepoints from clusters already on tracks");
174 ATH_MSG_DEBUG(
"Returning "<<nPix<<
" Pixel Spacepoints and "<<nSct<<
" SCT SpacePoints");
175 return StatusCode::SUCCESS;
183 double shift_x =
vertex.x() - beamSpotHandle->beamTilt(0)*
vertex.z();
184 double shift_y =
vertex.y() - beamSpotHandle->beamTilt(1)*
vertex.z();
195 double tx =
tan(beamSpotHandle->beamTilt(0));
196 double ty =
tan(beamSpotHandle->beamTilt(1));
198 double phi = atan2(ty,
tx);
199 double theta = acos(1.0/sqrt(1.0+
tx*
tx+ty*ty));
205 std::array<float, 4> xtrf{}, ytrf{}, ztrf{};
207 xtrf[0] =
float(origin.x());
208 xtrf[1] =
float(
cost*cosp*cosp+sinp*sinp);
209 xtrf[2] =
float(
cost*sinp*cosp-sinp*cosp);
210 xtrf[3] =-
float(sint*cosp);
212 ytrf[0] =
float(origin.y());
213 ytrf[1] =
float(
cost*cosp*sinp-sinp*cosp);
214 ytrf[2] =
float(
cost*sinp*sinp+cosp*cosp);
215 ytrf[3] =-
float(sint*sinp);
217 ztrf[0] =
float(origin.z());
218 ztrf[1] =
float(sint*cosp);
219 ztrf[2] =
float(sint*sinp);