本文整理汇总了C++中PHG4CylinderSubsystem::Verbosity方法的典型用法代码示例。如果您正苦于以下问题:C++ PHG4CylinderSubsystem::Verbosity方法的具体用法?C++ PHG4CylinderSubsystem::Verbosity怎么用?C++ PHG4CylinderSubsystem::Verbosity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHG4CylinderSubsystem
的用法示例。
在下文中一共展示了PHG4CylinderSubsystem::Verbosity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Svtx
double Svtx(PHG4Reco* g4Reco, double radius,
const int absorberactive = 0,
int verbosity = 0)
{
if (n_maps_layer > 0)
{
bool maps_overlapcheck = false; // set to true if you want to check for overlaps
// MAPS inner barrel layers
//======================================================
double maps_layer_radius[3] = {24.61, 32.59, 39.88}; // mm - numbers from Walt 6 Aug 2018
// D. McGlinchey 6Aug2018 - type no longer is used, included here because I was too lazy to remove it from the code
int stave_type[3] = {0, 0, 0};
int staves_in_layer[3] = {12, 16, 20}; // Number of staves per layer in sPHENIX MVTX
double phi_tilt[3] = {0.300, 0.305, 0.300}; // radians - numbers from Walt 6 Aug 2018
for (int ilayer = 0; ilayer < n_maps_layer; ilayer++)
{
if (verbosity)
cout << "Create Maps layer " << ilayer << " with radius " << maps_layer_radius[ilayer] << " mm, stave type " << stave_type[ilayer]
<< " pixel size 30 x 30 microns "
<< " active pixel thickness 0.0018 microns" << endl;
PHG4MapsSubsystem* lyr = new PHG4MapsSubsystem("MAPS", ilayer, stave_type[ilayer]);
lyr->Verbosity(verbosity);
lyr->set_double_param("layer_nominal_radius", maps_layer_radius[ilayer]); // thickness in cm
lyr->set_int_param("N_staves", staves_in_layer[ilayer]); // uses fixed number of staves regardless of radius, if set. Otherwise, calculates optimum number of staves
// The cell size is used only during pixilization of sensor hits, but it is convemient to set it now because the geometry object needs it
lyr->set_double_param("pixel_x", 0.0030); // pitch in cm
lyr->set_double_param("pixel_z", 0.0030); // length in cm
lyr->set_double_param("pixel_thickness", 0.0018); // thickness in cm
lyr->set_double_param("phitilt", phi_tilt[ilayer]);
lyr->set_int_param("active", 1);
lyr->OverlapCheck(maps_overlapcheck);
//lyr->set_string_param("stave_geometry_file", "/phenix/hhj3/dcm07e/sPHENIX/macros/macros/g4simulations/mvtx_stave_v01.gdml");
lyr->set_string_param("stave_geometry_file", string(getenv("CALIBRATIONROOT")) + string("/Tracking/geometry/mvtx_stave_v01.gdml"));
g4Reco->registerSubsystem(lyr);
radius = maps_layer_radius[ilayer];
}
}
if (n_intt_layer > 0)
{
//-------------------
// INTT ladders
//-------------------
bool intt_overlapcheck = false; // set to true if you want to check for overlaps
// instantiate the Silicon tracker subsystem and register it
// We make one instance of PHG4TrackerSubsystem for all four layers of tracker
// dimensions are in mm, angles are in radians
// PHG4SiliconTrackerSubsystem creates the detetor layer using PHG4SiliconTrackerDetector
// and instantiates the appropriate PHG4SteppingAction
const double intt_radius_max = 140.; // including stagger radius (mm)
// The length of vpair is used to determine the number of layers
std::vector<std::pair<int, int>> vpair; // (sphxlayer, inttlayer)
for (int i = 0; i < n_intt_layer; i++)
{
// We want the sPHENIX layer numbers for the INTT to be from n_maps_layer to n_maps_layer+n_intt_layer - 1
vpair.push_back(std::make_pair(n_maps_layer + i, i)); // sphxlayer=n_maps_layer+i corresponding to inttlayer=i
if (verbosity) cout << "Create strip tracker layer " << vpair[i].second << " as sphenix layer " << vpair[i].first << endl;
}
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)
{
//.........这里部分代码省略.........
示例2: Svtx
double Svtx(PHG4Reco* g4Reco, double radius,
const int absorberactive = 0,
int verbosity = 0)
{
//---------------
// Load libraries
//---------------
gSystem->Load("libg4detectors.so");
gSystem->Load("libg4testbench.so");
//---------------------------------
// Inner Cylinder layers for pixels
//---------------------------------
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
//=======================================================================================================
double si_thickness[2] = {0.02, 0.02};
double svxrad[2] = {2.71, 4.63};
double support_thickness[2] = {0.0154, 0.0154};
double length[2] = {20., 20.};
// here is our silicon:
double inner_radius = radius;
for (int ilayer = Min_si_layer; ilayer < 2; ilayer++)
{
cyl = new PHG4CylinderSubsystem("SVTX", ilayer);
cyl->Verbosity(verbosity);
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->Verbosity(verbosity);
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 );
}
//--------------------------------
// Outer Silicon tracking subsytem
//--------------------------------
bool overlapcheck = false; // set to true if you want to check for overlaps
// instantiate the Silicon tracker subsystem and register it
// We make one instance of PHG4TrackerSubsystem per layer of tracker
// dimensions are in mm, angles are in radians
bool option_double_layer[5] = {false, true, false, true, false};
double layer_radius[5] = {85.0, 85.0, 400.0, 400.0, 800.0};
int N_strips_sensor_phi[5] = {256, 256, 512, 512, 1536};
double radius_stagger[5] = {10.0, 10.0, 10.0, 10.0, 10.0};
int N_staggers[5] = {4, 4, 4, 4, 2};
bool add_lower_roc[5] = {false, false, true, true, true};
double strip_tilt[5] = {0.0156, -0.0156, 0.0156, -0.0156, 0.0}; // radians, usually 1:64 tilt
//double strip_tilt[num_si_layers] = {0.0, 0.0, 0.0, 0.0, 0.0}; // radians, usually 1:64 tilt
//.........这里部分代码省略.........