本文整理汇总了C++中PHG4CylinderSubsystem类的典型用法代码示例。如果您正苦于以下问题:C++ PHG4CylinderSubsystem类的具体用法?C++ PHG4CylinderSubsystem怎么用?C++ PHG4CylinderSubsystem使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PHG4CylinderSubsystem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CEmc_Vis
//! for visualization purpose only
double
CEmc_Vis(PHG4Reco* g4Reco, double radius, const int crossings, const int absorberactive = 0)
{
double emc_inner_radius = 95.; // emc inner radius from engineering drawing
double cemcthickness = 12.7;
double emc_outer_radius = emc_inner_radius + cemcthickness; // outer radius
if (radius > emc_inner_radius) {
cout << "inconsistency: preshower radius+thickness: " << radius
<< " larger than emc inner radius: " << emc_inner_radius
<< endl;
gSystem->Exit(-1);
}
//---------------
// Load libraries
//---------------
gSystem->Load("libg4detectors.so");
gSystem->Load("libg4testbench.so");
// the radii are only to determined the thickness of the cemc
radius = emc_inner_radius;
int ilayer = Min_cemc_layer;
PHG4SpacalSubsystem *cemc;
cemc = new PHG4SpacalSubsystem("CEMC", ilayer);
cemc ->get_geom().set_radius(emc_inner_radius);
cemc ->get_geom().set_thickness(cemcthickness);
cemc ->get_geom().set_virualize_fiber(true);
cemc ->get_geom().set_construction_verbose(2);
cemc->SetActive();
cemc->SuperDetector("CEMC");
if (absorberactive) cemc->SetAbsorberActive();
cemc->OverlapCheck(overlapcheck);
g4Reco->registerSubsystem( cemc );
if (ilayer > Max_cemc_layer)
{
cout << "layer discrepancy, current layer " << ilayer
<< " max cemc layer: " << Max_cemc_layer << endl;
}
radius += cemcthickness;
radius += no_overlapp;
PHG4CylinderSubsystem *cyl = new PHG4CylinderSubsystem("EMCELECTRONICS", 0);
cyl->SetRadius(radius);
cyl->SetMaterial("G4_TEFLON"); // plastic
cyl->SetThickness(0.5);
if (absorberactive) cyl->SetActive();
g4Reco->registerSubsystem( cyl );
radius += 0.5;
radius += no_overlapp;
return radius;
}
示例2: HCalInner_SupportRing
//! A rough version of the inner HCal support ring, from Richie's CAD drawing. - Jin
void HCalInner_SupportRing(PHG4Reco* g4Reco,
const int absorberactive = 0) {
gSystem->Load("libg4detectors.so");
gSystem->Load("libg4testbench.so");
const double z_ring1 = (2025 + 2050) / 2. / 10.;
const double z_ring2 = (2150 + 2175) / 2. / 10.;
const double dz = 25. / 10.;
const double innerradius = 116.;
const double maxradius = 178.0 - 0.001; // avoid touching the outer HCal envelop volumne
const double z_rings[] =
{ -z_ring2, -z_ring1, z_ring1, z_ring2, 0, 0, 0, 0 };
PHG4CylinderSubsystem *cyl;
for (int i = 0; i < 4; i++)
{
cyl = new PHG4CylinderSubsystem("HCALIN_SPT_N1", 0);
cyl->SetPosition(0, 0, z_rings[i]);
cyl->SuperDetector("HCALIN_SPT");
cyl->SetRadius(innerradius);
cyl->SetLengthViaRapidityCoverage(false);
cyl->SetLength(dz);
cyl->SetMaterial("G4_Fe"); // use 1 radiation length Al for magnet thickness
cyl->SetThickness(maxradius - innerradius);
if (absorberactive)
cyl->SetActive();
g4Reco->registerSubsystem(cyl);
}
return;
}
示例3: HCalInner_SupportRing
//! A rough version of the inner HCal support ring, from Richie's CAD drawing. - Jin
void HCalInner_SupportRing(PHG4Reco* g4Reco,
const int absorberactive = 0) {
gSystem->Load("libg4detectors.so");
gSystem->Load("libg4testbench.so");
const double z_ring1 = (2025 + 2050) / 2. / 10.;
const double z_ring2 = (2150 + 2175) / 2. / 10.;
const double dz = 25. / 10.;
const double innerradius_sphenix = 116.;
const double innerradius_ephenix_hadronside = 138.;
const double maxradius = 178.0 - 0.001; // avoid touching the outer HCal envelop volumne
const double z_rings[] =
{ -z_ring2, -z_ring1, z_ring1, z_ring2 };
PHG4CylinderSubsystem *cyl;
for (int i = 0; i < 4; i++)
{
double innerradius = innerradius_sphenix;
if ( z_rings[i] > 0 && inner_hcal_eic == 1)
{
innerradius = innerradius_ephenix_hadronside;
}
cyl = new PHG4CylinderSubsystem("HCALIN_SPT_N1", i);
cyl->set_double_param("place_z",z_rings[i]);
cyl->SuperDetector("HCALIN_SPT");
cyl->set_double_param("radius",innerradius);
cyl->set_int_param("lengthviarapidity",0);
cyl->set_double_param("length",dz);
cyl->set_string_param("material","SS310");
cyl->set_double_param("thickness",maxradius - innerradius);
if (absorberactive)
{
cyl->SetActive();
}
g4Reco->registerSubsystem(cyl);
}
return;
}
示例4: Pipe
double Pipe(PHG4Reco* g4Reco,
double radius,
const int absorberactive = 0,
int verbosity = 0) {
double pipe_radius = 2.16; // 2.16 cm based on spec sheet
double pipe_thickness = 0.0760; // 760 um based on spec sheet
double pipe_length = g4Reco->GetWorldSizeZ() - no_overlapp; // entire volume
if (radius > pipe_radius) {
cout << "inconsistency: radius: " << radius
<< " larger than Pipe inner radius: " << pipe_radius << endl;
gSystem->Exit(-1);
}
gSystem->Load("libg4detectors.so");
gSystem->Load("libg4testbench.so");
PHG4CylinderSubsystem *cyl = new PHG4CylinderSubsystem("PIPE", 0);
cyl->SetRadius(pipe_radius);
cyl->SetLengthViaRapidityCoverage(false);
cyl->SetLength(pipe_length);
cyl->SetMaterial("G4_Be");
cyl->SetThickness(pipe_thickness);
cyl->SuperDetector("PIPE");
if (absorberactive) cyl->SetActive();
g4Reco->registerSubsystem( cyl );
radius = pipe_radius + pipe_thickness;
if (verbosity >= 0) {
cout << "=========================== G4_Pipe.C::Pipe() =============================" << endl;
cout << " PIPE Material Description:" << endl;
cout << " inner radius = " << pipe_radius << " cm" << endl;
cout << " thickness = " << pipe_thickness << " cm" << endl;
cout << " outer radius = " << pipe_radius + pipe_thickness << " cm" << endl;
cout << " length = " << pipe_length << " cm" << endl;
cout << "===========================================================================" << endl;
}
radius += no_overlapp;
return radius;
}
示例5: CEmc_1DProjectiveSpacal
//! EMCal setup macro - 1D azimuthal projective SPACAL
double
CEmc_1DProjectiveSpacal(PHG4Reco* g4Reco, double radius, const int crossings, const int absorberactive = 0)
{
double emc_inner_radius = 95.; // emc inner radius from engineering drawing
double cemcthickness = 12.7;
double emc_outer_radius = emc_inner_radius + cemcthickness; // outer radius
if (radius > emc_inner_radius) {
cout << "inconsistency: preshower radius+thickness: " << radius
<< " larger than emc inner radius: " << emc_inner_radius
<< endl;
gSystem->Exit(-1);
}
//---------------
// Load libraries
//---------------
gSystem->Load("libg4detectors.so");
gSystem->Load("libg4testbench.so");
// boundary check
if (radius> emc_inner_radius - 1.5 - no_overlapp)
{
cout <<"G4_CEmc_Spacal.C::CEmc() - expect radius < "<<emc_inner_radius - 1.5 - no_overlapp<<" to install SPACAL"<<endl;
exit(1);
}
radius = emc_inner_radius - 1.5 - no_overlapp;
// 1.5cm thick teflon as an approximation for EMCAl light collection + electronics (10% X0 total estimated)
PHG4CylinderSubsystem *cyl = new PHG4CylinderSubsystem("CEMC_ELECTRONICS", 0);
cyl->SuperDetector("CEMC_ELECTRONICS");
cyl->set_double_param("radius",radius);
cyl->set_string_param("material","G4_TEFLON");
cyl->set_double_param("thickness",1.5);
if (absorberactive) cyl->SetActive();
g4Reco->registerSubsystem( cyl );
radius += 1.5;
radius += no_overlapp;
int ilayer = Min_cemc_layer;
PHG4SpacalSubsystem *cemc;
cemc = new PHG4SpacalSubsystem("CEMC", ilayer);
cemc ->get_geom().set_radius(emc_inner_radius);
cemc ->get_geom().set_thickness(cemcthickness);
cemc ->get_geom().set_construction_verbose(1);
cemc->SetActive();
cemc->SuperDetector("CEMC");
if (absorberactive) cemc->SetAbsorberActive();
cemc->OverlapCheck(overlapcheck);
g4Reco->registerSubsystem( cemc );
if (ilayer > Max_cemc_layer)
{
cout << "layer discrepancy, current layer " << ilayer
<< " max cemc layer: " << Max_cemc_layer << endl;
}
radius += cemcthickness;
radius += no_overlapp;
// 0.5cm thick Stainless Steel as an approximation for EMCAl support system
cyl = new PHG4CylinderSubsystem("CEMC_SPT", 0);
cyl->SuperDetector("CEMC_SPT");
cyl->set_double_param("radius",radius);
cyl->set_string_param("material","SS310"); // SS310 Stainless Steel
cyl->set_double_param("thickness",0.5);
if (absorberactive)
cyl->SetActive();
g4Reco->registerSubsystem(cyl);
radius += 0.5;
radius += no_overlapp;
return radius;
}
示例6: CEmc_Proj
//! test for 2D projective SPACAL using 1D projective modules. For evaluation only
double
CEmc_Proj(PHG4Reco* g4Reco, double radius, const int crossings, const int absorberactive = 0)
{
double emc_inner_radius = 95.; // emc inner radius from engineering drawing
double cemcthickness = 12.9+1.5;
double emc_outer_radius = emc_inner_radius + cemcthickness; // outer radius
if (radius > emc_inner_radius) {
cout << "inconsistency: preshower radius+thickness: " << radius
<< " larger than emc inner radius: " << emc_inner_radius
<< endl;
gSystem->Exit(-1);
}
//---------------
// Load libraries
//---------------
gSystem->Load("libg4detectors.so");
gSystem->Load("libg4testbench.so");
cout <<"Get_Spacal_Tilt() = "<<Get_Spacal_Tilt()<<endl;
// the radii are only to determined the thickness of the cemc
//double emc_inner_radius = radius; // emc inner radius from engineering spreadsheet
// double cemcthickness = 12.9+1.5;
// double emc_outer_radius = emc_inner_radius + cemcthickness; // outer radius
radius = emc_outer_radius;
int ilayer = Min_cemc_layer;
PHG4SpacalSubsystem *cemc;
cemc = new PHG4SpacalSubsystem("CEMC", ilayer);
cemc ->get_geom().set_radius(emc_inner_radius);
cemc ->get_geom().set_thickness(cemcthickness);
cemc ->get_geom().set_construction_verbose(2);
cemc ->get_geom().set_config(PHG4CylinderGeom_Spacalv1::kProjective_PolarTaper);
cemc ->get_geom().set_azimuthal_tilt(Get_Spacal_Tilt());
// cemc ->get_geom().set_azimuthal_tilt(-2.3315/2./95*1.9);
// cemc ->get_geom().set_azimuthal_tilt(6.28/256*2);
// cemc ->get_geom().set_azimuthal_tilt(-6.28/256*4);
// cemc ->get_geom().set_azimuthal_seg_visible(true);
// cemc ->get_geom().set_virualize_fiber(false);
// cemc ->get_geom().set_assembly_spacing(0.001);
cemc ->get_geom().set_polar_taper_ratio(1.128);
// cemc ->get_geom().set_polar_taper_ratio(1.123);
// cemc ->get_geom().set_polar_taper_ratio(1.117);
// cemc ->get_geom().set_absorber_mat("G4_AIR");
// cemc ->get_geom().set_azimuthal_n_sec(256/2);
cemc->SetActive();
cemc->SuperDetector("CEMC");
if (absorberactive) cemc->SetAbsorberActive();
cemc->OverlapCheck(overlapcheck);
g4Reco->registerSubsystem( cemc );
if (ilayer > Max_cemc_layer)
{
cout << "layer discrepancy, current layer " << ilayer
<< " max cemc layer: " << Max_cemc_layer << endl;
}
radius += cemcthickness;
radius += no_overlapp;
PHG4CylinderSubsystem *cyl = new PHG4CylinderSubsystem("EMCELECTRONICS", 0);
cyl->set_double_param("radius",radius);
cyl->set_string_param("material","G4_TEFLON");
cyl->set_double_param("thickness",0.5);
if (absorberactive) cyl->SetActive();
g4Reco->registerSubsystem( cyl );
radius += 0.5;
radius += no_overlapp;
return radius;
}
示例7: CEmc_2DProjectiveSpacal
//! 2D full projective SPACAL
double
CEmc_2DProjectiveSpacal(PHG4Reco *g4Reco, double radius, const int crossings,
const int absorberactive = 0)
{
double emc_inner_radius = 92; // emc inner radius from engineering drawing
double cemcthickness = 24.00000 - no_overlapp;
//max radius is 116 cm;
double emc_outer_radius = emc_inner_radius + cemcthickness; // outer radius
assert(emc_outer_radius < 116);
if (radius > emc_inner_radius)
{
cout << "inconsistency: preshower radius+thickness: " << radius
<< " larger than emc inner radius: " << emc_inner_radius << endl;
gSystem->Exit(-1);
}
//---------------
// Load libraries
//---------------
gSystem->Load("libg4detectors.so");
// the radii are only to determined the thickness of the cemc
radius = emc_inner_radius;
//---------------
// Load libraries
//---------------
// 1.5cm thick teflon as an approximation for EMCAl light collection + electronics (10% X0 total estimated)
PHG4CylinderSubsystem *cyl = new PHG4CylinderSubsystem("CEMC_ELECTRONICS", 0);
cyl->set_double_param("radius", radius);
cyl->set_string_param("material", "G4_TEFLON");
cyl->set_double_param("thickness", 1.5 - no_overlapp);
cyl->SuperDetector("CEMC_ELECTRONICS");
cyl->OverlapCheck(overlapcheck);
if (absorberactive) cyl->SetActive();
g4Reco->registerSubsystem(cyl);
radius += 1.5;
cemcthickness -= 1.5 + no_overlapp;
// 0.5cm thick Stainless Steel as an approximation for EMCAl support system
cyl = new PHG4CylinderSubsystem("CEMC_SPT", 0);
cyl->SuperDetector("CEMC_SPT");
cyl->set_double_param("radius", radius + cemcthickness - 0.5);
cyl->set_string_param("material", "SS310"); // SS310 Stainless Steel
cyl->set_double_param("thickness", 0.5 - no_overlapp);
cyl->OverlapCheck(overlapcheck);
if (absorberactive)
cyl->SetActive();
g4Reco->registerSubsystem(cyl);
cemcthickness -= 0.5 + no_overlapp;
//---------------
// Load libraries
//---------------
int ilayer = 0;
PHG4SpacalSubsystem *cemc;
const bool use_2015_design = false;
if (use_2015_design)
{
cemc = new PHG4SpacalSubsystem("CEMC", ilayer);
cemc->set_int_param("config", PHG4CylinderGeom_Spacalv1::kFullProjective_2DTaper_SameLengthFiberPerTower);
cemc->set_double_param("radius", radius); // overwrite minimal radius
cemc->set_double_param("thickness", cemcthickness); // overwrite thickness
cemc->set_int_param("azimuthal_n_sec", 32);
// cemc->set_int_param("construction_verbose", 2);
cemc->SetActive();
cemc->SuperDetector("CEMC");
if (absorberactive)
cemc->SetAbsorberActive();
cemc->OverlapCheck(overlapcheck);
}
else
{
cemc = new PHG4SpacalSubsystem("CEMC", ilayer);
cemc->set_int_param("virualize_fiber", 0);
cemc->set_int_param("azimuthal_seg_visible", 1);
cemc->set_int_param("construction_verbose", 0);
cemc->Verbosity(0);
cemc->UseCalibFiles(PHG4DetectorSubsystem::xml);
cemc->SetCalibrationFileDir(string(getenv("CALIBRATIONROOT")) + string("/CEMC/Geometry_2017ProjTilted/"));
cemc->set_double_param("radius", radius); // overwrite minimal radius
cemc->set_double_param("thickness", cemcthickness); // overwrite thickness
cemc->SetActive();
cemc->SuperDetector("CEMC");
if (absorberactive)
//.........这里部分代码省略.........
示例8: CEmc
double
CEmc(PHG4Reco* g4Reco, double radius, const int crossings, const int absorberactive = 0)
{
if (radius > 100) {
cout << "inconsistency: radius: " << radius
<< " larger than ALICE CEMC inner radius: 100" << endl;
gSystem->Exit(-1);
}
radius = 100;
//---------------
// Load libraries
//---------------
gSystem->Load("libg4detectors.so");
gSystem->Load("libg4testbench.so");
double depth = 18*1.23; // 18 radlen, 1 radlen = 1.23 cm
double scintiwidth = 0.176;
double leadwidth = 0.144;
PHG4CylinderSubsystem *cemc;
for (int ilayer = Min_cemc_layer; ilayer <= Max_cemc_layer; ilayer++)
{
cemc = new PHG4CylinderSubsystem("ABSORBER_CEMC", ilayer);
cemc->SetRadius(radius);
cemc->SetMaterial("G4_Pb");
cemc->SetThickness(leadwidth);
cemc->SuperDetector("ABSORBER_CEMC");
if (absorberactive) cemc->SetActive();
cemc->OverlapCheck(overlapcheck);
g4Reco->registerSubsystem( cemc );
radius += leadwidth;
radius += no_overlapp;
cemc = new PHG4CylinderSubsystem("CEMC", ilayer);
cemc->SetRadius(radius);
cemc->SetMaterial("Scintillator");
cemc->SetThickness(scintiwidth);
cemc->SetActive();
cemc->SuperDetector("CEMC");
cemc->OverlapCheck(overlapcheck);
g4Reco->registerSubsystem( cemc );
radius += scintiwidth;
radius += no_overlapp;
}
PHG4CylinderSubsystem *cyl = new PHG4CylinderSubsystem("EMCELECTRONICS", 0);
cyl->SetRadius(radius);
cyl->SetMaterial("G4_TEFLON"); // plastic
cyl->SetThickness(0.5);
if (absorberactive) cyl->SetActive();
g4Reco->registerSubsystem( cyl );
radius += 0.5;
radius += no_overlapp;
return radius;
}
示例9: CEmc_2DProjectiveSpacal
//! 2D full projective SPACAL
double
CEmc_2DProjectiveSpacal(PHG4Reco* g4Reco, double radius, const int crossings,
const int absorberactive = 0)
{
double emc_inner_radius = 95.; // emc inner radius from engineering drawing
double cemcthickness = 21.00000 - no_overlapp;
double emc_outer_radius = emc_inner_radius + cemcthickness; // outer radius
if (radius > emc_inner_radius)
{
cout << "inconsistency: preshower radius+thickness: " << radius
<< " larger than emc inner radius: " << emc_inner_radius << endl;
gSystem->Exit(-1);
}
//---------------
// Load libraries
//---------------
gSystem->Load("libg4detectors.so");
// the radii are only to determined the thickness of the cemc
radius = emc_inner_radius;
//---------------
// Load libraries
//---------------
// 1.5cm thick teflon as an approximation for EMCAl light collection + electronics (10% X0 total estimated)
PHG4CylinderSubsystem *cyl = new PHG4CylinderSubsystem("CEMC_ELECTRONICS", 0);
cyl->set_double_param("radius",radius);
cyl->set_string_param("material","G4_TEFLON");
cyl->set_double_param("thickness",1.5- no_overlapp);
cyl->SuperDetector("CEMC_ELECTRONICS");
cyl->OverlapCheck(overlapcheck);
if (absorberactive) cyl->SetActive();
g4Reco->registerSubsystem( cyl );
radius += 1.5;
cemcthickness -= 1.5+no_overlapp;
// 0.5cm thick Stainless Steel as an approximation for EMCAl support system
cyl = new PHG4CylinderSubsystem("CEMC_SPT", 0);
cyl->SuperDetector("CEMC_SPT");
cyl->set_double_param("radius",radius +cemcthickness - 0.5 );
cyl->set_string_param("material","SS310"); // SS310 Stainless Steel
cyl->set_double_param("thickness",0.5 - no_overlapp);
cyl->OverlapCheck(overlapcheck);
if (absorberactive)
cyl->SetActive();
g4Reco->registerSubsystem(cyl);
cemcthickness -= 0.5+no_overlapp;
//---------------
// Load libraries
//---------------
int ilayer = Min_cemc_layer;
PHG4SpacalSubsystem *cemc;
cemc = new PHG4SpacalSubsystem("CEMC", ilayer);
cemc->get_geom().set_config(
PHG4CylinderGeom_Spacalv1::kFullProjective_2DTaper_SameLengthFiberPerTower);
// load from hard code map for now. Need to move to calibration file or database.
cemc->get_geom().load_demo_sector_tower_map3();
cemc->get_geom().set_radius(radius);
cemc->get_geom().set_thickness(cemcthickness);
cemc->get_geom().set_construction_verbose(1);
cemc->SetActive();
cemc->SuperDetector("CEMC");
if (absorberactive)
cemc->SetAbsorberActive();
cemc->OverlapCheck(overlapcheck);
g4Reco->registerSubsystem(cemc);
if (ilayer > Max_cemc_layer)
{
cout << "layer discrepancy, current layer " << ilayer
<< " max cemc layer: " << Max_cemc_layer << endl;
}
radius += cemcthickness;
radius += no_overlapp;
return radius;
}
示例10: Svtx
//.........这里部分代码省略.........
PHG4SiliconTrackerSubsystem* sitrack = new PHG4SiliconTrackerSubsystem("SILICON_TRACKER", vpair);
sitrack->Verbosity(verbosity);
sitrack->SetActive(1);
sitrack->OverlapCheck(intt_overlapcheck);
g4Reco->registerSubsystem(sitrack);
// Update the laddertype and ladder spacing configuration
for(int i=0;i<n_intt_layer;i++)
{
sitrack->set_int_param(i, "laddertype", laddertype[i]);
sitrack->set_int_param(i, "nladder", nladder[i]);
sitrack->set_double_param(i,"sensor_radius", sensor_radius[i]); // expecting cm
sitrack->set_double_param(i,"offsetphi",offsetphi[i]); // expecting degrees
}
// outer radius marker (translation back to cm)
radius = intt_radius_max * 0.1;
}
// int verbosity = 1;
// time projection chamber layers --------------------------------------------
// switch ONLY for backward compatibility with 40 layer hits files!
if (tpc_layers_40)
{
n_tpc_layer_inner = 8;
tpc_layer_thick_inner = 1.25;
tpc_layer_rphi_count_inner = 1152;
cout << "Using 8 inner_layers for backward comatibility" << endl;
}
PHG4CylinderSubsystem* cyl;
radius = inner_cage_radius;
double cage_length = 211.0; // From TPC group, gives eta = 1.1 at 78 cm
double n_rad_length_cage = 1.13e-02;
double cage_thickness = 28.6 * n_rad_length_cage; // Kapton X_0 = 28.6 cm // mocks up Kapton + carbon fiber structure
// inner field cage
cyl = new PHG4CylinderSubsystem("SVTXSUPPORT", n_maps_layer + n_intt_layer);
cyl->set_double_param("radius", radius);
cyl->set_int_param("lengthviarapidity", 0);
cyl->set_double_param("length", cage_length);
cyl->set_string_param("material", "G4_KAPTON");
cyl->set_double_param("thickness", cage_thickness);
cyl->SuperDetector("SVTXSUPPORT");
cyl->Verbosity(0);
g4Reco->registerSubsystem(cyl);
radius += cage_thickness;
double inner_readout_radius = 30.;
if (inner_readout_radius < radius) inner_readout_radius = radius;
string tpcgas = "sPHENIX_TPC_Gas"; // Ne(90%) CF4(10%) - defined in g4main/PHG4Reco.cc
// Layer of inert TPC gas from 20-30 cm
if (inner_readout_radius - radius > 0)
{
cyl = new PHG4CylinderSubsystem("SVTXSUPPORT", n_maps_layer + n_intt_layer + 1);
cyl->set_double_param("radius", radius);
cyl->set_int_param("lengthviarapidity", 0);
cyl->set_double_param("length", cage_length);
示例11: Magnet
double Magnet(PHG4Reco* g4Reco,
double radius,
const int crossings = 0,
const int absorberactive = 0,
int verbosity = 0) {
double magnet_inner_cryostat_wall_radius = 142;
double magnet_inner_cryostat_wall_thickness = 1;
double magnet_outer_cryostat_wall_radius = 174.5;
double magnet_outer_cryostat_wall_thickness = 2.5;
double magnet_coil_radius = 150.8;
double magnet_coil_thickness = 9.38;
double magnet_length = 379.;
double coil_length = 361.5;
if (radius > magnet_inner_cryostat_wall_radius) {
cout << "inconsistency: radius: " << radius
<< " larger than Magnet inner radius: " << magnet_inner_cryostat_wall_radius << endl;
gSystem->Exit(-1);
}
gSystem->Load("libg4detectors.so");
gSystem->Load("libg4testbench.so");
radius = magnet_inner_cryostat_wall_radius;
PHG4CylinderSubsystem *cyl = new PHG4CylinderSubsystem("MAGNET", 0);
cyl->SetRadius(magnet_inner_cryostat_wall_radius);
cyl->SetLengthViaRapidityCoverage(false);
cyl->SetLength(magnet_length);
cyl->SetMaterial("Al5083"); // use 1 radiation length Al for magnet thickness
cyl->SetThickness(magnet_inner_cryostat_wall_thickness);
cyl->SuperDetector("MAGNET");
if (absorberactive) cyl->SetActive();
g4Reco->registerSubsystem( cyl );
cyl = new PHG4CylinderSubsystem("MAGNET", 1);
cyl->SetRadius(magnet_coil_radius);
cyl->SetLengthViaRapidityCoverage(false);
cyl->SetLength(coil_length);
cyl->SetMaterial("Al5083"); // use 1 radiation length Al for magnet thickness
cyl->SetThickness(magnet_coil_thickness);
cyl->SuperDetector("MAGNET");
if (absorberactive) cyl->SetActive();
g4Reco->registerSubsystem( cyl );
cyl = new PHG4CylinderSubsystem("MAGNET", 2);
cyl->SetRadius(magnet_outer_cryostat_wall_radius);
cyl->SetLengthViaRapidityCoverage(false);
cyl->SetLength(magnet_length);
cyl->SetMaterial("Al5083"); // use 1 radiation length Al for magnet thickness
cyl->SetThickness(magnet_outer_cryostat_wall_thickness);
cyl->SuperDetector("MAGNET");
if (absorberactive) cyl->SetActive();
g4Reco->registerSubsystem( cyl );
radius = magnet_outer_cryostat_wall_radius + magnet_outer_cryostat_wall_thickness; // outside of magnet
if (verbosity > 0) {
cout << "========================= G4_Magnet.C::Magnet() ===========================" << endl;
cout << " MAGNET Material Description:" << endl;
cout << " inner radius = " << magnet_inner_cryostat_wall_radius << " cm" << endl;
cout << " outer radius = " << magnet_outer_cryostat_wall_radius + magnet_outer_cryostat_wall_thickness << " cm" << endl;
cout << " length = " << magnet_length << " cm" << endl;
cout << "===========================================================================" << endl;
}
radius += no_overlapp;
return radius;
}
示例12: G4Setup
int G4Setup(const int absorberactive = 0,
const string &field ="1.5",
const EDecayType decayType = TPythia6Decayer::kAll,
const bool do_svtx = true,
const bool do_preshower = false,
const bool do_cemc = true,
const bool do_hcalin = true,
const bool do_magnet = true,
const bool do_hcalout = true,
const bool do_pipe = true,
const bool do_bbc = true,
const bool do_FEMC = false,
const bool do_FHCAL = false,
const float magfield_rescale = 1.0) {
//---------------
// Load libraries
//---------------
gSystem->Load("libg4detectors.so");
gSystem->Load("libg4testbench.so");
//---------------
// Fun4All server
//---------------
Fun4AllServer *se = Fun4AllServer::instance();
PHG4Reco* g4Reco = new PHG4Reco();
g4Reco->set_rapidity_coverage(1.1); // according to drawings
if (decayType != TPythia6Decayer::kAll) {
g4Reco->set_force_decay(decayType);
}
double fieldstrength;
istringstream stringline(field);
stringline >> fieldstrength;
if (stringline.fail()) { // conversion to double fails -> we have a string
if (field.find("sPHENIX.root") != string::npos) {
g4Reco->set_field_map(field, 1);
} else {
g4Reco->set_field_map(field, 2);
}
} else {
g4Reco->set_field(fieldstrength); // use const soleniodal field
}
g4Reco->set_field_rescale(magfield_rescale);
double radius = 0.;
//----------------------------------------
// PIPE
if (do_pipe) radius = Pipe(g4Reco, radius, absorberactive);
//----------------------------------------
// SVTX
if (do_svtx) radius = Svtx(g4Reco, radius, absorberactive);
//----------------------------------------
// PRESHOWER
if (do_preshower) radius = PreShower(g4Reco, radius, absorberactive);
//----------------------------------------
// CEMC
//
if (do_cemc) radius = CEmc(g4Reco, radius, 8, absorberactive);
// if (do_cemc) radius = CEmc_Vis(g4Reco, radius, 8, absorberactive);// for visualization substructure of SPACAL, slow to render
//----------------------------------------
// HCALIN
if (do_hcalin) radius = HCalInner(g4Reco, radius, 4, absorberactive);
//----------------------------------------
// MAGNET
if (do_magnet) radius = Magnet(g4Reco, radius, 0, absorberactive);
//----------------------------------------
// HCALOUT
if (do_hcalout) radius = HCalOuter(g4Reco, radius, 4, absorberactive);
//----------------------------------------
// FEMC
if ( do_FEMC )
FEMCSetup(g4Reco, absorberactive);
//----------------------------------------
// FHCAL
if ( do_FHCAL )
FHCALSetup(g4Reco, absorberactive);
// sPHENIX forward flux return(s)
PHG4CylinderSubsystem *flux_return_plus = new PHG4CylinderSubsystem("FWDFLUXRET", 0);
//.........这里部分代码省略.........
示例13: Svtx
double Svtx(PHG4Reco* g4Reco, double radius,
const int absorberactive = 0,
int verbosity = 0) {
float svtx_inner_radius = 2.71;
if (radius > svtx_inner_radius) {
cout << "inconsistency: radius: " << radius
<< " larger than SVTX inner radius: " << svtx_inner_radius << endl;
gSystem->Exit(-1);
}
//---------------
// Load libraries
//---------------
gSystem->Load("libg4detectors.so");
gSystem->Load("libg4testbench.so");
PHG4CylinderSubsystem *cyl;
//======================================================================================================
// The thicknesses from Yasuyuki on June 12, 2014 are as follows:
// For Si 1mm = 1.07% X_0
// For Cu 1mm = 6.96% X_0
// The thickness of the tracking layers is:
// Pixels: 1.3% X_0 (0.21% sensor + 1.07% support) sensor = 200 mc Si, support = 154 mc Cu
// Stripixel: 5% X_0 (0.67% sensor + 4.3% support) sensor = 624 mc Si, support = 618 mc Cu
// Outer strips: 2% X_0 (conservative) (0.34% sensor + 1.66% support) sensor = 320 mc Si, support = 238 mc Cu
//=======================================================================================================
double si_thickness[7] = {0.02, 0.02, 0.032, 0.032, 0.032, 0.032, 0.032};
double svxrad[7] = {svtx_inner_radius, 4.63, 9.5, 10.5, 44.5, 45.5, 80.0}; // provides 98 MeV Upsilon resolution
// Thicknesses (in % X_0) of 1.3,1.3,2.7/2,2.7/2,2.0/2,2.0/2,2.0 - YA's most conservative case
double support_thickness[7] = {0.0154, 0.0154, 0.0338/2.0, 0.0338/2.0, 0.0238/2.0, 0.0238/2.0, 0.0238};
double length[7] = {20., 20., -1, -1., - 1., - 1., -1}; // -1 use eta coverage to determine length
// here is our silicon:
double inner_radius = radius;
for (int ilayer = Min_si_layer; ilayer <= Max_si_layer; ilayer++)
{
cyl = new PHG4CylinderSubsystem("SVTX", ilayer);
radius = svxrad[ilayer];
// protect against installing layer with radius < inner radius from argument
if (radius < inner_radius)
{
cout << "current radius " << radius << " smaller than inner radius "
<< inner_radius << endl;
gSystem->Exit(-1);
}
cyl->set_double_param("radius",radius);
if (length[ilayer] > 0)
{
cyl->set_int_param("lengthviarapidity",0);
cyl->set_double_param("length",length[ilayer]);
}
else
{
cyl->set_int_param("lengthviarapidity",1);
}
cyl->set_string_param("material","G4_Si");
cyl->set_double_param("thickness",si_thickness[ilayer]);
cyl->SetActive();
cyl->SuperDetector("SVTX");
g4Reco->registerSubsystem( cyl );
radius += si_thickness[ilayer] + no_overlapp;
cyl = new PHG4CylinderSubsystem("SVTXSUPPORT", ilayer);
cyl->set_double_param("radius",radius);
if (length[ilayer] > 0)
{
cyl->set_int_param("lengthviarapidity",0);
cyl->set_double_param("length",length[ilayer]);
}
else
{
cyl->set_int_param("lengthviarapidity",1);
}
cyl->set_string_param("material","G4_Cu");
cyl->set_double_param("thickness",support_thickness[ilayer]);
if (absorberactive) cyl->SetActive();
cyl->SuperDetector("SVTXSUPPORT");
g4Reco->registerSubsystem( cyl );
}
if (ilayer != (Max_si_layer+1)) // coming out of the loop, layer is layer+1
{
cout << "layer number mismatch for Max_si_layer, Max_si_layer "
<< Max_si_layer << " should be " << ilayer << endl;
gSystem->Exit(-1);
}
radius += support_thickness[Max_si_layer] + no_overlapp;
if (verbosity > 0) {
cout << "============================ G4_Svtx.C::Svtx() ============================" << endl;
cout << " SVTX Material Description:" << endl;
for (int ilayer = Min_si_layer; ilayer <= Max_si_layer; ilayer++) {
cout << " layer " << ilayer
<< " radius " << svxrad[ilayer]
<< " zlength " << length[ilayer]
<< " thickness (Si) " << si_thickness[ilayer]
//.........这里部分代码省略.........
示例14: Svtx
double Svtx(PHG4Reco* g4Reco, double radius,
const int absorberactive = 0,
int verbosity = 0) {
float svtx_inner_radius = 2.335; // based on the ALICE ITS (same beam pipe as ours)
if (radius > svtx_inner_radius) {
cout << "inconsistency: radius: " << radius
<< " larger than SVTX inner radius: " << svtx_inner_radius << endl;
gSystem->Exit(-1);
}
PHG4CylinderSubsystem *cyl;
// silicon layers ------------------------------------------------------------
// inner pixels are a copy of the MAPS ITS inner layers
// outer strips are from YA at the Santa Fe Tracking Workshop 10/27/2015
// see: https://indico.bnl.gov/conferenceDisplay.py?confId=1364
// The updated thicknesses from Yasuyuki are as follows:
// For Si 1mm = 1.07% X_0
// For Cu 1mm = 6.96% X_0
// The thickness of the tracking layers is:
// 0 MAPS: 0.3% X_0 (0.053% sensor + 0.247% support) sensor = 50 mc Si, support = 35 mc Cu
// 1 MAPS: 0.3% X_0 (0.053% sensor + 0.247% support) sensor = 50 mc Si, support = 35 mc Cu
// 2 MAPS: 0.3% X_0 (0.053% sensor + 0.247% support) sensor = 50 mc Si, support = 35 mc Cu
double si_thickness[3] = {0.0050, 0.0050, 0.0050};
double svxrad[3] = {svtx_inner_radius, 3.132, 3.904};
double support_thickness[3] = {0.0035, 0.0035, 0.0035};
double length[3] = {27., 27., 27.};
for (int ilayer=0;ilayer<n_svx_layer;++ilayer) {
cyl = new PHG4CylinderSubsystem("SVTX", ilayer);
radius = svxrad[ilayer];
cyl->SetRadius(radius);
cyl->SetLength( length[ilayer] );
cyl->SetMaterial("G4_Si");
cyl->SetThickness( si_thickness[ilayer] );
cyl->SetActive();
cyl->SuperDetector("SVTX");
g4Reco->registerSubsystem( cyl );
radius += si_thickness[ilayer] + no_overlapp;
cyl = new PHG4CylinderSubsystem("SVTXSUPPORT", ilayer);
cyl->SetRadius(radius);
cyl->SetLength( length[ilayer] );
cyl->SetMaterial("G4_Cu");
cyl->SetThickness( support_thickness[ilayer] );
cyl->SuperDetector("SVTXSUPPORT");
g4Reco->registerSubsystem( cyl );
}
// time projection chamber layers --------------------------------------------
double inner_cage_radius = 30.;
string tpcgas = "G4_Ar";
radius = inner_cage_radius;
double n_rad_length_cage = 1.0e-02;
double cage_length = 400.;
double cage_thickness = 1.43 * n_rad_length_cage;
cyl = new PHG4CylinderSubsystem("SVTXSUPPORT", 3);
cyl->SetRadius(radius);
cyl->SetLength(cage_length);
cyl->SetMaterial("G4_Cu");
cyl->SetThickness( cage_thickness ); // Cu X_0 = 1.43 cm
cyl->SuperDetector("SVTXSUPPORT");
g4Reco->registerSubsystem( cyl );
radius += cage_thickness;
double outer_radius = 80.;
int npoints = Max_si_layer - n_svx_layer;
double delta_radius = ( outer_radius - cage_thickness - radius )/( (double)npoints );
for(int ilayer=n_svx_layer;ilayer<(2+npoints);++ilayer) {
cyl = new PHG4CylinderSubsystem("SVTX", ilayer);
cyl->SetRadius(radius);
cyl->SetLength( cage_length );
cyl->SetMaterial(tpcgas.c_str());
cyl->SetThickness( delta_radius - 0.01 );
cyl->SetActive();
cyl->SuperDetector("SVTX");
g4Reco->registerSubsystem( cyl );
radius += delta_radius;
}
cyl = new PHG4CylinderSubsystem("SVTXSUPPORT", 2+npoints);
cyl->SetRadius(radius);
cyl->SetLength(cage_length);
cyl->SetMaterial("G4_Cu");
cyl->SetThickness( cage_thickness ); // Cu X_0 = 1.43 cm
cyl->SuperDetector("SVTXSUPPORT");
g4Reco->registerSubsystem( cyl );
//.........这里部分代码省略.........
示例15: G4Setup
//! Jin Huang <[email protected]> : Fully tuned for ePHENIX LOI setup
void
G4Setup(const int absorberactive = 0, const float field = -1.)
{
//---------------
// Load libraries
//---------------
gSystem->Load("libg4detectors.so");
gSystem->Load("libg4testbench.so");
//---------------
// Fun4All server
//---------------
Fun4AllServer *se = Fun4AllServer::instance();
PHG4Reco* g4Reco = new PHG4Reco();
g4Reco->set_rapidity_coverage(1.1); // temperary value assigned by ePHENIX LOI
if (field < 0)
{
const char * map =
"/direct/phenix+WWW/p/draft/jinhuang/sPHENIX/ePHENIX/BABAR_V11_GridOut_ePHENIX.SF7.root";
cout << "G4Setup - Using ePHENIX LOI field map ";
cout << map;
cout << endl;
g4Reco->set_field_map(map, 2);
}
else
{
g4Reco->set_field(field); // use const soleniodal field
}
/////////////////////////////////////////////////
// Beam Pipe
/////////////////////////////////////////////////
PHG4CylinderSubsystem *beamcyl;
beamcyl = new PHG4CylinderSubsystem("BEAMPIPE", 1);
beamcyl->SetRadius(2.0);
beamcyl->SetThickness(0.1);
beamcyl->SetLengthViaRapidityCoverage(false);
beamcyl->SetLength(g4Reco->GetWorldSizeZ() - 10.); //g4Reco->GetWorldSizeZ()); // go through our entire world in z directions
beamcyl->SetMaterial("G4_Be");
// beamcyl->SetPosition(0, 0, 250);
// if (absorberactive) beamcyl->SetActive();
beamcyl->OverlapCheck(overlapcheck);
g4Reco->registerSubsystem(beamcyl);
/////////////////////////////////////////////////
// Central magnet and detectors
/////////////////////////////////////////////////
PHG4CylinderSubsystem *cyl;
double magnet_inner_radius = 140;
double magnet_outer_radius = 173;
double magnet_thickness = magnet_outer_radius - magnet_inner_radius;
double emc_inner_radius = 95.; // emc inner radius from engineering spreadsheet
double hcal_in_inner_radius = magnet_outer_radius + 15.; // inner hcal inner radius from engineering spreadsheet
double hcal_out_inner_radius = hcal_in_inner_radius + 30.; // inner hcal inner radius from engineering spreadsheet
double preshower_inner_radius = 90.;
double tpc_inner_radius = 15.;
double tpc_outer_radius = 80.;
double tpc_thickness = tpc_outer_radius - tpc_inner_radius;
int ilayer = -1; // just to declare this varialbe outside of detector setups
double radius = tpc_inner_radius;
radius = Tpc(g4Reco, radius, tpc_thickness, absorberactive);
//
radius = G4_DIRC(g4Reco);
if (radius > emc_inner_radius - 4.)
{
cout << "inconsistency: " << radius << " larger than emc inner radius: "
<< emc_inner_radius - 4. << endl;
gSystem->Exit(-1);
}
// inside CEmc now...
//radius = emc_inner_radius - 4.;
//cyl = new PHG4CylinderSubsystem("EMCELECTRONICS", 0);
//cyl->SetRadius(radius);
//cyl->SetMaterial("G4_TEFLON"); // plastic
//cyl->SetThickness(0.5);
//if (absorberactive)
// cyl->SetActive();
//cyl->OverlapCheck(overlapcheck);
//g4Reco->registerSubsystem(cyl);
radius = emc_inner_radius;
int ncross = 4;
radius = CEmc(g4Reco, radius, ncross, absorberactive);
double saveradius = radius + no_overlapp;
// double al_radlen = 8.897;
// radius = magnet_inner_radius + magnet_thickness/2. - al_radlen/2.;
// magnet (1 radlen Al = 8.897cm - pdg)
//.........这里部分代码省略.........