CMS 3D CMS Logo

Classes | Public Member Functions | Private Member Functions | Private Attributes

StripCPEgeometric Class Reference

#include <StripCPEgeometric.h>

Inheritance diagram for StripCPEgeometric:
StripCPE StripClusterParameterEstimator ClusterParameterEstimator< SiStripCluster >

List of all members.

Classes

class  WrappedCluster

Public Member Functions

StripClusterParameterEstimator::LocalValues localParameters (const SiStripCluster &, const LocalTrajectoryParameters &) const
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)

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

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

    : StripCPE(conf, mag, geom, LorentzAngle, confObj, latency ),
    tan_diffusion_angle(conf.getParameter<double>("TanDiffusionAngle")),    
    thickness_rel_err2(pow(conf.getParameter<double>("ThicknessRelativeUncertainty"), 2)),
    noise_threshold(conf.getParameter<double>("NoiseThreshold")),
    maybe_noise_threshold(conf.getParameter<double>("MaybeNoiseThreshold")),
    scaling_squared(pow(conf.getParameter<double>("UncertaintyScaling"), 2)),
    minimum_uncertainty_squared(pow(conf.getParameter<double>("MinimumUncertainty"),2))
      {}

Member Function Documentation

bool StripCPEgeometric::ambiguousSize ( const WrappedCluster wc,
const stats_t< float > &  proj 
) const [inline, private]

Definition at line 91 of file StripCPEgeometric.cc.

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

Referenced by offset_from_firstStrip().

{  return 
     proj() < wc.N-1 && 
     wc.smallerEdgeStrip()()>0 && 
     wc.smallerEdgeStrip().sigmaFrom(0) < maybe_noise_threshold; }
stats_t< float > StripCPEgeometric::geometric_position ( const WrappedCluster wc,
const stats_t< float > &  proj 
) const [private]
StripClusterParameterEstimator::LocalValues StripCPEgeometric::localParameters ( const SiStripCluster cluster,
const LocalTrajectoryParameters ltp 
) const

Definition at line 12 of file StripCPEgeometric.cc.

References SiStripCluster::amplitudes(), StripCPE::Param::coveredStrips(), StripCPE::Param::drift, SiStripCluster::firstStrip(), SiStripCluster::geographicalId(), 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(), L1TEmulatorMonitor_cff::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, ExpressReco_HICollisions_FallBack::track, reco::InverseCrosstalkMatrix::unfold(), LocalTrajectoryParameters::vector(), StripCPE::xtalk1, and PV3DBase< T, PVType, FrameType >::z().

Referenced by localParameters().

                                                                                            {
  StripCPE::Param const& p = param(cluster.geographicalId());

  const LocalPoint& pos = ltp.position();
  LocalVector track = ltp.momentum();
  track *=  (track.z()<0) ?  fabs(p.thickness/track.z()) : 
            (track.z()>0) ? -fabs(p.thickness/track.z()) :  
                             p.maxLength/track.mag() ;

  const float fullProjection = p.coveredStrips( track+p.drift, pos );
  stats_t<float> projection;
  {
    const float absProj = fabs( fullProjection );
    const float minProj = 2*p.thickness*tan_diffusion_angle/p.topology->localPitch(pos);
    const float projection_rel_err2 = thickness_rel_err2 + p.pitch_rel_err2;
    projection = stats_t<float>::from_relative_uncertainty2( std::max(absProj, minProj), projection_rel_err2);
  }

  const std::vector<stats_t<float> > Q = reco::InverseCrosstalkMatrix::unfold( cluster.amplitudes(), xtalk1[p.moduleGeom] );
  const stats_t<float> strip = cluster.firstStrip() + offset_from_firstStrip( Q, projection );

  const float corrected = strip() -  0.5*(1-shift[p.moduleGeom]) * fullProjection
    + 0.5*p.coveredStrips(track, ltp.position());
  const float error2 = std::max( strip.error2(), minimum_uncertainty_squared );  

  return std::make_pair( p.topology->localPosition( corrected, ltp.vector()),
                         p.topology->localError( corrected, error2, ltp.vector()));
}
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 localParameters().

                                                                                                                    {
  return localParameters(cluster,ltp);
}
stats_t< float > StripCPEgeometric::offset_from_firstStrip ( const std::vector< stats_t< float > > &  Q,
const stats_t< float > &  proj 
) const [private]

Definition at line 42 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(), useNMinusOne(), and useNPlusOne().

Referenced by localParameters().

                                                                                               {
  WrappedCluster wc(Q);
  if(    useNPlusOne( wc, proj))  wc.addSuppressedEdgeStrip();  else 
  while( useNMinusOne( wc, proj)) wc.dropSmallerEdgeStrip();

  if( proj() < wc.N-2 )           return stats_t<float>( wc.middle(),  pow(wc.N-proj(),2) / 12.);
  if( wc.deformed()   )           return stats_t<float>( wc.centroid()(),               1 / 12.);
  if( proj > wc.maxProjection() ) return stats_t<float>( wc.centroid()(),               1 / 12.);

  if( ambiguousSize( wc, proj) ) {
    const stats_t<float> probably = geometric_position( wc, proj);
    wc.dropSmallerEdgeStrip();
    const stats_t<float> maybe = geometric_position( wc, proj);
    return stats_t<float>( probably(), std::max( probably.error2(), float(maybe.error2() + pow( probably()-maybe() ,2)/12 )) );
  }
  return geometric_position( wc, proj);
}
bool StripCPEgeometric::useNMinusOne ( const WrappedCluster wc,
const stats_t< float > &  proj 
) const [inline, private]

Definition at line 75 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().

                                                                         {
  if( proj() > wc.N-1) return false;
  if( wc.smallerEdgeStrip() < 0 ) return true;
  if( proj() < wc.N-3) return false;
  if( proj() < wc.N-2) return true;
  if( wc.eta().sigmaFrom(0) < 3) return false;

  WrappedCluster wcTest(wc); wcTest.dropSmallerEdgeStrip();
  if( proj >= wcTest.maxProjection() ) return false;
  if( wc.sign()*wc.eta()() > 1./(wc.N-1) ) return true;

  return wc.smallerEdgeStrip().sigmaFrom(0) < noise_threshold;
}
bool StripCPEgeometric::useNPlusOne ( const WrappedCluster wc,
const stats_t< float > &  proj 
) const [inline, private]

Definition at line 70 of file StripCPEgeometric.cc.

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

Referenced by offset_from_firstStrip().

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

Member Data Documentation

Definition at line 36 of file StripCPEgeometric.h.

Referenced by ambiguousSize().

Definition at line 36 of file StripCPEgeometric.h.

Referenced by localParameters().

const float StripCPEgeometric::noise_threshold [private]

Definition at line 36 of file StripCPEgeometric.h.

Referenced by useNMinusOne().

const float StripCPEgeometric::scaling_squared [private]

Definition at line 36 of file StripCPEgeometric.h.

Referenced by geometric_position().

Definition at line 36 of file StripCPEgeometric.h.

Referenced by localParameters().

Definition at line 36 of file StripCPEgeometric.h.

Referenced by localParameters().