File indexing completed on 2024-04-06 12:27:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef RecoPPS_Local_TotemRPLocalTrackFitterAlgorithm
0011 #define RecoPPS_Local_TotemRPLocalTrackFitterAlgorithm
0012
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014
0015 #include "DataFormats/Common/interface/DetSetVector.h"
0016 #include "DataFormats/CTPPSReco/interface/TotemRPRecHit.h"
0017 #include "DataFormats/CTPPSReco/interface/TotemRPLocalTrack.h"
0018
0019 #include "Geometry/VeryForwardGeometryBuilder/interface/CTPPSGeometry.h"
0020 #include "Geometry/VeryForwardRPTopology/interface/RPTopology.h"
0021
0022 #include "TVector3.h"
0023 #include "TVector2.h"
0024
0025 #include <unordered_map>
0026
0027
0028
0029
0030
0031
0032 class TotemRPLocalTrackFitterAlgorithm {
0033 public:
0034 TotemRPLocalTrackFitterAlgorithm(const edm::ParameterSet &conf);
0035
0036
0037 bool fitTrack(const edm::DetSetVector<TotemRPRecHit> &hits,
0038 double z_0,
0039 const CTPPSGeometry &tot_geom,
0040 TotemRPLocalTrack &fitted_track);
0041
0042
0043 void reset();
0044
0045 private:
0046 struct RPDetCoordinateAlgebraObjs {
0047 TVector3 centre_of_det_global_position_;
0048 double rec_u_0_;
0049 TVector2 readout_direction_;
0050 bool available_;
0051 };
0052
0053
0054 std::unordered_map<unsigned int, RPDetCoordinateAlgebraObjs> det_data_map_;
0055
0056 RPTopology rp_topology_;
0057
0058
0059
0060 RPDetCoordinateAlgebraObjs *getDetAlgebraData(unsigned int det_id, const CTPPSGeometry &tot_rp_geom);
0061
0062
0063 RPDetCoordinateAlgebraObjs prepareReconstAlgebraData(unsigned int det_id, const CTPPSGeometry &tot_rp_geom);
0064
0065
0066 void multiplyByDiagonalInPlace(TMatrixD &mt, const TVectorD &diag);
0067
0068 static TVector3 convert3vector(const CTPPSGeometry::Vector &v) { return TVector3(v.x(), v.y(), v.z()); }
0069 };
0070
0071 #endif