Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4HcalPrototypeDetector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4HcalPrototypeDetector.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 // This is the header file for the hcal prototype
4 // created on 1/27/2014, Liang, HeXC
5 // Updated on 3/21/2014, Liang, HeXC
6 
7 #ifndef G4CALOPROTOTYPE_PHG4HCALPROTOTYPEDETECTOR_H
8 #define G4CALOPROTOTYPE_PHG4HCALPROTOTYPEDETECTOR_H
9 
10 #include <g4main/PHG4Detector.h>
11 
12 #include <Geant4/G4String.hh> // for G4String
13 #include <Geant4/G4SystemOfUnits.hh>
14 #include <Geant4/G4Types.hh>
15 
16 #include <string> // for string
17 
18 class G4Box;
19 class G4LogicalVolume;
20 class G4Material;
21 class G4PVPlacement;
22 class G4VPhysicalVolume;
23 class PHCompositeNode;
24 class PHG4Subsystem;
26 
28 {
29  public:
31  PHG4HcalPrototypeDetector(PHG4Subsystem* subsys, PHCompositeNode* Node, const std::string& dnam, const int lyr = 0);
32 
35  {
36  }
37 
39  virtual void ConstructMe(G4LogicalVolume* world);
40 
42 
45 
46  // We will keep these functions for now and deal with them later
47  void SetYRot(const G4double angle) { hcalBoxRotationAngle_z = angle * rad; }
48  void SetZRot(const G4double angle) { hcalBoxRotationAngle_y = angle * rad; }
49  void SetActive(const int i = 1) { active = i; }
50  void SetAbsorberActive(const int i = 1) { absorberactive = i; }
51  int IsActive() const { return active; }
53  const std::string SuperDetector() const { return superdetector; }
54  int get_Layer() const { return layer; }
55 
56  void BlackHole(const int i = 1) { blackhole = i; }
57  int IsBlackHole() const { return blackhole; }
58 
59  // These functions are copied from our standalone simulation
60  void SetMaterial(G4String);
61  void SetOuterHcalDPhi(G4double);
62  void SetInnerHcalDPhi(G4double);
63  void SetOuterPlateTiltAngle(G4double);
64  void SetInnerPlateTiltAngle(G4double);
65  void UpdateGeometry();
66 
67  private:
68  void CalculateGeometry();
69 
70  G4int nScint360;
71  G4int nHcal1Layers;
72  G4int nHcal2Layers;
73 
76  G4double hcal1TiltAngle;
77  G4double hcal2TiltAngle;
78  G4double hcal1DPhi;
79  G4double hcal2DPhi;
80 
81  G4double hcal1RadiusIn;
82  G4double hcal2RadiusIn;
84 
87  G4double hcal2Abs_dz;
88 
91  G4double hcal1Abs_dz;
92 
94 
96  G4LogicalVolume* logicWorld;
97 
98  G4LogicalVolume* logicHcalBox;
99  G4Box* solidHcalBox;
100  G4PVPlacement* physiHcalBox;
101 
104 
105  G4Material *world_mat, *steel, *scint_mat;
106 
107  void DefineMaterials();
109 
110  void SetTiltViaNcross(const int ncross);
111 
113 
114  int active;
116  int layer;
120 };
121 
122 #endif