DD4hep  01.18
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
MaterialScan.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 #ifndef DDREC_MATERIALSCAN_H
14 #define DDREC_MATERIALSCAN_H
15 
16 // Framework include files
17 #include "DDRec/MaterialManager.h"
18 
19 #include <memory>
20 
22 namespace dd4hep {
23 
25  class Detector;
26 
28  namespace rec {
29 
31 
52  class MaterialScan {
53  private:
54 
56  Detector& m_detector;
62  MaterialScan();
63 
64  public:
65 
67  MaterialScan(Detector& description);
68 
70  virtual ~MaterialScan();
71 
73  void setDetector(DetElement detector);
75  void setDetector(const char* detector);
76 
78  void setMaterial(const char* material);
80  void setMaterial(Material material);
81 
83  void setRegion(const char* region);
85  void setRegion(Region region);
86 
88  const MaterialVec& scan(double x0, double y0, double z0, double x1, double y1, double z1, double epsilon=1e-4) const;
89 
91  void print(const Vector3D& start, const Vector3D& end, double epsilon=1e-4) const;
92 
94  void print(double x0, double y0, double z0,
95  double x1, double y1, double z1,
96  double epsilon=1e-4) const;
97  };
98  } // End namespace rec
99 } // End namespace dd4hep
100 #endif // DDREC_MATERIALSCAN_H
void setRegion(const char *region)
Set a specific region to limit the scan (resets other selection criteria)
virtual ~MaterialScan()
Default destructor.
Simple three dimensional vector providing the components for cartesian, cylindrical and spherical coo...
Definition: Vector3D.h:32
MaterialScan()
Default constructor.
void setMaterial(const char *material)
Set a specific volume material to limit the scan (resets other selection criteria) ...
std::unique_ptr< MaterialManager > m_materialMgr
Material manager.
Definition: MaterialScan.h:58
std::set< const TGeoNode * > m_placements
Local cache: subdetector placements.
Definition: MaterialScan.h:60
STL class.
void print(const Vector3D &start, const Vector3D &end, double epsilon=1e-4) const
Scan along a line and print the materials traversed.
Detector & m_detector
Reference to detector setup.
Definition: MaterialScan.h:56
const MaterialVec & scan(double x0, double y0, double z0, double x1, double y1, double z1, double epsilon=1e-4) const
Scan along a line and store the matrials internally.
Class to perform material scans along a straight line.
Definition: MaterialScan.h:52
void setDetector(DetElement detector)
Set a specific detector volume to limit the scan (resets other selection criteria) ...