本文整理汇总了C++中PHG4CylinderSubsystem::SetLengthViaRapidityCoverage方法的典型用法代码示例。如果您正苦于以下问题:C++ PHG4CylinderSubsystem::SetLengthViaRapidityCoverage方法的具体用法?C++ PHG4CylinderSubsystem::SetLengthViaRapidityCoverage怎么用?C++ PHG4CylinderSubsystem::SetLengthViaRapidityCoverage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHG4CylinderSubsystem
的用法示例。
在下文中一共展示了PHG4CylinderSubsystem::SetLengthViaRapidityCoverage方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: G4Setup
//.........这里部分代码省略.........
// 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);
flux_return_plus->SetLength(10.2);
flux_return_plus->SetPosition(0,0,335.9);
flux_return_plus->SetRadius(5.0);
flux_return_plus->SetLengthViaRapidityCoverage(false);
flux_return_plus->SetThickness(263.5-5.0);
flux_return_plus->SetMaterial("G4_Fe");
flux_return_plus->SetActive(false);
flux_return_plus->SuperDetector("FLUXRET_ETA_PLUS");
flux_return_plus->OverlapCheck(overlapcheck);
g4Reco->registerSubsystem(flux_return_plus);
PHG4CylinderSubsystem *flux_return_minus = new PHG4CylinderSubsystem("FWDFLUXRET", 0);
flux_return_minus->SetLength(10.2);
flux_return_minus->SetPosition(0,0,-335.9);
flux_return_minus->SetRadius(5.0);
flux_return_minus->SetLengthViaRapidityCoverage(false);
flux_return_minus->SetThickness(263.5-5.0);
flux_return_minus->SetMaterial("G4_Fe");
flux_return_minus->SetActive(false);
flux_return_minus->SuperDetector("FLUXRET_ETA_MINUS");
flux_return_minus->OverlapCheck(overlapcheck);
g4Reco->registerSubsystem(flux_return_minus);
//----------------------------------------
// BLACKHOLE
// swallow all particles coming out of the backend of sPHENIX
PHG4CylinderSubsystem *blackhole = new PHG4CylinderSubsystem("BH", 1);
blackhole->SetRadius(radius + 10); // add 10 cm
blackhole->SetLengthViaRapidityCoverage(false);
blackhole->SetLength(g4Reco->GetWorldSizeZ() - no_overlapp); // make it cover the world in length
blackhole->BlackHole();
blackhole->SetThickness(0.1); // it needs some thickness
blackhole->SetActive(); // always see what leaks out
blackhole->OverlapCheck(overlapcheck);
g4Reco->registerSubsystem(blackhole);
//----------------------------------------
// FORWARD BLACKHOLEs
// +Z
blackhole = new PHG4CylinderSubsystem("BH_FORWARD_PLUS", 1);
blackhole->SuperDetector("BH_FORWARD_PLUS");
blackhole->SetRadius(0); // add 10 cm
blackhole->SetLengthViaRapidityCoverage(false);
blackhole->SetLength(0.1); // make it cover the world in length
blackhole->SetPosition(0,0, g4Reco->GetWorldSizeZ()/2. - 0.1 - no_overlapp);
blackhole->BlackHole();
blackhole->SetThickness(radius - no_overlapp); // it needs some thickness
blackhole->SetActive(); // always see what leaks out
blackhole->OverlapCheck(overlapcheck);
g4Reco->registerSubsystem(blackhole);
blackhole = new PHG4CylinderSubsystem("BH_FORWARD_NEG", 1);
blackhole->SuperDetector("BH_FORWARD_NEG");
blackhole->SetRadius(0); // add 10 cm
blackhole->SetLengthViaRapidityCoverage(false);
blackhole->SetLength(0.1); // make it cover the world in length
blackhole->SetPosition(0,0, - g4Reco->GetWorldSizeZ()/2. +0.1 + no_overlapp);
blackhole->BlackHole();
blackhole->SetThickness(radius - no_overlapp); // it needs some thickness
blackhole->SetActive(); // always see what leaks out
blackhole->OverlapCheck(overlapcheck);
g4Reco->registerSubsystem(blackhole);
PHG4TruthSubsystem *truth = new PHG4TruthSubsystem();
g4Reco->registerSubsystem(truth);
se->registerSubsystem( g4Reco );
}
示例4: 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;
}
示例5: Tpc
//! 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)
//.........这里部分代码省略.........
示例6: Pipe
double Pipe(PHG4Reco* g4Reco,
double radius,
const int absorberactive = 0,
int verbosity = 0) {
double be_pipe_radius = 2.16; // 2.16 cm based on spec sheet
double be_pipe_thickness = 0.0760; // 760 um based on spec sheet
double be_pipe_length = 80.0; // +/- 40 cm
double al_pipe_radius = 2.16; // same as Be pipe
double al_pipe_thickness = 0.1600; // 1.6 mm based on spec
double al_pipe_length = 88.3; // extension beyond +/- 40 cm
if (radius > be_pipe_radius) {
cout << "inconsistency: radius: " << radius
<< " larger than pipe inner radius: " << be_pipe_radius << endl;
gSystem->Exit(-1);
}
gSystem->Load("libg4detectors.so");
gSystem->Load("libg4testbench.so");
// mid-rapidity beryillium pipe
PHG4CylinderSubsystem *cyl = new PHG4CylinderSubsystem("BE_PIPE", 0);
cyl->SetRadius(be_pipe_radius);
cyl->SetLengthViaRapidityCoverage(false);
cyl->SetLength(be_pipe_length);
cyl->SetMaterial("G4_Be");
cyl->SetThickness(be_pipe_thickness);
cyl->SuperDetector("PIPE");
if (absorberactive) cyl->SetActive();
g4Reco->registerSubsystem( cyl );
// north aluminum pipe
cyl = new PHG4CylinderSubsystem("N_AL_PIPE", 1);
cyl->SetPosition(0.0,0.0,0.5*be_pipe_length+0.5*al_pipe_length+no_overlapp);
cyl->SetRadius(al_pipe_radius);
cyl->SetLengthViaRapidityCoverage(false);
cyl->SetLength(al_pipe_length);
cyl->SetMaterial("G4_Al");
cyl->SetThickness(al_pipe_thickness);
cyl->SuperDetector("PIPE");
if (absorberactive) cyl->SetActive();
g4Reco->registerSubsystem( cyl );
// south aluminum pipe
cyl = new PHG4CylinderSubsystem("S_AL_PIPE", 2);
cyl->SetPosition(0.0,0.0,-0.5*be_pipe_length-0.5*al_pipe_length-no_overlapp);
cyl->SetRadius(al_pipe_radius);
cyl->SetLengthViaRapidityCoverage(false);
cyl->SetLength(al_pipe_length);
cyl->SetMaterial("G4_Al");
cyl->SetThickness(al_pipe_thickness);
cyl->SuperDetector("PIPE");
if (absorberactive) cyl->SetActive();
g4Reco->registerSubsystem( cyl );
radius = be_pipe_radius + be_pipe_thickness;
if (verbosity > 0) {
cout << "=========================== G4_Pipe.C::Pipe() =============================" << endl;
cout << " PIPE Material Description:" << endl;
cout << " inner radius = " << be_pipe_radius << " cm" << endl;
cout << " thickness = " << be_pipe_thickness << " cm" << endl;
cout << " outer radius = " << be_pipe_radius + be_pipe_thickness << " cm" << endl;
cout << " length = " << be_pipe_length << " cm" << endl;
cout << "===========================================================================" << endl;
}
radius += no_overlapp;
return radius;
}