CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SiStripGaussianSmearingRecHitConverterAlgorithm Class Reference

#include <SiStripGaussianSmearingRecHitConverterAlgorithm.h>

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.

virtual SiStripGaussianSmearingRecHitConverterAlgorithm::~SiStripGaussianSmearingRecHitConverterAlgorithm ( )
inlinevirtual

Definition at line 29 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

29 {;}

Member Function Documentation

const LocalError& SiStripGaussianSmearingRecHitConverterAlgorithm::getError ( ) const
inline
double SiStripGaussianSmearingRecHitConverterAlgorithm::getErrorX ( ) const
inline
double SiStripGaussianSmearingRecHitConverterAlgorithm::getErrorY ( ) const
inline
double SiStripGaussianSmearingRecHitConverterAlgorithm::getErrorZ ( ) const
inline
const Local3DPoint& SiStripGaussianSmearingRecHitConverterAlgorithm::getPosition ( ) const
inline
double SiStripGaussianSmearingRecHitConverterAlgorithm::getPositionX ( ) const
inline
double SiStripGaussianSmearingRecHitConverterAlgorithm::getPositionY ( ) const
inline
double SiStripGaussianSmearingRecHitConverterAlgorithm::getPositionZ ( ) const
inline
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().

31 {
32 
33  // Gaussian Smearing
34  // x is smeared,
35  // y fixed at the centre of the strip,
36  // z fixed at the centre of the active area
37  // For the double-sided modules it will be a problem
38  // for the RecHit matcher (starting from these PSimHits)
39  //
40  do {
41  thePosition =
42  Local3DPoint(random->gaussShoot((double)simHit.localPosition().x(), localPositionResolutionX),
43  (double)simHit.localPosition().y(),
44  0.);
45 #ifdef FAMOS_DEBUG
46  std::cout << " Detector bounds: "
47  << "\t\tx = " << boundX
48  << "\ty = " << boundY
49  << std::endl;
50  std::cout << " Generated local position "
51  << "\tx = " << thePosition.x()
52  << "\ty = " << thePosition.y()
53  << std::endl;
54 #endif
55  } while(fabs(thePosition.x()) > boundX);
56 
57  //
61  //
62  theErrorX = localPositionResolutionX;
63  theErrorY = localPositionResolutionY;
64  theErrorZ = localPositionResolutionZ;
65 
67  0.0,
68  theErrorY * theErrorY );
69  // Local Error is 2D: (xx,xy,yy), square of sigma
70  // in first an third position as for resolution matrix
71  //
72 }
T y() const
Definition: PV3DBase.h:62
double gaussShoot(double mean=0.0, double sigma=1.0) const
Definition: RandomEngine.h:37
Local3DPoint localPosition() const
Definition: PSimHit.h:44
T z() const
Definition: PV3DBase.h:63
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
tuple cout
Definition: gather_cfg.py:121
T x() const
Definition: PV3DBase.h:61

Member Data Documentation

const RandomEngine* SiStripGaussianSmearingRecHitConverterAlgorithm::random
private

Definition at line 62 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by smearHit().

LocalError SiStripGaussianSmearingRecHitConverterAlgorithm::theError
private

Definition at line 55 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getError(), and smearHit().

double SiStripGaussianSmearingRecHitConverterAlgorithm::theErrorX
private

Definition at line 56 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getErrorX(), and smearHit().

double SiStripGaussianSmearingRecHitConverterAlgorithm::theErrorY
private

Definition at line 57 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getErrorY(), and smearHit().

double SiStripGaussianSmearingRecHitConverterAlgorithm::theErrorZ
private

Definition at line 58 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getErrorZ(), and smearHit().

Local3DPoint SiStripGaussianSmearingRecHitConverterAlgorithm::thePosition
private

Definition at line 51 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getPosition(), and smearHit().

double SiStripGaussianSmearingRecHitConverterAlgorithm::thePositionX
private

Definition at line 52 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getPositionX(), and smearHit().

double SiStripGaussianSmearingRecHitConverterAlgorithm::thePositionY
private

Definition at line 53 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getPositionY(), and smearHit().

double SiStripGaussianSmearingRecHitConverterAlgorithm::thePositionZ
private

Definition at line 54 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getPositionZ(), and smearHit().