ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4TTLDetector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4TTLDetector.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4TTLDETECTOR_H
4 #define G4DETECTORS_PHG4TTLDETECTOR_H
5 
6 #include <g4main/PHG4Detector.h>
7 
8 #include <Geant4/G4Box.hh>
9 #include <Geant4/G4DisplacedSolid.hh> // for G4DisplacedSolid
10 #include <Geant4/G4ExceptionSeverity.hh> // for FatalException, JustWarning
11 #include <Geant4/G4IntersectionSolid.hh>
12 #include <Geant4/G4LogicalVolume.hh>
13 #include <Geant4/G4Material.hh>
14 #include <Geant4/G4MaterialTable.hh> // for G4MaterialTable
15 #include <Geant4/G4PVPlacement.hh>
16 #include <Geant4/G4PhysicalConstants.hh> // for pi
17 #include <Geant4/G4Sphere.hh>
18 #include <Geant4/G4String.hh> // for G4String
19 #include <Geant4/G4SystemOfUnits.hh> // for cm, um, perCent
20 #include <Geant4/G4ThreeVector.hh> // for G4ThreeVector
21 #include <Geant4/G4Transform3D.hh> // for G4Transform3D, G4RotateX3D
22 #include <Geant4/G4Tubs.hh>
23 #include <Geant4/G4Types.hh> // for G4int
24 #include <Geant4/globals.hh> // for G4Exception
25 
26 #include "PHG4TTLSteppingAction.h"
27 
28 #include <map>
29 #include <set>
30 #include <utility>
31 
32 #include <cassert>
33 #include <cmath>
34 #include <string>
35 #include <vector>
36 
37 class G4LogicalVolume;
38 class G4VPhysicalVolume;
39 class PHCompositeNode;
41 // class PHG4TTLSteppingAction;
42 class PHG4Subsystem;
43 class PHParameters;
44 
46 {
47  public:
49  PHG4TTLDetector(PHG4Subsystem *subsys, PHCompositeNode *Node, PHParameters *parameters, const std::string &dnam);
50 
52  ~PHG4TTLDetector(void) override
53  {
54  }
55 
57  void ConstructMe(G4LogicalVolume *world) override;
58 
60 
61  bool IsInSectorActive(G4VPhysicalVolume *physvol);
63 
64  void SuperDetector(const std::string &name) { superdetector = name; }
65  const std::string SuperDetector() const { return superdetector; }
67 
68  // void OverlapCheck(const bool chk = true) override
69  // {
70  // PHG4Detector::OverlapCheck(chk);
71  // // PHG4SectorConstructor::OverlapCheck(chk);
72  // }
73  void
74  OverlapCheck(bool check = true) override
75  {
76  overlapcheck_sector = check;
77  }
78  // void Verbosity(int v) override {m_Verbosity = v;}
79  // int Verbosity() const {return m_Verbosity;}
80 
81  public:
82  // properties
83 
84  std::string name_base;
85 
86  private:
90  std::string superdetector;
91  PHParameters *m_Params = nullptr;
92 
93  protected:
97 
98  G4VSolid *
100  const std::string &name, //
101  const double start_z, //
102  const double thickness, //
103  G4VSolid *SecConeBoundary_Det //
104  );
105  typedef std::map<G4String, G4LogicalVolume *> map_log_vol_t;
107 
108  G4PVPlacement *
109  RegisterPhysicalVolume(G4PVPlacement *v, const bool active = false);
110 
113 
114  typedef std::pair<G4String, G4int> phy_vol_idx_t;
115  typedef std::map<phy_vol_idx_t, G4PVPlacement *> map_phy_vol_t;
118 };
119 
120 #endif