1 #ifndef MACRO_G4MICROMEGAS_C
2 #define MACRO_G4MICROMEGAS_C
30 namespace G4MICROMEGAS
54 G4INTT::n_intt_layer = 0;
58 G4TPC::n_gas_layer = 0;
70 mm->set_double_param(
"mm_length", 220);
82 static constexpr
double radius = 82;
83 static constexpr
double length = 210;
84 static constexpr
int nsectors = 12;
85 static constexpr
double tile_length = 50;
86 static constexpr
double tile_width = 25;
93 std::cout <<
"Micromegas_Cells - Tiles configuration: CONFIG_MINIMAL" << std::endl;
94 static constexpr
double phi0 =
M_PI * (0.5 + 1. / nsectors);
95 reco->set_tiles({{{phi0, 0, tile_width /
radius, tile_length}}});
102 std::cout <<
"Micromegas_Cells - Tiles configuration: CONFIG_PHI_ONE_RING" << std::endl;
104 for (
int i = 0; i < nsectors; ++i)
106 tiles.emplace_back(2. *
M_PI * (0.5 + i) / nsectors, 0, tile_width / radius, tile_length);
108 reco->set_tiles(tiles);
115 std::cout <<
"Micromegas_Cells - Tiles configuration: CONFIG_Z_ONE_SECTOR" << std::endl;
117 static constexpr
double phi0 =
M_PI * (0.5 + 1. / nsectors);
118 static constexpr
int ntiles = 4;
119 for (
int i = 0; i < ntiles; ++i)
121 tiles.emplace_back(phi0, length * ((0.5 + i) / ntiles - 0.5), tile_width / radius, tile_length);
123 reco->set_tiles(tiles);
129 std::cout <<
"Micromegas_Cells - Tiles configuration: CONFIG_BASELINE" << std::endl;
133 static constexpr
double phi0 =
M_PI * (0.5 + 1. / nsectors);
134 static constexpr
int ntiles_z = 4;
135 for (
int i = 0; i < ntiles_z; ++i)
137 tiles.emplace_back(phi0, length * ((0.5 + i) / ntiles_z - 0.5), tile_width / radius, tile_length);
141 static constexpr
double zoffset = 7;
142 for (
int i = 1; i < nsectors; ++i)
144 const double phi = phi0 + 2.*
M_PI*i/nsectors;
145 tiles.emplace_back( phi, length*(1.5/4-0.5) - zoffset, tile_width/radius, tile_length );
146 tiles.emplace_back( phi, length*(2.5/4-0.5) + zoffset, tile_width/radius, tile_length );
148 reco->set_tiles(tiles);
154 std::cout <<
"Micromegas_Cells - Tiles configuration: CONFIG_MAXIMAL" << std::endl;
158 static constexpr
int ntiles_z = 4;
159 for (
int iphi = 0; iphi < nsectors; ++iphi)
161 const double phi = 2. *
M_PI * (0.5 + iphi) / nsectors;
162 for (
int iz = 0; iz < ntiles_z; ++iz)
164 tiles.emplace_back(phi, length * ((0.5 + iz) / ntiles_z - 0.5), tile_width / radius, tile_length);
167 reco->set_tiles(tiles);
172 se->registerSubsystem(reco);