CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 unsigned short RPTopology::no_of_strips_ = 512;
14 
15 // all in mm
16 double RPTopology::pitch_ = 66E-3;
17 double RPTopology::thickness_ = 0.3;
18 double RPTopology::x_width_ = 36.07;
19 double RPTopology::y_width_ = 36.07;
20 double RPTopology::phys_edge_lenght_ = 22.276; //correct, but of vague impact, check sensitive edge efficiency curve
23 
24 
25 
27  : sqrt_2(sqrt(2.0)),
28  strip_readout_direction_(0, 1, 0),
29  strip_direction_(1,0,0),
30  normal_direction_(0,0,1)
31 {
32 }
33 
34 
35 
36 bool RPTopology::IsHit(double u, double v, double insensitiveMargin)
37 {
38  // assumes square shape
39 
40  if (fabs(u) > last_strip_to_center_dist_)
41  return false;
42 
43  if (fabs(v) > last_strip_to_center_dist_)
44  return false;
45 
46  double sqrt_2 = sqrt(2.);
47  double y = (u + v) / sqrt_2;
48  double edge_to_ceter_dist = (x_width_ - phys_edge_lenght_ / sqrt_2) / sqrt_2 - insensitiveMargin;
49  if (y < -edge_to_ceter_dist)
50  return false;
51 
52  return true;
53 }
static double y_width_
Definition: RPTopology.h:65
static double thickness_
Definition: RPTopology.h:62
static double last_strip_to_border_dist_
Definition: RPTopology.h:67
static unsigned short no_of_strips_
Definition: RPTopology.h:63
static bool IsHit(double u, double v, double insensitiveMargin=0)
Definition: RPTopology.cc:36
T sqrt(T t)
Definition: SSEVec.h:18
static double phys_edge_lenght_
Definition: RPTopology.h:66
static double last_strip_to_center_dist_
Definition: RPTopology.h:68
static double x_width_
Definition: RPTopology.h:64
const double sqrt_2
Definition: RPTopology.h:59
static double pitch_
Definition: RPTopology.h:61