Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:49:17

0001 /****************************************************************************
0002 *
0003 * This is a part of TotemDQM and TOTEM offline software.
0004 * Authors:
0005 *   Hubert Niewiadomski
0006 *   Jan Kašpar (jan.kaspar@gmail.com)
0007 *
0008 ****************************************************************************/
0009 
0010 #ifndef Geometry_VeryForwardRPTopology_RPTopology
0011 #define Geometry_VeryForwardRPTopology_RPTopology
0012 
0013 #include "Math/Vector3D.h"
0014 
0015 /**
0016  *\brief Geometrical and topological information on RP silicon detector.
0017  * Uses coordinate a frame with origin in the center of the wafer.
0018  **/
0019 class RPTopology {
0020 public:
0021   using Vector = ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>>;
0022 
0023   RPTopology();
0024   inline const Vector& GetStripReadoutAxisDir() const { return strip_readout_direction_; }
0025   inline const Vector& GetStripDirection() const { return strip_direction_; }
0026   inline const Vector& GetNormalDirection() const { return normal_direction_; }
0027 
0028   /// method converts strip number to a hit position [mm] in det readout coordinate
0029   /// in the origin in the middle of the si detector
0030   /// strip_no is assumed in the range 0 ... no_of_strips_ - 1
0031   inline double GetHitPositionInReadoutDirection(double strip_no) const
0032   //      { return y_width_/2. - last_strip_to_border_dist_ - strip_no * pitch_; }
0033   {
0034     return last_strip_to_border_dist_ + (no_of_strips_ - 1) * pitch_ - y_width_ / 2. - strip_no * pitch_;
0035   }
0036 
0037   inline double DetXWidth() const { return x_width_; }
0038   inline double DetYWidth() const { return y_width_; }
0039   inline double DetEdgeLength() const { return phys_edge_lenght_; }
0040   inline double DetThickness() const { return thickness_; }
0041   inline double DetPitch() const { return pitch_; }
0042   inline unsigned short DetStripNo() const { return no_of_strips_; }
0043 
0044   /// returns true if hit at coordinates u, v (in mm) falls into the sensitive area
0045   /// can take into account insensitive margin (in mm) at the beam-facing edge
0046   static bool IsHit(double u, double v, double insensitiveMargin = 0);
0047 
0048 public:
0049   static const double sqrt_2;
0050 
0051   static const double pitch_;
0052   static const double thickness_;
0053   static const unsigned short no_of_strips_;
0054   static const double x_width_;
0055   static const double y_width_;
0056   static const double phys_edge_lenght_;
0057   static const double last_strip_to_border_dist_;
0058   static const double last_strip_to_center_dist_;
0059 
0060   Vector strip_readout_direction_;
0061   Vector strip_direction_;
0062   Vector normal_direction_;
0063 };
0064 
0065 #endif  //Geometry_VeryForwardRPTopology_RPTopology