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 #include "Geometry/VeryForwardRPTopology/interface/RPTopology.h"
0011 #include <iostream>
0012 
0013 const unsigned short RPTopology::no_of_strips_ = 512;
0014 
0015 const double RPTopology::sqrt_2 = std::sqrt(2.0);
0016 // all in mm
0017 const double RPTopology::pitch_ = 66E-3;
0018 const double RPTopology::thickness_ = 0.3;
0019 const double RPTopology::x_width_ = 36.07;
0020 const double RPTopology::y_width_ = 36.07;
0021 const double RPTopology::phys_edge_lenght_ =
0022     22.276;  //correct, but of vague impact, check sensitive edge efficiency curve
0023 const double RPTopology::last_strip_to_border_dist_ = 1.4175;
0024 const double RPTopology::last_strip_to_center_dist_ =
0025     RPTopology::x_width_ / 2. - RPTopology::last_strip_to_border_dist_;  // assumes square shape
0026 
0027 RPTopology::RPTopology() : strip_readout_direction_(0, 1, 0), strip_direction_(1, 0, 0), normal_direction_(0, 0, 1) {}
0028 
0029 bool RPTopology::IsHit(double u, double v, double insensitiveMargin) {
0030   // assumes square shape
0031 
0032   if (fabs(u) > last_strip_to_center_dist_)
0033     return false;
0034 
0035   if (fabs(v) > last_strip_to_center_dist_)
0036     return false;
0037 
0038   double y = (u + v) / sqrt_2;
0039   double edge_to_ceter_dist = (x_width_ - phys_edge_lenght_ / sqrt_2) / sqrt_2 - insensitiveMargin;
0040   if (y < -edge_to_ceter_dist)
0041     return false;
0042 
0043   return true;
0044 }