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;
90 ATH_MSG_INFO(
"TrigSpacePointConversionTool initialized ");
103 std::vector<TrigSiSpacePointBase>&
output,
int& nPix,
int& nSct,
const EventContext& ctx, std::map<
Identifier, std::vector<long int> > *clustermap)
const {
111 pixelSpacePointsContainer = pixHandle.
ptr();
117 sctSpacePointsContainer = sctHandle.
ptr();
120 std::vector<IdentifierHash> listOfPixIds;
121 std::vector<IdentifierHash> listOfSctIds;
123 m_regsel_pix->lookup(ctx)->HashIDList( internalRoI, listOfPixIds );
124 m_regsel_sct->lookup(ctx)->HashIDList( internalRoI, listOfSctIds );
139 if ( clustermap!=
nullptr ) {
141 ATH_MSG_DEBUG(
"LRT Mode: clustermap supplied and being used to remove spacepoints from clusters already on tracks");
172 ATH_MSG_DEBUG(
"Returning "<<nPix<<
" Pixel Spacepoints and "<<nSct<<
" SCT SpacePoints");
173 return StatusCode::SUCCESS;
181 double shift_x =
vertex.x() - beamSpotHandle->beamTilt(0)*
vertex.z();
182 double shift_y =
vertex.y() - beamSpotHandle->beamTilt(1)*
vertex.z();
193 double tx =
tan(beamSpotHandle->beamTilt(0));
194 double ty =
tan(beamSpotHandle->beamTilt(1));
196 double phi = atan2(ty,
tx);
197 double theta = acos(1.0/sqrt(1.0+
tx*
tx+ty*ty));
203 std::array<float, 4> xtrf{}, ytrf{}, ztrf{};
205 xtrf[0] =
float(origin.x());
206 xtrf[1] =
float(
cost*cosp*cosp+sinp*sinp);
207 xtrf[2] =
float(
cost*sinp*cosp-sinp*cosp);
208 xtrf[3] =-
float(sint*cosp);
210 ytrf[0] =
float(origin.y());
211 ytrf[1] =
float(
cost*cosp*sinp-sinp*cosp);
212 ytrf[2] =
float(
cost*sinp*sinp+cosp*cosp);
213 ytrf[3] =-
float(sint*sinp);
215 ztrf[0] =
float(origin.z());
216 ztrf[1] =
float(sint*cosp);
217 ztrf[2] =
float(sint*sinp);