99 cout <<
"Gas Choice: TPC_Gas::Ne2K_100" << endl;
111 cout <<
"Gas Choice: TPC_Gas::Ne2K_400" << endl;
124 cout <<
"Gas Choice: TPC_Gas::NeCF4_100" << endl;
136 cout <<
"Gas Choice: TPC_Gas::NeCF4_300" << endl;
148 cout <<
"Gas Choice: TPC_Gas::NeCF4_400" << endl;
160 cout <<
"Gas Choice: TPC_Gas::ByHand" << endl;
173 cout <<
"Gas Choice Undefined...using TPC_Gas::NeCF4_400" << endl;
204 const int absorberactive = 0,
209 bool maps_overlapcheck =
false;
225 double maps_layer_radius[3] = {23.4, 31.5, 39.3};
230 int stave_type[3] = {0, 0, 0};
231 int staves_in_layer[3] = {12, 16, 20};
232 double phi_tilt[3] = {0.304, 0.304, 0.304};
237 cout <<
"Create Maps layer " << ilayer <<
" with radius " << maps_layer_radius[ilayer] <<
" mm, stave type " << stave_type[ilayer]
238 <<
" pixel size 30 x 30 microns "
239 <<
" active pixel thickness 0.0018 microns" << endl;
241 PHG4MapsSubsystem* lyr =
new PHG4MapsSubsystem(
"MAPS", ilayer, stave_type[ilayer]);
244 lyr->set_double_param(
"layer_nominal_radius", maps_layer_radius[ilayer]);
245 lyr->set_int_param(
"N_staves", staves_in_layer[ilayer]);
248 lyr->set_double_param(
"pixel_x", 0.0030);
249 lyr->set_double_param(
"pixel_z", 0.0030);
250 lyr->set_double_param(
"pixel_thickness", 0.0018);
251 lyr->set_double_param(
"phitilt", phi_tilt[ilayer]);
253 lyr->set_int_param(
"active", 1);
254 lyr->OverlapCheck(maps_overlapcheck);
256 lyr->set_string_param(
"stave_geometry_file",
257 string(getenv(
"CALIBRATIONROOT")) +
string(
"/Tracking/geometry/ALICE_ITS_tgeo.gdml"));
261 radius = maps_layer_radius[ilayer];
271 bool intt_overlapcheck =
false;
282 std::vector<std::pair<int, int>> vpair;
287 if (
verbosity) cout <<
"Create strip tracker layer " << vpair[
i].second <<
" as sphenix layer " << vpair[
i].first << endl;
289 PHG4SiliconTrackerSubsystem* sitrack =
new PHG4SiliconTrackerSubsystem(
"SILICON_TRACKER", vpair);
291 sitrack->SetActive(1);
292 sitrack->OverlapCheck(intt_overlapcheck);
296 radius = intt_radius_max * 0.1;
305 double cage_length = 211.0;
306 double n_rad_length_cage = 1.13e-02;
307 double cage_thickness = 28.6 * n_rad_length_cage;
320 radius += cage_thickness;
323 if (inner_readout_radius < radius) inner_readout_radius = radius;
325 string tpcgas =
"sPHENIX_TPC_Gas";
328 if (inner_readout_radius - radius > 0)
351 cout <<
"Create TPC gas layer " << ilayer <<
" with inner radius " << radius <<
" cm "
372 cout <<
"Create TPC gas layer " << ilayer <<
" with inner radius " << radius <<
" cm "
393 cout <<
"Create TPC gas layer " << ilayer <<
" with inner radius " << radius <<
" cm "
419 radius += cage_thickness;
433 gSystem->Load(
"libfun4all.so");
434 gSystem->Load(
"libg4detectors.so");
450 cout <<
" TPC Longitudinal Diffusion: " <<
TPC_Long_Diffusion <<
" cm/SQRT(cm)" << endl;
451 cout <<
" TPC dE/dx: " <<
TPC_dEdx <<
" keV/cm" << endl;
452 cout <<
" TPC N Primary: " <<
TPC_NPri <<
" electrons/cm" << endl;
453 cout <<
" TPC N Total: " <<
TPC_NTot <<
" electrons/cm" << endl;
455 cout <<
" TPC ADC Clock: " <<
TPCADCClock <<
" nsec" << endl;
456 cout <<
" TPC ADC Rate: " << 1000.0 /
TPCADCClock <<
" MHZ" << endl;
459 cout <<
" TPC z cell " <<
tpc_cell_z <<
" cm" << endl;
460 cout <<
" TPC Smear R-Phi " <<
TPC_SmearRPhi <<
" cm" << endl;
461 cout <<
" TPC Smear Z " <<
TPC_SmearZ <<
" cm" << endl;
467 PHG4MapsCellReco* maps_cells =
new PHG4MapsCellReco(
"MAPS");
471 maps_cells->set_timing_window(ilayer, -2000, 2000);
479 PHG4SiliconTrackerCellReco* reco =
new PHG4SiliconTrackerCellReco(
"SILICON_TRACKER");
494 const bool do_tpc_distortion =
true;
495 PHG4TPCSpaceChargeDistortion* tpc_distortion = NULL;
496 if (do_tpc_distortion)
500 cout <<
"Svtx_Cells - Fatal Error - TPC distortion required that "
501 "inner_cage_radius is either 20 or 30 cm."
506 string TPC_distortion_file =
507 string(getenv(
"CALIBRATIONROOT")) +
508 Form(
"/Tracking/TPC/SpaceChargeDistortion/TPCCAGE_20_78_211_2.root");
509 PHG4TPCSpaceChargeDistortion* tpc_distortion =
510 new PHG4TPCSpaceChargeDistortion(TPC_distortion_file);
516 svtx_cells->Detector(
"SVTX");
517 svtx_cells->setDistortion(tpc_distortion);
535 svtx_cells->setDiffusionT(0.0120);
536 svtx_cells->setDiffusionL(0.0120);
537 svtx_cells->setSmearRPhi(0.09);
538 svtx_cells->setSmearZ(0.06);
541 svtx_cells->setHalfLength(105.5);
543 svtx_cells->Verbosity(0);
555 int counter_layer = 0;
559 if (counter_layer > 0)
562 svtx_cells->cellsize(
i, tpc_cell_rphi,
tpc_cell_z);
563 svtx_cells->set_timing_window(
i, -tpc_timing_window, +tpc_timing_window);
565 cout <<
"TPC cells inner: layer " <<
i <<
" center radius " << radius_layer <<
" tpc_cell_rphi " << tpc_cell_rphi <<
" tpc_cell_z " <<
tpc_cell_z << endl;
575 if (counter_layer > 0)
578 svtx_cells->cellsize(
i, tpc_cell_rphi,
tpc_cell_z);
579 svtx_cells->set_timing_window(
i, -tpc_timing_window, +tpc_timing_window);
581 cout <<
"TPC cells mid: layer " <<
i <<
" center radius " << radius_layer <<
" tpc_cell_rphi " << tpc_cell_rphi <<
" tpc_cell_z " <<
tpc_cell_z << endl;
591 if (counter_layer > 0)
594 svtx_cells->cellsize(
i, tpc_cell_rphi,
tpc_cell_z);
595 svtx_cells->set_timing_window(
i, -tpc_timing_window, +tpc_timing_window);
597 cout <<
"TPC cells outer: layer " <<
i <<
" center radius " << radius_layer <<
" tpc_cell_rphi " << tpc_cell_rphi <<
" tpc_cell_z " <<
tpc_cell_z << endl;
612 gSystem->Load(
"libfun4all.so");
613 gSystem->Load(
"libg4hough.so");
624 PHG4SvtxDigitizer* digi =
new PHG4SvtxDigitizer();
628 digi->set_adc_scale(
i, 255, 0.4
e-6);
634 std::vector<double> userrange;
636 userrange.push_back(0.05);
637 userrange.push_back(0.10);
638 userrange.push_back(0.15);
639 userrange.push_back(0.20);
640 userrange.push_back(0.25);
641 userrange.push_back(0.30);
642 userrange.push_back(0.35);
643 userrange.push_back(0.40);
645 PHG4SiliconTrackerDigitizer* digiintt =
new PHG4SiliconTrackerDigitizer();
649 digiintt->set_adc_scale(n_maps_layer +
i, userrange);
657 digi->set_adc_scale(
i, 30000, 1.0);
666 PHG4SvtxDeadArea* deadarea =
new PHG4SvtxDeadArea();
672 deadarea->set_hit_efficiency(
i, 1.0);
677 deadarea->set_hit_efficiency(
i, 1.0);
685 PHG4SvtxThresholds* thresholds =
new PHG4SvtxThresholds();
693 thresholds->set_threshold(
i, 0.1);
698 thresholds->set_threshold(
i, 0.1);
699 thresholds->set_use_thickness_mip(
i,
true);
708 PHG4SvtxClusterizer* clusterizer =
new PHG4SvtxClusterizer(
"PHG4SvtxClusterizer", 0, n_maps_layer + n_intt_layer - 1);
712 clusterizer->set_threshold(0.1);
716 clusterizer->set_z_clustering(
i,
false);
721 PHG4TPCClusterizer* tpcclusterizer =
new PHG4TPCClusterizer();
722 tpcclusterizer->Verbosity(0);
723 tpcclusterizer->setRangeLayers(n_maps_layer + n_intt_layer, Max_si_layer);
726 tpcclusterizer->setEnergyCut(12 );
727 tpcclusterizer->setFitWindowSigmas(0.0160, 0.0160);
728 tpcclusterizer->setFitWindowMax(4 , 6 );
729 tpcclusterizer->setFitEnergyThreshold(0.05 );
734 tpcclusterizer->setEnergyCut(15 );
735 tpcclusterizer->setFitWindowSigmas(0.0150, 0.0160);
736 tpcclusterizer->setFitWindowMax(4 , 3 );
737 tpcclusterizer->setFitEnergyThreshold(0.05 );
742 const bool use_kalman_pat_rec =
true;
743 if (use_kalman_pat_rec)
749 PHG4KalmanPatRec* kalman_pat_rec =
new PHG4KalmanPatRec(
"PHG4KalmanPatRec", n_maps_layer, n_intt_layer,
n_gas_layer);
750 kalman_pat_rec->Verbosity(0);
758 PHG4TruthPatRec* pat_rec =
new PHG4TruthPatRec();
766 PHG4TrackKalmanFitter* kalman =
new PHG4TrackKalmanFitter();
767 kalman->Verbosity(0);
769 kalman->set_fit_primary_tracks(
true);
775 PHG4GenFitTrackProjection* projection =
new PHG4GenFitTrackProjection();
794 <<
"Warning: G4_Svtx_Reco() was moved to G4_Svtx.C and renamed to Svtx_Reco(), please update macros"
795 <<
"\033[0m" << endl;
807 gSystem->Load(
"libfun4all.so");
808 gSystem->Load(
"libg4detectors.so");
809 gSystem->Load(
"libg4hough.so");
810 gSystem->Load(
"libg4eval.so");
823 eval =
new SvtxEvaluator(
"SVTXEVALUATOR", outputfile.c_str());
837 evalp =
new SvtxEvaluator(
"SVTXEVALUATOR",
string(outputfile.c_str()) +
"_primary_eval.root",
"PrimaryTrackMap");