CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
StripCPEgeometric Class Reference

#include <StripCPEgeometric.h>

Inheritance diagram for StripCPEgeometric:
StripCPE StripClusterParameterEstimator

Classes

class  WrappedCluster
 

Public Member Functions

StripClusterParameterEstimator::LocalValues localParameters (const SiStripCluster &cl, const GeomDetUnit &) const override
 
virtual StripClusterParameterEstimator::LocalValues localParameters (const SiStripCluster &cl, AlgoParam const &ap) const
 
virtual LocalValues localParameters (const SiStripCluster &cluster, const GeomDetUnit &gd, const LocalTrajectoryParameters &) const
 
virtual LocalValues localParameters (const SiStripCluster &cluster, const GeomDetUnit &gd, const TrajectoryStateOnSurface &tsos) const
 
virtual void localParameters (AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters &ltp) const
 
virtual LocalValues localParameters (const SiStripCluster &, const GeomDetUnit &) const
 
StripClusterParameterEstimator::LocalValues localParameters (const SiStripCluster &, const GeomDetUnit &, const LocalTrajectoryParameters &) const override
 
 StripCPEgeometric (edm::ParameterSet &conf, const MagneticField &mag, const TrackerGeometry &geom, const SiStripLorentzAngle &LorentzAngle, const SiStripBackPlaneCorrection &BackPlaneCorrection, const SiStripConfObject &confObj, const SiStripLatency &latency)
 
- Public Member Functions inherited from StripCPE
LocalVector driftDirection (const StripGeomDetUnit *det) const override
 
AlgoParam getAlgoParam (const GeomDetUnit &det, const LocalTrajectoryParameters &ltp) const
 
virtual LocalValues localParameters (const SiStripCluster &cluster, const GeomDetUnit &gd, const TrajectoryStateOnSurface &tsos) const
 
virtual LocalValues localParameters (const SiStripCluster &, const GeomDetUnit &) const
 
virtual LocalValues localParameters (const SiStripCluster &cluster, const GeomDetUnit &gd, const LocalTrajectoryParameters &) const
 
virtual void localParameters (AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters &ltp) const
 
StripClusterParameterEstimator::LocalValues localParameters (const SiStripCluster &cl, const GeomDetUnit &) const override
 
virtual StripClusterParameterEstimator::LocalValues localParameters (const SiStripCluster &cl, AlgoParam const &ap) const
 
 StripCPE (edm::ParameterSet &conf, const MagneticField &, const TrackerGeometry &, const SiStripLorentzAngle &, const SiStripBackPlaneCorrection &, const SiStripConfObject &, const SiStripLatency &)
 
- Public Member Functions inherited from StripClusterParameterEstimator
virtual void localParameters (AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters &ltp) const
 
virtual LocalValues localParameters (const SiStripCluster &cluster, const GeomDetUnit &gd, const TrajectoryStateOnSurface &tsos) const
 
virtual VLocalValues localParametersV (const SiStripCluster &cluster, const GeomDetUnit &gd) const
 
virtual VLocalValues localParametersV (const SiStripCluster &cluster, const GeomDetUnit &gd, const TrajectoryStateOnSurface &tsos) const
 
virtual ~StripClusterParameterEstimator ()
 

Private Member Functions

bool ambiguousSize (const WrappedCluster &, const stats_t< float > &) const
 
stats_t< float > geometric_position (const WrappedCluster &, const stats_t< float > &) const
 
stats_t< float > offset_from_firstStrip (const std::vector< stats_t< float > > &, const stats_t< float > &) const
 
bool useNMinusOne (const WrappedCluster &, const stats_t< float > &) const
 
bool useNPlusOne (const WrappedCluster &, const stats_t< float > &) const
 

Private Attributes

const float maybe_noise_threshold
 
const float minimum_uncertainty_squared
 
const float noise_threshold
 
const float scaling_squared
 
const float tan_diffusion_angle
 
const float thickness_rel_err2
 

Additional Inherited Members

- Public Types inherited from StripClusterParameterEstimator
using AClusters = DynArray< SiStripCluster const * >
 
using ALocalValues = DynArray< LocalValues >
 
using LocalValues = std::pair< LocalPoint, LocalError >
 
typedef std::vector< LocalValuesVLocalValues
 
- Protected Member Functions inherited from StripCPE
Param const & param (const GeomDetUnit &det) const
 
- Protected Attributes inherited from StripCPE
const SiStripBackPlaneCorrectionBackPlaneCorrectionMap_
 
const TrackerGeometrygeom_
 
const SiStripLorentzAngleLorentzAngleMap_
 
const MagneticFieldmagfield_
 
const bool peakMode_
 
std::vector< float > xtalk1
 
std::vector< float > xtalk2
 

Detailed Description

Definition at line 7 of file StripCPEgeometric.h.

Constructor & Destructor Documentation

◆ StripCPEgeometric()

StripCPEgeometric::StripCPEgeometric ( edm::ParameterSet conf,
const MagneticField mag,
const TrackerGeometry geom,
const SiStripLorentzAngle LorentzAngle,
const SiStripBackPlaneCorrection BackPlaneCorrection,
const SiStripConfObject confObj,
const SiStripLatency latency 
)
inline

Definition at line 14 of file StripCPEgeometric.h.

21  : StripCPE(conf, mag, geom, LorentzAngle, BackPlaneCorrection, confObj, latency),
22  tan_diffusion_angle(conf.getParameter<double>("TanDiffusionAngle")),
23  thickness_rel_err2(pow(conf.getParameter<double>("ThicknessRelativeUncertainty"), 2)),
24  noise_threshold(conf.getParameter<double>("NoiseThreshold")),
25  maybe_noise_threshold(conf.getParameter<double>("MaybeNoiseThreshold")),
26  scaling_squared(pow(conf.getParameter<double>("UncertaintyScaling"), 2)),
27  minimum_uncertainty_squared(pow(conf.getParameter<double>("MinimumUncertainty"), 2)) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
StripCPE(edm::ParameterSet &conf, const MagneticField &, const TrackerGeometry &, const SiStripLorentzAngle &, const SiStripBackPlaneCorrection &, const SiStripConfObject &, const SiStripLatency &)
Definition: StripCPE.cc:9
const float scaling_squared
const float maybe_noise_threshold
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const float minimum_uncertainty_squared
const float tan_diffusion_angle
const float thickness_rel_err2
const float noise_threshold
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

Member Function Documentation

◆ ambiguousSize()

bool StripCPEgeometric::ambiguousSize ( const WrappedCluster wc,
const stats_t< float > &  proj 
) const
inlineprivate

Definition at line 96 of file StripCPEgeometric.cc.

References maybe_noise_threshold, StripCPEgeometric::WrappedCluster::N, amptDefault_cfi::proj, and StripCPEgeometric::WrappedCluster::smallerEdgeStrip().

Referenced by offset_from_firstStrip().

96  {
97  return proj() < wc.N - 1 && wc.smallerEdgeStrip()() > 0 && wc.smallerEdgeStrip().sigmaFrom(0) < maybe_noise_threshold;
98 }
const float maybe_noise_threshold

◆ geometric_position()

stats_t< float > StripCPEgeometric::geometric_position ( const WrappedCluster wc,
const stats_t< float > &  proj 
) const
private

Definition at line 63 of file StripCPEgeometric.cc.

References StripCPEgeometric::WrappedCluster::eta(), StripCPEgeometric::WrappedCluster::middle(), StripCPEgeometric::WrappedCluster::N, funct::pow(), amptDefault_cfi::proj, scaling_squared, and x.

Referenced by offset_from_firstStrip().

64  {
65  const stats_t<float> x = wc.middle() + 0.5 * proj * wc.eta();
66  return wc.N == 1 ? stats_t<float>(x(), pow(1 - 0.82 * proj(), 2) / 12)
67  : stats_t<float>(x(), scaling_squared * x.error2());
68 }
const float scaling_squared
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ localParameters() [1/7]

virtual LocalValues StripClusterParameterEstimator::localParameters
inline

Definition at line 40 of file StripClusterParameterEstimator.h.

42  {
43  return localParameters(cluster, gd);
44  }
StripClusterParameterEstimator::LocalValues localParameters(const SiStripCluster &, const GeomDetUnit &, const LocalTrajectoryParameters &) const override

◆ localParameters() [2/7]

virtual StripClusterParameterEstimator::LocalValues StripCPE::localParameters
inline

Definition at line 52 of file StripCPE.h.

53  {
54  return std::make_pair(LocalPoint(), LocalError());
55  }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30

◆ localParameters() [3/7]

virtual void StripClusterParameterEstimator::localParameters
inline

Definition at line 32 of file StripClusterParameterEstimator.h.

35  {}

◆ localParameters() [4/7]

virtual LocalValues StripClusterParameterEstimator::localParameters
inline

Definition at line 37 of file StripClusterParameterEstimator.h.

37  {
38  return std::make_pair(LocalPoint(), LocalError());
39  }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30

◆ localParameters() [5/7]

StripClusterParameterEstimator::LocalValues StripCPE::localParameters
override

Definition at line 62 of file StripCPE.cc.

63  {
64  StripCPE::Param const& p = param(det);
65  const float barycenter = cluster.barycenter();
66  const float fullProjection =
67  p.coveredStrips(p.drift + LocalVector(0, 0, -p.thickness), p.topology->localPosition(barycenter));
68  const float strip = barycenter - 0.5f * (1.f - p.backplanecorrection) * fullProjection;
69 
70  return std::make_pair(p.topology->localPosition(strip), p.topology->localError(strip, 1.f / 12.f));
71 }
Param const & param(const GeomDetUnit &det) const
Definition: StripCPE.h:81
double f[11][100]

◆ localParameters() [6/7]

virtual LocalValues StripClusterParameterEstimator::localParameters
inline

Definition at line 45 of file StripClusterParameterEstimator.h.

47  {
48  return localParameters(cluster, gd, tsos.localParameters());
49  }
StripClusterParameterEstimator::LocalValues localParameters(const SiStripCluster &, const GeomDetUnit &, const LocalTrajectoryParameters &) const override

◆ localParameters() [7/7]

StripClusterParameterEstimator::LocalValues StripCPEgeometric::localParameters ( const SiStripCluster cluster,
const GeomDetUnit det,
const LocalTrajectoryParameters ltp 
) const
overridevirtual

Reimplemented from StripClusterParameterEstimator.

Definition at line 6 of file StripCPEgeometric.cc.

References SiStripCluster::firstStrip(), stats_t< T >::from_relative_uncertainty2(), SiStripPI::max, minimum_uncertainty_squared, LocalTrajectoryParameters::momentum(), offset_from_firstStrip(), AlCaHLTBitMon_ParallelJobs::p, StripCPE::param(), LocalTrajectoryParameters::position(), nano_mu_digi_cff::strip, tan_diffusion_angle, thickness_rel_err2, HLT_2024v12_cff::track, reco::InverseCrosstalkMatrix::unfold(), LocalTrajectoryParameters::vector(), and StripCPE::xtalk1.

7  {
8  StripCPE::Param const& p = param(det);
9 
10  const LocalPoint& pos = ltp.position();
11  LocalVector track = ltp.momentum();
12  track *= (track.z() < 0) ? fabs(p.thickness / track.z())
13  : (track.z() > 0) ? -fabs(p.thickness / track.z())
14  : p.maxLength / track.mag();
15 
16  const float fullProjection = p.coveredStrips(track + p.drift, pos);
17  stats_t<float> projection;
18  {
19  const float absProj = fabs(fullProjection);
20  const float minProj = 2 * p.thickness * tan_diffusion_angle / p.topology->localPitch(pos);
21  const float projection_rel_err2 = thickness_rel_err2 + p.pitch_rel_err2;
22  projection = stats_t<float>::from_relative_uncertainty2(std::max(absProj, minProj), projection_rel_err2);
23  }
24 
25  const std::vector<stats_t<float> > Q =
26  reco::InverseCrosstalkMatrix::unfold(cluster, xtalk1[static_cast<int>(p.moduleGeom)]);
27  const stats_t<float> strip = cluster.firstStrip() + offset_from_firstStrip(Q, projection);
28 
29  const float corrected =
30  strip() - 0.5 * (1 - p.backplanecorrection) * fullProjection + 0.5 * p.coveredStrips(track, ltp.position());
31  const float error2 = std::max(strip.error2(), minimum_uncertainty_squared);
32 
33  return std::make_pair(p.topology->localPosition(corrected, ltp.vector()),
34  p.topology->localError(corrected, error2, ltp.vector()));
35 }
uint16_t firstStrip() const
stats_t< float > offset_from_firstStrip(const std::vector< stats_t< float > > &, const stats_t< float > &) const
Param const & param(const GeomDetUnit &det) const
Definition: StripCPE.h:81
std::vector< float > xtalk1
Definition: StripCPE.h:78
static stats_t from_relative_uncertainty2(T q, T re2)
LocalVector momentum() const
Momentum vector in the local frame.
AlgebraicVector5 vector() const
static std::vector< stats_t< float > > unfold(const SiStripCluster &q, const float x)
const float minimum_uncertainty_squared
const float tan_diffusion_angle
const float thickness_rel_err2
LocalPoint position() const
Local x and y position coordinates.

◆ offset_from_firstStrip()

stats_t< float > StripCPEgeometric::offset_from_firstStrip ( const std::vector< stats_t< float > > &  Q,
const stats_t< float > &  proj 
) const
private

Definition at line 37 of file StripCPEgeometric.cc.

References StripCPEgeometric::WrappedCluster::addSuppressedEdgeStrip(), ambiguousSize(), StripCPEgeometric::WrappedCluster::centroid(), StripCPEgeometric::WrappedCluster::deformed(), StripCPEgeometric::WrappedCluster::dropSmallerEdgeStrip(), stats_t< T >::error2(), nano_mu_digi_cff::float, geometric_position(), SiStripPI::max, StripCPEgeometric::WrappedCluster::maxProjection(), StripCPEgeometric::WrappedCluster::middle(), StripCPEgeometric::WrappedCluster::N, funct::pow(), amptDefault_cfi::proj, useNMinusOne(), and useNPlusOne().

Referenced by localParameters().

38  {
39  WrappedCluster wc(Q);
40  if (useNPlusOne(wc, proj))
41  wc.addSuppressedEdgeStrip();
42  else
43  while (useNMinusOne(wc, proj))
44  wc.dropSmallerEdgeStrip();
45 
46  if (proj() < wc.N - 2)
47  return stats_t<float>(wc.middle(), pow(wc.N - proj(), 2) / 12.);
48  if (wc.deformed())
49  return stats_t<float>(wc.centroid()(), 1 / 12.);
50  if (proj > wc.maxProjection())
51  return stats_t<float>(wc.centroid()(), 1 / 12.);
52 
53  if (ambiguousSize(wc, proj)) {
54  const stats_t<float> probably = geometric_position(wc, proj);
55  wc.dropSmallerEdgeStrip();
56  const stats_t<float> maybe = geometric_position(wc, proj);
57  return stats_t<float>(probably(),
58  std::max(probably.error2(), float(maybe.error2() + pow(probably() - maybe(), 2) / 12)));
59  }
60  return geometric_position(wc, proj);
61 }
T error2() const
bool ambiguousSize(const WrappedCluster &, const stats_t< float > &) const
stats_t< float > geometric_position(const WrappedCluster &, const stats_t< float > &) const
bool useNMinusOne(const WrappedCluster &, const stats_t< float > &) const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
bool useNPlusOne(const WrappedCluster &, const stats_t< float > &) const

◆ useNMinusOne()

bool StripCPEgeometric::useNMinusOne ( const WrappedCluster wc,
const stats_t< float > &  proj 
) const
inlineprivate

Definition at line 74 of file StripCPEgeometric.cc.

References StripCPEgeometric::WrappedCluster::dropSmallerEdgeStrip(), StripCPEgeometric::WrappedCluster::eta(), StripCPEgeometric::WrappedCluster::maxProjection(), StripCPEgeometric::WrappedCluster::N, noise_threshold, amptDefault_cfi::proj, StripCPEgeometric::WrappedCluster::sign(), and StripCPEgeometric::WrappedCluster::smallerEdgeStrip().

Referenced by offset_from_firstStrip().

74  {
75  if (proj() > wc.N - 1)
76  return false;
77  if (wc.smallerEdgeStrip() < 0)
78  return true;
79  if (proj() < wc.N - 3)
80  return false;
81  if (proj() < wc.N - 2)
82  return true;
83  if (wc.eta().sigmaFrom(0) < 3)
84  return false;
85 
86  WrappedCluster wcTest(wc);
87  wcTest.dropSmallerEdgeStrip();
88  if (proj >= wcTest.maxProjection())
89  return false;
90  if (wc.sign() * wc.eta()() > 1. / (wc.N - 1))
91  return true;
92 
93  return wc.smallerEdgeStrip().sigmaFrom(0) < noise_threshold;
94 }
const float noise_threshold

◆ useNPlusOne()

bool StripCPEgeometric::useNPlusOne ( const WrappedCluster wc,
const stats_t< float > &  proj 
) const
inlineprivate

Definition at line 70 of file StripCPEgeometric.cc.

References StripCPEgeometric::WrappedCluster::maxProjection(), StripCPEgeometric::WrappedCluster::N, and amptDefault_cfi::proj.

Referenced by offset_from_firstStrip().

70  {
71  return wc.maxProjection() < proj && proj() < wc.N + 1;
72 }

Member Data Documentation

◆ maybe_noise_threshold

const float StripCPEgeometric::maybe_noise_threshold
private

Definition at line 30 of file StripCPEgeometric.h.

Referenced by ambiguousSize().

◆ minimum_uncertainty_squared

const float StripCPEgeometric::minimum_uncertainty_squared
private

Definition at line 30 of file StripCPEgeometric.h.

Referenced by localParameters().

◆ noise_threshold

const float StripCPEgeometric::noise_threshold
private

Definition at line 30 of file StripCPEgeometric.h.

Referenced by useNMinusOne().

◆ scaling_squared

const float StripCPEgeometric::scaling_squared
private

Definition at line 30 of file StripCPEgeometric.h.

Referenced by geometric_position().

◆ tan_diffusion_angle

const float StripCPEgeometric::tan_diffusion_angle
private

Definition at line 30 of file StripCPEgeometric.h.

Referenced by localParameters().

◆ thickness_rel_err2

const float StripCPEgeometric::thickness_rel_err2
private

Definition at line 30 of file StripCPEgeometric.h.

Referenced by localParameters().