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

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
 
virtual StripClusterParameterEstimator::LocalValues localParameters (const SiStripCluster &cl, AlgoParam const &ap) const
 
StripClusterParameterEstimator::LocalValues localParameters (const SiStripCluster &cl, const GeomDetUnit &) const override
 
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
 
 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 void localParameters (AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters &ltp) const
 
virtual LocalValues localParameters (const SiStripCluster &, const GeomDetUnit &) const
 
virtual StripClusterParameterEstimator::LocalValues localParameters (const SiStripCluster &cl, AlgoParam const &ap) const
 
StripClusterParameterEstimator::LocalValues localParameters (const SiStripCluster &cl, const GeomDetUnit &) const override
 
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
 
 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)) {}

Member Function Documentation

◆ ambiguousSize()

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

Definition at line 95 of file StripCPEgeometric.cc.

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

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

Referenced by offset_from_firstStrip().

◆ geometric_position()

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

Definition at line 62 of file StripCPEgeometric.cc.

63  {
64  const stats_t<float> x = wc.middle() + 0.5 * proj * wc.eta();
65  return wc.N == 1 ? stats_t<float>(x(), pow(1 - 0.82 * proj(), 2) / 12)
66  : stats_t<float>(x(), scaling_squared * x.error2());
67 }

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

Referenced by offset_from_firstStrip().

◆ localParameters() [1/7]

virtual void StripClusterParameterEstimator::localParameters
inline

Definition at line 32 of file StripClusterParameterEstimator.h.

35  {}

◆ localParameters() [2/7]

virtual LocalValues StripClusterParameterEstimator::localParameters
inline

Definition at line 37 of file StripClusterParameterEstimator.h.

37  {
38  return std::make_pair(LocalPoint(), LocalError());
39  }

◆ localParameters() [3/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.

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()) : p.maxLength / track.mag();
14 
15  const float fullProjection = p.coveredStrips(track + p.drift, pos);
16  stats_t<float> projection;
17  {
18  const float absProj = fabs(fullProjection);
19  const float minProj = 2 * p.thickness * tan_diffusion_angle / p.topology->localPitch(pos);
20  const float projection_rel_err2 = thickness_rel_err2 + p.pitch_rel_err2;
21  projection = stats_t<float>::from_relative_uncertainty2(std::max(absProj, minProj), projection_rel_err2);
22  }
23 
24  const std::vector<stats_t<float> > Q =
25  reco::InverseCrosstalkMatrix::unfold(cluster, xtalk1[static_cast<int>(p.moduleGeom)]);
26  const stats_t<float> strip = cluster.firstStrip() + offset_from_firstStrip(Q, projection);
27 
28  const float corrected =
29  strip() - 0.5 * (1 - p.backplanecorrection) * fullProjection + 0.5 * p.coveredStrips(track, ltp.position());
30  const float error2 = std::max(strip.error2(), minimum_uncertainty_squared);
31 
32  return std::make_pair(p.topology->localPosition(corrected, ltp.vector()),
33  p.topology->localError(corrected, error2, ltp.vector()));
34 }

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(), class-composition::Q, digitizers_cfi::strip, tan_diffusion_angle, thickness_rel_err2, HLT_FULL_cff::track, reco::InverseCrosstalkMatrix::unfold(), LocalTrajectoryParameters::vector(), and StripCPE::xtalk1.

◆ localParameters() [4/7]

virtual StripClusterParameterEstimator::LocalValues StripCPE::localParameters
inline

Definition at line 52 of file StripCPE.h.

53  {
54  return std::make_pair(LocalPoint(), LocalError());
55  }

◆ 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 }

◆ localParameters() [6/7]

virtual LocalValues StripClusterParameterEstimator::localParameters
inline

Definition at line 40 of file StripClusterParameterEstimator.h.

42  {
43  return localParameters(cluster, gd);
44  }

◆ localParameters() [7/7]

virtual LocalValues StripClusterParameterEstimator::localParameters
inline

Definition at line 45 of file StripClusterParameterEstimator.h.

47  {
48  return localParameters(cluster, gd, tsos.localParameters());
49  }

◆ 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 36 of file StripCPEgeometric.cc.

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

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

Referenced by localParameters().

◆ useNMinusOne()

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

Definition at line 73 of file StripCPEgeometric.cc.

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

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().

◆ useNPlusOne()

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

Definition at line 69 of file StripCPEgeometric.cc.

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

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

Referenced by offset_from_firstStrip().

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().

Vector3DBase< float, LocalTag >
reco::InverseCrosstalkMatrix::unfold
static std::vector< stats_t< float > > unfold(const SiStripCluster &q, const float x)
Definition: CrosstalkInversion.cc:7
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
SiStripSimParameters_cfi.LorentzAngle
LorentzAngle
Definition: SiStripSimParameters_cfi.py:93
config_102169_raw_cff.latency
latency
Definition: config_102169_raw_cff.py:29
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
StripCPEgeometric::geometric_position
stats_t< float > geometric_position(const WrappedCluster &, const stats_t< float > &) const
Definition: StripCPEgeometric.cc:62
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
pos
Definition: PixelAliasList.h:18
StripCPEgeometric::ambiguousSize
bool ambiguousSize(const WrappedCluster &, const stats_t< float > &) const
Definition: StripCPEgeometric.cc:95
DDAxes::x
StripCPEgeometric::offset_from_firstStrip
stats_t< float > offset_from_firstStrip(const std::vector< stats_t< float > > &, const stats_t< float > &) const
Definition: StripCPEgeometric.cc:36
StripCPE::param
Param const & param(const GeomDetUnit &det) const
Definition: StripCPE.h:81
StripCPE::StripCPE
StripCPE(edm::ParameterSet &conf, const MagneticField &, const TrackerGeometry &, const SiStripLorentzAngle &, const SiStripBackPlaneCorrection &, const SiStripConfObject &, const SiStripLatency &)
Definition: StripCPE.cc:9
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
stats_t
Definition: ErrorPropogationTypes.h:38
class-composition.Q
Q
Definition: class-composition.py:82
SiStripCluster::firstStrip
uint16_t firstStrip() const
Definition: SiStripCluster.h:47
StripCPE::xtalk1
std::vector< float > xtalk1
Definition: StripCPE.h:78
stats_t::error2
T error2() const
Definition: ErrorPropogationTypes.h:107
LocalTrajectoryParameters::position
LocalPoint position() const
Local x and y position coordinates.
Definition: LocalTrajectoryParameters.h:85
StripCPEgeometric::scaling_squared
const float scaling_squared
Definition: StripCPEgeometric.h:30
stats_t::from_relative_uncertainty2
static stats_t from_relative_uncertainty2(T q, T re2)
Definition: ErrorPropogationTypes.h:57
StripCPEgeometric::localParameters
StripClusterParameterEstimator::LocalValues localParameters(const SiStripCluster &, const GeomDetUnit &, const LocalTrajectoryParameters &) const override
Definition: StripCPEgeometric.cc:6
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
LocalTrajectoryParameters::vector
AlgebraicVector5 vector() const
Definition: LocalTrajectoryParameters.h:120
Point3DBase< float, LocalTag >
amptDefault_cfi.proj
proj
Definition: amptDefault_cfi.py:13
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
LocalError
Definition: LocalError.h:12
StripCPE::Param
Definition: StripCPE.h:33
StripCPEgeometric::tan_diffusion_angle
const float tan_diffusion_angle
Definition: StripCPEgeometric.h:30
StripCPEgeometric::minimum_uncertainty_squared
const float minimum_uncertainty_squared
Definition: StripCPEgeometric.h:30
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
LocalTrajectoryParameters::momentum
LocalVector momentum() const
Momentum vector in the local frame.
Definition: LocalTrajectoryParameters.h:88
StripCPEgeometric::maybe_noise_threshold
const float maybe_noise_threshold
Definition: StripCPEgeometric.h:30
StripCPEgeometric::useNMinusOne
bool useNMinusOne(const WrappedCluster &, const stats_t< float > &) const
Definition: StripCPEgeometric.cc:73
StripCPEgeometric::useNPlusOne
bool useNPlusOne(const WrappedCluster &, const stats_t< float > &) const
Definition: StripCPEgeometric.cc:69
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
StripCPEgeometric::noise_threshold
const float noise_threshold
Definition: StripCPEgeometric.h:30
StripCPEgeometric::thickness_rel_err2
const float thickness_rel_err2
Definition: StripCPEgeometric.h:30