CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
RPSimTopology Class Reference

#include <RPSimTopology.h>

Inheritance diagram for RPSimTopology:
RPTopology

Public Member Functions

std::vector< strip_infoGetStripsInvolved (double x, double y, double sigma, double &hit_pos)
 
 RPSimTopology (const edm::ParameterSet &params)
 
- Public Member Functions inherited from RPTopology
double DetEdgeLength () const
 
double DetPitch () const
 
unsigned short DetStripNo () const
 
double DetThickness () const
 
double DetXWidth () const
 
double DetYWidth () const
 
double GetHitPositionInReadoutDirection (double strip_no) const
 
const VectorGetNormalDirection () const
 
const VectorGetStripDirection () const
 
const VectorGetStripReadoutAxisDir () const
 
 RPTopology ()
 

Private Member Functions

double ActiveEdgeFactor (double x, double y)
 
double BottomEdgeFactor (double x, double y)
 
double DistanceFromActiveEdge (double x, double y)
 
double DistanceFromBottomEdge (double x, double y)
 
double DistanceFromTopEdge (double x, double y)
 
double TopEdgeFactor (double x, double y)
 

Private Attributes

double active_edge_sigma_
 
double active_edge_x_
 
double active_edge_y_
 
double bot_edge_sigma_
 
double bot_edge_x_
 
double no_of_sigms_to_include_
 
const Vector normal_direction_
 
const Vector strip_direction_
 
const Vector strip_readout_direction_
 
std::vector< strip_infotheRelevantStrips_
 
double top_edge_sigma_
 
double top_edge_x_
 
int verbosity_
 

Additional Inherited Members

- Public Types inherited from RPTopology
using Vector = ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > >
 
- Static Public Member Functions inherited from RPTopology
static bool IsHit (double u, double v, double insensitiveMargin=0)
 
- Public Attributes inherited from RPTopology
Vector normal_direction_
 
Vector strip_direction_
 
Vector strip_readout_direction_
 
- Static Public Attributes inherited from RPTopology
static const double last_strip_to_border_dist_ = 1.4175
 
static const double last_strip_to_center_dist_
 
static const unsigned short no_of_strips_ = 512
 
static const double phys_edge_lenght_
 
static const double pitch_ = 66E-3
 
static const double sqrt_2 = std::sqrt(2.0)
 
static const double thickness_ = 0.3
 
static const double x_width_ = 36.07
 
static const double y_width_ = 36.07
 

Detailed Description

Definition at line 29 of file RPSimTopology.h.

Constructor & Destructor Documentation

◆ RPSimTopology()

RPSimTopology::RPSimTopology ( const edm::ParameterSet params)

Definition at line 4 of file RPSimTopology.cc.

4  {
5  verbosity_ = params.getParameter<int>("RPVerbosity");
6  no_of_sigms_to_include_ = params.getParameter<double>("RPSharingSigmas");
7 
8  top_edge_sigma_ = params.getParameter<double>("RPTopEdgeSmearing"); //[mm]
9  bot_edge_sigma_ = params.getParameter<double>("RPBottomEdgeSmearing"); //[mm]
10  active_edge_sigma_ = params.getParameter<double>("RPActiveEdgeSmearing"); //[mm]
11 
12  double phys_active_edge_dist = params.getParameter<double>("RPActiveEdgePosition"); //[mm]
13 
14  active_edge_x_ = -x_width_ / 2.0 + phys_edge_lenght_ / sqrt_2 + phys_active_edge_dist * sqrt_2;
15  active_edge_y_ = -y_width_ / 2.0;
16 
17  top_edge_x_ = x_width_ / 2 - params.getParameter<double>("RPTopEdgePosition"); //[mm]
18  bot_edge_x_ = params.getParameter<double>("RPBottomEdgePosition") - x_width_ / 2; //[mm]
19 }

References active_edge_sigma_, active_edge_x_, active_edge_y_, bot_edge_sigma_, bot_edge_x_, no_of_sigms_to_include_, CalibrationSummaryClient_cfi::params, RPTopology::phys_edge_lenght_, RPTopology::sqrt_2, top_edge_sigma_, top_edge_x_, verbosity_, RPTopology::x_width_, and RPTopology::y_width_.

Member Function Documentation

◆ ActiveEdgeFactor()

double RPSimTopology::ActiveEdgeFactor ( double  x,
double  y 
)
inlineprivate

Definition at line 53 of file RPSimTopology.h.

53  {
54  return TMath::Erf(DistanceFromActiveEdge(x, y) / sqrt_2 / active_edge_sigma_) / 2 + 0.5;
55  }

References active_edge_sigma_, DistanceFromActiveEdge(), RPTopology::sqrt_2, x, and y.

Referenced by GetStripsInvolved().

◆ BottomEdgeFactor()

double RPSimTopology::BottomEdgeFactor ( double  x,
double  y 
)
inlineprivate

Definition at line 57 of file RPSimTopology.h.

57  {
58  return TMath::Erf(DistanceFromBottomEdge(x, y) / sqrt_2 / bot_edge_sigma_) / 2 + 0.5;
59  }

References bot_edge_sigma_, DistanceFromBottomEdge(), RPTopology::sqrt_2, x, and y.

Referenced by GetStripsInvolved().

◆ DistanceFromActiveEdge()

double RPSimTopology::DistanceFromActiveEdge ( double  x,
double  y 
)
inlineprivate

Definition at line 65 of file RPSimTopology.h.

65  {
66  return ((x - active_edge_x_) + (y - active_edge_y_)) / sqrt_2;
67  }

References active_edge_x_, active_edge_y_, RPTopology::sqrt_2, x, and y.

Referenced by ActiveEdgeFactor().

◆ DistanceFromBottomEdge()

double RPSimTopology::DistanceFromBottomEdge ( double  x,
double  y 
)
inlineprivate

Definition at line 68 of file RPSimTopology.h.

68 { return x - bot_edge_x_; }

References bot_edge_x_, and x.

Referenced by BottomEdgeFactor().

◆ DistanceFromTopEdge()

double RPSimTopology::DistanceFromTopEdge ( double  x,
double  y 
)
inlineprivate

Definition at line 69 of file RPSimTopology.h.

69 { return top_edge_x_ - x; }

References top_edge_x_, and x.

Referenced by TopEdgeFactor().

◆ GetStripsInvolved()

std::vector< strip_info > RPSimTopology::GetStripsInvolved ( double  x,
double  y,
double  sigma,
double &  hit_pos 
)

Definition at line 21 of file RPSimTopology.cc.

21  {
22  theRelevantStrips_.clear();
23  hit_pos = (no_of_strips_ - 1) * pitch_ -
25  y_width_ / 2.0); //hit position with respect to the center of the first strip, only in y direction
26  double hit_pos_in_strips = hit_pos / pitch_;
27  double hit_factor = ActiveEdgeFactor(x, y) * BottomEdgeFactor(x, y) * TopEdgeFactor(x, y);
28  double range_of_interest_in_strips = no_of_sigms_to_include_ * sigma / pitch_;
29  int lowest_strip_no = (int)floor(hit_pos_in_strips - range_of_interest_in_strips + 0.5);
30  int highest_strip_no = (int)ceil(hit_pos_in_strips + range_of_interest_in_strips - 0.5);
31 
32  if (verbosity_)
33  std::cout << "lowest_strip_no:" << lowest_strip_no << " highest_strip_no:" << highest_strip_no << std::endl;
34 
35  if (lowest_strip_no < 0)
36  lowest_strip_no = 0;
37  if (highest_strip_no > no_of_strips_ - 1)
38  highest_strip_no = no_of_strips_ - 1;
39 
40  for (int i = lowest_strip_no; i <= highest_strip_no; ++i) {
41  double low_strip_range = ((double)i - 0.5) * pitch_;
42  double high_strip_range = low_strip_range + pitch_;
43  theRelevantStrips_.emplace_back(strip_info(low_strip_range, high_strip_range, hit_factor, (unsigned short)i));
44  }
45  return theRelevantStrips_;
46 }

References ActiveEdgeFactor(), BottomEdgeFactor(), reco::ceil(), gather_cfg::cout, mps_fire::i, createfilelist::int, RPTopology::last_strip_to_border_dist_, no_of_sigms_to_include_, RPTopology::no_of_strips_, RPTopology::pitch_, theRelevantStrips_, TopEdgeFactor(), verbosity_, x, y, and RPTopology::y_width_.

Referenced by RPLinearInduceChargeOnStrips::Induce().

◆ TopEdgeFactor()

double RPSimTopology::TopEdgeFactor ( double  x,
double  y 
)
inlineprivate

Definition at line 61 of file RPSimTopology.h.

61  {
62  return TMath::Erf(DistanceFromTopEdge(x, y) / sqrt_2 / top_edge_sigma_) / 2 + 0.5;
63  }

References DistanceFromTopEdge(), RPTopology::sqrt_2, top_edge_sigma_, x, and y.

Referenced by GetStripsInvolved().

Member Data Documentation

◆ active_edge_sigma_

double RPSimTopology::active_edge_sigma_
private

Definition at line 45 of file RPSimTopology.h.

Referenced by ActiveEdgeFactor(), and RPSimTopology().

◆ active_edge_x_

double RPSimTopology::active_edge_x_
private

Definition at line 40 of file RPSimTopology.h.

Referenced by DistanceFromActiveEdge(), and RPSimTopology().

◆ active_edge_y_

double RPSimTopology::active_edge_y_
private

Definition at line 41 of file RPSimTopology.h.

Referenced by DistanceFromActiveEdge(), and RPSimTopology().

◆ bot_edge_sigma_

double RPSimTopology::bot_edge_sigma_
private

Definition at line 44 of file RPSimTopology.h.

Referenced by BottomEdgeFactor(), and RPSimTopology().

◆ bot_edge_x_

double RPSimTopology::bot_edge_x_
private

Definition at line 39 of file RPSimTopology.h.

Referenced by DistanceFromBottomEdge(), and RPSimTopology().

◆ no_of_sigms_to_include_

double RPSimTopology::no_of_sigms_to_include_
private

Definition at line 36 of file RPSimTopology.h.

Referenced by GetStripsInvolved(), and RPSimTopology().

◆ normal_direction_

const Vector RPSimTopology::normal_direction_
private

Definition at line 51 of file RPSimTopology.h.

◆ strip_direction_

const Vector RPSimTopology::strip_direction_
private

Definition at line 50 of file RPSimTopology.h.

◆ strip_readout_direction_

const Vector RPSimTopology::strip_readout_direction_
private

Definition at line 49 of file RPSimTopology.h.

◆ theRelevantStrips_

std::vector<strip_info> RPSimTopology::theRelevantStrips_
private

Definition at line 35 of file RPSimTopology.h.

Referenced by GetStripsInvolved().

◆ top_edge_sigma_

double RPSimTopology::top_edge_sigma_
private

Definition at line 43 of file RPSimTopology.h.

Referenced by RPSimTopology(), and TopEdgeFactor().

◆ top_edge_x_

double RPSimTopology::top_edge_x_
private

Definition at line 38 of file RPSimTopology.h.

Referenced by DistanceFromTopEdge(), and RPSimTopology().

◆ verbosity_

int RPSimTopology::verbosity_
private

Definition at line 47 of file RPSimTopology.h.

Referenced by GetStripsInvolved(), and RPSimTopology().

DDAxes::y
RPTopology::y_width_
static const double y_width_
Definition: RPTopology.h:60
mps_fire.i
i
Definition: mps_fire.py:428
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
gather_cfg.cout
cout
Definition: gather_cfg.py:144
RPSimTopology::TopEdgeFactor
double TopEdgeFactor(double x, double y)
Definition: RPSimTopology.h:61
DDAxes::x
reco::ceil
constexpr int32_t ceil(float num)
Definition: constexpr_cmath.h:7
RPSimTopology::active_edge_sigma_
double active_edge_sigma_
Definition: RPSimTopology.h:45
RPTopology::last_strip_to_border_dist_
static const double last_strip_to_border_dist_
Definition: RPTopology.h:62
RPSimTopology::active_edge_x_
double active_edge_x_
Definition: RPSimTopology.h:40
RPSimTopology::verbosity_
int verbosity_
Definition: RPSimTopology.h:47
RPTopology::pitch_
static const double pitch_
Definition: RPTopology.h:56
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
createfilelist.int
int
Definition: createfilelist.py:10
RPSimTopology::active_edge_y_
double active_edge_y_
Definition: RPSimTopology.h:41
RPSimTopology::no_of_sigms_to_include_
double no_of_sigms_to_include_
Definition: RPSimTopology.h:36
RPTopology::no_of_strips_
static const unsigned short no_of_strips_
Definition: RPTopology.h:58
RPSimTopology::top_edge_sigma_
double top_edge_sigma_
Definition: RPSimTopology.h:43
RPSimTopology::DistanceFromTopEdge
double DistanceFromTopEdge(double x, double y)
Definition: RPSimTopology.h:69
RPTopology::x_width_
static const double x_width_
Definition: RPTopology.h:59
RPSimTopology::DistanceFromActiveEdge
double DistanceFromActiveEdge(double x, double y)
Definition: RPSimTopology.h:65
strip_info
Definition: RPSimTopology.h:9
RPTopology::phys_edge_lenght_
static const double phys_edge_lenght_
Definition: RPTopology.h:61
RPSimTopology::theRelevantStrips_
std::vector< strip_info > theRelevantStrips_
Definition: RPSimTopology.h:35
RPSimTopology::ActiveEdgeFactor
double ActiveEdgeFactor(double x, double y)
Definition: RPSimTopology.h:53
RPSimTopology::DistanceFromBottomEdge
double DistanceFromBottomEdge(double x, double y)
Definition: RPSimTopology.h:68