CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Attributes
MaterialAccountingTrack Class Reference

#include <MaterialAccountingTrack.h>

Public Member Functions

std::vector< MaterialAccountingDetector > & detectors ()
 
const std::vector< MaterialAccountingDetector > & detectors () const
 
void enterDetector (const GlobalPoint &position, double cosTheta)
 
void leaveDetector (double cosTheta)
 
 MaterialAccountingTrack (void)
 
void reset (void)
 
void step (const MaterialAccountingStep &step)
 
std::vector< MaterialAccountingStep > & steps ()
 
const std::vector< MaterialAccountingStep > & steps () const
 
const MaterialAccountingStepsummary () const
 

Private Types

enum  { kSteps = 600, kDetectors = 30 }
 

Private Attributes

MaterialAccountingDetector m_detector
 
std::vector< MaterialAccountingDetectorm_detectors
 
std::vector< MaterialAccountingStepm_steps
 
MaterialAccountingStep m_total
 

Detailed Description

Definition at line 10 of file MaterialAccountingTrack.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
kSteps 
kDetectors 

Definition at line 13 of file MaterialAccountingTrack.h.

13 { kSteps = 600, kDetectors = 30 };

Constructor & Destructor Documentation

◆ MaterialAccountingTrack()

MaterialAccountingTrack::MaterialAccountingTrack ( void  )
inline

Definition at line 16 of file MaterialAccountingTrack.h.

16  : m_total(), m_detector(), m_steps(), m_detectors() {
17  m_steps.reserve(kSteps);
18  m_detectors.reserve(kDetectors);
19  }

References kDetectors, kSteps, m_detectors, and m_steps.

Member Function Documentation

◆ detectors() [1/2]

std::vector<MaterialAccountingDetector>& MaterialAccountingTrack::detectors ( )
inline

Definition at line 43 of file MaterialAccountingTrack.h.

43 { return m_detectors; }

References m_detectors.

◆ detectors() [2/2]

const std::vector<MaterialAccountingDetector>& MaterialAccountingTrack::detectors ( ) const
inline

Definition at line 41 of file MaterialAccountingTrack.h.

41 { return m_detectors; }

References m_detectors.

◆ enterDetector()

void MaterialAccountingTrack::enterDetector ( const GlobalPoint position,
double  cosTheta 
)

◆ leaveDetector()

void MaterialAccountingTrack::leaveDetector ( double  cosTheta)

◆ reset()

void MaterialAccountingTrack::reset ( void  )
inline

Definition at line 21 of file MaterialAccountingTrack.h.

21  {
22  m_total.clear();
23  m_steps.clear();
24  m_steps.reserve(kSteps);
25  m_steps.push_back(m_total);
26  m_detector.clear();
27  m_detectors.clear();
28  m_detectors.reserve(kDetectors);
29  }

References MaterialAccountingStep::clear(), MaterialAccountingDetector::clear(), kDetectors, kSteps, m_detector, m_detectors, m_steps, and m_total.

◆ step()

void MaterialAccountingTrack::step ( const MaterialAccountingStep step)
inline

Definition at line 31 of file MaterialAccountingTrack.h.

31  {
32  m_total += step;
33  m_steps.push_back(step);
34  }

References m_steps, and m_total.

◆ steps() [1/2]

std::vector<MaterialAccountingStep>& MaterialAccountingTrack::steps ( )
inline

Definition at line 47 of file MaterialAccountingTrack.h.

47 { return m_steps; }

References m_steps.

◆ steps() [2/2]

const std::vector<MaterialAccountingStep>& MaterialAccountingTrack::steps ( ) const
inline

Definition at line 45 of file MaterialAccountingTrack.h.

45 { return m_steps; }

References m_steps.

◆ summary()

const MaterialAccountingStep& MaterialAccountingTrack::summary ( ) const
inline

Definition at line 39 of file MaterialAccountingTrack.h.

39 { return m_total; }

References m_total.

Member Data Documentation

◆ m_detector

MaterialAccountingDetector MaterialAccountingTrack::m_detector
private

Definition at line 51 of file MaterialAccountingTrack.h.

Referenced by enterDetector(), leaveDetector(), and reset().

◆ m_detectors

std::vector<MaterialAccountingDetector> MaterialAccountingTrack::m_detectors
private

Definition at line 53 of file MaterialAccountingTrack.h.

Referenced by detectors(), leaveDetector(), MaterialAccountingTrack(), and reset().

◆ m_steps

std::vector<MaterialAccountingStep> MaterialAccountingTrack::m_steps
private

Definition at line 52 of file MaterialAccountingTrack.h.

Referenced by MaterialAccountingTrack(), reset(), step(), and steps().

◆ m_total

MaterialAccountingStep MaterialAccountingTrack::m_total
private

Definition at line 50 of file MaterialAccountingTrack.h.

Referenced by enterDetector(), leaveDetector(), reset(), step(), and summary().

MaterialAccountingDetector::m_cosThetaOut
double m_cosThetaOut
Definition: MaterialAccountingDetector.h:55
MaterialAccountingTrack::m_steps
std::vector< MaterialAccountingStep > m_steps
Definition: MaterialAccountingTrack.h:52
step
step
Definition: StallMonitor.cc:94
MaterialAccountingDetector::m_cosThetaIn
double m_cosThetaIn
Definition: MaterialAccountingDetector.h:54
MaterialAccountingTrack::m_detectors
std::vector< MaterialAccountingDetector > m_detectors
Definition: MaterialAccountingTrack.h:53
MaterialAccountingDetector::m_curvilinearIn
double m_curvilinearIn
Definition: MaterialAccountingDetector.h:52
MaterialAccountingDetector::m_curvilinearOut
double m_curvilinearOut
Definition: MaterialAccountingDetector.h:53
MaterialAccountingTrack::step
void step(const MaterialAccountingStep &step)
Definition: MaterialAccountingTrack.h:31
MaterialAccountingTrack::kSteps
Definition: MaterialAccountingTrack.h:13
MaterialAccountingTrack::m_detector
MaterialAccountingDetector m_detector
Definition: MaterialAccountingTrack.h:51
MaterialAccountingTrack::m_total
MaterialAccountingStep m_total
Definition: MaterialAccountingTrack.h:50
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
MaterialAccountingDetector::clear
void clear(void)
Definition: MaterialAccountingDetector.h:24
MaterialAccountingStep::length
double length(void) const
Definition: MaterialAccountingStep.h:32
MaterialAccountingTrack::kDetectors
Definition: MaterialAccountingTrack.h:13
MaterialAccountingDetector::m_position
GlobalPoint m_position
Definition: MaterialAccountingDetector.h:51
MaterialAccountingStep::clear
void clear(void)
Definition: MaterialAccountingStep.h:16