ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4Subsystem.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4Subsystem.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4MAIN_PHG4SUBSYSTEM_H
4 #define G4MAIN_PHG4SUBSYSTEM_H
5 
7 #include <fun4all/SubsysReco.h>
8 
9 #include <iostream>
10 #include <string>
11 
12 class G4LogicalVolume;
14 class PHCompositeNode;
15 class PHG4Detector;
16 class PHG4DisplayAction;
17 class PHG4EventAction;
18 class PHG4StackingAction;
19 class PHG4SteppingAction;
20 class PHG4TrackingAction;
21 
22 class PHG4Subsystem : public SubsysReco
23 {
24  public:
26  PHG4Subsystem(const std::string &name = "Generic Subsystem")
27  : SubsysReco(name)
28  {
29  }
30 
32  ~PHG4Subsystem(void) override {}
33 
36  {
38  }
39 
41  virtual PHG4Detector *GetDetector(void) const
42  {
43  return nullptr;
44  }
45 
47  virtual PHG4EventAction *GetEventAction(void) const
48  {
49  return nullptr;
50  }
51 
54  {
55  return nullptr;
56  }
57 
60  {
61  return nullptr;
62  }
63 
66  {
67  return nullptr;
68  }
69 
70  virtual PHG4StackingAction *GetStackingAction() const {return nullptr;}
71 
72  void OverlapCheck(const bool chk = true) { overlapcheck = chk; }
73 
74  bool CheckOverlap() const { return overlapcheck; }
75 
76  void SetMotherSubsystem(PHG4Subsystem *subsys);
78 
81 
82 // this method is used to check if it can be used as mothervolume
83 // Subsystems which can be mothervolume need to implement this
84 // and return true
85  virtual bool CanBeMotherSubsystem() const {return false;}
86 
87 //
88  virtual void AddProcesses(G4ParticleDefinition */*particle*/) {}
89 
90 // define materials used in detector
91  virtual void DefineMaterials() {}
92 
93  private:
96  bool overlapcheck = false;
97 };
98 
99 #endif // G4MAIN_PHG4SUBSYSTEM_H