test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripGaussianSmearingRecHitConverterAlgorithm.cc
Go to the documentation of this file.
1 
10 // SiStrip Gaussian Smearing
12 
13 // Famos
15 
16 // STL
17 
18 // #define FAMOS_DEBUG
19 
21 { }
22 
23 void
25  double localPositionResolutionX,
26  double localPositionResolutionY,
27  double localPositionResolutionZ,
28  double boundX,
29  double boundY,
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
double gaussShoot(double mean=0.0, double sigma=1.0) const
tuple cout
Definition: gather_cfg.py:145
T x() const
Definition: PV3DBase.h:62
void smearHit(const PSimHit &simHit, double localPositionResolutionX, double localPositionResolutionY, double localPositionResolutionZ, double boundX, double boundY, RandomEngineAndDistribution const *)