CMS 3D CMS Logo

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

#include <RPLinearInduceChargeOnStrips.h>

Public Member Functions

simromanpot::strip_charge_map Induce (const simromanpot::charge_induced_on_surface &charge_map)
 
 RPLinearInduceChargeOnStrips (const edm::ParameterSet &params, RPDetId det_id)
 

Private Attributes

RPDetId det_id_
 
int no_of_strips_
 
std::vector< double > signalCoupling_
 
RPSimTopology theRPDetTopology
 
simromanpot::strip_charge_map theStripChargeMap
 
int verbosity_
 

Detailed Description

Definition at line 9 of file RPLinearInduceChargeOnStrips.h.

Constructor & Destructor Documentation

◆ RPLinearInduceChargeOnStrips()

RPLinearInduceChargeOnStrips::RPLinearInduceChargeOnStrips ( const edm::ParameterSet params,
RPDetId  det_id 
)

Definition at line 5 of file RPLinearInduceChargeOnStrips.cc.

References RPTopology::DetStripNo(), no_of_strips_, submitPVValidationJobs::params, signalCoupling_, theRPDetTopology, and verbosity_.

6  : det_id_(det_id), theRPDetTopology(params) {
7  verbosity_ = params.getParameter<int>("RPVerbosity");
8  signalCoupling_.clear();
9  double coupling_constant_ = params.getParameter<double>("RPInterStripCoupling");
10  signalCoupling_.push_back(coupling_constant_);
11  signalCoupling_.push_back((1.0 - coupling_constant_) / 2.);
12 
14 }
unsigned short DetStripNo() const
Definition: RPTopology.h:42

Member Function Documentation

◆ Induce()

simromanpot::strip_charge_map RPLinearInduceChargeOnStrips::Induce ( const simromanpot::charge_induced_on_surface charge_map)

Definition at line 16 of file RPLinearInduceChargeOnStrips.cc.

References funct::abs(), det_id_, RPSimTopology::GetStripsInvolved(), mps_fire::i, createfilelist::int, dqmiolumiharvest::j, dqmdumpme::k, no_of_strips_, signalCoupling_, mathSSE::sqrt(), theRPDetTopology, theStripChargeMap, and verbosity_.

17  {
18  theStripChargeMap.clear();
19  const double sqrt_2 = sqrt(2.0);
20  if (verbosity_)
21  edm::LogInfo("RPLinearInduceChargeOnStrips ") << det_id_ << " : Clouds to be induced:" << charge_map.size() << "\n";
22  for (simromanpot::charge_induced_on_surface::const_iterator i = charge_map.begin(); i != charge_map.end(); ++i) {
23  double hit_pos;
24  std::vector<strip_info> relevant_strips =
25  theRPDetTopology.GetStripsInvolved((*i).Position().x(), (*i).Position().y(), (*i).Sigma(), hit_pos);
26  if (verbosity_) {
27  edm::LogInfo("RPLinearInduceChargeOnStrips ")
28  << det_id_ << " : relevant_strips" << relevant_strips.size() << "\n";
29  }
30  for (std::vector<strip_info>::const_iterator j = relevant_strips.begin(); j != relevant_strips.end(); ++j) {
31  double strip_begin = (*j).LowerBoarder();
32  double strip_end = (*j).HigherBoarder();
33  double effic = (*j).EffFactor();
34  double sigma = (*i).Sigma();
35  unsigned short str_no = (*j).StripNo();
36 
37  double charge_on_strip = (TMath::Erfc((strip_begin - hit_pos) / sqrt_2 / sigma) / 2.0 -
38  TMath::Erfc((strip_end - hit_pos) / sqrt_2 / sigma) / 2.0) *
39  (*i).Charge() * effic;
40  if (verbosity_)
41  edm::LogInfo("RPLinearInduceChargeOnStrips") << "Efficiency " << det_id_ << " :" << effic << "\n";
42 
43  for (int k = -signalCoupling_.size() + 1; k < (int)signalCoupling_.size(); ++k) {
44  if ((str_no + k) >= 0 && (str_no + k) < no_of_strips_)
45  theStripChargeMap[str_no + k] += charge_on_strip * signalCoupling_[abs(k)];
46  }
47  }
48  }
49 
50  return theStripChargeMap;
51 }
simromanpot::strip_charge_map theStripChargeMap
T sqrt(T t)
Definition: SSEVec.h:23
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Log< level::Info, false > LogInfo
std::vector< strip_info > GetStripsInvolved(double x, double y, double sigma, double &hit_pos)

Member Data Documentation

◆ det_id_

RPDetId RPLinearInduceChargeOnStrips::det_id_
private

Definition at line 15 of file RPLinearInduceChargeOnStrips.h.

Referenced by Induce().

◆ no_of_strips_

int RPLinearInduceChargeOnStrips::no_of_strips_
private

Definition at line 19 of file RPLinearInduceChargeOnStrips.h.

Referenced by Induce(), and RPLinearInduceChargeOnStrips().

◆ signalCoupling_

std::vector<double> RPLinearInduceChargeOnStrips::signalCoupling_
private

Definition at line 16 of file RPLinearInduceChargeOnStrips.h.

Referenced by Induce(), and RPLinearInduceChargeOnStrips().

◆ theRPDetTopology

RPSimTopology RPLinearInduceChargeOnStrips::theRPDetTopology
private

Definition at line 18 of file RPLinearInduceChargeOnStrips.h.

Referenced by Induce(), and RPLinearInduceChargeOnStrips().

◆ theStripChargeMap

simromanpot::strip_charge_map RPLinearInduceChargeOnStrips::theStripChargeMap
private

Definition at line 17 of file RPLinearInduceChargeOnStrips.h.

Referenced by Induce().

◆ verbosity_

int RPLinearInduceChargeOnStrips::verbosity_
private

Definition at line 20 of file RPLinearInduceChargeOnStrips.h.

Referenced by Induce(), and RPLinearInduceChargeOnStrips().