25 const IInterface* p ) :
28 declareInterface< ITrigSpacePointConversionTool >(
this );
41 StatusCode
sc = AthAlgTool::initialize();
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 ");
97 StatusCode
sc = AthAlgTool::finalize();
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));
198 double sint = sin(
theta);
200 double sinp = sin(
phi);
201 double cosp = cos(
phi);
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);
218 ztrf[3] = float(
cost);
Scalar phi() const
phi method
Scalar theta() const
theta method
#define ATH_CHECK
Evaluate an expression and check for errors.
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
Describes the API of the Region of Ineterest geometry.
const_pointer_type ptr()
Dereference the pointer.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
int cost(std::vector< std::string > &files, node &n, const std::string &directory="", bool deleteref=false, bool relocate=false)
Eigen::Matrix< double, 3, 1 > Vector3D