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 ClusterParameterEstimator< SiStripCluster >

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 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 SiStripConfObject &, const SiStripLatency &)
 
- Public Member Functions inherited from StripClusterParameterEstimator
virtual MeasurementValues measurementParameters (const SiStripCluster &, const GeomDetUnit &) const
 
virtual MeasurementValues measurementParameters (const SiStripCluster &cluster, const GeomDetUnit &gd, const LocalTrajectoryParameters &ltp) const
 
float templateProbability () const
 
void templateProbability (float stp)
 
int templateQbin () const
 
void templateQbin (int stqb)
 
- Public Member Functions inherited from ClusterParameterEstimator< SiStripCluster >
virtual void clearParameters () const
 
virtual void enterLocalParameters (unsigned int id, std::pair< int, int > &row_col, LocalValues pos_err_info) const
 
virtual void enterLocalParameters (uint32_t id, uint16_t firstStrip, LocalValues pos_err_info) 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 ~ClusterParameterEstimator ()
 

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
< MeasurementPoint,
MeasurementError
MeasurementValues
 
- Public Types inherited from ClusterParameterEstimator< SiStripCluster >
typedef std::pair< LocalPoint,
LocalError
LocalValues
 
typedef std::vector< LocalValuesVLocalValues
 
- Public Attributes inherited from StripClusterParameterEstimator
float stripCPEtemplateProbability_
 
int stripCPEtemplateQbin_
 
- Protected Member Functions inherited from StripCPE
Param const & param (const GeomDetUnit &det) const
 
- Protected Attributes inherited from StripCPE
const TrackerGeometrygeom_
 
const SiStripLorentzAngleLorentzAngleMap_
 
const MagneticFieldmagfield_
 
const bool peakMode_
 
std::vector< double > shift
 
std::vector< double > xtalk1
 
std::vector< double > 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 SiStripConfObject confObj,
const SiStripLatency latency 
)
inline

Definition at line 15 of file StripCPEgeometric.h.

21  : StripCPE(conf, mag, geom, LorentzAngle, 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))
28  {}
StripCPE(edm::ParameterSet &conf, const MagneticField &, const TrackerGeometry &, const SiStripLorentzAngle &, const SiStripConfObject &, const SiStripLatency &)
Definition: StripCPE.cc:11
T getParameter(std::string const &) const
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, trackerHitRTTI::proj, 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
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(), trackerHitRTTI::proj, scaling_squared, and vdt::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
x
Definition: VDTMath.h:216
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 ClusterParameterEstimator< SiStripCluster >.

Definition at line 7 of file StripCPEgeometric.cc.

References SiStripCluster::amplitudes(), 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(), 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, pos, LocalTrajectoryParameters::position(), StripCPE::shift, strip(), 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-shift[p.moduleGeom]) * 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 }
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
float pitch_rel_err2
Definition: StripCPE.h:43
LocalPoint position() const
Local x and y position coordinates.
float thickness
Definition: StripCPE.h:43
StripTopology const * topology
Definition: StripCPE.h:41
uint16_t firstStrip() const
std::vector< double > xtalk1
Definition: StripCPE.h:36
AlgebraicVector5 vector() const
virtual float localPitch(const LocalPoint &) const =0
T mag() const
Definition: PV3DBase.h:66
SiStripDetId::ModuleGeometry moduleGeom
Definition: StripCPE.h:45
const T & max(const T &a, const T &b)
static stats_t from_relative_uncertainty2(T q, T re2)
T z() const
Definition: PV3DBase.h:63
stats_t< float > offset_from_firstStrip(const std::vector< stats_t< float > > &, const stats_t< float > &) const
std::vector< double > shift
Definition: StripCPE.h:35
LocalVector momentum() const
Momentum vector in the local frame.
float coveredStrips(const LocalVector &, const LocalPoint &) const
Definition: StripCPE.cc:78
const float minimum_uncertainty_squared
const float tan_diffusion_angle
virtual LocalError localError(float strip, float stripErr2) const =0
float maxLength
Definition: StripCPE.h:43
Param const & param(const GeomDetUnit &det) const
Definition: StripCPE.h:48
LocalVector drift
Definition: StripCPE.h:42
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(), max(), StripCPEgeometric::WrappedCluster::maxProjection(), StripCPEgeometric::WrappedCluster::middle(), StripCPEgeometric::WrappedCluster::N, funct::pow(), trackerHitRTTI::proj, 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
const T & max(const T &a, const T &b)
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, trackerHitRTTI::proj, 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(), StripCPEgeometric::WrappedCluster::N, and trackerHitRTTI::proj.

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 33 of file StripCPEgeometric.h.

Referenced by ambiguousSize().

const float StripCPEgeometric::minimum_uncertainty_squared
private

Definition at line 33 of file StripCPEgeometric.h.

Referenced by localParameters().

const float StripCPEgeometric::noise_threshold
private

Definition at line 33 of file StripCPEgeometric.h.

Referenced by useNMinusOne().

const float StripCPEgeometric::scaling_squared
private

Definition at line 33 of file StripCPEgeometric.h.

Referenced by geometric_position().

const float StripCPEgeometric::tan_diffusion_angle
private

Definition at line 33 of file StripCPEgeometric.h.

Referenced by localParameters().

const float StripCPEgeometric::thickness_rel_err2
private

Definition at line 33 of file StripCPEgeometric.h.

Referenced by localParameters().