EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EicToyModelSubsystem.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EicToyModelSubsystem.cc
1 //____________________________________________________________________________..
2 //
3 // This is the interface to the framework. You only need to define the parameters
4 // you use for your detector in the SetDefaultParameters() method here
5 // The place to do this is marked by //implement your own here//
6 // The parameters have no units, they need to be converted in the
7 // EicToyModelDetector::ConstructMe() method
8 // but the convention is as mentioned cm and deg
9 //____________________________________________________________________________..
10 //
11 #include "EicToyModelSubsystem.h"
12 #include "EicToyModelDetector.h"
13 
14 using namespace std;
15 
16 //_______________________________________________________________________
18  : PHG4DetectorSubsystem(name)
19  , m_Detector(nullptr)
20 {
21  // call base class method which will set up parameter infrastructure
22  // and call our SetDefaultParameters() method
24 }
25 
26 //_______________________________________________________________________
28 {
29  // create detector
30  m_Detector = new EicToyModelDetector(this, topNode, GetParams(), Name());
33 
34  return 0;
35 }
36 
37 //_______________________________________________________________________
38 void EicToyModelSubsystem::Print(const string &what) const
39 {
40  if (m_Detector)
41  {
42  m_Detector->Print(what);
43  }
44  return;
45 }
46 
47 //_______________________________________________________________________
49 {
50  return m_Detector;
51 }
52 
53 //_______________________________________________________________________
55 {
56  // sizes are in cm
57  // angles are in deg
58  // units should be converted to G4 units when used
59  //implement your own here//
60  set_default_double_param("place_x", 0.);
61  set_default_double_param("place_y", 0.);
62  set_default_double_param("place_z", 0.);
63  set_default_double_param("rot_x", 0.);
64  set_default_double_param("rot_y", 0.);
65  set_default_double_param("rot_z", 0.);
66  set_default_double_param("size_x", 20.);
67  set_default_double_param("size_y", 20.);
68  set_default_double_param("size_z", 20.);
69 
70  set_default_string_param("EtmInputRootFile", "DefaultParameters-Invalid");
71 }