5 #include "vdt/vdtMath.h"
14 :
StripCPE(conf, mag, geom, lorentz, backPlaneCorrection, confObj, latency),
15 useLegacyError(conf.existsAs<bool>(
"useLegacyError") ? conf.getParameter<bool>(
"useLegacyError") :
true),
16 maxChgOneMIP(conf.existsAs<float>(
"maxChgOneMIP") ? conf.getParameter<double>(
"maxChgOneMIP") : -6000.),
17 m_algo(useLegacyError ?
Algo::legacy : (maxChgOneMIP < 0 ?
Algo::mergeCK :
Algo::chargeCK)) {
36 auto uerr = (N <= 4) ? fun(uProj) :
mHC_P[loc - 3][0] + float(N) *
mHC_P[loc - 3][1];
42 return float(N * N) / 12.f;
44 static constexpr
float P1 = -0.339;
45 static constexpr
float P2 = 0.90;
46 static constexpr
float P3 = 0.279;
57 auto const&
p = par.p;
60 auto afp = par.afullProjection;
62 auto fill = [&](
unsigned int i,
float uerr2) {
63 const float strip = clusters[
i]->barycenter() +
corr;
64 retValues[
i].first =
p.topology->localPosition(strip, ltp.
vector());
65 retValues[
i].second =
p.topology->localError(strip, uerr2, ltp.
vector());
70 for (
auto i = 0U; i < clusters.
size(); ++
i) {
72 auto N = clusters[
i]->amplitudes().
size();
78 for (
auto i = 0U; i < clusters.
size(); ++
i) {
79 auto N = clusters[
i]->amplitudes().
size();
85 for (
auto i = 0U; i < clusters.
size(); ++
i) {
86 auto N = clusters[
i]->amplitudes().
size();
96 auto const&
p = par.
p;
97 auto const& ltp = par.
ltp;
121 return std::make_pair(
p.topology->localPosition(strip, ltp.vector()),
122 p.topology->localError(strip, uerr2, ltp.vector()));
float legacyStripErrorSquared(const unsigned N, const float uProj) const
std::pair< LocalPoint, LocalError > LocalValues
StripCPEfromTrackAngle(edm::ParameterSet &conf, const MagneticField &mag, const TrackerGeometry &geom, const SiStripLorentzAngle &lorentz, const SiStripBackPlaneCorrection &backPlaneCorrection, const SiStripConfObject &confObj, const SiStripLatency &latency)
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
static constexpr auto TID
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
SiStripCluster const & amplitudes() const
void localParameters(AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters <p) const override
SiStripDetId::SubDetector loc
AlgebraicVector5 vector() const
AlgoParam getAlgoParam(const GeomDetUnit &det, const LocalTrajectoryParameters <p) const
static constexpr auto TOB
const LocalTrajectoryParameters & ltp
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
T getParameter(std::string const &) const
static constexpr auto TIB
unsigned int size() const
static constexpr auto TEC
float stripErrorSquared(const unsigned N, const float uProj, const SiStripDetId::SubDetector loc) const