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.

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

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 }
static const double phys_edge_lenght_
Definition: RPTopology.h:56
double top_edge_sigma_
Definition: RPSimTopology.h:43
double active_edge_sigma_
Definition: RPSimTopology.h:45
double active_edge_y_
Definition: RPSimTopology.h:41
static const double y_width_
Definition: RPTopology.h:55
static const double x_width_
Definition: RPTopology.h:54
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
double bot_edge_sigma_
Definition: RPSimTopology.h:44
static const double sqrt_2
Definition: RPTopology.h:49

Member Function Documentation

◆ ActiveEdgeFactor()

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

Definition at line 53 of file RPSimTopology.h.

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

Referenced by GetStripsInvolved().

53  {
54  return TMath::Erf(DistanceFromActiveEdge(x, y) / sqrt_2 / active_edge_sigma_) / 2 + 0.5;
55  }
double DistanceFromActiveEdge(double x, double y)
Definition: RPSimTopology.h:65
double active_edge_sigma_
Definition: RPSimTopology.h:45
static const double sqrt_2
Definition: RPTopology.h:49

◆ BottomEdgeFactor()

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

Definition at line 57 of file RPSimTopology.h.

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

Referenced by GetStripsInvolved().

57  {
58  return TMath::Erf(DistanceFromBottomEdge(x, y) / sqrt_2 / bot_edge_sigma_) / 2 + 0.5;
59  }
double bot_edge_sigma_
Definition: RPSimTopology.h:44
double DistanceFromBottomEdge(double x, double y)
Definition: RPSimTopology.h:68
static const double sqrt_2
Definition: RPTopology.h:49

◆ DistanceFromActiveEdge()

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

Definition at line 65 of file RPSimTopology.h.

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

Referenced by ActiveEdgeFactor().

65  {
66  return ((x - active_edge_x_) + (y - active_edge_y_)) / sqrt_2;
67  }
double active_edge_y_
Definition: RPSimTopology.h:41
double active_edge_x_
Definition: RPSimTopology.h:40
static const double sqrt_2
Definition: RPTopology.h:49

◆ DistanceFromBottomEdge()

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

Definition at line 68 of file RPSimTopology.h.

References bot_edge_x_, and x.

Referenced by BottomEdgeFactor().

68 { return x - bot_edge_x_; }
double bot_edge_x_
Definition: RPSimTopology.h:39

◆ DistanceFromTopEdge()

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

Definition at line 69 of file RPSimTopology.h.

References top_edge_x_, and x.

Referenced by TopEdgeFactor().

69 { return top_edge_x_ - x; }
double top_edge_x_
Definition: RPSimTopology.h:38

◆ GetStripsInvolved()

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

Definition at line 21 of file RPSimTopology.cc.

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().

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 }
constexpr int32_t ceil(float num)
double BottomEdgeFactor(double x, double y)
Definition: RPSimTopology.h:57
std::vector< strip_info > theRelevantStrips_
Definition: RPSimTopology.h:35
static const unsigned short no_of_strips_
Definition: RPTopology.h:53
static const double y_width_
Definition: RPTopology.h:55
double ActiveEdgeFactor(double x, double y)
Definition: RPSimTopology.h:53
double no_of_sigms_to_include_
Definition: RPSimTopology.h:36
static const double last_strip_to_border_dist_
Definition: RPTopology.h:57
double TopEdgeFactor(double x, double y)
Definition: RPSimTopology.h:61
static const double pitch_
Definition: RPTopology.h:51

◆ TopEdgeFactor()

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

Definition at line 61 of file RPSimTopology.h.

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

Referenced by GetStripsInvolved().

61  {
62  return TMath::Erf(DistanceFromTopEdge(x, y) / sqrt_2 / top_edge_sigma_) / 2 + 0.5;
63  }
double DistanceFromTopEdge(double x, double y)
Definition: RPSimTopology.h:69
double top_edge_sigma_
Definition: RPSimTopology.h:43
static const double sqrt_2
Definition: RPTopology.h:49

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().