SimPPS
RPDigiProducer
plugins
RPLinearChargeCollectionDrifter.cc
Go to the documentation of this file.
1
#include "
SimPPS/RPDigiProducer/plugins/RPLinearChargeCollectionDrifter.h
"
2
#include "
Geometry/VeryForwardRPTopology/interface/RPTopology.h
"
3
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
4
#include <iostream>
5
#include <vector>
6
7
RPLinearChargeCollectionDrifter::RPLinearChargeCollectionDrifter
(
const
edm::ParameterSet
&
params
,
RPDetId
det_id) {
8
verbosity_
=
params
.getParameter<
int
>(
"RPVerbosity"
);
9
GeV_per_electron_
=
params
.getParameter<
double
>(
"RPGeVPerElectron"
);
10
charge_cloud_sigmas_vect_
=
params
.getParameter<std::vector<double> >(
"RPInterStripSmearing"
);
11
det_thickness_
=
RPTopology
().
DetThickness
();
12
det_id_
= det_id;
13
}
14
15
simromanpot::charge_induced_on_surface
RPLinearChargeCollectionDrifter::Drift
(
16
const
simromanpot::energy_path_distribution
&energy_deposition) {
17
simromanpot::charge_induced_on_surface
temp_;
18
temp_.resize(energy_deposition.size());
19
for
(
unsigned
int
i
= 0;
i
< energy_deposition.size();
i
++) {
20
temp_[
i
].setPosition(
LocalPoint
(energy_deposition[
i
].
Position
().
x
(), energy_deposition[
i
].
Position
().
y
()));
21
temp_[
i
].setSigma(
22
getSigma
(energy_deposition[
i
].
Position
().
z
()));
//befor charge_cloud_sigma_ used, now a vector of sigmas;
23
temp_[
i
].setCharge(energy_deposition[
i
].
Energy
() /
GeV_per_electron_
);
24
if
(
verbosity_
) {
25
edm::LogInfo
(
"RPLinearChargeCollectionDrifter"
)
26
<<
det_id_
<<
" :"
<< temp_[
i
].Position() <<
" "
<< temp_[
i
].Sigma() <<
" "
<< temp_[
i
].Charge() <<
"\n"
;
27
}
28
}
29
return
temp_;
30
}
31
double
RPLinearChargeCollectionDrifter::getSigma
(
double
z
) {
32
if
(
charge_cloud_sigmas_vect_
.size() == 1)
33
return
charge_cloud_sigmas_vect_
[0];
34
35
double
factor
= (
z
/
det_thickness_
) * (
charge_cloud_sigmas_vect_
.size() - 1);
36
double
lo_i = floor(
factor
);
37
double
hi_i =
ceil
(
factor
);
38
if
(lo_i == hi_i) {
39
return
charge_cloud_sigmas_vect_
[(
int
)
factor
];
40
}
else
{
41
double
lo_weight = hi_i -
factor
;
42
double
hi_weight =
factor
- lo_i;
43
44
return
charge_cloud_sigmas_vect_
[(
int
)lo_i] * lo_weight +
charge_cloud_sigmas_vect_
[(
int
)hi_i] * hi_weight;
45
}
46
}
DDAxes::y
simromanpot::energy_path_distribution
std::vector< RPEnergyDepositUnit > energy_path_distribution
Definition:
RPSimTypes.h:16
RPLinearChargeCollectionDrifter.h
mps_fire.i
i
Definition:
mps_fire.py:355
MessageLogger.h
EcalCondDBWriter_cfi.Energy
Energy
Definition:
EcalCondDBWriter_cfi.py:152
detailsBasic3DVector::z
float float float z
Definition:
extBasic3DVector.h:14
RPLinearChargeCollectionDrifter::Drift
simromanpot::charge_induced_on_surface Drift(const simromanpot::energy_path_distribution &energy_deposition)
Definition:
RPLinearChargeCollectionDrifter.cc:15
CalibrationSummaryClient_cfi.params
params
Definition:
CalibrationSummaryClient_cfi.py:14
RPTopology::DetThickness
double DetThickness() const
Definition:
RPTopology.h:45
edm::LogInfo
Definition:
MessageLogger.h:254
RPLinearChargeCollectionDrifter::getSigma
double getSigma(double z)
Definition:
RPLinearChargeCollectionDrifter.cc:31
DDAxes::x
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition:
Definitions.h:30
RPLinearChargeCollectionDrifter::GeV_per_electron_
double GeV_per_electron_
Definition:
RPLinearChargeCollectionDrifter.h:16
reco::ceil
constexpr int32_t ceil(float num)
Definition:
constexpr_cmath.h:7
DDAxes::z
DQMScaleToClient_cfi.factor
factor
Definition:
DQMScaleToClient_cfi.py:8
PixelTestBeamValidation_cfi.Position
Position
Definition:
PixelTestBeamValidation_cfi.py:62
RPTopology
Geometrical and topological information on RP silicon detector. Uses coordinate a frame with origin i...
Definition:
RPTopology.h:18
edm::ParameterSet
Definition:
ParameterSet.h:36
simromanpot::charge_induced_on_surface
std::vector< RPSignalPoint > charge_induced_on_surface
Definition:
RPSimTypes.h:15
createfilelist.int
int
Definition:
createfilelist.py:10
RPLinearChargeCollectionDrifter::verbosity_
int verbosity_
Definition:
RPLinearChargeCollectionDrifter.h:17
RPLinearChargeCollectionDrifter::det_id_
RPDetId det_id_
Definition:
RPLinearChargeCollectionDrifter.h:19
RPDetId
uint32_t RPDetId
Definition:
RPSimTypes.h:11
RPLinearChargeCollectionDrifter::charge_cloud_sigmas_vect_
std::vector< double > charge_cloud_sigmas_vect_
Definition:
RPLinearChargeCollectionDrifter.h:15
RPTopology.h
RPLinearChargeCollectionDrifter::RPLinearChargeCollectionDrifter
RPLinearChargeCollectionDrifter(const edm::ParameterSet ¶ms, RPDetId det_id)
Definition:
RPLinearChargeCollectionDrifter.cc:7
RPLinearChargeCollectionDrifter::det_thickness_
double det_thickness_
Definition:
RPLinearChargeCollectionDrifter.h:18
Generated for CMSSW Reference Manual by
1.8.16