CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RPTopology.cc
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * This is a part of TotemDQM and TOTEM offline software.
4 * Authors:
5 * Hubert Niewiadomski
6 * Jan Kašpar (jan.kaspar@gmail.com)
7 *
8 ****************************************************************************/
9 
11 #include <iostream>
12 
13 const unsigned short RPTopology::no_of_strips_ = 512;
14 
15 const double RPTopology::sqrt_2 = std::sqrt(2.0);
16 // all in mm
17 const double RPTopology::pitch_ = 66E-3;
18 const double RPTopology::thickness_ = 0.3;
19 const double RPTopology::x_width_ = 36.07;
20 const double RPTopology::y_width_ = 36.07;
21 const double RPTopology::phys_edge_lenght_ =
22  22.276; //correct, but of vague impact, check sensitive edge efficiency curve
23 const double RPTopology::last_strip_to_border_dist_ = 1.4175;
25  RPTopology::x_width_ / 2. - RPTopology::last_strip_to_border_dist_; // assumes square shape
26 
27 RPTopology::RPTopology() : strip_readout_direction_(0, 1, 0), strip_direction_(1, 0, 0), normal_direction_(0, 0, 1) {}
28 
29 bool RPTopology::IsHit(double u, double v, double insensitiveMargin) {
30  // assumes square shape
31 
32  if (fabs(u) > last_strip_to_center_dist_)
33  return false;
34 
35  if (fabs(v) > last_strip_to_center_dist_)
36  return false;
37 
38  double y = (u + v) / sqrt_2;
39  double edge_to_ceter_dist = (x_width_ - phys_edge_lenght_ / sqrt_2) / sqrt_2 - insensitiveMargin;
40  if (y < -edge_to_ceter_dist)
41  return false;
42 
43  return true;
44 }
static const double phys_edge_lenght_
Definition: RPTopology.h:56
static const double last_strip_to_center_dist_
Definition: RPTopology.h:58
static const double thickness_
Definition: RPTopology.h:52
static bool IsHit(double u, double v, double insensitiveMargin=0)
Definition: RPTopology.cc:29
static const unsigned short no_of_strips_
Definition: RPTopology.h:53
static const double y_width_
Definition: RPTopology.h:55
static const double x_width_
Definition: RPTopology.h:54
T sqrt(T t)
Definition: SSEVec.h:19
static const double last_strip_to_border_dist_
Definition: RPTopology.h:57
static const double pitch_
Definition: RPTopology.h:51
static const double sqrt_2
Definition: RPTopology.h:49