CMS 3D CMS Logo

MaterialAccountingDetector.h
Go to the documentation of this file.
1 #ifndef MaterialAccountingDetector_h
2 #define MaterialAccountingDetector_h
3 
4 #include <iostream>
5 #include <sstream>
6 #include <string>
7 #include <vector>
8 #include <cmath>
9 
10 // CMSSW
13 
14 // struct to keep material accounting and geometrical informations on a per-detector basis, along a track
19 
20 public:
23 
24  void clear(void) {
26  m_curvilinearOut = 0.;
27  m_cosThetaIn = 0.;
28  m_cosThetaOut = 0.;
30  }
31 
32  const GlobalPoint& position() const { return m_position; }
33 
34  const MaterialAccountingStep& material() const { return m_accounting; }
35 
36  // step holds the length and material infos for a step
37  // begin and end are the curviliniear coordinates
38  void account(const MaterialAccountingStep& step, double begin, double end) {
39  if (end <= m_curvilinearIn)
40  // step before detector
42  else if (begin >= m_curvilinearOut)
43  // step after detector
45  else
46  // step inside detector
48  }
49 
50 private:
51  GlobalPoint m_position; // roughly the center of the detector
52  double m_curvilinearIn; // beginning of detector coordinate along the track
53  double m_curvilinearOut; // end of detector coordinate along the track
54  double m_cosThetaIn;
55  double m_cosThetaOut;
57 };
58 
59 #endif // MaterialAccountingDetector_h
MaterialAccountingDetector::m_cosThetaOut
double m_cosThetaOut
Definition: MaterialAccountingDetector.h:55
MaterialAccountingStep.h
step
step
Definition: StallMonitor.cc:94
MaterialAccountingDetector::m_cosThetaIn
double m_cosThetaIn
Definition: MaterialAccountingDetector.h:54
MaterialAccountingDetector::m_curvilinearIn
double m_curvilinearIn
Definition: MaterialAccountingDetector.h:52
MaterialAccountingDetector::m_curvilinearOut
double m_curvilinearOut
Definition: MaterialAccountingDetector.h:53
MaterialAccountingDetector::position
const GlobalPoint & position() const
Definition: MaterialAccountingDetector.h:32
MaterialAccountingDetector
Definition: MaterialAccountingDetector.h:15
mps_fire.end
end
Definition: mps_fire.py:242
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
MaterialAccountingDetector::m_accounting
MaterialAccountingStep m_accounting
Definition: MaterialAccountingDetector.h:56
Point3DBase< float, GlobalTag >
MaterialAccountingDetector::MaterialAccountingDetector
MaterialAccountingDetector(void)
Definition: MaterialAccountingDetector.h:21
MaterialAccountingTrack
Definition: MaterialAccountingTrack.h:10
MaterialAccountingDetector::material
const MaterialAccountingStep & material() const
Definition: MaterialAccountingDetector.h:34
MaterialAccountingDetector::clear
void clear(void)
Definition: MaterialAccountingDetector.h:24
TrackingMaterialAnalyser
Definition: TrackingMaterialAnalyser.h:16
MaterialAccountingDetector::account
void account(const MaterialAccountingStep &step, double begin, double end)
Definition: MaterialAccountingDetector.h:38
MaterialAccountingStep
Definition: MaterialAccountingStep.h:9
DD4hep_TrackingMaterialAnalyser
Definition: DD4hep_TrackingMaterialAnalyser.h:16
MaterialAccountingDetector::m_position
GlobalPoint m_position
Definition: MaterialAccountingDetector.h:51
GlobalPoint.h
MaterialAccountingStep::clear
void clear(void)
Definition: MaterialAccountingStep.h:16