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 HepMC::ThreeVector & GetNormalDirection () const
 
const HepMC::ThreeVector & GetStripDirection () const
 
const HepMC::ThreeVector & GetStripReadoutAxisDir () 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 LocalVector normal_direction_
 
const LocalVector strip_direction_
 
const LocalVector strip_readout_direction_
 
std::vector< strip_infotheRelevantStrips_
 
double top_edge_sigma_
 
double top_edge_x_
 
int verbosity_
 

Additional Inherited Members

- Static Public Member Functions inherited from RPTopology
static bool IsHit (double u, double v, double insensitiveMargin=0)
 
- Public Attributes inherited from RPTopology
HepMC::ThreeVector normal_direction_
 
HepMC::ThreeVector strip_direction_
 
HepMC::ThreeVector 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 ( 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_, edm::ParameterSet::getParameter(), no_of_sigms_to_include_, 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 }
T getParameter(std::string const &) const
static const double phys_edge_lenght_
Definition: RPTopology.h:64
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:63
static const double x_width_
Definition: RPTopology.h:62
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:57

Member Function Documentation

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

Definition at line 53 of file RPSimTopology.h.

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:57
double RPSimTopology::BottomEdgeFactor ( double  x,
double  y 
)
inlineprivate

Definition at line 57 of file RPSimTopology.h.

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:57
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  }
double active_edge_y_
Definition: RPSimTopology.h:41
double active_edge_x_
Definition: RPSimTopology.h:40
static const double sqrt_2
Definition: RPTopology.h:57
double RPSimTopology::DistanceFromBottomEdge ( double  x,
double  y 
)
inlineprivate

Definition at line 68 of file RPSimTopology.h.

68 { return x - bot_edge_x_; }
double bot_edge_x_
Definition: RPSimTopology.h:39
double RPSimTopology::DistanceFromTopEdge ( double  x,
double  y 
)
inlineprivate

Definition at line 69 of file RPSimTopology.h.

References x.

69 { return top_edge_x_ - x; }
double top_edge_x_
Definition: RPSimTopology.h:38
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(), hgcaltilesconstants::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_, 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 }
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:61
constexpr int32_t ceil(float num)
static const double y_width_
Definition: RPTopology.h:63
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:65
double TopEdgeFactor(double x, double y)
Definition: RPSimTopology.h:61
static const double pitch_
Definition: RPTopology.h:59
double RPSimTopology::TopEdgeFactor ( double  x,
double  y 
)
inlineprivate

Definition at line 61 of file RPSimTopology.h.

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:57

Member Data Documentation

double RPSimTopology::active_edge_sigma_
private

Definition at line 45 of file RPSimTopology.h.

Referenced by RPSimTopology().

double RPSimTopology::active_edge_x_
private

Definition at line 40 of file RPSimTopology.h.

Referenced by RPSimTopology().

double RPSimTopology::active_edge_y_
private

Definition at line 41 of file RPSimTopology.h.

Referenced by RPSimTopology().

double RPSimTopology::bot_edge_sigma_
private

Definition at line 44 of file RPSimTopology.h.

Referenced by RPSimTopology().

double RPSimTopology::bot_edge_x_
private

Definition at line 39 of file RPSimTopology.h.

Referenced by RPSimTopology().

double RPSimTopology::no_of_sigms_to_include_
private

Definition at line 36 of file RPSimTopology.h.

Referenced by GetStripsInvolved(), and RPSimTopology().

const LocalVector RPSimTopology::normal_direction_
private

Definition at line 51 of file RPSimTopology.h.

const LocalVector RPSimTopology::strip_direction_
private

Definition at line 50 of file RPSimTopology.h.

const LocalVector RPSimTopology::strip_readout_direction_
private

Definition at line 49 of file RPSimTopology.h.

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

Definition at line 35 of file RPSimTopology.h.

Referenced by GetStripsInvolved().

double RPSimTopology::top_edge_sigma_
private

Definition at line 43 of file RPSimTopology.h.

Referenced by RPSimTopology().

double RPSimTopology::top_edge_x_
private

Definition at line 38 of file RPSimTopology.h.

Referenced by RPSimTopology().

int RPSimTopology::verbosity_
private

Definition at line 47 of file RPSimTopology.h.

Referenced by GetStripsInvolved(), and RPSimTopology().