test
CMS 3D CMS Logo

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