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

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

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

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 }

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

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(), 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 37 of file StripCPEgeometric.cc.

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 }

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, useNMinusOne(), and useNPlusOne().

Referenced by localParameters().

◆ useNMinusOne()

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

Definition at line 74 of file StripCPEgeometric.cc.

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 }

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

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

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:11724
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:63
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
pos
Definition: PixelAliasList.h:18
StripCPEgeometric::ambiguousSize
bool ambiguousSize(const WrappedCluster &, const stats_t< float > &) const
Definition: StripCPEgeometric.cc:96
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:37
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
SiStripCluster::firstStrip
uint16_t firstStrip() const
Definition: SiStripCluster.h:46
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
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
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:74
StripCPEgeometric::useNPlusOne
bool useNPlusOne(const WrappedCluster &, const stats_t< float > &) const
Definition: StripCPEgeometric.cc:70
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