CMS 3D CMS Logo

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

#include <MaterialAccountingStep.h>

Public Member Functions

void clear (void)
 
double energyLoss (void) const
 
const GlobalPointin (void) const
 
double length (void) const
 
 MaterialAccountingStep (double position, double radlen, double loss, const GlobalPoint &in, const GlobalPoint &out)
 
 MaterialAccountingStep (void)
 
MaterialAccountingStepoperator*= (const MaterialAccountingStep &step)
 multiply two steps, usefull to implement (co)variance More...
 
MaterialAccountingStepoperator*= (double x)
 multiply by a scalar More...
 
MaterialAccountingStepoperator+= (const MaterialAccountingStep &step)
 add a step More...
 
MaterialAccountingStepoperator-= (const MaterialAccountingStep &step)
 subtract a step More...
 
MaterialAccountingStepoperator/= (double x)
 divide by a scalar More...
 
MaterialAccountingStepoperator= (const MaterialAccountingStep &step)
 assignement operator More...
 
const GlobalPointout (void) const
 
double radiationLengths (void) const
 
std::pair< MaterialAccountingStep, MaterialAccountingStepsplit (double fraction) const
 split the step (0..1) in (0..f) + (f..1) using linear interpolation More...
 

Private Attributes

double m_energyLoss
 
GlobalPoint m_in
 
double m_length
 
GlobalPoint m_out
 
double m_radiationLengths
 

Detailed Description

Definition at line 9 of file MaterialAccountingStep.h.

Constructor & Destructor Documentation

◆ MaterialAccountingStep() [1/2]

MaterialAccountingStep::MaterialAccountingStep ( void  )
inline

Definition at line 11 of file MaterialAccountingStep.h.

11 : m_length(0.), m_radiationLengths(0.), m_energyLoss(0.), m_in(), m_out() {}

◆ MaterialAccountingStep() [2/2]

MaterialAccountingStep::MaterialAccountingStep ( double  position,
double  radlen,
double  loss,
const GlobalPoint in,
const GlobalPoint out 
)
inline

Definition at line 13 of file MaterialAccountingStep.h.

Member Function Documentation

◆ clear()

void MaterialAccountingStep::clear ( void  )
inline

Definition at line 16 of file MaterialAccountingStep.h.

16  {
17  m_length = 0.;
18  m_radiationLengths = 0.;
19  m_energyLoss = 0.;
20  m_in = GlobalPoint();
21  m_out = GlobalPoint();
22  }

References m_energyLoss, m_in, m_length, m_out, and m_radiationLengths.

Referenced by MaterialAccountingDetector::clear(), and MaterialAccountingTrack::reset().

◆ energyLoss()

double MaterialAccountingStep::energyLoss ( void  ) const
inline

◆ in()

const GlobalPoint& MaterialAccountingStep::in ( void  ) const
inline

Definition at line 38 of file MaterialAccountingStep.h.

38 { return m_in; }

References m_in.

Referenced by DD4hep_MaterialAccountingGroup::endOfTrack(), and MaterialAccountingGroup::endOfTrack().

◆ length()

double MaterialAccountingStep::length ( void  ) const
inline

◆ operator*=() [1/2]

MaterialAccountingStep& MaterialAccountingStep::operator*= ( const MaterialAccountingStep step)
inline

multiply two steps, usefull to implement (co)variance

Definition at line 100 of file MaterialAccountingStep.h.

100  {
101  m_length *= step.m_length;
102  m_radiationLengths *= step.m_radiationLengths;
103  m_energyLoss *= step.m_energyLoss;
104  return *this;
105  }

References m_energyLoss, m_length, and m_radiationLengths.

◆ operator*=() [2/2]

MaterialAccountingStep& MaterialAccountingStep::operator*= ( double  x)
inline

multiply by a scalar

Definition at line 108 of file MaterialAccountingStep.h.

108  {
109  m_length *= x;
111  m_energyLoss *= x;
112  return *this;
113  }

References m_energyLoss, m_length, m_radiationLengths, and x.

◆ operator+=()

MaterialAccountingStep& MaterialAccountingStep::operator+= ( const MaterialAccountingStep step)
inline

add a step

Definition at line 68 of file MaterialAccountingStep.h.

68  {
69  m_length += step.m_length;
70  m_radiationLengths += step.m_radiationLengths;
71  m_energyLoss += step.m_energyLoss;
72 
73  // assume that perp2 is 0 only for uninitialized steps
74  if ((m_in.perp2() == 0.0) or (step.m_in.perp2() < m_in.perp2()))
75  m_in = step.m_in;
76 
77  if ((m_out.perp2() == 0.0) or (step.m_out.perp2() > m_out.perp2()))
78  m_out = step.m_out;
79 
80  return *this;
81  }

References m_energyLoss, m_in, m_length, m_out, m_radiationLengths, or, and PV3DBase< T, PVType, FrameType >::perp2().

◆ operator-=()

MaterialAccountingStep& MaterialAccountingStep::operator-= ( const MaterialAccountingStep step)
inline

subtract a step

Definition at line 84 of file MaterialAccountingStep.h.

84  {
85  m_length -= step.m_length;
86  m_radiationLengths -= step.m_radiationLengths;
87  m_energyLoss -= step.m_energyLoss;
88 
89  // can anything more sensible be done for m_in and/or m_out ?
90  if ((step.m_in.perp2() <= m_in.perp2()) and (step.m_out.perp2() >= m_in.perp2()))
91  m_in = step.m_out;
92 
93  if ((step.m_out.perp2() >= m_out.perp2()) and (step.m_in.perp2() <= m_out.perp2()))
94  m_out = step.m_in;
95 
96  return *this;
97  }

References m_energyLoss, m_in, m_length, m_out, m_radiationLengths, and PV3DBase< T, PVType, FrameType >::perp2().

◆ operator/=()

MaterialAccountingStep& MaterialAccountingStep::operator/= ( double  x)
inline

divide by a scalar

Definition at line 116 of file MaterialAccountingStep.h.

116  {
117  m_length /= x;
119  m_energyLoss /= x;
120  return *this;
121  }

References m_energyLoss, m_length, m_radiationLengths, and x.

◆ operator=()

MaterialAccountingStep& MaterialAccountingStep::operator= ( const MaterialAccountingStep step)
inline

assignement operator

Definition at line 58 of file MaterialAccountingStep.h.

58  {
59  m_length = step.m_length;
60  m_radiationLengths = step.m_radiationLengths;
61  m_energyLoss = step.m_energyLoss;
62  m_in = step.m_in;
63  m_out = step.m_out;
64  return *this;
65  }

References m_energyLoss, m_in, m_length, m_out, and m_radiationLengths.

◆ out()

const GlobalPoint& MaterialAccountingStep::out ( void  ) const
inline

Definition at line 40 of file MaterialAccountingStep.h.

40 { return m_out; }

References m_out.

Referenced by DD4hep_MaterialAccountingGroup::endOfTrack(), and MaterialAccountingGroup::endOfTrack().

◆ radiationLengths()

double MaterialAccountingStep::radiationLengths ( void  ) const
inline

◆ split()

std::pair<MaterialAccountingStep, MaterialAccountingStep> MaterialAccountingStep::split ( double  fraction) const
inline

split the step (0..1) in (0..f) + (f..1) using linear interpolation

Definition at line 43 of file MaterialAccountingStep.h.

43  {
44  // no check is done to ensure that 0 <= f <= 1 !
45  GlobalPoint limit(m_in.x() * fraction + m_out.x() * (1. - fraction),
46  m_in.y() * fraction + m_out.y() * (1. - fraction),
47  m_in.z() * fraction + m_out.z() * (1. - fraction));
48 
51 
54  return std::make_pair(part1, part2);
55  }

References HLT_FULL_cff::fraction, remoteMonitoring_LED_IterMethod_cfg::limit, m_energyLoss, m_in, m_length, m_out, m_radiationLengths, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Member Data Documentation

◆ m_energyLoss

double MaterialAccountingStep::m_energyLoss
private

◆ m_in

GlobalPoint MaterialAccountingStep::m_in
private

Definition at line 28 of file MaterialAccountingStep.h.

Referenced by clear(), in(), operator+=(), operator-=(), operator=(), and split().

◆ m_length

double MaterialAccountingStep::m_length
private

◆ m_out

GlobalPoint MaterialAccountingStep::m_out
private

Definition at line 29 of file MaterialAccountingStep.h.

Referenced by clear(), operator+=(), operator-=(), operator=(), out(), and split().

◆ m_radiationLengths

double MaterialAccountingStep::m_radiationLengths
private
MaterialAccountingStep::m_out
GlobalPoint m_out
Definition: MaterialAccountingStep.h:29
step
step
Definition: StallMonitor.cc:94
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
DDAxes::x
MaterialAccountingStep::in
const GlobalPoint & in(void) const
Definition: MaterialAccountingStep.h:38
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
MaterialAccountingStep::m_energyLoss
double m_energyLoss
Definition: MaterialAccountingStep.h:27
HLT_FULL_cff.fraction
fraction
Definition: HLT_FULL_cff.py:52802
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
MaterialAccountingStep::m_radiationLengths
double m_radiationLengths
Definition: MaterialAccountingStep.h:26
MaterialAccountingStep::out
const GlobalPoint & out(void) const
Definition: MaterialAccountingStep.h:40
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
MaterialAccountingStep::m_in
GlobalPoint m_in
Definition: MaterialAccountingStep.h:28
MaterialAccountingStep::m_length
double m_length
Definition: MaterialAccountingStep.h:25
MaterialAccountingStep
Definition: MaterialAccountingStep.h:9
remoteMonitoring_LED_IterMethod_cfg.limit
limit
Definition: remoteMonitoring_LED_IterMethod_cfg.py:427
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
PV3DBase::perp2
T perp2() const
Definition: PV3DBase.h:68