CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 &, const GeomDetUnit &, const LocalTrajectoryParameters &) 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
 
StripClusterParameterEstimator::LocalValues localParameters (const SiStripCluster &cl, const GeomDetUnit &) const
 
 StripCPE (edm::ParameterSet &conf, const MagneticField &, const TrackerGeometry &, const SiStripLorentzAngle &, const SiStripBackPlaneCorrection &, const SiStripConfObject &, const SiStripLatency &)
 
- Public Member Functions inherited from StripClusterParameterEstimator
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
typedef std::pair< LocalPoint,
LocalError
LocalValues
 
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 ( 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 15 of file StripCPEgeometric.h.

22  : StripCPE(conf, mag, geom, LorentzAngle, BackPlaneCorrection, confObj, latency ),
23  tan_diffusion_angle(conf.getParameter<double>("TanDiffusionAngle")),
24  thickness_rel_err2(pow(conf.getParameter<double>("ThicknessRelativeUncertainty"), 2)),
25  noise_threshold(conf.getParameter<double>("NoiseThreshold")),
26  maybe_noise_threshold(conf.getParameter<double>("MaybeNoiseThreshold")),
27  scaling_squared(pow(conf.getParameter<double>("UncertaintyScaling"), 2)),
28  minimum_uncertainty_squared(pow(conf.getParameter<double>("MinimumUncertainty"),2))
29  {}
T getParameter(std::string const &) const
StripCPE(edm::ParameterSet &conf, const MagneticField &, const TrackerGeometry &, const SiStripLorentzAngle &, const SiStripBackPlaneCorrection &, const SiStripConfObject &, const SiStripLatency &)
Definition: StripCPE.cc:11
const float scaling_squared
const float maybe_noise_threshold
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:40

Member Function Documentation

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

Definition at line 87 of file StripCPEgeometric.cc.

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

Referenced by offset_from_firstStrip().

88 { return
89  proj() < wc.N-1 &&
90  wc.smallerEdgeStrip()()>0 &&
91  wc.smallerEdgeStrip().sigmaFrom(0) < maybe_noise_threshold; }
const float maybe_noise_threshold
T sigmaFrom(const T &x) const
stats_t< float > StripCPEgeometric::geometric_position ( const WrappedCluster wc,
const stats_t< float > &  proj 
) const
private

Definition at line 57 of file StripCPEgeometric.cc.

References stats_t< T >::error2(), StripCPEgeometric::WrappedCluster::eta(), StripCPEgeometric::WrappedCluster::middle(), StripCPEgeometric::WrappedCluster::N, funct::pow(), scaling_squared, and x.

Referenced by offset_from_firstStrip().

57  {
58  const stats_t<float> x = wc.middle() + 0.5 * proj * wc.eta();
59  return wc.N==1
60  ? stats_t<float>( x(), pow( 1-0.82*proj(), 2 ) / 12 )
61  : stats_t<float>( x(), scaling_squared * x.error2() ) ;
62 }
const float scaling_squared
T error2() const
Definition: DDAxes.h:10
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
StripClusterParameterEstimator::LocalValues StripCPEgeometric::localParameters ( const SiStripCluster cluster,
const GeomDetUnit det,
const LocalTrajectoryParameters ltp 
) const
virtual

Reimplemented from StripClusterParameterEstimator.

Definition at line 7 of file StripCPEgeometric.cc.

References SiStripCluster::amplitudes(), StripCPE::Param::backplanecorrection, StripCPE::Param::coveredStrips(), StripCPE::Param::drift, SiStripCluster::firstStrip(), stats_t< T >::from_relative_uncertainty2(), StripTopology::localError(), StripTopology::localPitch(), StripTopology::localPosition(), PV3DBase< T, PVType, FrameType >::mag(), bookConverter::max, StripCPE::Param::maxLength, minimum_uncertainty_squared, StripCPE::Param::moduleGeom, LocalTrajectoryParameters::momentum(), offset_from_firstStrip(), AlCaHLTBitMon_ParallelJobs::p, StripCPE::param(), StripCPE::Param::pitch_rel_err2, LocalTrajectoryParameters::position(), tan_diffusion_angle, StripCPE::Param::thickness, thickness_rel_err2, StripCPE::Param::topology, reco::InverseCrosstalkMatrix::unfold(), LocalTrajectoryParameters::vector(), StripCPE::xtalk1, and PV3DBase< T, PVType, FrameType >::z().

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 = reco::InverseCrosstalkMatrix::unfold( cluster.amplitudes(), xtalk1[p.moduleGeom] );
26  const stats_t<float> strip = cluster.firstStrip() + offset_from_firstStrip( Q, projection );
27 
28  const float corrected = strip() - 0.5*(1-p.backplanecorrection) * fullProjection
29  + 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 }
float pitch_rel_err2
Definition: StripCPE.h:45
LocalPoint position() const
Local x and y position coordinates.
float thickness
Definition: StripCPE.h:45
StripTopology const * topology
Definition: StripCPE.h:43
uint16_t firstStrip() const
float backplanecorrection
Definition: StripCPE.h:47
AlgebraicVector5 vector() const
virtual float localPitch(const LocalPoint &) const =0
std::vector< float > xtalk1
Definition: StripCPE.h:38
T mag() const
Definition: PV3DBase.h:67
SiStripDetId::ModuleGeometry moduleGeom
Definition: StripCPE.h:48
static stats_t from_relative_uncertainty2(T q, T re2)
T z() const
Definition: PV3DBase.h:64
stats_t< float > offset_from_firstStrip(const std::vector< stats_t< float > > &, const stats_t< float > &) const
LocalVector momentum() const
Momentum vector in the local frame.
float coveredStrips(const LocalVector &, const LocalPoint &) const
Definition: StripCPE.cc:76
const float minimum_uncertainty_squared
const float tan_diffusion_angle
virtual LocalError localError(float strip, float stripErr2) const =0
float maxLength
Definition: StripCPE.h:45
Param const & param(const GeomDetUnit &det) const
Definition: StripCPE.h:51
LocalVector drift
Definition: StripCPE.h:44
virtual LocalPoint localPosition(float strip) const =0
const float thickness_rel_err2
const std::vector< uint8_t > & amplitudes() const
static std::vector< stats_t< float > > unfold(const std::vector< uint8_t > &q, const float x)
stats_t< float > StripCPEgeometric::offset_from_firstStrip ( const std::vector< stats_t< float > > &  Q,
const stats_t< float > &  proj 
) const
private

Definition at line 38 of file StripCPEgeometric.cc.

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

Referenced by localParameters().

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

Definition at line 71 of file StripCPEgeometric.cc.

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

Referenced by offset_from_firstStrip().

71  {
72  if( proj() > wc.N-1) return false;
73  if( wc.smallerEdgeStrip() < 0 ) return true;
74  if( proj() < wc.N-3) return false;
75  if( proj() < wc.N-2) return true;
76  if( wc.eta().sigmaFrom(0) < 3) return false;
77 
78  WrappedCluster wcTest(wc); wcTest.dropSmallerEdgeStrip();
79  if( proj >= wcTest.maxProjection() ) return false;
80  if( wc.sign()*wc.eta()() > 1./(wc.N-1) ) return true;
81 
82  return wc.smallerEdgeStrip().sigmaFrom(0) < noise_threshold;
83 }
const float noise_threshold
bool StripCPEgeometric::useNPlusOne ( const WrappedCluster wc,
const stats_t< float > &  proj 
) const
inlineprivate

Definition at line 66 of file StripCPEgeometric.cc.

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

Referenced by offset_from_firstStrip().

67 { return wc.maxProjection() < proj && proj() < wc.N+1 ; }

Member Data Documentation

const float StripCPEgeometric::maybe_noise_threshold
private

Definition at line 34 of file StripCPEgeometric.h.

Referenced by ambiguousSize().

const float StripCPEgeometric::minimum_uncertainty_squared
private

Definition at line 34 of file StripCPEgeometric.h.

Referenced by localParameters().

const float StripCPEgeometric::noise_threshold
private

Definition at line 34 of file StripCPEgeometric.h.

Referenced by useNMinusOne().

const float StripCPEgeometric::scaling_squared
private

Definition at line 34 of file StripCPEgeometric.h.

Referenced by geometric_position().

const float StripCPEgeometric::tan_diffusion_angle
private

Definition at line 34 of file StripCPEgeometric.h.

Referenced by localParameters().

const float StripCPEgeometric::thickness_rel_err2
private

Definition at line 34 of file StripCPEgeometric.h.

Referenced by localParameters().