Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4_TPC.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4_TPC.C
1 
2 void TPCInit() {}
3 
4 double TPC(PHG4Reco* g4Reco,
5  double radius,
6  const int absorberactive = 0,
7  int verbosity = 0) {
8 
9  overlappcheck = 1;
10  if (radius > 21-1.17) {
11  cout << "inconsistency: radius: " << radius
12  << " larger than tpc inner radius: " << 21-1.17 << endl;
13  gSystem->Exit(-1);
14  }
15 
16  gSystem->Load("libg4tpc.so");
17  gSystem->Load("libg4testbench.so");
18 
19  PHG4TPCSubsystem *tpc = new PHG4TPCSubsystem("TPC");
20  tpc->SetActive();
21  tpc->SuperDetector("TPC");
22  // tpc_set_double_param("gas_inner_radius",21.);
23  // tpc_set_double_param("gas_outer_radius",77.);
24  // tpc_set_double_param("place_x", 0.);
25  // tpc_set_double_param("place_y", 0.);
26  // tpc_set_double_param("place_z", 0.);
27  // tpc_set_double_param("rot_x", 0.);
28  // tpc_set_double_param("rot_y", 0.);
29  // tpc_set_double_param("rot_z", 0.);
30  // tpc_set_double_param("tpc_length",211.);
31 
32  // tpc_set_double_param("steplimits", NAN);
33 
34  // tpc_set_string_param("tpc_gas", "sPHENIX_TPC_Gas");
35 
36 // material budget:
37 // Cu (all layers): 0.5 oz cu per square foot, 1oz == 0.0347mm --> 0.5 oz == 0.00347cm/2.
38 // Kapton insulation 18 layers of * 5mil = 18*0.0127=0.2286
39 // 250 um FR4 (Substrate for Cu layers)
40 // HoneyComb (nomex) 1/2 inch=0.5*2.54 cm
41  // tpc_set_string_param("cage_layer_1_material","G4_Cu");
42  // tpc_set_double_param("cage_layer_1_thickness",0.00347/2.);
43 
44  // tpc_set_string_param("cage_layer_2_material","FR4");
45  // tpc_set_double_param("cage_layer_2_thickness",0.025);
46 
47  // tpc_set_string_param("cage_layer_3_material","NOMEX");
48  // tpc_set_double_param("cage_layer_3_thickness",0.5*2.54);
49 
50  // tpc_set_string_param("cage_layer_4_material","G4_Cu");
51  // tpc_set_double_param("cage_layer_4_thickness",0.00347/2.);
52 
53  // tpc_set_string_param("cage_layer_5_material","FR4");
54  // tpc_set_double_param("cage_layer_5_thickness",0.025);
55 
56  // tpc_set_string_param("cage_layer_6_material","G4_KAPTON");
57  // tpc_set_double_param("cage_layer_6_thickness",0.2286);
58 
59  // tpc_set_string_param("cage_layer_7_material","G4_Cu");
60  // tpc_set_double_param("cage_layer_7_thickness",0.00347/2.);
61 
62  // tpc_set_string_param("cage_layer_8_material","G4_KAPTON");
63  // tpc_set_double_param("cage_layer_8_thickness",0.05); // 50 um
64 
65  // tpc_set_string_param("cage_layer_9_material","G4_Cu");
66  // tpc_set_double_param("cage_layer_9_thickness",0.00347/2.);
67  if (absorberactive)
68  {
69  tpc->SetAbsorberActive();
70  }
71  tpc->OverlapCheck(overlapcheck);
72 
73  g4Reco->registerSubsystem( tpc );
74 
75  radius = 77.+1.17;
76 
77 
78  radius += no_overlapp;
79 
80  return radius;
81 }