forked from sPHENIX-Collaboration/coresoftware
/
PHG4ConeSubsystem.h
99 lines (76 loc) · 2.81 KB
/
PHG4ConeSubsystem.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
88
89
90
91
92
93
94
95
96
97
98
99
// Tell emacs that this is a C++ source
// -*- C++ -*-.
#ifndef G4DETECTORS_PHG4CONESUBSYSTEM_H
#define G4DETECTORS_PHG4CONESUBSYSTEM_H
#include "PHG4DetectorSubsystem.h"
#include <array> // for array
#include <string> // for string
class PHCompositeNode;
class PHG4ConeDetector;
class PHG4Detector;
class PHG4DisplayAction;
class PHG4SteppingAction;
class PHG4ConeSubsystem : public PHG4DetectorSubsystem
{
public:
//! constructor
PHG4ConeSubsystem(const std::string& name = "CONE", const int layer = 0);
//! destructor
~PHG4ConeSubsystem(void) override;
//! init runwise stuff
/*!
creates the m_Detector object
creates the stepping action
creates relevant hit nodes that will be populated by the stepping action and stored in the output DST
*/
int InitRunSubsystem(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 set_color(const double red, const double green, const double blue, const double alpha = 1.)
{
m_ColorArray[0] = red;
m_ColorArray[1] = green;
m_ColorArray[2] = blue;
m_ColorArray[3] = alpha;
}
//!set inner and outter radius1
void SetR1(const double min, const double max);
//!set inner and outter radius2
void SetR2(const double min, const double max);
//! set length in Z
void SetZlength(const double a);
//! set phi offset and extention
void SetPhi(const double a, const double b);
//! set rmaximum and minimums according to the eta range
void Set_eta_range(double etaMin, double etaMax);
void SetPlaceZ(const double dbl);
void SetPlace(const double place_x, const double place_y, const double place_z);
void SetZRot(const double dbl);
void SetMaterial(const std::string& mat);
// this method is used to check if it can be used as mothervolume
// Subsystems which can be mothervolume need to implement this
// and return true
bool CanBeMotherSubsystem() const override { return true; }
private:
void SetDefaultParameters() override;
//! detector geometry
/*! derives from PHG4Detector */
PHG4ConeDetector* m_Detector = nullptr;
//! particle tracking "stepping" action
/*! derives from PHG4SteppingActions */
PHG4SteppingAction* m_SteppingAction = nullptr;
//! display attribute setting
/*! derives from PHG4DisplayAction */
PHG4DisplayAction* m_DisplayAction = nullptr;
//! Color setting if we want to override the default
std::array<double, 4> m_ColorArray;
};
#endif // G4DETECTORS_PHG4CONESUBSYSTEM_H