本文整理汇总了C++中PHG4CylinderSubsystem::SetPosition方法的典型用法代码示例。如果您正苦于以下问题:C++ PHG4CylinderSubsystem::SetPosition方法的具体用法?C++ PHG4CylinderSubsystem::SetPosition怎么用?C++ PHG4CylinderSubsystem::SetPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHG4CylinderSubsystem
的用法示例。
在下文中一共展示了PHG4CylinderSubsystem::SetPosition方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: G4Setup
//.........这里部分代码省略.........
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);
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
示例3: 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;
}