/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Protected Attributes
GtSourceRect Class Reference

#include <GtRockGammaTool.h>

Inheritance diagram for GtSourceRect:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 GtSourceRect (const CLHEP::Hep3Vector &origin, const CLHEP::Hep3Vector &edgeA, const CLHEP::Hep3Vector &edgeB)
virtual ~GtSourceRect ()
virtual double area ()
virtual CLHEP::Hep3Vector origin ()
virtual CLHEP::Hep3Vector normal ()
virtual CLHEP::Hep3Vector randomPoint (Rndm::Numbers &random)

Protected Attributes

double m_area
CLHEP::Hep3Vector m_origin
CLHEP::Hep3Vector m_edgeA
CLHEP::Hep3Vector m_edgeB
CLHEP::Hep3Vector m_normal

Detailed Description

Definition at line 30 of file GtRockGammaTool.h.


Constructor & Destructor Documentation

GtSourceRect::GtSourceRect ( const CLHEP::Hep3Vector &  origin,
const CLHEP::Hep3Vector &  edgeA,
const CLHEP::Hep3Vector &  edgeB 
)

Definition at line 19 of file GtRockGammaTool.cc.

  : m_origin(origin),
    m_edgeA(edgeA),
    m_edgeB(edgeB)
{
  // Pre-calculate area and normal vector
  m_area = edgeA.mag()*edgeB.mag();
  m_normal = edgeA.cross(edgeB).unit();
}
GtSourceRect::~GtSourceRect ( ) [virtual]

Definition at line 31 of file GtRockGammaTool.cc.

{
  ;
}

Member Function Documentation

double GtSourceRect::area ( ) [virtual]

Definition at line 36 of file GtRockGammaTool.cc.

{
  return m_area;
}
CLHEP::Hep3Vector GtSourceRect::origin ( ) [virtual]

Definition at line 41 of file GtRockGammaTool.cc.

{
  return m_origin;
}
CLHEP::Hep3Vector GtSourceRect::normal ( ) [virtual]

Definition at line 46 of file GtRockGammaTool.cc.

{
  return m_normal;
}
CLHEP::Hep3Vector GtSourceRect::randomPoint ( Rndm::Numbers &  random) [virtual]

Reimplemented in GtSourceOct.

Definition at line 51 of file GtRockGammaTool.cc.

{
  // Choose a random point on the rectangular surface
  double x=m_origin.x();
  double y=m_origin.y();
  double z=m_origin.z();
  double randA = random()-0.5;
  double randB = random()-0.5;
  x+=randA*m_edgeA.x();
  y+=randA*m_edgeA.y();
  z+=randA*m_edgeA.z();
  x+=randB*m_edgeB.x();
  y+=randB*m_edgeB.y();
  z+=randB*m_edgeB.z();
  return CLHEP::Hep3Vector(x,y,z);
}

Member Data Documentation

double GtSourceRect::m_area [protected]

Definition at line 45 of file GtRockGammaTool.h.

CLHEP::Hep3Vector GtSourceRect::m_origin [protected]

Definition at line 46 of file GtRockGammaTool.h.

CLHEP::Hep3Vector GtSourceRect::m_edgeA [protected]

Definition at line 47 of file GtRockGammaTool.h.

CLHEP::Hep3Vector GtSourceRect::m_edgeB [protected]

Definition at line 48 of file GtRockGammaTool.h.

CLHEP::Hep3Vector GtSourceRect::m_normal [protected]

Definition at line 49 of file GtRockGammaTool.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:18:51 for GenTools by doxygen 1.7.4