CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 (void)
 
 MaterialAccountingStep (double position, double radlen, double loss, const GlobalPoint &in, const GlobalPoint &out)
 
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,
MaterialAccountingStep
split (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::MaterialAccountingStep ( void  )
inline

Definition at line 11 of file MaterialAccountingStep.h.

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

Definition at line 19 of file MaterialAccountingStep.h.

19  :
20  m_length( position ),
21  m_radiationLengths( radlen ),
22  m_energyLoss( loss ),
23  m_in( in ),
24  m_out( out )
25  { }
static int position[264][3]
Definition: ReadPGInfo.cc:509

Member Function Documentation

void MaterialAccountingStep::clear ( void  )
inline
double MaterialAccountingStep::energyLoss ( void  ) const
inline
const GlobalPoint& MaterialAccountingStep::in ( void  ) const
inline

Definition at line 55 of file MaterialAccountingStep.h.

References m_in.

Referenced by TrackingMaterialPlotter::plotSegmentInLayer(), and TrackingMaterialPlotter::plotSegmentUnassigned().

55  {
56  return m_in;
57  }
double MaterialAccountingStep::length ( void  ) const
inline
MaterialAccountingStep& MaterialAccountingStep::operator*= ( const MaterialAccountingStep step)
inline

multiply two steps, usefull to implement (co)variance

Definition at line 129 of file MaterialAccountingStep.h.

References m_energyLoss, m_length, and m_radiationLengths.

129  {
130  m_length *= step.m_length;
132  m_energyLoss *= step.m_energyLoss;
133  return *this;
134  }
MaterialAccountingStep& MaterialAccountingStep::operator*= ( double  x)
inline

multiply by a scalar

Definition at line 137 of file MaterialAccountingStep.h.

References m_energyLoss, m_length, m_radiationLengths, and x.

137  {
138  m_length *= x;
140  m_energyLoss *= x;
141  return *this;
142  }
MaterialAccountingStep& MaterialAccountingStep::operator+= ( const MaterialAccountingStep step)
inline

add a step

Definition at line 97 of file MaterialAccountingStep.h.

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

97  {
98  m_length += step.m_length;
100  m_energyLoss += step.m_energyLoss;
101 
102  // assume that perp2 is 0 only for uninitialized steps
103  if ((m_in.perp2() == 0.0) or (step.m_in.perp2() < m_in.perp2()))
104  m_in = step.m_in;
105 
106  if ((m_out.perp2() == 0.0) or (step.m_out.perp2() > m_out.perp2()))
107  m_out = step.m_out;
108 
109  return *this;
110  }
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
T perp2() const
Definition: PV3DBase.h:71
MaterialAccountingStep& MaterialAccountingStep::operator-= ( const MaterialAccountingStep step)
inline

subtract a step

Definition at line 113 of file MaterialAccountingStep.h.

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

113  {
114  m_length -= step.m_length;
116  m_energyLoss -= step.m_energyLoss;
117 
118  // can anything more sensible be done for m_in and/or m_out ?
119  if ((step.m_in.perp2() <= m_in.perp2()) and (step.m_out.perp2() >= m_in.perp2()))
120  m_in = step.m_out;
121 
122  if ((step.m_out.perp2() >= m_out.perp2()) and (step.m_in.perp2() <= m_out.perp2()))
123  m_out = step.m_in;
124 
125  return *this;
126  }
T perp2() const
Definition: PV3DBase.h:71
MaterialAccountingStep& MaterialAccountingStep::operator/= ( double  x)
inline

divide by a scalar

Definition at line 145 of file MaterialAccountingStep.h.

References m_energyLoss, m_length, m_radiationLengths, and x.

145  {
146  m_length /= x;
148  m_energyLoss /= x;
149  return *this;
150  }
MaterialAccountingStep& MaterialAccountingStep::operator= ( const MaterialAccountingStep step)
inline

assignement operator

Definition at line 87 of file MaterialAccountingStep.h.

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

87  {
88  m_length = step.m_length;
91  m_in = step.m_in;
92  m_out = step.m_out;
93  return *this;
94  }
const GlobalPoint& MaterialAccountingStep::out ( void  ) const
inline

Definition at line 59 of file MaterialAccountingStep.h.

References m_out.

Referenced by TrackingMaterialPlotter::plotSegmentInLayer(), and TrackingMaterialPlotter::plotSegmentUnassigned().

59  {
60  return m_out;
61  }
double MaterialAccountingStep::radiationLengths ( void  ) const
inline
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 64 of file MaterialAccountingStep.h.

References HLT_25ns14e33_v1_cff::fraction, MessageLogger_cff::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().

Referenced by TrackingMaterialAnalyser::split().

64  {
65  // no check is done to ensure that 0 <= f <= 1 !
67  m_in.x() * fraction + m_out.x() * (1. - fraction),
68  m_in.y() * fraction + m_out.y() * (1. - fraction),
69  m_in.z() * fraction + m_out.z() * (1. - fraction)
70  );
71 
75  m_in,
76  limit );
77 
80  (1 - fraction) * m_energyLoss,
81  limit,
82  m_out );
83  return std::make_pair( part1, part2 );
84  }
T y() const
Definition: PV3DBase.h:63
T z() const
Definition: PV3DBase.h:64
T x() const
Definition: PV3DBase.h:62

Member Data Documentation

double MaterialAccountingStep::m_energyLoss
private
GlobalPoint MaterialAccountingStep::m_in
private

Definition at line 39 of file MaterialAccountingStep.h.

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

double MaterialAccountingStep::m_length
private
GlobalPoint MaterialAccountingStep::m_out
private

Definition at line 40 of file MaterialAccountingStep.h.

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

double MaterialAccountingStep::m_radiationLengths
private