forked from sPHENIX-Collaboration/coresoftware
/
PHG4SectorSubsystem.h
87 lines (68 loc) · 2.08 KB
/
PHG4SectorSubsystem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Tell emacs that this is a C++ source
// -*- C++ -*-.
#ifndef G4DETECTORS_PHG4SECTORSUBSYSTEM_H
#define G4DETECTORS_PHG4SECTORSUBSYSTEM_H
#include "PHG4SectorConstructor.h"
#include <g4main/PHG4Subsystem.h>
#include <string> // for string
class PHCompositeNode;
class PHG4Detector;
class PHG4DisplayAction;
class PHG4SectorDetector;
class PHG4SteppingAction;
class PHG4SectorSubsystem : public PHG4Subsystem
{
public:
//! constructor
PHG4SectorSubsystem(const std::string& name = "Sector");
//! destructor
~PHG4SectorSubsystem() override;
//! init
/*!
creates the detector_ object and place it on the node tree, under "DETECTORS" node (or whatever)
reates the stepping action and place it on the node tree, under "ACTIONS" node
creates relevant hit nodes that will be populated by the stepping action and stored in the output DST
*/
int Init(PHCompositeNode*) override;
//! event processing
/*!
get all relevant nodes from top nodes (namely hit list)
and pass that to the stepping action
*/
int process_event(PHCompositeNode*) override;
//! accessors (reimplemented)
PHG4Detector*
GetDetector(void) const override;
PHG4SteppingAction* GetSteppingAction(void) const override { return m_SteppingAction; }
PHG4DisplayAction* GetDisplayAction() const override { return m_DisplayAction; }
void
SuperDetector(const std::string& name)
{
superdetector = name;
}
//! geometry manager PHG4Sector::Sector_Geometry
PHG4Sector::Sector_Geometry&
get_geometry()
{
return geom;
}
//! geometry manager PHG4Sector::Sector_Geometry
void
set_geometry(const PHG4Sector::Sector_Geometry& g)
{
geom = g;
}
private:
//! detector geometry
/*! defives from PHG4Detector */
PHG4SectorDetector* m_Detector;
//! particle tracking "stepping" action
/*! derives from PHG4SteppingActions */
PHG4SteppingAction* m_SteppingAction;
//! display attribute setting
/*! derives from PHG4DisplayAction */
PHG4DisplayAction* m_DisplayAction;
std::string superdetector;
PHG4Sector::Sector_Geometry geom;
};
#endif