CMS 3D CMS Logo

RPLinearInduceChargeOnStrips.cc
Go to the documentation of this file.
3 #include <iostream>
4 
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 }
15 
17  const simromanpot::charge_induced_on_surface &charge_map) {
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 }
mps_fire.i
i
Definition: mps_fire.py:428
MessageLogger.h
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
RPLinearInduceChargeOnStrips::theRPDetTopology
RPSimTopology theRPDetTopology
Definition: RPLinearInduceChargeOnStrips.h:18
RPLinearInduceChargeOnStrips::RPLinearInduceChargeOnStrips
RPLinearInduceChargeOnStrips(const edm::ParameterSet &params, RPDetId det_id)
Definition: RPLinearInduceChargeOnStrips.cc:5
RPLinearInduceChargeOnStrips::det_id_
RPDetId det_id_
Definition: RPLinearInduceChargeOnStrips.h:15
simromanpot::strip_charge_map
std::map< unsigned short, double > strip_charge_map
Definition: RPSimTypes.h:14
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
RPSimTopology::GetStripsInvolved
std::vector< strip_info > GetStripsInvolved(double x, double y, double sigma, double &hit_pos)
Definition: RPSimTopology.cc:21
dqmdumpme.k
k
Definition: dqmdumpme.py:60
edm::ParameterSet
Definition: ParameterSet.h:47
simromanpot::charge_induced_on_surface
std::vector< RPSignalPoint > charge_induced_on_surface
Definition: RPSimTypes.h:15
RPTopology::DetStripNo
unsigned short DetStripNo() const
Definition: RPTopology.h:47
createfilelist.int
int
Definition: createfilelist.py:10
RPDetId
uint32_t RPDetId
Definition: RPSimTypes.h:11
RPLinearInduceChargeOnStrips.h
RPLinearInduceChargeOnStrips::signalCoupling_
std::vector< double > signalCoupling_
Definition: RPLinearInduceChargeOnStrips.h:16
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
RPLinearInduceChargeOnStrips::Induce
simromanpot::strip_charge_map Induce(const simromanpot::charge_induced_on_surface &charge_map)
Definition: RPLinearInduceChargeOnStrips.cc:16
RPLinearInduceChargeOnStrips::no_of_strips_
int no_of_strips_
Definition: RPLinearInduceChargeOnStrips.h:19
RPLinearInduceChargeOnStrips::verbosity_
int verbosity_
Definition: RPLinearInduceChargeOnStrips.h:20
RPLinearInduceChargeOnStrips::theStripChargeMap
simromanpot::strip_charge_map theStripChargeMap
Definition: RPLinearInduceChargeOnStrips.h:17