forked from sPHENIX-Collaboration/coresoftware
/
PHG4SpacalSubsystem.h
81 lines (63 loc) · 2.1 KB
/
PHG4SpacalSubsystem.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
// Tell emacs that this is a C++ source
// -*- C++ -*-.
/*!
* \file ${file_name}
* \brief
* \author Jin Huang <jhuang@bnl.gov>
* \version $$Revision: 1.2 $$
* \date $$Date: 2014/08/12 03:49:12 $$
*/
#ifndef G4DETECTORS_PHG4SPACALSUBSYSTEM_H
#define G4DETECTORS_PHG4SPACALSUBSYSTEM_H
#include "PHG4DetectorSubsystem.h"
#include <string> // for string
class PHCompositeNode;
class PHG4Detector;
class PHG4DisplayAction;
class PHG4SpacalDetector;
class PHG4SteppingAction;
class PHG4SpacalSubsystem : public PHG4DetectorSubsystem
{
public:
//! constructor
PHG4SpacalSubsystem(const std::string &name = "PHG4SpacalSubsystem",
const int layer = 0);
//! destructor
~PHG4SpacalSubsystem() override;
//! init
/*!
called during InitRun (the original InitRun does common setup and calls this one)
creates the detector object
ceates 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() const override;
PHG4SteppingAction *GetSteppingAction() const override { return steppingAction_; }
PHG4DisplayAction *GetDisplayAction() const override { return m_DisplayAction; }
void
Print(const std::string &what = "ALL") const override;
void CosmicSetup(const int i) { m_CosmicSetupFlag = i; }
int CosmicSetup() const { return m_CosmicSetupFlag; }
private:
void SetDefaultParameters() override;
// SpacalGeom_t _geom;
//! detector geometry
/*! defives from PHG4Detector */
PHG4SpacalDetector *detector_ = nullptr;
//! particle tracking "stepping" action
/*! derives from PHG4SteppingActions */
PHG4SteppingAction *steppingAction_ = nullptr;
//! display attribute setting
/*! derives from PHG4DisplayAction */
PHG4DisplayAction *m_DisplayAction = nullptr;
int m_CosmicSetupFlag = 0;
};
#endif