6 #include <Math/ProbFuncMathCore.h>
22 type[Ntypes] = {
"IB1",
"IB2",
"OB1",
"OB2",
"W1a",
"W2a",
"W3a",
"W1b",
"W2b",
"W3b",
"W4",
"W5",
"W6",
"W7"};
43 : Nsigma(3.), geVperElectron(g) {
53 std::vector<double>& localAmplitudes,
54 size_t& recordMinAffectedStrip,
55 size_t& recordMaxAffectedStrip) {
59 size_t Nstrips = topology.
nstrips();
61 for (SiChargeCollectionDrifter::collection_type::const_iterator
62 signalpoint = collection_points.begin(); signalpoint != collection_points.end(); signalpoint++ ) {
65 double chargePosition = topology.
strip(signalpoint->position());
66 double chargeSpread = signalpoint->sigma() / topology.
localPitch(signalpoint->position());
68 size_t fromStrip = size_t(
std::max( 0,
int(std::floor( chargePosition -
Nsigma*chargeSpread))));
69 size_t untilStrip = size_t(
std::min( Nstrips,
size_t(std::ceil( chargePosition +
Nsigma*chargeSpread) )));
72 double chargeDepositedOnStrip =
chargeDeposited(
strip, Nstrips, signalpoint->amplitude(), chargeSpread, chargePosition);
74 size_t affectedFromStrip = size_t(
std::max( 0,
int(
strip - coupling.size() + 1)));
75 size_t affectedUntilStrip = size_t(
std::min( Nstrips,
strip + coupling.size()) );
76 for (
size_t affectedStrip = affectedFromStrip; affectedStrip < affectedUntilStrip; affectedStrip++) {
77 localAmplitudes.at( affectedStrip ) += chargeDepositedOnStrip * coupling.at(
abs( affectedStrip -
strip )) ;
80 if( affectedFromStrip < recordMinAffectedStrip ) recordMinAffectedStrip = affectedFromStrip;
81 if( affectedUntilStrip > recordMaxAffectedStrip ) recordMaxAffectedStrip = affectedUntilStrip;
89 chargeDeposited(
size_t strip,
size_t Nstrips,
double amplitude,
double chargeSpread,
double chargePosition)
const {
90 double integralUpToStrip = (strip == 0) ? 0. : ( ROOT::Math::normal_cdf( strip, chargeSpread, chargePosition) );
91 double integralUpToNext = (strip+1 == Nstrips) ? 1. : ( ROOT::Math::normal_cdf( strip+1, chargeSpread, chargePosition) );
92 double percentOfSignal = integralUpToNext - integralUpToStrip;
T getParameter(std::string const &) const
virtual int nstrips() const =0
const double geVperElectron
static unsigned int indexOf(const std::string &)
double chargeDeposited(size_t strip, size_t Nstrips, double amplitude, double chargeSpread, double chargePosition) const
std::vector< std::vector< double > > signalCoupling
std::vector< SignalPoint > collection_type
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
virtual float strip(const LocalPoint &) const =0
virtual float localPitch(const LocalPoint &) const =0
const T & max(const T &a, const T &b)
unsigned int ring() const
ring id
static const std::string type[]
DetId geographicalId() const
The label of this GeomDet.
static unsigned int typeOf(const StripGeomDetUnit &)
virtual StripGeomDetType & specificType() const
unsigned int layer() const
layer id
unsigned int ring() const
ring id
void induce(SiChargeCollectionDrifter::collection_type collection_points, const StripGeomDetUnit &det, std::vector< double > &localAmplitudes, size_t &recordMinAffectedStrip, size_t &recordMaxAffectedStrip)
SiTrivialInduceChargeOnStrips(const edm::ParameterSet &conf, double g)
SubDetector subDetector() const