CMS 3D CMS Logo

TotemRPLocalTrackFitterAlgorithm.h
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * This is a part of TOTEM offline software.
4 * Authors:
5 * Hubert Niewiadomski
6 * Jan Kašpar (jan.kaspar@gmail.com)
7 *
8 ****************************************************************************/
9 
10 #ifndef RecoCTPPS_TotemRPLocal_TotemRPLocalTrackFitterAlgorithm
11 #define RecoCTPPS_TotemRPLocal_TotemRPLocalTrackFitterAlgorithm
12 
14 
18 
21 
22 #include "TVector3.h"
23 #include "TVector2.h"
24 
25 #include <unordered_map>
26 
27 //----------------------------------------------------------------------------------------------------
28 
33 {
34  public:
36 
38  bool fitTrack(const edm::DetSetVector<TotemRPRecHit> &hits, double z_0, const TotemRPGeometry &tot_geom, TotemRPLocalTrack &fitted_track);
39 
41  void reset();
42 
43  private:
45  {
47  double rec_u_0_;
48  TVector2 readout_direction_;
49  bool available_;
50  };
51 
53  std::unordered_map<unsigned int, RPDetCoordinateAlgebraObjs> det_data_map_;
54 
56 
59  RPDetCoordinateAlgebraObjs *getDetAlgebraData(unsigned int det_id, const TotemRPGeometry &tot_rp_geom);
60 
62  RPDetCoordinateAlgebraObjs prepareReconstAlgebraData(unsigned int det_id, const TotemRPGeometry &tot_rp_geom);
63 
65  void multiplyByDiagonalInPlace(TMatrixD &mt, const TVectorD &diag);
66 
67  static TVector3 convert3vector(const CLHEP::Hep3Vector & v)
68  {
69  return TVector3(v.x(),v.y(),v.z()) ;
70  }
71 };
72 
73 #endif
void multiplyByDiagonalInPlace(TMatrixD &mt, const TVectorD &diag)
A matrix multiplication shorthand.
void reset()
Resets the reconstruction-data cache.
std::unordered_map< unsigned int, RPDetCoordinateAlgebraObjs > det_data_map_
A cache of reconstruction data. Must be reset every time the geometry chagnges.
TVector2 readout_direction_
non paralell projection and rot_cor included
A track fit through a single RP.
bool available_
if det should be included in the reconstruction
RPDetCoordinateAlgebraObjs prepareReconstAlgebraData(unsigned int det_id, const TotemRPGeometry &tot_rp_geom)
Build the reconstruction data.
double rec_u_0_
in mm, position of det. centre projected on readout direction
TotemRPLocalTrackFitterAlgorithm(const edm::ParameterSet &conf)
bool fitTrack(const edm::DetSetVector< TotemRPRecHit > &hits, double z_0, const TotemRPGeometry &tot_geom, TotemRPLocalTrack &fitted_track)
performs the track fit, returns true if successful
Algorithm for fitting tracks through a single RP.
The manager class for TOTEM RP geometry.
Geometrical and topological information on RP silicon detector. Uses coordinate a frame with origin i...
Definition: RPTopology.h:29
static TVector3 convert3vector(const CLHEP::Hep3Vector &v)
RPDetCoordinateAlgebraObjs * getDetAlgebraData(unsigned int det_id, const TotemRPGeometry &tot_rp_geom)