From 34687943809e7351dfd4fd967efba3821a8874bb Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Fri, 7 Nov 2025 11:26:12 -0500 Subject: [PATCH 1/3] IRT -> IRT2 --- CMakeLists.txt | 2 +- cmake/{IRTConfig.cmake.in => IRT2Config.cmake.in} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename cmake/{IRTConfig.cmake.in => IRT2Config.cmake.in} (85%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 92e4d3b..a92acf1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) -project(IRT +project(IRT2 VERSION 2.1.0 LANGUAGES CXX ) diff --git a/cmake/IRTConfig.cmake.in b/cmake/IRT2Config.cmake.in similarity index 85% rename from cmake/IRTConfig.cmake.in rename to cmake/IRT2Config.cmake.in index 102d9ff..f3aa316 100644 --- a/cmake/IRTConfig.cmake.in +++ b/cmake/IRT2Config.cmake.in @@ -2,4 +2,4 @@ include("@PACKAGE_TARGETS_INSTALL_PATH@") set_and_check(IRT_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") set_and_check(IRT_LIBRARY_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@") -check_required_components(IRT) +check_required_components(IRT2) From 61627e7b2da3efdc6f2caaaa7aff516b7d020a5e Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Fri, 7 Nov 2025 11:27:34 -0500 Subject: [PATCH 2/3] namespace IRT2 --- include/BitMask.h | 4 ++++ include/Calibration.h | 3 +++ include/ChargedParticle.h | 4 ++++ include/ChargedParticleStep.h | 4 ++++ include/CherenkovDetector.h | 4 ++++ include/CherenkovDetectorCollection.h | 4 ++++ include/CherenkovEvent.h | 4 ++++ include/CherenkovMirror.h | 4 ++++ include/CherenkovPID.h | 4 ++++ include/CherenkovPhotonDetector.h | 4 ++++ include/CherenkovRadiator.h | 4 ++++ include/CherenkovWaveLengthRange.h | 4 ++++ include/ConicalSurface.h | 4 ++++ include/CylindricalSurface.h | 4 ++++ include/Digitization.h | 5 +++++ include/DigitizedHit.h | 6 ++++++ include/FlatSurface.h | 4 ++++ include/G4Object.h | 4 ++++ include/GeantImport.h | 11 ++++++++--- include/IRT.h | 4 ++++ include/IRTSolution.h | 4 ++++ include/OpticalBoundary.h | 5 +++++ include/OpticalPhoton.h | 9 +++++++-- include/ParametricSurface.h | 6 +++++- include/RadiatorHistory.h | 4 ++++ include/ReconstructionFactory.h | 4 ++++ include/ReflectionPoint.h | 4 ++++ include/RefractionPoint.h | 4 ++++ include/SinglePDF.h | 3 +++ include/SphericalSurface.h | 4 ++++ include/ToricSurface.h | 4 ++++ include/TransientParticle.h | 4 ++++ source/Calibration.cc | 4 ++++ source/ChargedParticle.cc | 4 ++++ source/CherenkovRadiator.cc | 4 ++++ source/ConicalSurface.cc | 4 ++++ source/CylindricalSurface.cc | 4 ++++ source/Digitization.cc | 4 ++++ source/DigitizedHit.cc | 3 +++ source/FlatSurface.cc | 4 ++++ source/GeantImport.cc | 4 ++++ source/IRT.cc | 4 ++++ source/ParametricSurface.cc | 4 ++++ source/ReconstructionFactory.cc | 4 ++++ source/SphericalSurface.cc | 4 ++++ source/ToricSurface.cc | 4 ++++ 46 files changed, 193 insertions(+), 6 deletions(-) diff --git a/include/BitMask.h b/include/BitMask.h index 9f9a89c..5716a37 100644 --- a/include/BitMask.h +++ b/include/BitMask.h @@ -4,6 +4,8 @@ #ifndef _BIT_MASK_ #define _BIT_MASK_ +namespace IRT2 { + class BitMask: public TObject { public: BitMask(ULong64_t mask = 0): m_Mask(mask) {}; @@ -24,4 +26,6 @@ class BitMask: public TObject { #endif }; +} // namespace IRT2 + #endif diff --git a/include/Calibration.h b/include/Calibration.h index 89b3b13..a0a9ef5 100644 --- a/include/Calibration.h +++ b/include/Calibration.h @@ -13,6 +13,8 @@ class TDatabasePDG; #define _THETA_BIN_COUNT_ (180/5) #define _THETA_BIN_WIDTH_ (M_PI / _THETA_BIN_COUNT_) +namespace IRT2 { + class Calibration : public virtual GeantImport { public: Calibration (); @@ -69,5 +71,6 @@ class Calibration : public virtual GeantImport { double m_DefaultSinglePhotonThetaResolution; }; +} // namespace IRT2 #endif diff --git a/include/ChargedParticle.h b/include/ChargedParticle.h index 6731564..3276a65 100644 --- a/include/ChargedParticle.h +++ b/include/ChargedParticle.h @@ -12,6 +12,8 @@ #include "CherenkovPID.h" #include "DigitizedHit.h" +namespace IRT2 { + class ChargedParticle: public TransientParticle { public: ChargedParticle(int pdg = 0, bool primary = true): @@ -107,4 +109,6 @@ class ChargedParticle: public TransientParticle { #endif }; +} // namespace IRT2 + #endif diff --git a/include/ChargedParticleStep.h b/include/ChargedParticleStep.h index 8fc8666..22f2adf 100644 --- a/include/ChargedParticleStep.h +++ b/include/ChargedParticleStep.h @@ -5,6 +5,8 @@ #ifndef _CHARGED_PARTICLE_STEP_ #define _CHARGED_PARTICLE_STEP_ +namespace IRT2 { + class ChargedParticleStep: public TObject { public: ChargedParticleStep()/*: m_Length(0.0)*/ {}; @@ -28,4 +30,6 @@ class ChargedParticleStep: public TObject { #endif }; +} // namespace IRT2 + #endif diff --git a/include/CherenkovDetector.h b/include/CherenkovDetector.h index b14f03d..f986178 100644 --- a/include/CherenkovDetector.h +++ b/include/CherenkovDetector.h @@ -15,6 +15,8 @@ class CherenkovMirrorGroup; class OpticalBoundary; class G4LogicalVolume; +namespace IRT2 { + class CherenkovDetector: public TObject { public: CherenkovDetector(const char *name = 0): /*m_ContainerVolume(0),*/ m_Name(name ? name : ""), @@ -164,4 +166,6 @@ class CherenkovDetector: public TObject { #endif }; +} // namespace IRT2 + #endif diff --git a/include/CherenkovDetectorCollection.h b/include/CherenkovDetectorCollection.h index 97fc8e2..44427cd 100644 --- a/include/CherenkovDetectorCollection.h +++ b/include/CherenkovDetectorCollection.h @@ -18,6 +18,8 @@ class CherenkovPhotonDetector; #define _STORE_REFLECTION_POINTS_ (0x00000002) #define _STORE_REFRACTION_POINTS_ (0x00000003) +namespace IRT2 { + class CherenkovDetectorCollection: public BitMask { public: CherenkovDetectorCollection() {}; @@ -163,4 +165,6 @@ class CherenkovDetectorCollection: public BitMask { #endif }; +} // namespace IRT2 + #endif diff --git a/include/CherenkovEvent.h b/include/CherenkovEvent.h index 92b4107..38363f4 100644 --- a/include/CherenkovEvent.h +++ b/include/CherenkovEvent.h @@ -8,6 +8,8 @@ class OpticalPhoton; +namespace IRT2 { + class CherenkovEvent: public TObject { public: CherenkovEvent() {}; @@ -39,4 +41,6 @@ class CherenkovEvent: public TObject { #endif }; +} // namespace IRT2 + #endif diff --git a/include/CherenkovMirror.h b/include/CherenkovMirror.h index 84f5be6..ce5a6d0 100644 --- a/include/CherenkovMirror.h +++ b/include/CherenkovMirror.h @@ -11,6 +11,8 @@ class CherenkovWaveLengthRange; +namespace IRT2 { + class SurfaceCopy: public G4ObjectCopy { public: SurfaceCopy(G4VPhysicalVolume *phys = 0): G4ObjectCopy(phys), m_Surface(0) {}; @@ -101,4 +103,6 @@ class ConicalMirror: public CherenkovMirror, public ConicalSurface { #endif }; +} // namespace IRT2 + #endif diff --git a/include/CherenkovPID.h b/include/CherenkovPID.h index 2e85e0d..a780cf6 100644 --- a/include/CherenkovPID.h +++ b/include/CherenkovPID.h @@ -6,6 +6,8 @@ #ifndef _CHERENKOV_PID_ #define _CHERENKOV_PID_ +namespace IRT2 { + class CherenkovRadiator; class RadiatorMassHypothesis { @@ -73,4 +75,6 @@ class CherenkovPID { std::vector m_Hypotheses; }; +} // namespace IRT2 + #endif diff --git a/include/CherenkovPhotonDetector.h b/include/CherenkovPhotonDetector.h index 99ca78e..2bd6413 100644 --- a/include/CherenkovPhotonDetector.h +++ b/include/CherenkovPhotonDetector.h @@ -11,6 +11,8 @@ class G4DataInterpolation; #include "IRT.h" +namespace IRT2 { + class CherenkovPhotonDetector: public G4Object { public: CherenkovPhotonDetector(G4VSolid *solid = 0, G4Material *material = 0): @@ -96,4 +98,6 @@ class CherenkovPhotonDetector: public G4Object { #endif }; +} // namespace IRT2 + #endif diff --git a/include/CherenkovRadiator.h b/include/CherenkovRadiator.h index 5deb58e..afcd247 100644 --- a/include/CherenkovRadiator.h +++ b/include/CherenkovRadiator.h @@ -17,6 +17,8 @@ class G4RadiatorMaterial; class G4DataInterpolation; +namespace IRT2 { + struct CherenkovRadiatorCalibration: public TObject { CherenkovRadiatorCalibration(): m_Stat(0), m_AverageZvtx(0.0), m_hcalib(0), m_Coffset(0.0), m_Csigma(0.0) {}; @@ -193,4 +195,6 @@ class CherenkovRadiator: public TObject { #endif }; +} // namespace IRT2 + #endif diff --git a/include/CherenkovWaveLengthRange.h b/include/CherenkovWaveLengthRange.h index a7fc673..58c2966 100644 --- a/include/CherenkovWaveLengthRange.h +++ b/include/CherenkovWaveLengthRange.h @@ -2,6 +2,8 @@ #ifndef _CHERENKOV_WAVELENGTH_RANGE_ #define _CHERENKOV_WAVELENGTH_RANGE_ +namespace IRT2 { + class CherenkovWaveLengthRange { public: CherenkovWaveLengthRange(unsigned wldim, double numin, double nustep): @@ -24,4 +26,6 @@ class CherenkovWaveLengthRange { double *m_PhotonEnergies; }; +} // namespace IRT2 + #endif diff --git a/include/ConicalSurface.h b/include/ConicalSurface.h index b982807..313a059 100644 --- a/include/ConicalSurface.h +++ b/include/ConicalSurface.h @@ -4,6 +4,8 @@ #ifndef _IRT_CONICAL_SURFACE_ #define _IRT_CONICAL_SURFACE_ +namespace IRT2 { + class ConicalSurface: public ParametricSurface { public: ConicalSurface(): m_Concave(true), m_R0(0.0), m_R1(0.0), m_Dz(0.0), m_Alfa(0.0), m_Rc(0.0), m_Slope(0.0) {}; @@ -82,4 +84,6 @@ class ConicalSurface: public ParametricSurface { #endif }; +} // namespace IRT2 + #endif diff --git a/include/CylindricalSurface.h b/include/CylindricalSurface.h index e740521..f2d36d0 100644 --- a/include/CylindricalSurface.h +++ b/include/CylindricalSurface.h @@ -8,6 +8,8 @@ #ifndef _IRT_CYLINDRICAL_SURFACE_ #define _IRT_CYLINDRICAL_SURFACE_ +namespace IRT2 { + class CylindricalSurface: public ParametricSurface { public: CylindricalSurface(): m_Concave(true), m_Radius(0.0), m_Alfa(0.0) {}; @@ -78,4 +80,6 @@ class CylindricalSurface: public ParametricSurface { #endif }; +} // namespace IRT2 + #endif diff --git a/include/Digitization.h b/include/Digitization.h index 0ab3a0e..216405b 100644 --- a/include/Digitization.h +++ b/include/Digitization.h @@ -6,6 +6,9 @@ #include "DigitizedHit.h" #include "GeantImport.h" + +namespace IRT2 { + class CherenkovPhotonDetector; struct BlackoutCell { @@ -66,4 +69,6 @@ class Digitization : public virtual GeantImport { unsigned m_SensorActiveAreaPixellation; }; +} // namespace IRT2 + #endif diff --git a/include/DigitizedHit.h b/include/DigitizedHit.h index 9ccef6d..2824a8f 100644 --- a/include/DigitizedHit.h +++ b/include/DigitizedHit.h @@ -11,6 +11,9 @@ #include "CherenkovPhotonDetector.h" #include "SinglePDF.h" + +namespace IRT2 { + class ChargedParticle; class IRT; @@ -87,4 +90,7 @@ class DigitizedHit { //TVector3 m_PhotonVertexPosition; //! //TVector3 m_PhotonVertexMomentum; //! }; + +} // namespace IRT2 + #endif diff --git a/include/FlatSurface.h b/include/FlatSurface.h index 4567426..712a5fe 100644 --- a/include/FlatSurface.h +++ b/include/FlatSurface.h @@ -4,6 +4,8 @@ #ifndef _IRT_FLAT_SURFACE_ #define _IRT_FLAT_SURFACE_ +namespace IRT2 { + // In fact a rectangle in space; class FlatSurface: public ParametricSurface, public LocalCoordinatesXY { public: @@ -58,4 +60,6 @@ class FlatSurface: public ParametricSurface, public LocalCoordinatesXY { #endif }; +} // namespace IRT2 + #endif diff --git a/include/G4Object.h b/include/G4Object.h index 474ba98..d8cb83c 100644 --- a/include/G4Object.h +++ b/include/G4Object.h @@ -20,6 +20,8 @@ class G4RotationMatrix; class G4ThreeVector; #endif +namespace IRT2 { + class G4ObjectCopy: public TObject { public: G4ObjectCopy(G4VPhysicalVolume *phys = 0): m_PhysicalVolume(phys) {}; @@ -79,4 +81,6 @@ class G4Object: public TObject { #endif }; +} // namespace IRT2 + #endif diff --git a/include/GeantImport.h b/include/GeantImport.h index dc5458f..c9d0f8f 100644 --- a/include/GeantImport.h +++ b/include/GeantImport.h @@ -5,11 +5,14 @@ #define _GEANT_IMPORT_ #include "CherenkovEvent.h" -class CherenkovDetectorCollection; -class CherenkovDetector; #define _MOMENTUM_CUTOFF_DEFAULT_ (0.010) +namespace IRT2 { + +class CherenkovDetectorCollection; +class CherenkovDetector; + class GeantImport { public: GeantImport(const char *dfname = 0, const char *cfname = 0, const char *dname = 0); @@ -46,8 +49,10 @@ class GeantImport { // Input (GEANT) / output(Reco) event structure; CherenkovEvent *m_Event; - bool m_PurgeSecondaries; + bool m_PurgeSecondaries; double m_MomentumCutoff; }; +} // namespace IRT2 + #endif diff --git a/include/IRT.h b/include/IRT.h index 1bb4245..afff4c2 100644 --- a/include/IRT.h +++ b/include/IRT.h @@ -24,6 +24,8 @@ #include "ParametricSurface.h" #include "IRTSolution.h" +namespace IRT2 { + class IRT: public TObject { public: IRT(/*unsigned sector = 0*/): /*m_Sector(sector),*/ m_IterationLimit(_IRT_ITERATION_LIMIT_), @@ -70,4 +72,6 @@ class IRT: public TObject { #endif }; +} // namespace IRT2 + #endif diff --git a/include/IRTSolution.h b/include/IRTSolution.h index 44af9d8..5250444 100644 --- a/include/IRTSolution.h +++ b/include/IRTSolution.h @@ -4,6 +4,8 @@ #ifndef _IRT_SOLUTION_ #define _IRT_SOLUTION_ +namespace IRT2 { + class IRTSolution { friend class IRT; @@ -65,4 +67,6 @@ class IRTSolution { double m_SigmaDx, m_SigmaDy, m_SigmaDz, m_SigmaDt, m_SigmaDf; }; +} // namespace IRT2 + #endif diff --git a/include/OpticalBoundary.h b/include/OpticalBoundary.h index bad9022..abc9f20 100644 --- a/include/OpticalBoundary.h +++ b/include/OpticalBoundary.h @@ -6,6 +6,9 @@ #define _OPTICAL_BOUNDARY_ #include "CherenkovRadiator.h" + +namespace IRT2 { + class ParametricSurface; class OpticalBoundary: public TObject { @@ -42,4 +45,6 @@ class OpticalBoundary: public TObject { #endif }; +} // namespace IRT2 + #endif diff --git a/include/OpticalPhoton.h b/include/OpticalPhoton.h index d87ffe2..0757560 100644 --- a/include/OpticalPhoton.h +++ b/include/OpticalPhoton.h @@ -10,11 +10,14 @@ #include "TransientParticle.h" #include "CherenkovPhotonDetector.h" -class ReflectionPoint; -class ChargedParticle; #include "RefractionPoint.h" #include "SinglePDF.h" +namespace IRT2 { + +class ReflectionPoint; +class ChargedParticle; + class OpticalPhoton: public TransientParticle { public: OpticalPhoton(): TransientParticle(0), m_VertexAttenuationLength(0.0), @@ -111,4 +114,6 @@ class OpticalPhoton: public TransientParticle { #endif }; +} // namespace IRT2 + #endif diff --git a/include/ParametricSurface.h b/include/ParametricSurface.h index 6859253..53d5afa 100644 --- a/include/ParametricSurface.h +++ b/include/ParametricSurface.h @@ -7,6 +7,8 @@ #ifndef _IRT_PARAMETRIC_SURFACE_ #define _IRT_PARAMETRIC_SURFACE_ +namespace IRT2 { + class ParametricSurface: public TObject { public: ParametricSurface(): m_Umin(0.0), m_Umax(0.0), m_Vmin(0.0), m_Vmax(0.0) {}; @@ -87,6 +89,8 @@ class LocalCoordinatesXY: public TObject { #ifndef DISABLE_ROOT_IO ClassDef(LocalCoordinatesXY, 1); #endif -}; +}; + +} // namespace IRT2 #endif diff --git a/include/RadiatorHistory.h b/include/RadiatorHistory.h index 830995f..5f97360 100644 --- a/include/RadiatorHistory.h +++ b/include/RadiatorHistory.h @@ -10,6 +10,8 @@ #include "OpticalPhoton.h" #include "ChargedParticleStep.h" +namespace IRT2 { + class RadiatorHistory: public TObject { public: RadiatorHistory(): m_EstimatedPath(0.0)/*, m_AverageTime(0.0)*/ {}; @@ -83,4 +85,6 @@ class RadiatorHistory: public TObject { #endif }; +} // namespace IRT2 + #endif diff --git a/include/ReconstructionFactory.h b/include/ReconstructionFactory.h index f491152..105e2b1 100644 --- a/include/ReconstructionFactory.h +++ b/include/ReconstructionFactory.h @@ -7,6 +7,8 @@ class TParticlePDG; #ifndef _RECONSTRUCTION_FACTORY_ #define _RECONSTRUCTION_FACTORY_ +namespace IRT2 { + struct ReconstructionFactoryPlots { ReconstructionFactoryPlots(); ~ReconstructionFactoryPlots() {}; @@ -96,4 +98,6 @@ class ReconstructionFactory : public Digitization, public Calibration { void LaunchRingFinder(bool calibration); }; +} // namespace IRT2 + #endif diff --git a/include/ReflectionPoint.h b/include/ReflectionPoint.h index d0a0834..4d782fb 100644 --- a/include/ReflectionPoint.h +++ b/include/ReflectionPoint.h @@ -8,6 +8,8 @@ #include "CherenkovMirror.h" +namespace IRT2 { + class ReflectionPoint: public TObject { public: ReflectionPoint(): m_Mirror(0)/*, m_VolumeCopy(0)*/ {}; @@ -25,4 +27,6 @@ class ReflectionPoint: public TObject { #endif }; +} // namespace IRT2 + #endif diff --git a/include/RefractionPoint.h b/include/RefractionPoint.h index 66c8cab..026ff1f 100644 --- a/include/RefractionPoint.h +++ b/include/RefractionPoint.h @@ -8,6 +8,8 @@ #include "CherenkovRadiator.h" +namespace IRT2 { + class RefractionPoint: public TObject { public: RefractionPoint()/*: m_Mirror(0), m_VolumeCopy(0)*/ { m_Radiators[0] = 0; m_Radiators[1] = 0; }; @@ -30,4 +32,6 @@ class RefractionPoint: public TObject { #endif }; +} // namespace IRT2 + #endif diff --git a/include/SinglePDF.h b/include/SinglePDF.h index 1cada40..362e2cd 100644 --- a/include/SinglePDF.h +++ b/include/SinglePDF.h @@ -7,6 +7,8 @@ #ifndef _SINGLE_PDF_ #define _SINGLE_PDF_ +namespace IRT2 { + class SinglePDF: public TObject { public: SinglePDF() {}; @@ -166,5 +168,6 @@ class VectorPDF: public TObject { #endif }; +} // namespace IRT2 #endif diff --git a/include/SphericalSurface.h b/include/SphericalSurface.h index 9cec9f2..9c56349 100644 --- a/include/SphericalSurface.h +++ b/include/SphericalSurface.h @@ -4,6 +4,8 @@ #ifndef _IRT_SPHERICAL_SURFACE_ #define _IRT_SPHERICAL_SURFACE_ +namespace IRT2 { + class SphericalSurface: public ParametricSurface { public: SphericalSurface(): m_Concave(true), m_Radius(0.0) {}; @@ -48,4 +50,6 @@ class SphericalSurface: public ParametricSurface { #endif }; +} // namespace IRT2 + #endif diff --git a/include/ToricSurface.h b/include/ToricSurface.h index a5a599d..d227c10 100644 --- a/include/ToricSurface.h +++ b/include/ToricSurface.h @@ -11,6 +11,8 @@ #ifndef _IRT_TORIC_SURFACE_ #define _IRT_TORIC_SURFACE_ +namespace IRT2 { + class ToricSurface: public ParametricSurface { public: ToricSurface(): m_Concave(true), m_R(0.0), m_r(0.0), m_Alfa(0.0) {}; @@ -104,4 +106,6 @@ class ToricSurface: public ParametricSurface { #endif }; +} // namespace IRT2 + #endif diff --git a/include/TransientParticle.h b/include/TransientParticle.h index d4f4cab..7f7feda 100644 --- a/include/TransientParticle.h +++ b/include/TransientParticle.h @@ -5,6 +5,8 @@ #ifndef _TRANSIENT_PARTICLE_ #define _TRANSIENT_PARTICLE_ +namespace IRT2 { + // Need a separate class because do not want to deal with G4VUserTrackInformation serialization; class TransientParticle: public TObject { public: @@ -38,4 +40,6 @@ class TransientParticle: public TObject { #endif }; +} // namespace IRT2 + #endif diff --git a/source/Calibration.cc b/source/Calibration.cc index 2797531..583aca8 100644 --- a/source/Calibration.cc +++ b/source/Calibration.cc @@ -7,6 +7,8 @@ #include "Calibration.h" #include "CherenkovDetectorCollection.h" +namespace IRT2 { + // FIXME: yes, fix it please; static unsigned hdim = 100; static double hmin = -30.0, hmax = 30.0, hbin = (hmax - hmin)/hdim, hwnd = 15.0; @@ -378,3 +380,5 @@ void Calibration::ExportModifiedOpticsFile(const char *fname) } // Calibration::ExportModifiedOpticsFile() // ------------------------------------------------------------------------------------- + +} // namespace IRT2 diff --git a/source/ChargedParticle.cc b/source/ChargedParticle.cc index 55f3e0e..c92e382 100644 --- a/source/ChargedParticle.cc +++ b/source/ChargedParticle.cc @@ -11,6 +11,8 @@ #include "ChargedParticle.h" +namespace IRT2 { + // ------------------------------------------------------------------------------------- double ChargedParticle::GetRecoCherenkovPhotonTheta(unsigned id) @@ -92,3 +94,5 @@ unsigned ChargedParticle::GetRecoCherenkovPhotonCount(CherenkovRadiator *radiato } // ChargedParticle::GetRecoCherenkovPhotonCount() // ------------------------------------------------------------------------------------- + +} // namespace IRT2 diff --git a/source/CherenkovRadiator.cc b/source/CherenkovRadiator.cc index 480f4b3..0b3d423 100644 --- a/source/CherenkovRadiator.cc +++ b/source/CherenkovRadiator.cc @@ -5,6 +5,8 @@ #include "CherenkovRadiator.h" +namespace IRT2 { + // ------------------------------------------------------------------------------------- CherenkovRadiatorPlots::CherenkovRadiatorPlots(const char *tag): @@ -85,3 +87,5 @@ void CherenkovRadiator::DisplayStandardPlots(const char *cname, int wtopx, } // CherenkovRadiator::DisplayStandardPlots() // ------------------------------------------------------------------------------------- + +} // namespace IRT2 diff --git a/source/ConicalSurface.cc b/source/ConicalSurface.cc index 733d645..29714a2 100644 --- a/source/ConicalSurface.cc +++ b/source/ConicalSurface.cc @@ -3,6 +3,8 @@ #include "ConicalSurface.h" +namespace IRT2 { + // ------------------------------------------------------------------------------------- bool ConicalSurface::GetCrossing(const TVector3 &x0, const TVector3 &n0, TVector3 *crs, @@ -30,3 +32,5 @@ double ConicalSurface::GetDistance(const TVector3 &xx) const } // ConicalSurface::GetDistance() // ------------------------------------------------------------------------------------- + +} // namespace IRT2 diff --git a/source/CylindricalSurface.cc b/source/CylindricalSurface.cc index 592f4d8..78d5fa5 100644 --- a/source/CylindricalSurface.cc +++ b/source/CylindricalSurface.cc @@ -3,6 +3,8 @@ #include "CylindricalSurface.h" +namespace IRT2 { + // ------------------------------------------------------------------------------------- bool CylindricalSurface::GetCrossing(const TVector3 &x0, const TVector3 &n0, TVector3 *crs, @@ -27,3 +29,5 @@ double CylindricalSurface::GetDistance(const TVector3 &xx) const } // CylindricalSurface::GetDistance() // ------------------------------------------------------------------------------------- + +} // namespace IRT2 diff --git a/source/Digitization.cc b/source/Digitization.cc index 9418a58..6b022cd 100644 --- a/source/Digitization.cc +++ b/source/Digitization.cc @@ -6,6 +6,8 @@ #include "GeantImport.h" #include "Digitization.h" +namespace IRT2 { + // Kind of digitization; may want to comment out (or set very fine) for debugging; #define _SENSOR_ACTIVE_AREA_PIXELLATION_DEFAULT_ (32) @@ -156,3 +158,5 @@ void Digitization::ProduceDigitizedHits(bool calibration) } // Digitization::ProduceDigitizedHits() // ------------------------------------------------------------------------------------- + +} // namespace IRT2 diff --git a/source/DigitizedHit.cc b/source/DigitizedHit.cc index ef0bf99..5b59887 100644 --- a/source/DigitizedHit.cc +++ b/source/DigitizedHit.cc @@ -1,7 +1,10 @@ #include "DigitizedHit.h" +namespace IRT2 { // ------------------------------------------------------------------------------------- // ------------------------------------------------------------------------------------- + +} // namespace IRT2 diff --git a/source/FlatSurface.cc b/source/FlatSurface.cc index a6ab38c..1910a4c 100644 --- a/source/FlatSurface.cc +++ b/source/FlatSurface.cc @@ -1,6 +1,8 @@ #include "FlatSurface.h" +namespace IRT2 { + // ------------------------------------------------------------------------------------- bool FlatSurface::GetCrossing(const TVector3 &x0, const TVector3 &n0, TVector3 *crs, @@ -35,3 +37,5 @@ double FlatSurface::GetDistance(const TVector3 &xx) const } // FlatSurface::GetDistance() // ------------------------------------------------------------------------------------- + +} // namespace IRT2 diff --git a/source/GeantImport.cc b/source/GeantImport.cc index 7ba93d0..2256d15 100644 --- a/source/GeantImport.cc +++ b/source/GeantImport.cc @@ -5,6 +5,8 @@ #include "CherenkovEvent.h" #include "GeantImport.h" +namespace IRT2 { + // ------------------------------------------------------------------------------------- GeantImport::GeantImport(const char *dfname, const char *cfname, const char *dname): @@ -50,3 +52,5 @@ void GeantImport::GetInputTreeEntry(unsigned ev) const } // GeantImport::GetInputTreeEntry() // ------------------------------------------------------------------------------------- + +} // namespace IRT2 diff --git a/source/IRT.cc b/source/IRT.cc index 2ff4c46..3ceb0e1 100644 --- a/source/IRT.cc +++ b/source/IRT.cc @@ -1,6 +1,8 @@ #include "IRT.h" +namespace IRT2 { + thread_local TVector3 OpticalBoundary::m_ImpactPoint, OpticalBoundary::m_IncomingDirection; thread_local TVector3 OpticalBoundary::m_OutgoingDirection; @@ -224,3 +226,5 @@ IRTSolution IRT::Solve(const TVector3 &xfrom, const TVector3 &nfrom, const doubl } // IRT::Solve() // ------------------------------------------------------------------------------------- + +} // namespace IRT2 diff --git a/source/ParametricSurface.cc b/source/ParametricSurface.cc index 1f00aae..8bee3d4 100644 --- a/source/ParametricSurface.cc +++ b/source/ParametricSurface.cc @@ -1,6 +1,8 @@ #include "ParametricSurface.h" +namespace IRT2 { + // ------------------------------------------------------------------------------------- bool ParametricSurface::GetQuadraticEquationCaseCrossing(const TVector3 &x0, const TVector3 &n0, @@ -34,3 +36,5 @@ bool ParametricSurface::GetQuadraticEquationCaseCrossing(const TVector3 &x0, con } // ParametricSurface::GetQuadraticEquationCaseCrossing() // ------------------------------------------------------------------------------------- + +} // namespace IRT2 diff --git a/source/ReconstructionFactory.cc b/source/ReconstructionFactory.cc index 497e038..44665c2 100644 --- a/source/ReconstructionFactory.cc +++ b/source/ReconstructionFactory.cc @@ -18,6 +18,8 @@ #include "CherenkovEvent.h" #include "ReconstructionFactory.h" +namespace IRT2 { + // ------------------------------------------------------------------------------------- ReconstructionFactory::ReconstructionFactory(const char *dfname, const char *cfname, @@ -617,3 +619,5 @@ void ReconstructionFactory::DisplayStandardPlots(const char *cname, int wtopx, } // ReconstructionFactory::DisplayStandardPlots() // ------------------------------------------------------------------------------------- + +} // namespace IRT2 diff --git a/source/SphericalSurface.cc b/source/SphericalSurface.cc index f02c1c6..5e5f26d 100644 --- a/source/SphericalSurface.cc +++ b/source/SphericalSurface.cc @@ -1,6 +1,8 @@ #include "SphericalSurface.h" +namespace IRT2 { + // ------------------------------------------------------------------------------------- bool SphericalSurface::GetCrossing(const TVector3 &x0, const TVector3 &n0, TVector3 *crs, @@ -20,3 +22,5 @@ double SphericalSurface::GetDistance(const TVector3 &xx) const } // SphericalSurface::GetDistance() // ------------------------------------------------------------------------------------- + +} // namespace IRT2 diff --git a/source/ToricSurface.cc b/source/ToricSurface.cc index 8ca2d7b..63d6acc 100644 --- a/source/ToricSurface.cc +++ b/source/ToricSurface.cc @@ -1,6 +1,8 @@ #include "ToricSurface.h" +namespace IRT2 { + // ------------------------------------------------------------------------------------- bool ToricSurface::GetCrossing(const TVector3 &x0, const TVector3 &n0, TVector3 *crs, @@ -30,3 +32,5 @@ double ToricSurface::GetDistance(const TVector3 &xx) const } // ToricSurface::GetDistance() // ------------------------------------------------------------------------------------- + +} // namespace IRT2 From c20cccc639feca308fe31975da98f8e8575449cf Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Fri, 7 Nov 2025 11:53:36 -0500 Subject: [PATCH 3/3] use `#pragma once` --- include/BitMask.h | 6 +----- include/Calibration.h | 6 +----- include/ChargedParticle.h | 6 +----- include/ChargedParticleStep.h | 6 +----- include/CherenkovDetector.h | 6 ------ include/CherenkovDetectorCollection.h | 6 +----- include/CherenkovEvent.h | 6 +----- include/CherenkovMirror.h | 6 +----- include/CherenkovPID.h | 6 +----- include/CherenkovPhotonDetector.h | 6 +----- include/CherenkovRadiator.h | 6 +----- include/CherenkovWaveLengthRange.h | 6 +----- include/ConicalSurface.h | 6 +----- include/CylindricalSurface.h | 6 +----- include/Digitization.h | 6 +----- include/DigitizedHit.h | 6 +----- include/FlatSurface.h | 6 +----- include/G4Object.h | 6 +----- include/GeantImport.h | 6 +----- include/IRT.h | 6 +----- include/IRTSolution.h | 6 +----- include/OpticalBoundary.h | 6 +----- include/OpticalPhoton.h | 6 +----- include/ParametricSurface.h | 6 +----- include/RadiatorHistory.h | 6 +----- include/ReconstructionFactory.h | 6 +----- include/ReflectionPoint.h | 6 +----- include/RefractionPoint.h | 6 +----- include/SinglePDF.h | 6 +----- include/SphericalSurface.h | 6 +----- include/ToricSurface.h | 6 +----- include/TransientParticle.h | 6 +----- 32 files changed, 31 insertions(+), 161 deletions(-) diff --git a/include/BitMask.h b/include/BitMask.h index 5716a37..b1337c3 100644 --- a/include/BitMask.h +++ b/include/BitMask.h @@ -1,9 +1,7 @@ +#pragma once #include -#ifndef _BIT_MASK_ -#define _BIT_MASK_ - namespace IRT2 { class BitMask: public TObject { @@ -27,5 +25,3 @@ class BitMask: public TObject { }; } // namespace IRT2 - -#endif diff --git a/include/Calibration.h b/include/Calibration.h index a0a9ef5..ca3a80d 100644 --- a/include/Calibration.h +++ b/include/Calibration.h @@ -1,12 +1,10 @@ +#pragma once #include class TDatabasePDG; #include -#ifndef _CALIBRATION_ -#define _CALIBRATION_ - #include "GeantImport.h" // 5 degree binning for calibration purposes suffices?; @@ -72,5 +70,3 @@ class Calibration : public virtual GeantImport { }; } // namespace IRT2 - -#endif diff --git a/include/ChargedParticle.h b/include/ChargedParticle.h index 3276a65..40d8f2c 100644 --- a/include/ChargedParticle.h +++ b/include/ChargedParticle.h @@ -1,11 +1,9 @@ +#pragma once #include #include -#ifndef _CHARGED_PARTICLE_ -#define _CHARGED_PARTICLE_ - #include "CherenkovRadiator.h" #include "RadiatorHistory.h" #include "TransientParticle.h" @@ -110,5 +108,3 @@ class ChargedParticle: public TransientParticle { }; } // namespace IRT2 - -#endif diff --git a/include/ChargedParticleStep.h b/include/ChargedParticleStep.h index 22f2adf..4dead64 100644 --- a/include/ChargedParticleStep.h +++ b/include/ChargedParticleStep.h @@ -1,10 +1,8 @@ +#pragma once #include #include -#ifndef _CHARGED_PARTICLE_STEP_ -#define _CHARGED_PARTICLE_STEP_ - namespace IRT2 { class ChargedParticleStep: public TObject { @@ -31,5 +29,3 @@ class ChargedParticleStep: public TObject { }; } // namespace IRT2 - -#endif diff --git a/include/CherenkovDetector.h b/include/CherenkovDetector.h index f986178..382ff41 100644 --- a/include/CherenkovDetector.h +++ b/include/CherenkovDetector.h @@ -1,4 +1,3 @@ - #pragma once #include @@ -7,9 +6,6 @@ #include #include -#ifndef _CHERENKOV_DETECTOR_ -#define _CHERENKOV_DETECTOR_ - #include "CherenkovPhotonDetector.h" class CherenkovMirrorGroup; class OpticalBoundary; @@ -167,5 +163,3 @@ class CherenkovDetector: public TObject { }; } // namespace IRT2 - -#endif diff --git a/include/CherenkovDetectorCollection.h b/include/CherenkovDetectorCollection.h index 44427cd..2692ff0 100644 --- a/include/CherenkovDetectorCollection.h +++ b/include/CherenkovDetectorCollection.h @@ -1,9 +1,7 @@ +#pragma once #include -#ifndef _CHERENKOV_DETECTOR_COLLECTION_ -#define _CHERENKOV_DETECTOR_COLLECTION_ - class G4LogicalVolume; class G4RadiatorMaterial; class G4OpticalSurface; @@ -166,5 +164,3 @@ class CherenkovDetectorCollection: public BitMask { }; } // namespace IRT2 - -#endif diff --git a/include/CherenkovEvent.h b/include/CherenkovEvent.h index 38363f4..eb01005 100644 --- a/include/CherenkovEvent.h +++ b/include/CherenkovEvent.h @@ -1,9 +1,7 @@ +#pragma once #include -#ifndef _CHERENKOV_EVENT_ -#define _CHERENKOV_EVENT_ - #include "ChargedParticle.h" class OpticalPhoton; @@ -42,5 +40,3 @@ class CherenkovEvent: public TObject { }; } // namespace IRT2 - -#endif diff --git a/include/CherenkovMirror.h b/include/CherenkovMirror.h index ce5a6d0..8fe479a 100644 --- a/include/CherenkovMirror.h +++ b/include/CherenkovMirror.h @@ -1,6 +1,4 @@ - -#ifndef _CHERENKOV_MIRROR_ -#define _CHERENKOV_MIRROR_ +#pragma once #include "G4Object.h" #include "FlatSurface.h" @@ -104,5 +102,3 @@ class ConicalMirror: public CherenkovMirror, public ConicalSurface { }; } // namespace IRT2 - -#endif diff --git a/include/CherenkovPID.h b/include/CherenkovPID.h index a780cf6..1d5db29 100644 --- a/include/CherenkovPID.h +++ b/include/CherenkovPID.h @@ -1,11 +1,9 @@ +#pragma once #include #include #include -#ifndef _CHERENKOV_PID_ -#define _CHERENKOV_PID_ - namespace IRT2 { class CherenkovRadiator; @@ -76,5 +74,3 @@ class CherenkovPID { }; } // namespace IRT2 - -#endif diff --git a/include/CherenkovPhotonDetector.h b/include/CherenkovPhotonDetector.h index 2bd6413..323b6e3 100644 --- a/include/CherenkovPhotonDetector.h +++ b/include/CherenkovPhotonDetector.h @@ -1,9 +1,7 @@ +#pragma once #include -#ifndef _CHERENKOV_PHOTON_DETECTOR_ -#define _CHERENKOV_PHOTON_DETECTOR_ - #include "G4Object.h" #include "FlatSurface.h" @@ -99,5 +97,3 @@ class CherenkovPhotonDetector: public G4Object { }; } // namespace IRT2 - -#endif diff --git a/include/CherenkovRadiator.h b/include/CherenkovRadiator.h index afcd247..816813a 100644 --- a/include/CherenkovRadiator.h +++ b/include/CherenkovRadiator.h @@ -1,3 +1,4 @@ +#pragma once #include #include @@ -8,9 +9,6 @@ #include class TH1D; -#ifndef _CHERENKOV_RADIATOR_ -#define _CHERENKOV_RADIATOR_ - #include "ParametricSurface.h" class G4LogicalVolume; class G4RadiatorMaterial; @@ -196,5 +194,3 @@ class CherenkovRadiator: public TObject { }; } // namespace IRT2 - -#endif diff --git a/include/CherenkovWaveLengthRange.h b/include/CherenkovWaveLengthRange.h index 58c2966..13fe38e 100644 --- a/include/CherenkovWaveLengthRange.h +++ b/include/CherenkovWaveLengthRange.h @@ -1,6 +1,4 @@ - -#ifndef _CHERENKOV_WAVELENGTH_RANGE_ -#define _CHERENKOV_WAVELENGTH_RANGE_ +#pragma once namespace IRT2 { @@ -27,5 +25,3 @@ class CherenkovWaveLengthRange { }; } // namespace IRT2 - -#endif diff --git a/include/ConicalSurface.h b/include/ConicalSurface.h index 313a059..5684960 100644 --- a/include/ConicalSurface.h +++ b/include/ConicalSurface.h @@ -1,9 +1,7 @@ +#pragma once #include "ParametricSurface.h" -#ifndef _IRT_CONICAL_SURFACE_ -#define _IRT_CONICAL_SURFACE_ - namespace IRT2 { class ConicalSurface: public ParametricSurface { @@ -85,5 +83,3 @@ class ConicalSurface: public ParametricSurface { }; } // namespace IRT2 - -#endif diff --git a/include/CylindricalSurface.h b/include/CylindricalSurface.h index f2d36d0..0563543 100644 --- a/include/CylindricalSurface.h +++ b/include/CylindricalSurface.h @@ -1,3 +1,4 @@ +#pragma once // // Yes, prefer to keep it separately even that it is a subset of a ConicalSurface; @@ -5,9 +6,6 @@ #include "ParametricSurface.h" -#ifndef _IRT_CYLINDRICAL_SURFACE_ -#define _IRT_CYLINDRICAL_SURFACE_ - namespace IRT2 { class CylindricalSurface: public ParametricSurface { @@ -81,5 +79,3 @@ class CylindricalSurface: public ParametricSurface { }; } // namespace IRT2 - -#endif diff --git a/include/Digitization.h b/include/Digitization.h index 216405b..a90203c 100644 --- a/include/Digitization.h +++ b/include/Digitization.h @@ -1,9 +1,7 @@ +#pragma once #include -#ifndef _DIGITIZATION_ -#define _DIGITIZATION_ - #include "DigitizedHit.h" #include "GeantImport.h" @@ -70,5 +68,3 @@ class Digitization : public virtual GeantImport { }; } // namespace IRT2 - -#endif diff --git a/include/DigitizedHit.h b/include/DigitizedHit.h index 2824a8f..90a3168 100644 --- a/include/DigitizedHit.h +++ b/include/DigitizedHit.h @@ -1,3 +1,4 @@ +#pragma once #include #include @@ -6,9 +7,6 @@ #include #include -#ifndef _DIGITIZED_HIT_ -#define _DIGITIZED_HIT_ - #include "CherenkovPhotonDetector.h" #include "SinglePDF.h" @@ -92,5 +90,3 @@ class DigitizedHit { }; } // namespace IRT2 - -#endif diff --git a/include/FlatSurface.h b/include/FlatSurface.h index 712a5fe..3978bb1 100644 --- a/include/FlatSurface.h +++ b/include/FlatSurface.h @@ -1,9 +1,7 @@ +#pragma once #include "ParametricSurface.h" -#ifndef _IRT_FLAT_SURFACE_ -#define _IRT_FLAT_SURFACE_ - namespace IRT2 { // In fact a rectangle in space; @@ -61,5 +59,3 @@ class FlatSurface: public ParametricSurface, public LocalCoordinatesXY { }; } // namespace IRT2 - -#endif diff --git a/include/G4Object.h b/include/G4Object.h index d8cb83c..e5b1139 100644 --- a/include/G4Object.h +++ b/include/G4Object.h @@ -1,9 +1,7 @@ +#pragma once #include -#ifndef _G4_OBJECT_ -#define _G4_OBJECT_ - class G4Material; class G4VPhysicalVolume; class G4LogicalVolume; @@ -82,5 +80,3 @@ class G4Object: public TObject { }; } // namespace IRT2 - -#endif diff --git a/include/GeantImport.h b/include/GeantImport.h index c9d0f8f..7a4d969 100644 --- a/include/GeantImport.h +++ b/include/GeantImport.h @@ -1,9 +1,7 @@ +#pragma once #include -#ifndef _GEANT_IMPORT_ -#define _GEANT_IMPORT_ - #include "CherenkovEvent.h" #define _MOMENTUM_CUTOFF_DEFAULT_ (0.010) @@ -54,5 +52,3 @@ class GeantImport { }; } // namespace IRT2 - -#endif diff --git a/include/IRT.h b/include/IRT.h index afff4c2..f2df984 100644 --- a/include/IRT.h +++ b/include/IRT.h @@ -1,3 +1,4 @@ +#pragma once #include @@ -5,9 +6,6 @@ #include #include -#ifndef _IRT_FACTORY_ -#define _IRT_FACTORY_ - // Don't even care about the units here; [mm] in fact; just make it practically small; #define _IRT_PRECISION_DEFAULT_ (1E-7) // Well, assume radians in [theta,phi] -> 1urad step should be good enough; @@ -73,5 +71,3 @@ class IRT: public TObject { }; } // namespace IRT2 - -#endif diff --git a/include/IRTSolution.h b/include/IRTSolution.h index 5250444..05969f6 100644 --- a/include/IRTSolution.h +++ b/include/IRTSolution.h @@ -1,9 +1,7 @@ +#pragma once #include -#ifndef _IRT_SOLUTION_ -#define _IRT_SOLUTION_ - namespace IRT2 { class IRTSolution { @@ -68,5 +66,3 @@ class IRTSolution { }; } // namespace IRT2 - -#endif diff --git a/include/OpticalBoundary.h b/include/OpticalBoundary.h index abc9f20..eaa6a1d 100644 --- a/include/OpticalBoundary.h +++ b/include/OpticalBoundary.h @@ -1,10 +1,8 @@ +#pragma once #include #include -#ifndef _OPTICAL_BOUNDARY_ -#define _OPTICAL_BOUNDARY_ - #include "CherenkovRadiator.h" namespace IRT2 { @@ -46,5 +44,3 @@ class OpticalBoundary: public TObject { }; } // namespace IRT2 - -#endif diff --git a/include/OpticalPhoton.h b/include/OpticalPhoton.h index 0757560..f8becae 100644 --- a/include/OpticalPhoton.h +++ b/include/OpticalPhoton.h @@ -1,3 +1,4 @@ +#pragma once #include #include @@ -5,9 +6,6 @@ #include -#ifndef _OPTICAL_PHOTON_ -#define _OPTICAL_PHOTON_ - #include "TransientParticle.h" #include "CherenkovPhotonDetector.h" #include "RefractionPoint.h" @@ -115,5 +113,3 @@ class OpticalPhoton: public TransientParticle { }; } // namespace IRT2 - -#endif diff --git a/include/ParametricSurface.h b/include/ParametricSurface.h index 53d5afa..5ca3432 100644 --- a/include/ParametricSurface.h +++ b/include/ParametricSurface.h @@ -1,12 +1,10 @@ +#pragma once #include #include #include -#ifndef _IRT_PARAMETRIC_SURFACE_ -#define _IRT_PARAMETRIC_SURFACE_ - namespace IRT2 { class ParametricSurface: public TObject { @@ -92,5 +90,3 @@ class LocalCoordinatesXY: public TObject { }; } // namespace IRT2 - -#endif diff --git a/include/RadiatorHistory.h b/include/RadiatorHistory.h index 5f97360..4a4fd01 100644 --- a/include/RadiatorHistory.h +++ b/include/RadiatorHistory.h @@ -1,12 +1,10 @@ +#pragma once #include #include #include -#ifndef _RADIATOR_HISTORY_ -#define _RADIATOR_HISTORY_ - #include "OpticalPhoton.h" #include "ChargedParticleStep.h" @@ -86,5 +84,3 @@ class RadiatorHistory: public TObject { }; } // namespace IRT2 - -#endif diff --git a/include/ReconstructionFactory.h b/include/ReconstructionFactory.h index 105e2b1..0c3f733 100644 --- a/include/ReconstructionFactory.h +++ b/include/ReconstructionFactory.h @@ -1,12 +1,10 @@ +#pragma once class TParticlePDG; #include "Calibration.h" #include "Digitization.h" -#ifndef _RECONSTRUCTION_FACTORY_ -#define _RECONSTRUCTION_FACTORY_ - namespace IRT2 { struct ReconstructionFactoryPlots { @@ -99,5 +97,3 @@ class ReconstructionFactory : public Digitization, public Calibration { }; } // namespace IRT2 - -#endif diff --git a/include/ReflectionPoint.h b/include/ReflectionPoint.h index 4d782fb..aa53117 100644 --- a/include/ReflectionPoint.h +++ b/include/ReflectionPoint.h @@ -1,11 +1,9 @@ +#pragma once #include #include #include -#ifndef _REFLECTION_POINT_ -#define _REFLECTION_POINT_ - #include "CherenkovMirror.h" namespace IRT2 { @@ -28,5 +26,3 @@ class ReflectionPoint: public TObject { }; } // namespace IRT2 - -#endif diff --git a/include/RefractionPoint.h b/include/RefractionPoint.h index 026ff1f..7eeee27 100644 --- a/include/RefractionPoint.h +++ b/include/RefractionPoint.h @@ -1,11 +1,9 @@ +#pragma once #include #include #include -#ifndef _REFRACTION_POINT_ -#define _REFRACTION_POINT_ - #include "CherenkovRadiator.h" namespace IRT2 { @@ -33,5 +31,3 @@ class RefractionPoint: public TObject { }; } // namespace IRT2 - -#endif diff --git a/include/SinglePDF.h b/include/SinglePDF.h index 362e2cd..74f2232 100644 --- a/include/SinglePDF.h +++ b/include/SinglePDF.h @@ -1,12 +1,10 @@ +#pragma once #include #include #include -#ifndef _SINGLE_PDF_ -#define _SINGLE_PDF_ - namespace IRT2 { class SinglePDF: public TObject { @@ -169,5 +167,3 @@ class VectorPDF: public TObject { }; } // namespace IRT2 - -#endif diff --git a/include/SphericalSurface.h b/include/SphericalSurface.h index 9c56349..74b9b82 100644 --- a/include/SphericalSurface.h +++ b/include/SphericalSurface.h @@ -1,9 +1,7 @@ +#pragma once #include "ParametricSurface.h" -#ifndef _IRT_SPHERICAL_SURFACE_ -#define _IRT_SPHERICAL_SURFACE_ - namespace IRT2 { class SphericalSurface: public ParametricSurface { @@ -51,5 +49,3 @@ class SphericalSurface: public ParametricSurface { }; } // namespace IRT2 - -#endif diff --git a/include/ToricSurface.h b/include/ToricSurface.h index d227c10..88eefe7 100644 --- a/include/ToricSurface.h +++ b/include/ToricSurface.h @@ -1,3 +1,4 @@ +#pragma once #include "ParametricSurface.h" @@ -8,9 +9,6 @@ // in 3D ends up with a quartic equation); // -#ifndef _IRT_TORIC_SURFACE_ -#define _IRT_TORIC_SURFACE_ - namespace IRT2 { class ToricSurface: public ParametricSurface { @@ -107,5 +105,3 @@ class ToricSurface: public ParametricSurface { }; } // namespace IRT2 - -#endif diff --git a/include/TransientParticle.h b/include/TransientParticle.h index 7f7feda..14d982c 100644 --- a/include/TransientParticle.h +++ b/include/TransientParticle.h @@ -1,10 +1,8 @@ +#pragma once #include #include -#ifndef _TRANSIENT_PARTICLE_ -#define _TRANSIENT_PARTICLE_ - namespace IRT2 { // Need a separate class because do not want to deal with G4VUserTrackInformation serialization; @@ -41,5 +39,3 @@ class TransientParticle: public TObject { }; } // namespace IRT2 - -#endif