CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RPSimTopology.h
Go to the documentation of this file.
1 #ifndef Geometry_VeryForwardRPTopology_RPSimTopology
2 #define Geometry_VeryForwardRPTopology_RPSimTopology
3 
4 #include "TMath.h"
6 
8 
9 class strip_info {
10 public:
11  strip_info(double lower_border, double higher_border, double eff_factor, unsigned short strip_no)
12  : lower_border_(lower_border), higher_border_(higher_border), eff_factor_(eff_factor), strip_no_(strip_no) {}
13  inline double &HigherBoarder() { return higher_border_; }
14  inline double &LowerBoarder() { return lower_border_; }
15  inline double &EffFactor() { return eff_factor_; }
16  inline unsigned short &StripNo() { return strip_no_; }
17  inline double LowerBoarder() const { return lower_border_; }
18  inline double HigherBoarder() const { return higher_border_; }
19  inline double EffFactor() const { return eff_factor_; }
20  inline unsigned short StripNo() const { return strip_no_; }
21 
22 private:
23  double lower_border_;
25  double eff_factor_;
26  unsigned short strip_no_;
27 };
28 
29 class RPSimTopology : public RPTopology {
30 public:
32  std::vector<strip_info> GetStripsInvolved(double x, double y, double sigma, double &hit_pos);
33 
34 private:
35  std::vector<strip_info> theRelevantStrips_;
37  //(0,0) in the center of the wafer
38  double top_edge_x_;
39  double bot_edge_x_;
42 
46 
48 
52 
53  inline double ActiveEdgeFactor(double x, double y) {
54  return TMath::Erf(DistanceFromActiveEdge(x, y) / sqrt_2 / active_edge_sigma_) / 2 + 0.5;
55  }
56 
57  inline double BottomEdgeFactor(double x, double y) {
58  return TMath::Erf(DistanceFromBottomEdge(x, y) / sqrt_2 / bot_edge_sigma_) / 2 + 0.5;
59  }
60 
61  inline double TopEdgeFactor(double x, double y) {
62  return TMath::Erf(DistanceFromTopEdge(x, y) / sqrt_2 / top_edge_sigma_) / 2 + 0.5;
63  }
64 
65  inline double DistanceFromActiveEdge(double x, double y) {
66  return ((x - active_edge_x_) + (y - active_edge_y_)) / sqrt_2;
67  }
68  inline double DistanceFromBottomEdge(double x, double y) { return x - bot_edge_x_; }
69  inline double DistanceFromTopEdge(double x, double y) { return top_edge_x_ - x; }
70 };
71 
72 #endif //Geometry_VeryForwardRPTopology_RPSimTopology
unsigned short strip_no_
Definition: RPSimTopology.h:26
double BottomEdgeFactor(double x, double y)
Definition: RPSimTopology.h:57
double DistanceFromTopEdge(double x, double y)
Definition: RPSimTopology.h:69
double DistanceFromActiveEdge(double x, double y)
Definition: RPSimTopology.h:65
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
std::vector< strip_info > theRelevantStrips_
Definition: RPSimTopology.h:35
double top_edge_sigma_
Definition: RPSimTopology.h:43
double active_edge_sigma_
Definition: RPSimTopology.h:45
double active_edge_y_
Definition: RPSimTopology.h:41
double & LowerBoarder()
Definition: RPSimTopology.h:14
double HigherBoarder() const
Definition: RPSimTopology.h:18
const Vector strip_readout_direction_
Definition: RPSimTopology.h:49
double EffFactor() const
Definition: RPSimTopology.h:19
double ActiveEdgeFactor(double x, double y)
Definition: RPSimTopology.h:53
RPSimTopology(const edm::ParameterSet &params)
Definition: RPSimTopology.cc:4
const Vector strip_direction_
Definition: RPSimTopology.h:50
double no_of_sigms_to_include_
Definition: RPSimTopology.h:36
double top_edge_x_
Definition: RPSimTopology.h:38
double active_edge_x_
Definition: RPSimTopology.h:40
double bot_edge_x_
Definition: RPSimTopology.h:39
const Vector normal_direction_
Definition: RPSimTopology.h:51
double higher_border_
Definition: RPSimTopology.h:24
double bot_edge_sigma_
Definition: RPSimTopology.h:44
double TopEdgeFactor(double x, double y)
Definition: RPSimTopology.h:61
unsigned short & StripNo()
Definition: RPSimTopology.h:16
unsigned short StripNo() const
Definition: RPSimTopology.h:20
std::vector< strip_info > GetStripsInvolved(double x, double y, double sigma, double &hit_pos)
double & EffFactor()
Definition: RPSimTopology.h:15
double eff_factor_
Definition: RPSimTopology.h:25
Geometrical and topological information on RP silicon detector. Uses coordinate a frame with origin i...
Definition: RPTopology.h:19
double lower_border_
Definition: RPSimTopology.h:23
double DistanceFromBottomEdge(double x, double y)
Definition: RPSimTopology.h:68
static const double sqrt_2
Definition: RPTopology.h:49
double & HigherBoarder()
Definition: RPSimTopology.h:13
strip_info(double lower_border, double higher_border, double eff_factor, unsigned short strip_no)
Definition: RPSimTopology.h:11
double LowerBoarder() const
Definition: RPSimTopology.h:17