EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4_dRICH.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4_dRICH.C
1 
8 #ifndef MACRO_G4dRICH_C
9 #define MACRO_G4dRICH_C
10 
11 #include <GlobalVariables.C>
12 
15 
16 #include <g4main/PHG4Reco.h>
17 
18 R__LOAD_LIBRARY(libg4detectors.so)
19 
20 namespace Enable
21 {
22  bool RICH = false;
23  bool RICH_OVERLAPCHECK = false;
24 } // namespace Enable
25 
26 void RICHInit()
27 {
30 }
31 
33 //Grzegorz Kalicy <gkalicy@jlab.org>
34 //- it starts 180 cm from IP
35 //- radius of aerogel part starts at 110 cm at rises up to 120cm over 20 cm of length.
36 //- at 175 cm from IP it rapidly grows radially to radius 210cm at stays constant like a cylinder until end at 280cm from the IP
37 void RICHSetup(PHG4Reco* g4Reco)
38 {
39  bool OverlapCheck = Enable::OVERLAPCHECK || Enable::RICH_OVERLAPCHECK;
40 
41  double z = 185;
42  double dz = 0;
43 
44  dz = 20;
45  PHG4ConeSubsystem* coneAeroGel = new PHG4ConeSubsystem("dRICHconeAeroGel", 0);
46  coneAeroGel->SetR1(11, 110);
47  coneAeroGel->SetR2(11, 120);
48  coneAeroGel->SetZlength(dz * 0.5);
49  coneAeroGel->SetPlaceZ(z + dz * 0.5);
50  coneAeroGel->set_string_param("material", "ePHENIX_AeroGel");
51  coneAeroGel->set_color(0.5, 0.5, 0.8);
52  coneAeroGel->SetActive();
53  coneAeroGel->SuperDetector("RICH");
54  coneAeroGel->OverlapCheck(OverlapCheck);
55  g4Reco->registerSubsystem(coneAeroGel);
56 
57  z += dz;
58  dz = 5;
59  PHG4ConeSubsystem* coneGas = new PHG4ConeSubsystem("dRICHconeGas", 1);
60  coneGas->SetR1(11, 120);
61  coneGas->SetR2(11, 170); // <- reduce from 210cm to avoid overlap with the HCal
62  coneGas->SetZlength(dz * 0.5);
63  coneGas->SetPlaceZ(z + dz * 0.5);
64  coneGas->set_string_param("material", "C4F10");
65  coneGas->set_color(0.5, 0.5, 0.5);
66  coneGas->SetActive();
67  coneGas->SuperDetector("RICH");
68  coneGas->OverlapCheck(OverlapCheck);
69  g4Reco->registerSubsystem(coneGas);
70 
71  z += dz;
72  dz = 75;
73  coneGas = new PHG4ConeSubsystem("dRICHconeGas", 2);
74  coneGas->SetR1(11, 170);
75  coneGas->SetR2(15, 170);
76  coneGas->SetZlength(dz * 0.5);
77  coneGas->SetPlaceZ(z + dz * 0.5);
78  coneGas->set_string_param("material", "C4F10");
79  coneGas->set_color(0.5, 0.5, 0.5);
80  coneGas->SetActive();
81  coneGas->SuperDetector("RICH");
82  coneGas->OverlapCheck(OverlapCheck);
83  g4Reco->registerSubsystem(coneGas);
84 
85  z += dz;
86 
87 
88 // if (TRACKING::FastKalmanFilter)
89 // {
90 // // project to an reference plane at z=170 cm
91 // TRACKING::FastKalmanFilter-> add_zplane_state("RICH", 185);
92 // TRACKING::ProjectionNames.insert("RICH");
93 // }
94 
95 }
96 #endif