CMS 3D CMS Logo

Public Member Functions | Private Attributes

SiStripGaussianSmearingRecHitConverterAlgorithm Class Reference

#include <SiStripGaussianSmearingRecHitConverterAlgorithm.h>

List of all members.

Public Member Functions

const LocalErrorgetError () const
double getErrorX () const
double getErrorY () const
double getErrorZ () const
const Local3DPointgetPosition () const
double getPositionX () const
double getPositionY () const
double getPositionZ () const
 SiStripGaussianSmearingRecHitConverterAlgorithm (const RandomEngine *engine)
void smearHit (const PSimHit &simHit, double localPositionResolutionX, double localPositionResolutionY, double localPositionResolutionZ, double boundX, double boundY)
virtual ~SiStripGaussianSmearingRecHitConverterAlgorithm ()

Private Attributes

const RandomEnginerandom
LocalError theError
double theErrorX
double theErrorY
double theErrorZ
Local3DPoint thePosition
double thePositionX
double thePositionY
double thePositionZ

Detailed Description

Definition at line 24 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.


Constructor & Destructor Documentation

SiStripGaussianSmearingRecHitConverterAlgorithm::SiStripGaussianSmearingRecHitConverterAlgorithm ( const RandomEngine engine) [explicit]

SiStripGaussianSmearingRecHitConverterAlgorithm.cc -------------------------------------------------------------- Description: see SiStripGaussianSmearingRecHitConverterAlgorithm.h Authors: R. Ranieri (CERN), M. Galanti History: Sep 27, 2006 - initial version --------------------------------------------------------------

Definition at line 21 of file SiStripGaussianSmearingRecHitConverterAlgorithm.cc.

: random(engine) {}
virtual SiStripGaussianSmearingRecHitConverterAlgorithm::~SiStripGaussianSmearingRecHitConverterAlgorithm ( ) [inline, virtual]

Definition at line 29 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

{;}

Member Function Documentation

const LocalError& SiStripGaussianSmearingRecHitConverterAlgorithm::getError ( ) const [inline]
double SiStripGaussianSmearingRecHitConverterAlgorithm::getErrorX ( ) const [inline]

Definition at line 37 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

References theErrorX.

{return theErrorX;}
double SiStripGaussianSmearingRecHitConverterAlgorithm::getErrorY ( ) const [inline]

Definition at line 38 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

References theErrorY.

{return theErrorY;}
double SiStripGaussianSmearingRecHitConverterAlgorithm::getErrorZ ( ) const [inline]

Definition at line 39 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

References theErrorZ.

{return theErrorZ;}
const Local3DPoint& SiStripGaussianSmearingRecHitConverterAlgorithm::getPosition ( ) const [inline]
double SiStripGaussianSmearingRecHitConverterAlgorithm::getPositionX ( ) const [inline]

Definition at line 33 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

References thePositionX.

{return thePositionX;}
double SiStripGaussianSmearingRecHitConverterAlgorithm::getPositionY ( ) const [inline]

Definition at line 34 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

References thePositionY.

{return thePositionY;}
double SiStripGaussianSmearingRecHitConverterAlgorithm::getPositionZ ( ) const [inline]

Definition at line 35 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

References thePositionZ.

{return thePositionZ;}
void SiStripGaussianSmearingRecHitConverterAlgorithm::smearHit ( const PSimHit simHit,
double  localPositionResolutionX,
double  localPositionResolutionY,
double  localPositionResolutionZ,
double  boundX,
double  boundY 
)

Definition at line 25 of file SiStripGaussianSmearingRecHitConverterAlgorithm.cc.

References gather_cfg::cout, RandomEngine::gaussShoot(), PSimHit::localPosition(), random, theError, theErrorX, theErrorY, theErrorZ, thePosition, thePositionX, thePositionY, thePositionZ, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by SiTrackerGaussianSmearingRecHitConverter::gaussianSmearing().

{

  // Gaussian Smearing
  // x is smeared,
  // y fixed at the centre of the strip, 
  // z fixed at the centre of the active area
  // For the double-sided modules it will be a problem 
  // for the RecHit matcher (starting from these PSimHits)
  //
  do {
    thePosition = 
      Local3DPoint(random->gaussShoot((double)simHit.localPosition().x(), localPositionResolutionX), 
                  (double)simHit.localPosition().y(),
                  0.);
#ifdef FAMOS_DEBUG
    std::cout << " Detector bounds: "
              << "\t\tx = " << boundX
              << "\ty = " << boundY
              << std::endl;
    std::cout << " Generated local position "
              << "\tx = " << thePosition.x()
              << "\ty = " << thePosition.y()
              << std::endl;       
#endif  
  } while(fabs(thePosition.x()) > boundX);
  
  //
  thePositionX = thePosition.x();
  thePositionY = thePosition.y();
  thePositionZ = thePosition.z();
  //
  theErrorX = localPositionResolutionX;
  theErrorY = localPositionResolutionY;
  theErrorZ = localPositionResolutionZ;

  theError = LocalError( theErrorX * theErrorX,
                         0.0,
                         theErrorY * theErrorY ); 
  // Local Error is 2D: (xx,xy,yy), square of sigma 
  // in first an third position as for resolution matrix
  //
}

Member Data Documentation

Definition at line 62 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by smearHit().

Definition at line 55 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getError(), and smearHit().

Definition at line 56 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getErrorX(), and smearHit().

Definition at line 57 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getErrorY(), and smearHit().

Definition at line 58 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getErrorZ(), and smearHit().

Definition at line 51 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getPosition(), and smearHit().

Definition at line 52 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getPositionX(), and smearHit().

Definition at line 53 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getPositionY(), and smearHit().

Definition at line 54 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getPositionZ(), and smearHit().