CMS 3D CMS Logo

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
DDAxes::y
RPSimTopology::top_edge_x_
double top_edge_x_
Definition: RPSimTopology.h:38
RPSimTopology::bot_edge_x_
double bot_edge_x_
Definition: RPSimTopology.h:39
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
RPSimTopology::normal_direction_
const Vector normal_direction_
Definition: RPSimTopology.h:51
RPSimTopology::TopEdgeFactor
double TopEdgeFactor(double x, double y)
Definition: RPSimTopology.h:61
DDAxes::x
strip_info::LowerBoarder
double & LowerBoarder()
Definition: RPSimTopology.h:14
Vector
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
RPSimTopology::active_edge_sigma_
double active_edge_sigma_
Definition: RPSimTopology.h:45
RPSimTopology
Definition: RPSimTopology.h:29
RPSimTopology::GetStripsInvolved
std::vector< strip_info > GetStripsInvolved(double x, double y, double sigma, double &hit_pos)
Definition: RPSimTopology.cc:21
RPTopology
Geometrical and topological information on RP silicon detector. Uses coordinate a frame with origin i...
Definition: RPTopology.h:18
RPSimTopology::active_edge_x_
double active_edge_x_
Definition: RPSimTopology.h:40
strip_info::LowerBoarder
double LowerBoarder() const
Definition: RPSimTopology.h:17
RPSimTopology::verbosity_
int verbosity_
Definition: RPSimTopology.h:47
edm::ParameterSet
Definition: ParameterSet.h:47
strip_info::StripNo
unsigned short StripNo() const
Definition: RPSimTopology.h:20
RPSimTopology::BottomEdgeFactor
double BottomEdgeFactor(double x, double y)
Definition: RPSimTopology.h:57
RPTopology::sqrt_2
static const double sqrt_2
Definition: RPTopology.h:54
RPSimTopology::bot_edge_sigma_
double bot_edge_sigma_
Definition: RPSimTopology.h:44
RPSimTopology::strip_direction_
const Vector strip_direction_
Definition: RPSimTopology.h:50
RPSimTopology::RPSimTopology
RPSimTopology(const edm::ParameterSet &params)
Definition: RPSimTopology.cc:4
RPSimTopology::active_edge_y_
double active_edge_y_
Definition: RPSimTopology.h:41
strip_info::EffFactor
double & EffFactor()
Definition: RPSimTopology.h:15
RPSimTopology::no_of_sigms_to_include_
double no_of_sigms_to_include_
Definition: RPSimTopology.h:36
strip_info::HigherBoarder
double HigherBoarder() const
Definition: RPSimTopology.h:18
RPSimTopology::top_edge_sigma_
double top_edge_sigma_
Definition: RPSimTopology.h:43
strip_info::higher_border_
double higher_border_
Definition: RPSimTopology.h:24
strip_info::EffFactor
double EffFactor() const
Definition: RPSimTopology.h:19
strip_info::eff_factor_
double eff_factor_
Definition: RPSimTopology.h:25
RPSimTopology::DistanceFromTopEdge
double DistanceFromTopEdge(double x, double y)
Definition: RPSimTopology.h:69
strip_info::StripNo
unsigned short & StripNo()
Definition: RPSimTopology.h:16
RPSimTopology::DistanceFromActiveEdge
double DistanceFromActiveEdge(double x, double y)
Definition: RPSimTopology.h:65
RPTopology.h
strip_info
Definition: RPSimTopology.h:9
strip_info::lower_border_
double lower_border_
Definition: RPSimTopology.h:23
RPSimTopology::theRelevantStrips_
std::vector< strip_info > theRelevantStrips_
Definition: RPSimTopology.h:35
ParameterSet.h
RPSimTopology::ActiveEdgeFactor
double ActiveEdgeFactor(double x, double y)
Definition: RPSimTopology.h:53
RPSimTopology::DistanceFromBottomEdge
double DistanceFromBottomEdge(double x, double y)
Definition: RPSimTopology.h:68
strip_info::HigherBoarder
double & HigherBoarder()
Definition: RPSimTopology.h:13
RPSimTopology::strip_readout_direction_
const Vector strip_readout_direction_
Definition: RPSimTopology.h:49
strip_info::strip_info
strip_info(double lower_border, double higher_border, double eff_factor, unsigned short strip_no)
Definition: RPSimTopology.h:11
strip_info::strip_no_
unsigned short strip_no_
Definition: RPSimTopology.h:26