CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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_ = RPTopology::x_width_/2. - RPTopology::last_strip_to_border_dist_
 
static const unsigned short no_of_strips_ = 512
 
static const double phys_edge_lenght_ = 22.276
 
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 30 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_.

5 {
6  verbosity_ = params.getParameter<int>("RPVerbosity");
7  no_of_sigms_to_include_ = params.getParameter<double>("RPSharingSigmas");
8 
9  top_edge_sigma_ = params.getParameter<double>("RPTopEdgeSmearing"); //[mm]
10  bot_edge_sigma_ = params.getParameter<double>("RPBottomEdgeSmearing"); //[mm]
11  active_edge_sigma_ = params.getParameter<double>("RPActiveEdgeSmearing"); //[mm]
12 
13  double phys_active_edge_dist = params.getParameter<double>("RPActiveEdgePosition"); //[mm]
14 
15  active_edge_x_ = -x_width_/2.0 + phys_edge_lenght_/sqrt_2 + phys_active_edge_dist*sqrt_2;
16  active_edge_y_ = -y_width_/2.0;
17 
18  top_edge_x_ = x_width_/2-params.getParameter<double>("RPTopEdgePosition"); //[mm]
19  bot_edge_x_ = params.getParameter<double>("RPBottomEdgePosition")-x_width_/2; //[mm]
20 }
T getParameter(std::string const &) const
static const double phys_edge_lenght_
Definition: RPTopology.h:64
double top_edge_sigma_
Definition: RPSimTopology.h:45
double active_edge_sigma_
Definition: RPSimTopology.h:47
double active_edge_y_
Definition: RPSimTopology.h:43
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: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 bot_edge_sigma_
Definition: RPSimTopology.h:46
static const double sqrt_2
Definition: RPTopology.h:57

Member Function Documentation

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

Definition at line 55 of file RPSimTopology.h.

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

Referenced by GetStripsInvolved().

56  {
57  return TMath::Erf(DistanceFromActiveEdge(x, y)/sqrt_2/active_edge_sigma_)/2+0.5;
58  }
double DistanceFromActiveEdge(double x, double y)
Definition: RPSimTopology.h:70
double active_edge_sigma_
Definition: RPSimTopology.h:47
static const double sqrt_2
Definition: RPTopology.h:57
double RPSimTopology::BottomEdgeFactor ( double  x,
double  y 
)
inlineprivate

Definition at line 60 of file RPSimTopology.h.

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

Referenced by GetStripsInvolved().

61  {
62  return TMath::Erf(DistanceFromBottomEdge(x, y)/sqrt_2/bot_edge_sigma_)/2+0.5;
63  }
double bot_edge_sigma_
Definition: RPSimTopology.h:46
double DistanceFromBottomEdge(double x, double y)
Definition: RPSimTopology.h:74
static const double sqrt_2
Definition: RPTopology.h:57
double RPSimTopology::DistanceFromActiveEdge ( double  x,
double  y 
)
inlineprivate

Definition at line 70 of file RPSimTopology.h.

References active_edge_x_, active_edge_y_, and RPTopology::sqrt_2.

Referenced by ActiveEdgeFactor().

71  {
72  return ((x-active_edge_x_) + (y-active_edge_y_))/sqrt_2;
73  }
double active_edge_y_
Definition: RPSimTopology.h:43
double active_edge_x_
Definition: RPSimTopology.h:42
static const double sqrt_2
Definition: RPTopology.h:57
double RPSimTopology::DistanceFromBottomEdge ( double  x,
double  y 
)
inlineprivate

Definition at line 74 of file RPSimTopology.h.

References bot_edge_x_.

Referenced by BottomEdgeFactor().

75  {
76  return x-bot_edge_x_;
77  }
double bot_edge_x_
Definition: RPSimTopology.h:41
double RPSimTopology::DistanceFromTopEdge ( double  x,
double  y 
)
inlineprivate

Definition at line 78 of file RPSimTopology.h.

References top_edge_x_, and x.

Referenced by TopEdgeFactor().

79  {
80  return top_edge_x_ - x;
81  }
double top_edge_x_
Definition: RPSimTopology.h:40
std::vector< strip_info > RPSimTopology::GetStripsInvolved ( double  x,
double  y,
double  sigma,
double &  hit_pos 
)

Definition at line 22 of file RPSimTopology.cc.

References ActiveEdgeFactor(), BottomEdgeFactor(), gather_cfg::cout, i, RPTopology::last_strip_to_border_dist_, no_of_sigms_to_include_, RPTopology::no_of_strips_, RPTopology::pitch_, theRelevantStrips_, TopEdgeFactor(), verbosity_, and RPTopology::y_width_.

23 {
24  theRelevantStrips_.clear();
25  hit_pos = (no_of_strips_-1)*pitch_ -(y-last_strip_to_border_dist_+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  {
42  double low_strip_range = ((double)i-0.5)*pitch_;
43  double high_strip_range = low_strip_range+pitch_;
44  theRelevantStrips_.push_back(strip_info(low_strip_range, high_strip_range, hit_factor, (unsigned short)i));
45  }
46  return theRelevantStrips_;
47 }
int i
Definition: DBlmapReader.cc:9
double BottomEdgeFactor(double x, double y)
Definition: RPSimTopology.h:60
std::vector< strip_info > theRelevantStrips_
Definition: RPSimTopology.h:37
static const unsigned short no_of_strips_
Definition: RPTopology.h:61
static const double y_width_
Definition: RPTopology.h:63
double ActiveEdgeFactor(double x, double y)
Definition: RPSimTopology.h:55
double no_of_sigms_to_include_
Definition: RPSimTopology.h:38
static const double last_strip_to_border_dist_
Definition: RPTopology.h:65
double TopEdgeFactor(double x, double y)
Definition: RPSimTopology.h:65
static const double pitch_
Definition: RPTopology.h:59
tuple cout
Definition: gather_cfg.py:145
double RPSimTopology::TopEdgeFactor ( double  x,
double  y 
)
inlineprivate

Definition at line 65 of file RPSimTopology.h.

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

Referenced by GetStripsInvolved().

66  {
67  return TMath::Erf(DistanceFromTopEdge(x, y)/sqrt_2/top_edge_sigma_)/2+0.5;
68  }
double DistanceFromTopEdge(double x, double y)
Definition: RPSimTopology.h:78
double top_edge_sigma_
Definition: RPSimTopology.h:45
static const double sqrt_2
Definition: RPTopology.h:57

Member Data Documentation

double RPSimTopology::active_edge_sigma_
private

Definition at line 47 of file RPSimTopology.h.

Referenced by ActiveEdgeFactor(), and RPSimTopology().

double RPSimTopology::active_edge_x_
private

Definition at line 42 of file RPSimTopology.h.

Referenced by DistanceFromActiveEdge(), and RPSimTopology().

double RPSimTopology::active_edge_y_
private

Definition at line 43 of file RPSimTopology.h.

Referenced by DistanceFromActiveEdge(), and RPSimTopology().

double RPSimTopology::bot_edge_sigma_
private

Definition at line 46 of file RPSimTopology.h.

Referenced by BottomEdgeFactor(), and RPSimTopology().

double RPSimTopology::bot_edge_x_
private

Definition at line 41 of file RPSimTopology.h.

Referenced by DistanceFromBottomEdge(), and RPSimTopology().

double RPSimTopology::no_of_sigms_to_include_
private

Definition at line 38 of file RPSimTopology.h.

Referenced by GetStripsInvolved(), and RPSimTopology().

const LocalVector RPSimTopology::normal_direction_
private

Definition at line 53 of file RPSimTopology.h.

const LocalVector RPSimTopology::strip_direction_
private

Definition at line 52 of file RPSimTopology.h.

const LocalVector RPSimTopology::strip_readout_direction_
private

Definition at line 51 of file RPSimTopology.h.

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

Definition at line 37 of file RPSimTopology.h.

Referenced by GetStripsInvolved().

double RPSimTopology::top_edge_sigma_
private

Definition at line 45 of file RPSimTopology.h.

Referenced by RPSimTopology(), and TopEdgeFactor().

double RPSimTopology::top_edge_x_
private

Definition at line 40 of file RPSimTopology.h.

Referenced by DistanceFromTopEdge(), and RPSimTopology().

int RPSimTopology::verbosity_
private

Definition at line 49 of file RPSimTopology.h.

Referenced by GetStripsInvolved(), and RPSimTopology().