CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

MaterialAccountingDetector Class Reference

#include <MaterialAccountingDetector.h>

List of all members.

Public Member Functions

void account (const MaterialAccountingStep &step, double begin, double end)
void clear (void)
const MaterialAccountingStepmaterial () const
 MaterialAccountingDetector (void)
const GlobalPointposition () const

Private Attributes

MaterialAccountingStep m_accounting
double m_cosThetaIn
double m_cosThetaOut
double m_curvilinearIn
double m_curvilinearOut
GlobalPoint m_position

Friends

class MaterialAccountingTrack
class TrackingMaterialAnalyser

Detailed Description

Definition at line 15 of file MaterialAccountingDetector.h.


Constructor & Destructor Documentation

MaterialAccountingDetector::MaterialAccountingDetector ( void  ) [inline]

Definition at line 20 of file MaterialAccountingDetector.h.

                                     :
    m_position         (),
    m_curvilinearIn    ( 0. ),
    m_curvilinearOut   ( 0. ),
    m_cosThetaIn       ( 0. ),
    m_cosThetaOut      ( 0. ),
    m_accounting       ()
  { }

Member Function Documentation

void MaterialAccountingDetector::account ( const MaterialAccountingStep step,
double  begin,
double  end 
) [inline]

Definition at line 48 of file MaterialAccountingDetector.h.

References m_accounting, m_cosThetaIn, m_cosThetaOut, m_curvilinearIn, m_curvilinearOut, and launcher::step.

  {
    if (end <= m_curvilinearIn)
      // step before detector
      m_accounting += m_cosThetaIn * step;
    else if (begin >= m_curvilinearOut)
      // step after detector
       m_accounting += m_cosThetaOut * step;
    else
      // step inside detector
      m_accounting += (m_cosThetaIn + m_cosThetaOut ) / 2. * step;
  }
void MaterialAccountingDetector::clear ( void  ) [inline]
const MaterialAccountingStep& MaterialAccountingDetector::material ( ) const [inline]

Definition at line 42 of file MaterialAccountingDetector.h.

References m_accounting.

Referenced by MaterialAccountingGroup::addDetector().

                                                  {
    return m_accounting;
  }
const GlobalPoint& MaterialAccountingDetector::position ( void  ) const [inline]

Friends And Related Function Documentation

friend class MaterialAccountingTrack [friend]

Definition at line 16 of file MaterialAccountingDetector.h.

friend class TrackingMaterialAnalyser [friend]

Definition at line 17 of file MaterialAccountingDetector.h.


Member Data Documentation

Definition at line 67 of file MaterialAccountingDetector.h.

Referenced by account(), clear(), and material().