diff --git a/include/analysis.hh b/include/analysis.hh index cd77c8a..a31d2cf 100644 --- a/include/analysis.hh +++ b/include/analysis.hh @@ -23,7 +23,7 @@ #include #include -#include +#include namespace MATHUSLA { namespace MU { diff --git a/include/geometry/Box.hh b/include/geometry/Box.hh index 1d9b2de..8e2459a 100644 --- a/include/geometry/Box.hh +++ b/include/geometry/Box.hh @@ -87,6 +87,7 @@ public: static bool SaveAll; static void WritePreData(); + static void SaveInfo(std::string & prefix); }; } /* namespace Box */ ////////////////////////////////////////////////////////////////////////// diff --git a/include/geometry/Construction.hh b/include/geometry/Construction.hh index 995a2ea..d9ed6d1 100644 --- a/include/geometry/Construction.hh +++ b/include/geometry/Construction.hh @@ -62,6 +62,8 @@ public: static void SetDetector(const std::string& detector); static void SetSaveOption(const bool save_option, const bool cut_save_option); + + static void SaveInfo(std::string& prefix); static const std::string& GetDetectorName(); static bool IsDetectorDataPerEvent(); diff --git a/src/action/RunAction.cc b/src/action/RunAction.cc index 43ca57b..84a936e 100644 --- a/src/action/RunAction.cc +++ b/src/action/RunAction.cc @@ -125,6 +125,8 @@ void RunAction::BeginOfRunAction(const G4Run* run) { Construction::Builder::GetDetectorDataKeys(), Construction::Builder::GetDetectorDataKeyTypes()); +Construction::Builder::SaveInfo(_prefix); + if (!G4Threading::IsWorkerThread()) std::cout << "\n\n"; } diff --git a/src/geometry/Construction.cc b/src/geometry/Construction.cc index 4a5470a..38d7594 100644 --- a/src/geometry/Construction.cc +++ b/src/geometry/Construction.cc @@ -284,6 +284,15 @@ void Builder::SetSaveOption(bool save_option, bool cut_save_option) { } //---------------------------------------------------------------------------------------------- +//__Save some information in a txt file____________________________________________________________ +void Builder::SaveInfo(std::string & prefix){ + if (_detector == "Flat") {;} + else if (_detector == "Box") { + Box::Detector::SaveInfo(prefix); + } +} +//---------------------------------------------------------------------------------------------- + //__Get Current Detector Name___________________________________________________________________ const std::string& Builder::GetDetectorName() { return _detector; diff --git a/src/geometry/box/Box.cc b/src/geometry/box/Box.cc index 33c483c..80818c0 100644 --- a/src/geometry/box/Box.cc +++ b/src/geometry/box/Box.cc @@ -16,7 +16,11 @@ #include "TTree.h" #include "MuonDataController.hh" +#include +#include +#include +#define UNUSED(x) (void)(x) using dimension = double; namespace MATHUSLA { namespace MU { @@ -82,7 +86,7 @@ G4ThreadLocal Tracking::HitCollection* _hit_collection; constexpr int scintillators_per_layer{400}; constexpr int NMODULES{100}; -constexpr int n_top_layers{5}; +constexpr int n_top_layers{6}; constexpr auto x_edge_length = 99.0*m; constexpr auto y_edge_length = 99.0*m; constexpr auto x_displacement = 70.0*m; @@ -100,10 +104,11 @@ constexpr auto steel_height = 0.03*m; constexpr auto air_gap = 30*m; -constexpr auto scintillator_casing_thickness = 0.005*m; +constexpr auto scintillator_casing_thickness = 0.003*m; -constexpr auto layer_spacing = 1.0*m; -constexpr auto layer_count = 7UL; +constexpr auto layer_spacing = 0.8*m; +constexpr auto layer_spacing_top = 0.8*m; // Top layers have different spacing +constexpr auto layer_count = 8UL; constexpr auto module_x_edge_length = 9.0*m; constexpr auto module_y_edge_length = 9.0*m; @@ -115,35 +120,53 @@ constexpr auto x_edge_increase = 2*full_layer_height + 4*wall_gap; constexpr auto layer_w_case = full_layer_height; -constexpr auto full_module_height = (25.0*m - 3.0*layer_w_case - 2.0*layer_spacing) + 5.0*layer_w_case + 4.0*layer_spacing; +constexpr auto full_module_height = (25.0*m) + 6.0*layer_w_case + 5.0*layer_spacing_top; constexpr auto scintillator_z_position = 0.00; constexpr auto wall_height = 20*m; -constexpr int NBEAMLAYERS = 7; +constexpr int NBEAMLAYERS = 8; constexpr auto beam_x_edge_length = 0.10*m; constexpr auto beam_y_edge_length = 0.10*m; constexpr auto beam_thickness = 0.02*m; -constexpr auto full_detector_height = full_module_height + steel_height + 3.0*layer_w_case + 2.0*layer_spacing; +constexpr auto full_detector_height = full_module_height + steel_height + 2.0*layer_w_case + 1.0*layer_spacing; constexpr auto half_detector_height = 0.5L * full_detector_height; -constexpr double layer_z_displacement[7] = {-0.5*full_module_height + (20.0*m - 3.0*layer_w_case - 2.0*layer_spacing) + 0.5*layer_w_case, - -0.5*full_module_height + (20.0*m - 3.0*layer_w_case - 2.0*layer_spacing) + layer_spacing + 1.5*layer_w_case, - -0.5*full_module_height + (25.0*m - 3.0*layer_w_case - 2.0*layer_spacing) + 0.5*layer_w_case, - -0.5*full_module_height + (25.0*m - 3.0*layer_w_case - 2.0*layer_spacing) + layer_spacing + 1.5*layer_w_case, - -0.5*full_module_height + (25.0*m - 3.0*layer_w_case - 2.0*layer_spacing) + 2*layer_spacing + 2.5*layer_w_case, - -0.5*full_module_height + (25.0*m - 3.0*layer_w_case - 2.0*layer_spacing) + 3*layer_spacing + 3.5*layer_w_case, - -0.5*full_module_height + (25.0*m - 3.0*layer_w_case - 2.0*layer_spacing) + 4*layer_spacing + 4.5*layer_w_case}; - -constexpr double module_beam_heights[7] = {20.0*m - 3*layer_w_case - 2*layer_spacing, - layer_spacing, - 5.0*m - 2*layer_w_case - layer_spacing, - layer_spacing, +constexpr double layer_z_displacement[8] = {-0.5*full_module_height + (25.0*m -5.0*m - layer_spacing - 2*layer_w_case) + 0.5*layer_w_case, + -0.5*full_module_height + (25.0*m -5.0*m - layer_spacing - 2*layer_w_case) + layer_spacing + 1.5*layer_w_case, + -0.5*full_module_height + (25.0*m ) + 0.5*layer_w_case, + -0.5*full_module_height + (25.0*m ) + layer_spacing_top + 1.5*layer_w_case, + -0.5*full_module_height + (25.0*m ) + 2*layer_spacing_top + 2.5*layer_w_case, + -0.5*full_module_height + (25.0*m ) + 3*layer_spacing_top + 3.5*layer_w_case, + -0.5*full_module_height + (25.0*m ) + 4*layer_spacing_top + 4.5*layer_w_case, + -0.5*full_module_height + (25.0*m ) + 5*layer_spacing_top + 5.5*layer_w_case}; + +// The z distance from the TOP of the floor layer to the BOTTOM of the middle layer +constexpr double floor_z_top = 25.0*m -5.0*m - layer_spacing - 2*layer_w_case; +// The z coordinates of the BOTTOM of all layers in the world +constexpr double layer_z_world[10] = {floor_z_top +layer_spacing+2.*layer_w_case, + floor_z_top +layer_w_case, + -(layer_z_displacement[0]+0.5*full_module_height-floor_z_top-0.5*layer_w_case), + -(layer_z_displacement[1]+0.5*full_module_height-floor_z_top-0.5*layer_w_case), + -(layer_z_displacement[2]+0.5*full_module_height-floor_z_top-0.5*layer_w_case), + -(layer_z_displacement[3]+0.5*full_module_height-floor_z_top-0.5*layer_w_case), + -(layer_z_displacement[4]+0.5*full_module_height-floor_z_top-0.5*layer_w_case), + -(layer_z_displacement[5]+0.5*full_module_height-floor_z_top-0.5*layer_w_case), + -(layer_z_displacement[6]+0.5*full_module_height-floor_z_top-0.5*layer_w_case), + -(layer_z_displacement[7]+0.5*full_module_height-floor_z_top-0.5*layer_w_case) +}; + + +constexpr double module_beam_heights[8] = {floor_z_top, layer_spacing, - layer_spacing, - layer_spacing}; + 5.0*m, + layer_spacing_top, + layer_spacing_top, + layer_spacing_top, + layer_spacing_top, + layer_spacing_top}; // constexpr double module_beam_z_pos[9] = {-0.50*full_module_height + 0.50*module_beam_heights[0] + layer_w_case, // -0.50*full_module_height + 2*layer_w_case + layer_spacing + 0.50*module_beam_heights[1], @@ -155,13 +178,14 @@ constexpr double module_beam_heights[7] = {20.0*m - 3*layer_w_case - 2*layer_spa // -0.50*full_module_height + 25.0*m + 3*layer_w_case + 2*layer_spacing + 0.50*module_beam_heights[7], // -0.50*full_module_height + 25.0*m + 4*layer_w_case + 3*layer_spacing + 0.50*module_beam_heights[8]}; -constexpr double module_beam_z_pos[7] = {-0.50*full_module_height + 0.50*module_beam_heights[0], - -0.50*full_module_height + (20.0*m - 3.0*layer_w_case - 2.0*layer_spacing) + layer_w_case + 0.50*module_beam_heights[1], - -0.50*full_module_height + (20.0*m - 3.0*layer_w_case - 2.0*layer_spacing) + 2*layer_w_case + layer_spacing + 0.50*module_beam_heights[2], - -0.50*full_module_height + (25.0*m - 3.0*layer_w_case - 2.0*layer_spacing) + layer_w_case + 0.50*module_beam_heights[3], - -0.50*full_module_height + (25.0*m - 3.0*layer_w_case - 2.0*layer_spacing) + 2*layer_w_case + layer_spacing + 0.50*module_beam_heights[4], - -0.50*full_module_height + (25.0*m - 3.0*layer_w_case - 2.0*layer_spacing) + 3*layer_w_case + 2*layer_spacing + 0.50*module_beam_heights[5], - -0.50*full_module_height + (25.0*m - 3.0*layer_w_case - 2.0*layer_spacing) + 4*layer_w_case + 3*layer_spacing + 0.50*module_beam_heights[6]}; +constexpr double module_beam_z_pos[8] = {-0.50*full_module_height + 0.50*module_beam_heights[0], + -0.50*full_module_height + floor_z_top + layer_w_case + 0.50*module_beam_heights[1], + -0.50*full_module_height + floor_z_top + 2*layer_w_case + layer_spacing + 0.50*module_beam_heights[2], + -0.50*full_module_height + 25.0*m + layer_w_case + 0.50*module_beam_heights[3], + -0.50*full_module_height + 25.0*m + 2*layer_w_case + 1*layer_spacing_top + 0.50*module_beam_heights[4], + -0.50*full_module_height + 25.0*m + 3*layer_w_case + 2*layer_spacing_top + 0.50*module_beam_heights[5], + -0.50*full_module_height + 25.0*m + 4*layer_w_case + 3*layer_spacing_top + 0.50*module_beam_heights[6], + -0.50*full_module_height + 25.0*m + 5*layer_w_case + 4*layer_spacing_top + 0.50*module_beam_heights[7]}; @@ -211,9 +235,41 @@ Detector::Detector() : G4VSensitiveDetector("MATHUSLA/MU/Box") { collectionName.insert("Box_HC"); for (auto& scintillator : _scintillators) scintillator->Register(this); + + // Print out the detector dislacement in z direction + std::cout<<"Layer z displacement [cm]:\n world coord.---- CMS coord.\n"<(std::floor(+local_position.y() / (layer_spacing + scintillator_height))); size_t y_index = 0; - if (new_position.y() < 6050.0L*cm) { +// if (new_position.y() < 6050.0L*cm) { +// y_index = static_cast(std::floor(+local_position.y() / (layer_spacing + scintillator_height))); +// } else if (new_position.y() > 6060.0L*cm && new_position.y() < 6150.0L*cm) { +// y_index = static_cast(std::floor((+local_position.y() - 1.0L*cm) / (layer_spacing + scintillator_height))); +// } else if (new_position.y() > 7900.0L*cm && new_position.y() < 8050.0L*cm) { +// y_index = static_cast(std::floor((+local_position.y() - 1796.0L*cm) / (layer_spacing + scintillator_height))); +// } else if (new_position.y() > 8050.0L*cm && new_position.y() < 8150.0L*cm) { +// y_index = static_cast(std::floor((+local_position.y() - 1797.0L*cm) / (layer_spacing + scintillator_height))); +// } else if (new_position.y() > 8400.0L*cm && new_position.y() < 8550.0L*cm) { +// y_index = static_cast(std::floor((+local_position.y() - 2092.0L*cm) / (layer_spacing + scintillator_height))); +// } else if (new_position.y() > 8560.0L*cm && new_position.y() < 8650.0L*cm) { +// y_index = static_cast(std::floor((+local_position.y() - 2093.0L*cm) / (layer_spacing + scintillator_height))); +// } else if (new_position.y() > 8660.0L*cm && new_position.y() < 8750.0L*cm) { +// y_index = static_cast(std::floor((+local_position.y() - 2094.0L*cm) / (layer_spacing + scintillator_height))); +// } else if (new_position.y() > 8760.0L*cm && new_position.y() < 8850.0L*cm) { +// y_index = static_cast(std::floor((+local_position.y() - 2095.0L*cm) / (layer_spacing + scintillator_height))); +// } else { +// y_index = static_cast(std::floor((+local_position.y() - 2096.0L*cm) / (layer_spacing + scintillator_height))); + // } + + if (new_position.y() <= 6003.5L*cm) { y_index = static_cast(std::floor(+local_position.y() / (layer_spacing + scintillator_height))); - } else if (new_position.y() > 6060.0L*cm && new_position.y() < 6150.0L*cm) { - y_index = static_cast(std::floor((+local_position.y() - 1.0L*cm) / (layer_spacing + scintillator_height))); - } else if (new_position.y() > 7900.0L*cm && new_position.y() < 8050.0L*cm) { - y_index = static_cast(std::floor((+local_position.y() - 1796.0L*cm) / (layer_spacing + scintillator_height))); - } else if (new_position.y() > 8050.0L*cm && new_position.y() < 8150.0L*cm) { - y_index = static_cast(std::floor((+local_position.y() - 1797.0L*cm) / (layer_spacing + scintillator_height))); - } else if (new_position.y() > 8400.0L*cm && new_position.y() < 8550.0L*cm) { - y_index = static_cast(std::floor((+local_position.y() - 2092.0L*cm) / (layer_spacing + scintillator_height))); - } else if (new_position.y() > 8560.0L*cm && new_position.y() < 8650.0L*cm) { - y_index = static_cast(std::floor((+local_position.y() - 2093.0L*cm) / (layer_spacing + scintillator_height))); - } else if (new_position.y() > 8660.0L*cm && new_position.y() < 8750.0L*cm) { - y_index = static_cast(std::floor((+local_position.y() - 2094.0L*cm) / (layer_spacing + scintillator_height))); - } else if (new_position.y() > 8760.0L*cm && new_position.y() < 8850.0L*cm) { - y_index = static_cast(std::floor((+local_position.y() - 2095.0L*cm) / (layer_spacing + scintillator_height))); - } else { + } else if (new_position.y() >= 6103.5L*cm && new_position.y() <= 6105.5L*cm) { + y_index = static_cast(std::floor((+local_position.y() - 100.0L*cm) / (layer_spacing + scintillator_height))); + } else if (new_position.y() >= 8101.5L*cm && new_position.y() <= 8103.5L*cm) { + y_index = static_cast(std::floor((+local_position.y() - 1996.0L*cm) / (layer_spacing + scintillator_height))); + } else if (new_position.y() >= 8203.5L*cm && new_position.y() <= 8205.5L*cm) { y_index = static_cast(std::floor((+local_position.y() - 2096.0L*cm) / (layer_spacing + scintillator_height))); + } else if (new_position.y() >= 8601.5L*cm && new_position.y() <= 8603.5L*cm) { + y_index = static_cast(std::floor((+local_position.y() - 2492.0L*cm) / (layer_spacing + scintillator_height))); + } else if (new_position.y() >= 8683.5L*cm && new_position.y() <= 8685.5L*cm) { + y_index = static_cast(std::floor((+local_position.y() - 2492.0L*cm +80.0L*cm) / (layer_spacing + scintillator_height))); + } else if (new_position.y() >= 8765.5L*cm && new_position.y() <= 8767.5L*cm) { + y_index = static_cast(std::floor((+local_position.y() - 2492.0L*cm +2*80.0L*cm) / (layer_spacing + scintillator_height))); + } else if (new_position.y() >= 8847.5L*cm && new_position.y() <= 8849.5L*cm) { + y_index = static_cast(std::floor((+local_position.y() - 2492.0L*cm +3*80.0L*cm) / (layer_spacing + scintillator_height))); + } else if (new_position.y() >= 8929.5L*cm && new_position.y() <= 8931.5L*cm) { + y_index = static_cast(std::floor((+local_position.y() - 2492.0L*cm +4*80.0L*cm) / (layer_spacing + scintillator_height))); + } else if (new_position.y() >= 9011.5L*cm && new_position.y() <= 9013.5L*cm) { + y_index = static_cast(std::floor((+local_position.y() - 2492.0L*cm +5*80.0L*cm) / (layer_spacing + scintillator_height))); + } else { + y_index = static_cast(std::floor((+local_position.y() - 2492.0L*cm +6*80.0L*cm) / (layer_spacing + scintillator_height))); } - // if (new_position.y() <= 6003.5L*cm) { - // y_index = static_cast(std::floor(+local_position.y() / (layer_spacing + scintillator_height))); - // } else if (new_position.y() >= 6103.5L*cm && new_position.y() <= 6105.5L*cm) { - // y_index = static_cast(std::floor((+local_position.y() - 100.0L*cm) / (layer_spacing + scintillator_height))); - // } else if (new_position.y() >= 8001.5L*cm && new_position.y() <= 8003.5L*cm) { - // y_index = static_cast(std::floor((+local_position.y() - 1996.0L*cm) / (layer_spacing + scintillator_height))); - // } else if (new_position.y() >= 8103.5L*cm && new_position.y() <= 8105.5L*cm) { - // y_index = static_cast(std::floor((+local_position.y() - 2096.0L*cm) / (layer_spacing + scintillator_height))); - // } else if (new_position.y() >= 8501.5L*cm && new_position.y() <= 8503.5L*cm) { - // y_index = static_cast(std::floor((+local_position.y() - 2492.0L*cm) / (layer_spacing + scintillator_height))); - // } else if (new_position.y() >= 8603.5L*cm && new_position.y() <= 8605.5L*cm) { - // y_index = static_cast(std::floor((+local_position.y() - 2592.0L*cm) / (layer_spacing + scintillator_height))); - // } else if (new_position.y() >= 8705.5L*cm && new_position.y() <= 8707.5L*cm) { - // y_index = static_cast(std::floor((+local_position.y() - 2692.0L*cm) / (layer_spacing + scintillator_height))); - // } else if (new_position.y() >= 8807.5L*cm && new_position.y() <= 8809.5L*cm) { - // y_index = static_cast(std::floor((+local_position.y() - 2792.0L*cm) / (layer_spacing + scintillator_height))); - // } else { - // y_index = static_cast(std::floor((+local_position.y() - 2892.0L*cm) / (layer_spacing + scintillator_height))); - // } - int _rotation = (1UL + y_index) % 2; - size_t x_index; - size_t z_index; + size_t x_index = 0; + size_t z_index = 0; if (_rotation == 0){ @@ -485,6 +545,9 @@ G4VPhysicalVolume* Detector::ConstructScintillatorLayer(G4LogicalVolume* ModuleV _scintillators.push_back(current); + UNUSED(module_x_displacement); + UNUSED(module_y_displacement); + return current->PlaceIn(ModuleVolume, G4Translate3D(0.0, 0.0, layer_z_displacement) ); //G4Translate3D(0.5*layer_x_edge_length, 0.5*layer_y_edge_length, layer_z_displacement) } @@ -504,8 +567,13 @@ G4VPhysicalVolume* Detector::ConstructModule(G4LogicalVolume* DetectorVolume, in 0*m, 0*m, get_layer_z_displacement(layer)); + UNUSED(current); } + UNUSED(detector_x); + UNUSED(detector_y); + UNUSED(detector_z); + //CONSTRUCTING AND INSERTING STEEL BEAMS for (int beam_layer = 0; beam_layer < NBEAMLAYERS; beam_layer++){ @@ -542,7 +610,7 @@ G4VPhysicalVolume* Detector::ConstructModule(G4LogicalVolume* DetectorVolume, in return Construction::PlaceVolume(ModuleVolume, DetectorVolume, Construction::Transform(get_module_x_displacement(tag_number), get_module_y_displacement(tag_number), - half_detector_height - steel_height - 3.0*layer_w_case - 2.0*layer_spacing - 0.5*full_module_height, + half_detector_height - steel_height - 2.0*layer_w_case - 1*layer_spacing - 0.5*full_module_height, 0.0, 0.0, 1.0, 0.0)); @@ -558,15 +626,15 @@ G4VPhysicalVolume* Detector::Construct(G4LogicalVolume* world) { // pre_data->Branch("Y_H", &Y_POS_HIT, "Y_H/D"); auto DetectorVolume = Construction::BoxVolume("Box", x_edge_length + x_edge_increase, y_edge_length, full_detector_height, - Construction::Material::Air, G4VisAttributes::Invisible); + Construction::Material::Air, G4VisAttributes::GetInvisible()); - //DetectorVolume->SetVisAttributes(G4VisAttributes::Invisible); + //DetectorVolume->SetVisAttributes(G4VisAttributes::GetInvisible()); for (int module_number = 0; module_number < NMODULES; module_number++){ - auto current = Detector::ConstructModule(DetectorVolume, module_number, - 0.5L*x_edge_length + x_displacement, //add extra terms for displacement from center here - 0.5L*y_edge_length + y_displacement, - -half_detector_height + steel_height + 3.0*layer_w_case + 2.0*layer_spacing); + Detector::ConstructModule(DetectorVolume, module_number, + 0.5L, //These arguments are not actually used + 0.5L, + 0.0L); } auto first_hermetic_floor = new Scintillator("HF1", @@ -585,13 +653,13 @@ G4VPhysicalVolume* Detector::Construct(G4LogicalVolume* world) { _scintillators.push_back(second_hermetic_floor); second_hermetic_floor->PlaceIn(DetectorVolume, G4Translate3D(0.0, 0.0, half_detector_height - 1.5*layer_w_case - layer_spacing - steel_height)); - auto third_hermetic_floor = new Scintillator("HF3", - x_edge_length, - y_edge_length, - full_layer_height, - scintillator_casing_thickness); - _scintillators.push_back(third_hermetic_floor); - third_hermetic_floor->PlaceIn(DetectorVolume, G4Translate3D(0.0, 0.0, half_detector_height - 2.5*layer_w_case - 2*layer_spacing - steel_height)); + // auto third_hermetic_floor = new Scintillator("HF3", + // x_edge_length, + // y_edge_length, + // full_layer_height, + // scintillator_casing_thickness); + // _scintillators.push_back(third_hermetic_floor); + // third_hermetic_floor->PlaceIn(DetectorVolume, G4Translate3D(0.0, 0.0, half_detector_height - 2.5*layer_w_case - 2*layer_spacing - steel_height)); auto hermetic_wall = new Scintillator("HW1", full_layer_height, @@ -610,7 +678,7 @@ G4VPhysicalVolume* Detector::Construct(G4LogicalVolume* world) { // Construction::Export(DetectorVolume, folder, file, arg4 ); return Construction::PlaceVolume(DetectorVolume, world, - Construction::Transform(0.5L*x_edge_length + x_displacement, 0.5L*y_edge_length + y_displacement, -0.50*full_detector_height + 20*m)); + Construction::Transform(0.5L*x_edge_length + x_displacement, 0.5L*y_edge_length + y_displacement, -0.50*full_detector_height + floor_z_top + layer_spacing + 2.*layer_w_case + steel_height)); } @@ -761,7 +829,7 @@ G4VPhysicalVolume* Detector::ConstructEarth(G4LogicalVolume* world){ auto CMS_Detector_logical = CMSRingVolume(); auto UXC_55_air_v1 = new G4SubtractionSolid("UXC_55_air_v1", UXC_55_cavern_solid, UXC55_outer_solid); auto UXC_55_air_v2 = new G4SubtractionSolid("UXC_55_air_v2", UXC_55_air_v1, CMS_Detector_logical->GetSolid()); - auto UXC55_air_logical = Volume("UXC55_air", UXC_55_air_v2, Construction::Material::Air, G4VisAttributes::Invisible); + auto UXC55_air_logical = Volume("UXC55_air", UXC_55_air_v2, Construction::Material::Air, G4VisAttributes::GetInvisible()); Construction::PlaceVolume(UXC55_outer_logical, earth, Cavern_Transform()*Construction::Rotate(0, 1, 0, 90*deg) ); Construction::PlaceVolume(CMS_Detector_logical, earth, Cavern_Transform()*Construction::Rotate(0, 1, 0, 90*deg) ); @@ -785,7 +853,7 @@ G4VPhysicalVolume* Detector::ConstructEarth(G4LogicalVolume* world){ AS_Depth - 2* AS_Thickness, AS_Height - 2* AS_Thickness, Construction::Material::Air, - G4VisAttributes::Invisible); + G4VisAttributes::GetInvisible()); Construction::PlaceVolume(Access_Shaft_outer_logical, earth, Access_Shaft_Transform() ); Construction::PlaceVolume(Access_Shaft_Air, earth, Access_Shaft_Transform()); diff --git a/src/geometry/cosmic/Cosmic.cc b/src/geometry/cosmic/Cosmic.cc index 904b34c..c3c6f4b 100644 --- a/src/geometry/cosmic/Cosmic.cc +++ b/src/geometry/cosmic/Cosmic.cc @@ -559,9 +559,9 @@ G4VPhysicalVolume* Detector::Construct(G4LogicalVolume* world) { // pre_data->Branch("Y_H", &Y_POS_HIT, "Y_H/D"); auto DetectorVolume = Construction::BoxVolume("Box", x_edge_length + x_edge_increase, y_edge_length, full_detector_height, - Construction::Material::Air, G4VisAttributes::Invisible); + Construction::Material::Air, G4VisAttributes::GetInvisible()); - //DetectorVolume->SetVisAttributes(G4VisAttributes::Invisible); + //DetectorVolume->SetVisAttributes(G4VisAttributes::GetInvisible(); for (int module_number = 0; module_number < NMODULES; module_number++){ auto current = Detector::ConstructModule(DetectorVolume, module_number, @@ -772,7 +772,7 @@ G4VPhysicalVolume* Detector::ConstructEarth(G4LogicalVolume* world){ // auto CMS_Detector_logical = CMSRingVolume(); // auto UXC_55_air_v1 = new G4SubtractionSolid("UXC_55_air_v1", UXC_55_cavern_solid, UXC55_outer_solid); // auto UXC_55_air_v2 = new G4SubtractionSolid("UXC_55_air_v2", UXC_55_air_v1, CMS_Detector_logical->GetSolid()); - // auto UXC55_air_logical = Volume("UXC55_air", UXC_55_air_v2, Construction::Material::Air, G4VisAttributes::Invisible); + // auto UXC55_air_logical = Volume("UXC55_air", UXC_55_air_v2, Construction::Material::Air, G4VisAttributes::GetInvisible()); // Construction::PlaceVolume(UXC55_outer_logical, earth, Cavern_Transform()*Construction::Rotate(0, 1, 0, 90*deg) ); // Construction::PlaceVolume(CMS_Detector_logical, earth, Cavern_Transform()*Construction::Rotate(0, 1, 0, 90*deg) ); @@ -796,7 +796,7 @@ G4VPhysicalVolume* Detector::ConstructEarth(G4LogicalVolume* world){ // AS_Depth - 2* AS_Thickness, // AS_Height - 2* AS_Thickness, // Construction::Material::Air, - // G4VisAttributes::Invisible); + // G4VisAttributes::GetInvisible()); // Construction::PlaceVolume(Access_Shaft_outer_logical, earth, Access_Shaft_Transform() ); // Construction::PlaceVolume(Access_Shaft_Air, earth, Access_Shaft_Transform());