/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
GtSourceOct Class Reference

#include <GtRockGammaTool.h>

Inheritance diagram for GtSourceOct:
Inheritance graph
[legend]
Collaboration diagram for GtSourceOct:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Protected Attributes

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

Detailed Description

Definition at line 53 of file GtRockGammaTool.h.


Constructor & Destructor Documentation

GtSourceOct::GtSourceOct ( const CLHEP::Hep3Vector &  origin,
const CLHEP::Hep3Vector &  edgeA,
const CLHEP::Hep3Vector &  edgeB,
const double &  bevelLength 
)

Definition at line 68 of file GtRockGammaTool.cc.

  : GtSourceRect(origin,edgeA,edgeB),
    m_bevelLength(bevelLength)
{
  // Pre-calculate area
  m_area = edgeA.mag()*edgeB.mag() - 2*bevelLength*bevelLength;
}
GtSourceOct::~GtSourceOct ( ) [virtual]

Definition at line 79 of file GtRockGammaTool.cc.

{
  ;
}

Member Function Documentation

CLHEP::Hep3Vector GtSourceOct::randomPoint ( Rndm::Numbers &  random) [virtual]

Reimplemented from GtSourceRect.

Definition at line 84 of file GtRockGammaTool.cc.

{
  // Choose a random point on the octagonal surface
  static const double sqrt2 = sqrt(2);
  double cutDist = ((m_edgeA.mag()+m_edgeB.mag())/(2*sqrt2)) 
    - m_bevelLength/sqrt2;
  CLHEP::Hep3Vector point;
  while(true){
    point = GtSourceRect::randomPoint(random);
    // Check if point is in beveled corners
    double pointDist = (fabs(point.x()) + fabs(point.y())) / sqrt2;
    if( pointDist < cutDist ) break;
  }
  return point;
}
double GtSourceRect::area ( ) [virtual, inherited]

Definition at line 36 of file GtRockGammaTool.cc.

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

Definition at line 41 of file GtRockGammaTool.cc.

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

Definition at line 46 of file GtRockGammaTool.cc.

{
  return m_normal;
}

Member Data Documentation

double GtSourceOct::m_bevelLength [protected]

Definition at line 62 of file GtRockGammaTool.h.

double GtSourceRect::m_area [protected, inherited]

Definition at line 45 of file GtRockGammaTool.h.

CLHEP::Hep3Vector GtSourceRect::m_origin [protected, inherited]

Definition at line 46 of file GtRockGammaTool.h.

CLHEP::Hep3Vector GtSourceRect::m_edgeA [protected, inherited]

Definition at line 47 of file GtRockGammaTool.h.

CLHEP::Hep3Vector GtSourceRect::m_edgeB [protected, inherited]

Definition at line 48 of file GtRockGammaTool.h.

CLHEP::Hep3Vector GtSourceRect::m_normal [protected, inherited]

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