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) diff --git a/include/BitMask.h b/include/BitMask.h index 9f9a89c..b1337c3 100644 --- a/include/BitMask.h +++ b/include/BitMask.h @@ -1,8 +1,8 @@ +#pragma once #include -#ifndef _BIT_MASK_ -#define _BIT_MASK_ +namespace IRT2 { class BitMask: public TObject { public: @@ -24,4 +24,4 @@ class BitMask: public TObject { #endif }; -#endif +} // namespace IRT2 diff --git a/include/Calibration.h b/include/Calibration.h index 89b3b13..ca3a80d 100644 --- a/include/Calibration.h +++ b/include/Calibration.h @@ -1,18 +1,18 @@ +#pragma once #include class TDatabasePDG; #include -#ifndef _CALIBRATION_ -#define _CALIBRATION_ - #include "GeantImport.h" // 5 degree binning for calibration purposes suffices?; #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 +69,4 @@ class Calibration : public virtual GeantImport { double m_DefaultSinglePhotonThetaResolution; }; - -#endif +} // namespace IRT2 diff --git a/include/ChargedParticle.h b/include/ChargedParticle.h index 6731564..40d8f2c 100644 --- a/include/ChargedParticle.h +++ b/include/ChargedParticle.h @@ -1,17 +1,17 @@ +#pragma once #include #include -#ifndef _CHARGED_PARTICLE_ -#define _CHARGED_PARTICLE_ - #include "CherenkovRadiator.h" #include "RadiatorHistory.h" #include "TransientParticle.h" #include "CherenkovPID.h" #include "DigitizedHit.h" +namespace IRT2 { + class ChargedParticle: public TransientParticle { public: ChargedParticle(int pdg = 0, bool primary = true): @@ -107,4 +107,4 @@ class ChargedParticle: public TransientParticle { #endif }; -#endif +} // namespace IRT2 diff --git a/include/ChargedParticleStep.h b/include/ChargedParticleStep.h index 8fc8666..4dead64 100644 --- a/include/ChargedParticleStep.h +++ b/include/ChargedParticleStep.h @@ -1,9 +1,9 @@ +#pragma once #include #include -#ifndef _CHARGED_PARTICLE_STEP_ -#define _CHARGED_PARTICLE_STEP_ +namespace IRT2 { class ChargedParticleStep: public TObject { public: @@ -28,4 +28,4 @@ class ChargedParticleStep: public TObject { #endif }; -#endif +} // namespace IRT2 diff --git a/include/CherenkovDetector.h b/include/CherenkovDetector.h index b14f03d..382ff41 100644 --- a/include/CherenkovDetector.h +++ b/include/CherenkovDetector.h @@ -1,4 +1,3 @@ - #pragma once #include @@ -7,14 +6,13 @@ #include #include -#ifndef _CHERENKOV_DETECTOR_ -#define _CHERENKOV_DETECTOR_ - #include "CherenkovPhotonDetector.h" 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 +162,4 @@ class CherenkovDetector: public TObject { #endif }; -#endif +} // namespace IRT2 diff --git a/include/CherenkovDetectorCollection.h b/include/CherenkovDetectorCollection.h index 97fc8e2..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; @@ -18,6 +16,8 @@ class CherenkovPhotonDetector; #define _STORE_REFLECTION_POINTS_ (0x00000002) #define _STORE_REFRACTION_POINTS_ (0x00000003) +namespace IRT2 { + class CherenkovDetectorCollection: public BitMask { public: CherenkovDetectorCollection() {}; @@ -163,4 +163,4 @@ class CherenkovDetectorCollection: public BitMask { #endif }; -#endif +} // namespace IRT2 diff --git a/include/CherenkovEvent.h b/include/CherenkovEvent.h index 92b4107..eb01005 100644 --- a/include/CherenkovEvent.h +++ b/include/CherenkovEvent.h @@ -1,13 +1,13 @@ +#pragma once #include -#ifndef _CHERENKOV_EVENT_ -#define _CHERENKOV_EVENT_ - #include "ChargedParticle.h" class OpticalPhoton; +namespace IRT2 { + class CherenkovEvent: public TObject { public: CherenkovEvent() {}; @@ -39,4 +39,4 @@ class CherenkovEvent: public TObject { #endif }; -#endif +} // namespace IRT2 diff --git a/include/CherenkovMirror.h b/include/CherenkovMirror.h index 84f5be6..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" @@ -11,6 +9,8 @@ class CherenkovWaveLengthRange; +namespace IRT2 { + class SurfaceCopy: public G4ObjectCopy { public: SurfaceCopy(G4VPhysicalVolume *phys = 0): G4ObjectCopy(phys), m_Surface(0) {}; @@ -101,4 +101,4 @@ class ConicalMirror: public CherenkovMirror, public ConicalSurface { #endif }; -#endif +} // namespace IRT2 diff --git a/include/CherenkovPID.h b/include/CherenkovPID.h index 2e85e0d..1d5db29 100644 --- a/include/CherenkovPID.h +++ b/include/CherenkovPID.h @@ -1,10 +1,10 @@ +#pragma once #include #include #include -#ifndef _CHERENKOV_PID_ -#define _CHERENKOV_PID_ +namespace IRT2 { class CherenkovRadiator; @@ -73,4 +73,4 @@ class CherenkovPID { std::vector m_Hypotheses; }; -#endif +} // namespace IRT2 diff --git a/include/CherenkovPhotonDetector.h b/include/CherenkovPhotonDetector.h index 99ca78e..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" @@ -11,6 +9,8 @@ class G4DataInterpolation; #include "IRT.h" +namespace IRT2 { + class CherenkovPhotonDetector: public G4Object { public: CherenkovPhotonDetector(G4VSolid *solid = 0, G4Material *material = 0): @@ -96,4 +96,4 @@ class CherenkovPhotonDetector: public G4Object { #endif }; -#endif +} // namespace IRT2 diff --git a/include/CherenkovRadiator.h b/include/CherenkovRadiator.h index 5deb58e..816813a 100644 --- a/include/CherenkovRadiator.h +++ b/include/CherenkovRadiator.h @@ -1,3 +1,4 @@ +#pragma once #include #include @@ -8,15 +9,14 @@ #include class TH1D; -#ifndef _CHERENKOV_RADIATOR_ -#define _CHERENKOV_RADIATOR_ - #include "ParametricSurface.h" class G4LogicalVolume; 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 +193,4 @@ class CherenkovRadiator: public TObject { #endif }; -#endif +} // namespace IRT2 diff --git a/include/CherenkovWaveLengthRange.h b/include/CherenkovWaveLengthRange.h index a7fc673..13fe38e 100644 --- a/include/CherenkovWaveLengthRange.h +++ b/include/CherenkovWaveLengthRange.h @@ -1,6 +1,6 @@ +#pragma once -#ifndef _CHERENKOV_WAVELENGTH_RANGE_ -#define _CHERENKOV_WAVELENGTH_RANGE_ +namespace IRT2 { class CherenkovWaveLengthRange { public: @@ -24,4 +24,4 @@ class CherenkovWaveLengthRange { double *m_PhotonEnergies; }; -#endif +} // namespace IRT2 diff --git a/include/ConicalSurface.h b/include/ConicalSurface.h index b982807..5684960 100644 --- a/include/ConicalSurface.h +++ b/include/ConicalSurface.h @@ -1,8 +1,8 @@ +#pragma once #include "ParametricSurface.h" -#ifndef _IRT_CONICAL_SURFACE_ -#define _IRT_CONICAL_SURFACE_ +namespace IRT2 { class ConicalSurface: public ParametricSurface { public: @@ -82,4 +82,4 @@ class ConicalSurface: public ParametricSurface { #endif }; -#endif +} // namespace IRT2 diff --git a/include/CylindricalSurface.h b/include/CylindricalSurface.h index e740521..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,8 +6,7 @@ #include "ParametricSurface.h" -#ifndef _IRT_CYLINDRICAL_SURFACE_ -#define _IRT_CYLINDRICAL_SURFACE_ +namespace IRT2 { class CylindricalSurface: public ParametricSurface { public: @@ -78,4 +78,4 @@ class CylindricalSurface: public ParametricSurface { #endif }; -#endif +} // namespace IRT2 diff --git a/include/Digitization.h b/include/Digitization.h index 0ab3a0e..a90203c 100644 --- a/include/Digitization.h +++ b/include/Digitization.h @@ -1,11 +1,12 @@ +#pragma once #include -#ifndef _DIGITIZATION_ -#define _DIGITIZATION_ - #include "DigitizedHit.h" #include "GeantImport.h" + +namespace IRT2 { + class CherenkovPhotonDetector; struct BlackoutCell { @@ -66,4 +67,4 @@ class Digitization : public virtual GeantImport { unsigned m_SensorActiveAreaPixellation; }; -#endif +} // namespace IRT2 diff --git a/include/DigitizedHit.h b/include/DigitizedHit.h index 9ccef6d..90a3168 100644 --- a/include/DigitizedHit.h +++ b/include/DigitizedHit.h @@ -1,3 +1,4 @@ +#pragma once #include #include @@ -6,11 +7,11 @@ #include #include -#ifndef _DIGITIZED_HIT_ -#define _DIGITIZED_HIT_ - #include "CherenkovPhotonDetector.h" #include "SinglePDF.h" + +namespace IRT2 { + class ChargedParticle; class IRT; @@ -87,4 +88,5 @@ class DigitizedHit { //TVector3 m_PhotonVertexPosition; //! //TVector3 m_PhotonVertexMomentum; //! }; -#endif + +} // namespace IRT2 diff --git a/include/FlatSurface.h b/include/FlatSurface.h index 4567426..3978bb1 100644 --- a/include/FlatSurface.h +++ b/include/FlatSurface.h @@ -1,8 +1,8 @@ +#pragma once #include "ParametricSurface.h" -#ifndef _IRT_FLAT_SURFACE_ -#define _IRT_FLAT_SURFACE_ +namespace IRT2 { // In fact a rectangle in space; class FlatSurface: public ParametricSurface, public LocalCoordinatesXY { @@ -58,4 +58,4 @@ class FlatSurface: public ParametricSurface, public LocalCoordinatesXY { #endif }; -#endif +} // namespace IRT2 diff --git a/include/G4Object.h b/include/G4Object.h index 474ba98..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; @@ -20,6 +18,8 @@ class G4RotationMatrix; class G4ThreeVector; #endif +namespace IRT2 { + class G4ObjectCopy: public TObject { public: G4ObjectCopy(G4VPhysicalVolume *phys = 0): m_PhysicalVolume(phys) {}; @@ -79,4 +79,4 @@ class G4Object: public TObject { #endif }; -#endif +} // namespace IRT2 diff --git a/include/GeantImport.h b/include/GeantImport.h index dc5458f..7a4d969 100644 --- a/include/GeantImport.h +++ b/include/GeantImport.h @@ -1,15 +1,16 @@ +#pragma once #include -#ifndef _GEANT_IMPORT_ -#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 +47,8 @@ class GeantImport { // Input (GEANT) / output(Reco) event structure; CherenkovEvent *m_Event; - bool m_PurgeSecondaries; + bool m_PurgeSecondaries; double m_MomentumCutoff; }; -#endif +} // namespace IRT2 diff --git a/include/IRT.h b/include/IRT.h index 1bb4245..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; @@ -24,6 +22,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 +70,4 @@ class IRT: public TObject { #endif }; -#endif +} // namespace IRT2 diff --git a/include/IRTSolution.h b/include/IRTSolution.h index 44af9d8..05969f6 100644 --- a/include/IRTSolution.h +++ b/include/IRTSolution.h @@ -1,8 +1,8 @@ +#pragma once #include -#ifndef _IRT_SOLUTION_ -#define _IRT_SOLUTION_ +namespace IRT2 { class IRTSolution { friend class IRT; @@ -65,4 +65,4 @@ class IRTSolution { double m_SigmaDx, m_SigmaDy, m_SigmaDz, m_SigmaDt, m_SigmaDf; }; -#endif +} // namespace IRT2 diff --git a/include/OpticalBoundary.h b/include/OpticalBoundary.h index bad9022..eaa6a1d 100644 --- a/include/OpticalBoundary.h +++ b/include/OpticalBoundary.h @@ -1,11 +1,12 @@ +#pragma once #include #include -#ifndef _OPTICAL_BOUNDARY_ -#define _OPTICAL_BOUNDARY_ - #include "CherenkovRadiator.h" + +namespace IRT2 { + class ParametricSurface; class OpticalBoundary: public TObject { @@ -42,4 +43,4 @@ class OpticalBoundary: public TObject { #endif }; -#endif +} // namespace IRT2 diff --git a/include/OpticalPhoton.h b/include/OpticalPhoton.h index d87ffe2..f8becae 100644 --- a/include/OpticalPhoton.h +++ b/include/OpticalPhoton.h @@ -1,3 +1,4 @@ +#pragma once #include #include @@ -5,16 +6,16 @@ #include -#ifndef _OPTICAL_PHOTON_ -#define _OPTICAL_PHOTON_ - #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 +112,4 @@ class OpticalPhoton: public TransientParticle { #endif }; -#endif +} // namespace IRT2 diff --git a/include/ParametricSurface.h b/include/ParametricSurface.h index 6859253..5ca3432 100644 --- a/include/ParametricSurface.h +++ b/include/ParametricSurface.h @@ -1,11 +1,11 @@ +#pragma once #include #include #include -#ifndef _IRT_PARAMETRIC_SURFACE_ -#define _IRT_PARAMETRIC_SURFACE_ +namespace IRT2 { class ParametricSurface: public TObject { public: @@ -87,6 +87,6 @@ class LocalCoordinatesXY: public TObject { #ifndef DISABLE_ROOT_IO ClassDef(LocalCoordinatesXY, 1); #endif -}; +}; -#endif +} // namespace IRT2 diff --git a/include/RadiatorHistory.h b/include/RadiatorHistory.h index 830995f..4a4fd01 100644 --- a/include/RadiatorHistory.h +++ b/include/RadiatorHistory.h @@ -1,15 +1,15 @@ +#pragma once #include #include #include -#ifndef _RADIATOR_HISTORY_ -#define _RADIATOR_HISTORY_ - #include "OpticalPhoton.h" #include "ChargedParticleStep.h" +namespace IRT2 { + class RadiatorHistory: public TObject { public: RadiatorHistory(): m_EstimatedPath(0.0)/*, m_AverageTime(0.0)*/ {}; @@ -83,4 +83,4 @@ class RadiatorHistory: public TObject { #endif }; -#endif +} // namespace IRT2 diff --git a/include/ReconstructionFactory.h b/include/ReconstructionFactory.h index f491152..0c3f733 100644 --- a/include/ReconstructionFactory.h +++ b/include/ReconstructionFactory.h @@ -1,11 +1,11 @@ +#pragma once class TParticlePDG; #include "Calibration.h" #include "Digitization.h" -#ifndef _RECONSTRUCTION_FACTORY_ -#define _RECONSTRUCTION_FACTORY_ +namespace IRT2 { struct ReconstructionFactoryPlots { ReconstructionFactoryPlots(); @@ -96,4 +96,4 @@ class ReconstructionFactory : public Digitization, public Calibration { void LaunchRingFinder(bool calibration); }; -#endif +} // namespace IRT2 diff --git a/include/ReflectionPoint.h b/include/ReflectionPoint.h index d0a0834..aa53117 100644 --- a/include/ReflectionPoint.h +++ b/include/ReflectionPoint.h @@ -1,13 +1,13 @@ +#pragma once #include #include #include -#ifndef _REFLECTION_POINT_ -#define _REFLECTION_POINT_ - #include "CherenkovMirror.h" +namespace IRT2 { + class ReflectionPoint: public TObject { public: ReflectionPoint(): m_Mirror(0)/*, m_VolumeCopy(0)*/ {}; @@ -25,4 +25,4 @@ class ReflectionPoint: public TObject { #endif }; -#endif +} // namespace IRT2 diff --git a/include/RefractionPoint.h b/include/RefractionPoint.h index 66c8cab..7eeee27 100644 --- a/include/RefractionPoint.h +++ b/include/RefractionPoint.h @@ -1,13 +1,13 @@ +#pragma once #include #include #include -#ifndef _REFRACTION_POINT_ -#define _REFRACTION_POINT_ - #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 +30,4 @@ class RefractionPoint: public TObject { #endif }; -#endif +} // namespace IRT2 diff --git a/include/SinglePDF.h b/include/SinglePDF.h index 1cada40..74f2232 100644 --- a/include/SinglePDF.h +++ b/include/SinglePDF.h @@ -1,11 +1,11 @@ +#pragma once #include #include #include -#ifndef _SINGLE_PDF_ -#define _SINGLE_PDF_ +namespace IRT2 { class SinglePDF: public TObject { public: @@ -166,5 +166,4 @@ class VectorPDF: public TObject { #endif }; - -#endif +} // namespace IRT2 diff --git a/include/SphericalSurface.h b/include/SphericalSurface.h index 9cec9f2..74b9b82 100644 --- a/include/SphericalSurface.h +++ b/include/SphericalSurface.h @@ -1,8 +1,8 @@ +#pragma once #include "ParametricSurface.h" -#ifndef _IRT_SPHERICAL_SURFACE_ -#define _IRT_SPHERICAL_SURFACE_ +namespace IRT2 { class SphericalSurface: public ParametricSurface { public: @@ -48,4 +48,4 @@ class SphericalSurface: public ParametricSurface { #endif }; -#endif +} // namespace IRT2 diff --git a/include/ToricSurface.h b/include/ToricSurface.h index a5a599d..88eefe7 100644 --- a/include/ToricSurface.h +++ b/include/ToricSurface.h @@ -1,3 +1,4 @@ +#pragma once #include "ParametricSurface.h" @@ -8,8 +9,7 @@ // in 3D ends up with a quartic equation); // -#ifndef _IRT_TORIC_SURFACE_ -#define _IRT_TORIC_SURFACE_ +namespace IRT2 { class ToricSurface: public ParametricSurface { public: @@ -104,4 +104,4 @@ class ToricSurface: public ParametricSurface { #endif }; -#endif +} // namespace IRT2 diff --git a/include/TransientParticle.h b/include/TransientParticle.h index d4f4cab..14d982c 100644 --- a/include/TransientParticle.h +++ b/include/TransientParticle.h @@ -1,9 +1,9 @@ +#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; class TransientParticle: public TObject { @@ -38,4 +38,4 @@ class TransientParticle: public TObject { #endif }; -#endif +} // namespace IRT2 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