Skip to content
2 changes: 1 addition & 1 deletion include/analysis.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <vector>
#include <unordered_map>

#include <g4root.hh>
#include <G4AnalysisManager.hh>

namespace MATHUSLA { namespace MU {

Expand Down
1 change: 1 addition & 0 deletions include/geometry/Box.hh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public:
static bool SaveAll;

static void WritePreData();
static void SaveInfo(std::string & prefix);
};

} /* namespace Box */ //////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 2 additions & 0 deletions include/geometry/Construction.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions src/action/RunAction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down
9 changes: 9 additions & 0 deletions src/geometry/Construction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
234 changes: 151 additions & 83 deletions src/geometry/box/Box.cc

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/geometry/cosmic/Cosmic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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) );
Expand All @@ -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());
Expand Down