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 ()
 
void smearHit (const PSimHit &simHit, double localPositionResolutionX, double localPositionResolutionY, double localPositionResolutionZ, double boundX, double boundY, RandomEngineAndDistribution const *)
 
virtual ~SiStripGaussianSmearingRecHitConverterAlgorithm ()
 

Private Attributes

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 ( )
explicit

SiStripGaussianSmearingRecHitConverterAlgorithm.cc

Description: see SiStripGaussianSmearingRecHitConverterAlgorithm.h Authors: R. Ranieri (CERN), M. Galanti

History: Sep 27, 2006 - initial version

Definition at line 20 of file SiStripGaussianSmearingRecHitConverterAlgorithm.cc.

21 { }
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,
RandomEngineAndDistribution const *  random 
)

Definition at line 24 of file SiStripGaussianSmearingRecHitConverterAlgorithm.cc.

References gather_cfg::cout, RandomEngineAndDistribution::gaussShoot(), PSimHit::localPosition(), 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::smear().

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  0.,0.);
44 #ifdef FAMOS_DEBUG
45  std::cout << " Detector bounds: "
46  << "\t\tx = " << boundX
47  << "\ty = " << boundY
48  << std::endl;
49  std::cout << " Generated local position "
50  << "\tx = " << thePosition.x()
51  << "\ty = " << thePosition.y()
52  << std::endl;
53 #endif
54  } while(fabs(thePosition.x()) > boundX);
55 
56  //
60  //
61  theErrorX = localPositionResolutionX;
62  theErrorY = localPositionResolutionY;
63  theErrorZ = localPositionResolutionZ;
64 
66  0.0,
67  theErrorY * theErrorY );
68  // Local Error is 2D: (xx,xy,yy), square of sigma
69  // in first an third position as for resolution matrix
70  //
71 }
T y() const
Definition: PV3DBase.h:63
TRandom random
Definition: MVATrainer.cc:138
Local3DPoint localPosition() const
Definition: PSimHit.h:44
T z() const
Definition: PV3DBase.h:64
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
tuple cout
Definition: gather_cfg.py:121
T x() const
Definition: PV3DBase.h:62

Member Data Documentation

LocalError SiStripGaussianSmearingRecHitConverterAlgorithm::theError
private

Definition at line 56 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getError(), and smearHit().

double SiStripGaussianSmearingRecHitConverterAlgorithm::theErrorX
private

Definition at line 57 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getErrorX(), and smearHit().

double SiStripGaussianSmearingRecHitConverterAlgorithm::theErrorY
private

Definition at line 58 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getErrorY(), and smearHit().

double SiStripGaussianSmearingRecHitConverterAlgorithm::theErrorZ
private

Definition at line 59 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getErrorZ(), and smearHit().

Local3DPoint SiStripGaussianSmearingRecHitConverterAlgorithm::thePosition
private

Definition at line 52 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getPosition(), and smearHit().

double SiStripGaussianSmearingRecHitConverterAlgorithm::thePositionX
private

Definition at line 53 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getPositionX(), and smearHit().

double SiStripGaussianSmearingRecHitConverterAlgorithm::thePositionY
private

Definition at line 54 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getPositionY(), and smearHit().

double SiStripGaussianSmearingRecHitConverterAlgorithm::thePositionZ
private

Definition at line 55 of file SiStripGaussianSmearingRecHitConverterAlgorithm.h.

Referenced by getPositionZ(), and smearHit().