File indexing completed on 2024-04-06 12:26:29
0001 #ifndef RecoLocalTracker_SiStripRecHitConverter_StripCPEgeometric_H
0002 #define RecoLocalTracker_SiStripRecHitConverter_StripCPEgeometric_H
0003
0004 #include "RecoLocalTracker/SiStripRecHitConverter/interface/StripCPE.h"
0005 #include "RecoLocalTracker/SiStripRecHitConverter/interface/ErrorPropogationTypes.h"
0006
0007 class StripCPEgeometric : public StripCPE {
0008 public:
0009 using StripCPE::localParameters;
0010 StripClusterParameterEstimator::LocalValues localParameters(const SiStripCluster&,
0011 const GeomDetUnit&,
0012 const LocalTrajectoryParameters&) const override;
0013
0014 StripCPEgeometric(edm::ParameterSet& conf,
0015 const MagneticField& mag,
0016 const TrackerGeometry& geom,
0017 const SiStripLorentzAngle& LorentzAngle,
0018 const SiStripBackPlaneCorrection& BackPlaneCorrection,
0019 const SiStripConfObject& confObj,
0020 const SiStripLatency& latency)
0021 : StripCPE(conf, mag, geom, LorentzAngle, BackPlaneCorrection, confObj, latency),
0022 tan_diffusion_angle(conf.getParameter<double>("TanDiffusionAngle")),
0023 thickness_rel_err2(pow(conf.getParameter<double>("ThicknessRelativeUncertainty"), 2)),
0024 noise_threshold(conf.getParameter<double>("NoiseThreshold")),
0025 maybe_noise_threshold(conf.getParameter<double>("MaybeNoiseThreshold")),
0026 scaling_squared(pow(conf.getParameter<double>("UncertaintyScaling"), 2)),
0027 minimum_uncertainty_squared(pow(conf.getParameter<double>("MinimumUncertainty"), 2)) {}
0028
0029 private:
0030 const float tan_diffusion_angle, thickness_rel_err2, noise_threshold, maybe_noise_threshold, scaling_squared,
0031 minimum_uncertainty_squared;
0032
0033 class WrappedCluster {
0034 public:
0035 WrappedCluster(const std::vector<stats_t<float> >&);
0036 void dropSmallerEdgeStrip();
0037 void addSuppressedEdgeStrip();
0038 float middle() const;
0039 stats_t<float> centroid() const;
0040 stats_t<float> sumQ() const;
0041 stats_t<float> eta() const;
0042 bool deformed() const;
0043 stats_t<float> maxProjection() const;
0044 stats_t<float> smallerEdgeStrip() const;
0045 int sign() const;
0046 uint16_t N;
0047
0048 private:
0049 const stats_t<float>& last() const { return *(first + N - 1); }
0050 std::vector<stats_t<float> >::const_iterator clusterFirst, first;
0051 };
0052
0053 stats_t<float> offset_from_firstStrip(const std::vector<stats_t<float> >&, const stats_t<float>&) const;
0054 stats_t<float> geometric_position(const WrappedCluster&, const stats_t<float>&) const;
0055 bool useNPlusOne(const WrappedCluster&, const stats_t<float>&) const;
0056 bool useNMinusOne(const WrappedCluster&, const stats_t<float>&) const;
0057 bool ambiguousSize(const WrappedCluster&, const stats_t<float>&) const;
0058 };
0059
0060 #endif