From 1a8caee42bdfad35d6fd97731e270fbff502dc6e Mon Sep 17 00:00:00 2001 From: Markus Frank <markus.frank@cern.ch> Date: Fri, 26 Sep 2014 15:35:49 +0000 Subject: [PATCH] Improve doxygen documentation --- DDAlign/include/DDAlign/AlignmentCache.h | 19 +- DDAlign/include/DDAlign/AlignmentOperators.h | 44 ++-- DDAlign/include/DDAlign/AlignmentStack.h | 24 +- DDAlign/include/DDAlign/AlignmentTags.h | 4 + .../include/DDAlign/AlignmentTransaction.h | 20 +- DDAlign/include/DDAlign/AlignmentWriter.h | 19 +- DDAlign/include/DDAlign/DetectorAlignment.h | 18 +- DDCond/include/DDCond/ConditionValidator.h | 23 +- DDCond/include/DDCond/ConditionsHandler.h | 19 +- DDCond/include/DDCond/ConditionsOperators.h | 10 +- DDCond/include/DDCond/ConditionsStack.h | 21 +- DDCond/include/DDCond/ConditionsTags.h | 4 +- DDCond/include/DDCond/ConditionsTransaction.h | 21 +- DDCore/include/DD4hep/Alignment.h | 15 +- DDCore/include/DD4hep/BasicGrammar.h | 10 +- DDCore/include/DD4hep/Callback.h | 21 +- DDCore/include/DD4hep/Conditions.h | 37 +-- DDCore/include/DD4hep/DetFactoryHelper.h | 11 +- DDCore/include/DD4hep/Detector.h | 34 ++- DDCore/include/DD4hep/DetectorTools.h | 5 +- DDCore/include/DD4hep/Exceptions.h | 14 +- DDCore/include/DD4hep/Factories.h | 53 +++-- DDCore/include/DD4hep/FieldTypes.h | 33 ++- DDCore/include/DD4hep/Fields.h | 31 ++- DDCore/include/DD4hep/GeoHandler.h | 37 +-- DDCore/include/DD4hep/Handle.h | 81 +++++-- DDCore/include/DD4hep/InstanceCount.h | 20 +- DDCore/include/DD4hep/LCDD.h | 23 +- DDCore/include/DD4hep/LCDDData.h | 34 ++- DDCore/include/DD4hep/MatrixHelpers.h | 25 +- DDCore/include/DD4hep/NamedObject.h | 10 +- DDCore/include/DD4hep/ObjectExtensions.h | 8 +- DDCore/include/DD4hep/Objects.h | 65 +++--- DDCore/include/DD4hep/Parsers.h | 160 ++++++------- DDCore/include/DD4hep/Printout.h | 6 +- DDCore/include/DD4hep/Readout.h | 6 +- DDCore/include/DD4hep/Segmentations.h | 11 +- DDCore/include/DD4hep/Shapes.h | 126 +++++----- DDCore/include/DD4hep/ToStream.h | 24 +- DDCore/include/DD4hep/VolumeManager.h | 7 +- DDCore/include/DD4hep/Volumes.h | 46 ++-- DDCore/include/DD4hep/config.h | 9 +- .../include/DD4hep/objects/BasicGrammar_inl.h | 17 +- .../DD4hep/objects/ConditionsInterna.h | 65 +++--- .../include/DD4hep/objects/DetectorInterna.h | 42 ++-- .../include/DD4hep/objects/ObjectsInterna.h | 69 +++--- .../DD4hep/objects/VolumeManagerInterna.h | 31 ++- DDCore/include/XML/Conversions.h | 11 +- DDCore/include/XML/DocumentHandler.h | 7 +- DDCore/include/XML/Evaluator.h | 1 + DDCore/include/XML/Layering.h | 126 +++++++--- DDCore/include/XML/UnicodeValues.h | 3 + DDCore/include/XML/XMLDetector.h | 18 +- DDCore/include/XML/XMLDimension.h | 13 +- DDCore/include/XML/XMLElements.h | 128 +++++----- DDCore/include/XML/config.h | 6 +- DDCore/src/ConditionsInterna.cpp | 4 +- DDCore/src/GeometryTreeDump.h | 17 +- DDCore/src/LCDDImp.h | 10 +- DDCore/src/SimpleGDMLWriter.h | 17 +- DDCore/src/XML/DocumentHandler.cpp | 25 +- DDCore/src/plugins/LCDDConverter.h | 25 +- DDG4/include/DDG4/ComponentProperties.h | 28 ++- DDG4/include/DDG4/Factories.h | 2 + DDG4/include/DDG4/Geant4Action.h | 41 ++-- DDG4/include/DDG4/Geant4ActionPhase.h | 19 +- DDG4/include/DDG4/Geant4AssemblyVolume.h | 21 +- DDG4/include/DDG4/Geant4Call.h | 19 +- DDG4/include/DDG4/Geant4Config.h | 13 +- DDG4/include/DDG4/Geant4Context.h | 24 +- DDG4/include/DDG4/Geant4Converter.h | 20 +- DDG4/include/DDG4/Geant4Data.h | 45 +++- DDG4/include/DDG4/Geant4DataConversion.h | 44 ++-- DDG4/include/DDG4/Geant4DataDump.h | 18 +- .../include/DDG4/Geant4DetectorConstruction.h | 16 +- DDG4/include/DDG4/Geant4EventAction.h | 29 +-- DDG4/include/DDG4/Geant4Field.h | 9 +- DDG4/include/DDG4/Geant4GDMLDetector.h | 16 +- DDG4/include/DDG4/Geant4GeneratorAction.h | 31 ++- DDG4/include/DDG4/Geant4GeneratorActionInit.h | 16 +- DDG4/include/DDG4/Geant4GeometryInfo.h | 22 +- DDG4/include/DDG4/Geant4Handle.h | 18 +- DDG4/include/DDG4/Geant4HierarchyDump.h | 14 +- DDG4/include/DDG4/Geant4HitCollection.h | 44 ++-- DDG4/include/DDG4/Geant4InputAction.h | 20 +- DDG4/include/DDG4/Geant4InteractionMerger.h | 5 +- .../DDG4/Geant4InteractionVertexBoost.h | 8 +- .../DDG4/Geant4InteractionVertexSmear.h | 5 +- DDG4/include/DDG4/Geant4IsotropeGenerator.h | 6 +- DDG4/include/DDG4/Geant4Kernel.h | 9 +- DDG4/include/DDG4/Geant4Mapping.h | 10 +- DDG4/include/DDG4/Geant4MonteCarloTruth.h | 41 ++-- DDG4/include/DDG4/Geant4Output2ROOT.h | 21 +- DDG4/include/DDG4/Geant4OutputAction.h | 8 +- DDG4/include/DDG4/Geant4Particle.h | 26 ++- DDG4/include/DDG4/Geant4ParticleGun.h | 10 +- DDG4/include/DDG4/Geant4ParticleHandler.h | 11 +- DDG4/include/DDG4/Geant4ParticlePrint.h | 5 +- DDG4/include/DDG4/Geant4PhysicsList.h | 40 ++-- DDG4/include/DDG4/Geant4Primary.h | 20 +- DDG4/include/DDG4/Geant4PrimaryHandler.h | 5 +- DDG4/include/DDG4/Geant4Random.h | 5 +- DDG4/include/DDG4/Geant4RunAction.h | 16 +- DDG4/include/DDG4/Geant4SensDetAction.h | 46 ++-- DDG4/include/DDG4/Geant4SensitiveDetector.h | 10 +- DDG4/include/DDG4/Geant4StackingAction.h | 16 +- DDG4/include/DDG4/Geant4StepHandler.h | 7 +- DDG4/include/DDG4/Geant4SteppingAction.h | 30 +-- DDG4/include/DDG4/Geant4TestActions.h | 38 +-- DDG4/include/DDG4/Geant4TouchableHandler.h | 8 +- DDG4/include/DDG4/Geant4TrackHandler.h | 9 +- DDG4/include/DDG4/Geant4TrackInformation.h | 11 +- DDG4/include/DDG4/Geant4TrackManager.h | 99 -------- DDG4/include/DDG4/Geant4TrackingAction.h | 16 +- DDG4/include/DDG4/Geant4TrackingPostAction.h | 19 +- DDG4/include/DDG4/Geant4TrackingPreAction.h | 19 +- DDG4/include/DDG4/Geant4Vertex.h | 9 +- DDG4/lcio/Geant4Output2LCIO.cpp | 21 +- DDG4/lcio/HepEventReader.cpp | 29 ++- DDG4/lcio/LCIOEventReader.h | 21 +- DDG4/lcio/LCIOFileReader.cpp | 28 +-- DDG4/lcio/LCIOInputAction.h | 4 +- DDG4/lcio/LCIOSDTestActions.cpp | 23 +- DDG4/lcio/LCIOStdHepReader.cpp | 28 +-- DDG4/plugins/Geant4EscapeCounter.cpp | 15 +- DDG4/plugins/Geant4HepEventReader.cpp | 24 +- DDG4/plugins/Geant4HitExtractor.cpp | 17 ++ DDG4/plugins/Geant4SDActions.cpp | 28 ++- DDG4/plugins/Geant4SensDet.cpp | 37 ++- DDG4/plugins/Geant4TCUserParticleHandler.cpp | 12 +- DDG4/plugins/Geant4XMLSetup.cpp | 221 ++++++++++-------- DDG4/src/Geant4Particle.cpp | 6 +- DDG4/src/Geant4TrackingPostAction.cpp | 6 + doc/doxygen/DD4hepFigures.dox | 2 +- doc/doxygen/DD4hepGroups.h | 84 +++++++ doc/doxygen/DD4hepMainpage.dox | 4 - doc/doxygen/Geant4Classes.h | 60 +++++ doc/doxygen/ROOTClasses.h | 23 ++ doc/doxygen/TiXMLClasses.h | 60 +++++ doc/release.notes | 6 + 140 files changed, 2080 insertions(+), 1639 deletions(-) delete mode 100644 DDG4/include/DDG4/Geant4TrackManager.h create mode 100644 doc/doxygen/DD4hepGroups.h create mode 100644 doc/doxygen/Geant4Classes.h create mode 100644 doc/doxygen/ROOTClasses.h create mode 100644 doc/doxygen/TiXMLClasses.h diff --git a/DDAlign/include/DDAlign/AlignmentCache.h b/DDAlign/include/DDAlign/AlignmentCache.h index 55842e7c1..a153b129b 100644 --- a/DDAlign/include/DDAlign/AlignmentCache.h +++ b/DDAlign/include/DDAlign/AlignmentCache.h @@ -13,14 +13,10 @@ #include "DD4hep/Alignment.h" #include "DDAlign/AlignmentStack.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Alignment namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { /// Forward declarations @@ -29,15 +25,14 @@ namespace DD4hep { class AlignmentStack; class LCDD; - /** @class AlignmentCache AlignmentCache.h AlignmentCache.h - * - * Class caching all known alignment operations for one LCDD instance. + /// Class caching all known alignment operations for one LCDD instance. + /** * Internally the instances are fragmented to subdetectors defined * by the next-to-top level detector elements. * - * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_ALIGN */ class AlignmentCache { friend class LCDD; diff --git a/DDAlign/include/DDAlign/AlignmentOperators.h b/DDAlign/include/DDAlign/AlignmentOperators.h index 1d5b59b27..4986d0640 100644 --- a/DDAlign/include/DDAlign/AlignmentOperators.h +++ b/DDAlign/include/DDAlign/AlignmentOperators.h @@ -13,26 +13,21 @@ #include "DD4hep/Alignment.h" #include "DDAlign/AlignmentCache.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Alignment namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { /// Forward declarations class LCDD; - /** @class AlignmentOperator AlignmentOperators.h DDAlign/AlignmentOperators.h - * - * - * - * @author M.Frank - * @version 1.0 + /// Base class for alignment functors + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_ALIGN */ struct AlignmentOperator { typedef AlignmentStack::StackEntry Entry; @@ -42,34 +37,47 @@ namespace DD4hep { AlignmentCache& cache; Nodes& nodes; public: + /// Initializing functor constructor AlignmentOperator(AlignmentCache& c, Nodes& n) : cache(c), nodes(n) {} + /// Insert alignment entry void insert(Alignment alignment) const; }; - /** @class AlignmentSelector AlignmentOperators.h DDAlign/AlignmentOperators.h - * - * - * - * @author M.Frank - * @version 1.0 + /// Select alignment operations according to certain criteria + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_ALIGN */ struct AlignmentSelector : public AlignmentOperator { public: const Entries& entries; + /// Initializing functor constructor AlignmentSelector(AlignmentCache& c, Nodes& n, const Entries& e) : AlignmentOperator(c,n), entries(e) {} ~AlignmentSelector() { } const AlignmentSelector& reset() const { nodes.clear(); return *this; } + /// Function callback for cache entries void operator()(const AlignmentCache::Cache::value_type& e) const; + /// Function callback for entries void operator()(Entry* e) const; }; + /// Act on selected alignment entries + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_ALIGN + */ template <typename T> struct AlignmentActor : public AlignmentOperator { public: + /// Initializing functor constructor AlignmentActor(AlignmentCache& c, Nodes& n) : AlignmentOperator(c,n) { init(); } void init() {} + /// Function callback for entries void operator()(Nodes::value_type& e) const; }; + /// Helper namespace to specialize functionality \ingroup DD4HEP_ALIGN namespace DDAlign_standard_operations { struct node_print; struct node_reset; diff --git a/DDAlign/include/DDAlign/AlignmentStack.h b/DDAlign/include/DDAlign/AlignmentStack.h index e90486983..af912a384 100644 --- a/DDAlign/include/DDAlign/AlignmentStack.h +++ b/DDAlign/include/DDAlign/AlignmentStack.h @@ -16,21 +16,17 @@ // C/C++ include files #include <memory> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Alignment namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { - /** @class AlignmentStack AlignmentStack.h AlignmentStack.h - * - * - * @author M.Frank - * @version 1.0 + /// Alignment Stack object definition + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_ALIGN */ class AlignmentStack { public: @@ -47,6 +43,12 @@ namespace DD4hep { ____LLLAST = 1<<31 } Flags; + /// Stack entry definition + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_ALIGN + */ struct StackEntry { /// Reference to the detector element DetElement detector; diff --git a/DDAlign/include/DDAlign/AlignmentTags.h b/DDAlign/include/DDAlign/AlignmentTags.h index 2f20da462..7c6041d17 100644 --- a/DDAlign/include/DDAlign/AlignmentTags.h +++ b/DDAlign/include/DDAlign/AlignmentTags.h @@ -17,7 +17,11 @@ // Unicode tags known to the alignment section namespace DD4hep { + /// Namespace for the AIDA detector description toolkit supporting XML utilities namespace XML { + + // Alignment tags + UNICODE(DetectorAlignment); UNICODE(subdetectors); UNICODE(subdetector); diff --git a/DDAlign/include/DDAlign/AlignmentTransaction.h b/DDAlign/include/DDAlign/AlignmentTransaction.h index 2be31da31..a08a2e58e 100644 --- a/DDAlign/include/DDAlign/AlignmentTransaction.h +++ b/DDAlign/include/DDAlign/AlignmentTransaction.h @@ -12,29 +12,23 @@ // Framework include files #include "DD4hep/Primitives.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { namespace XML { class Handle_t; } - /* - * Alignment namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { // Forward declarations class LCDD; class AlignmentCache; - /** @class AlignmentTransaction - * - * Manage alignment transaction to the cache for a given LCDD instance - * - * @author M.Frank - * @version 1.0 - * @date 01/04/2014 + /// Manage alignment transaction to the cache for a given LCDD instance + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_ALIGN */ struct AlignmentTransaction { /// Internal flag to remember transaction contexts diff --git a/DDAlign/include/DDAlign/AlignmentWriter.h b/DDAlign/include/DDAlign/AlignmentWriter.h index 45b61fac1..b6511408c 100644 --- a/DDAlign/include/DDAlign/AlignmentWriter.h +++ b/DDAlign/include/DDAlign/AlignmentWriter.h @@ -13,26 +13,21 @@ #include "XML/XMLElements.h" #include "DD4hep/Detector.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geomentry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { // Forward declarations class LCDD; class AlignmentCache; - /** @class AlignmentWriter AlignmentWriter.cpp AlignmentWriter.cpp - * - * Geometry converter from DD4hep to Geant 4. - * - * @author M.Frank - * @version 1.0 + /// Write aligment data to XML data file + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_ALIGN */ class AlignmentWriter { protected: diff --git a/DDAlign/include/DDAlign/DetectorAlignment.h b/DDAlign/include/DDAlign/DetectorAlignment.h index 055d1bbba..642f58c67 100644 --- a/DDAlign/include/DDAlign/DetectorAlignment.h +++ b/DDAlign/include/DDAlign/DetectorAlignment.h @@ -15,22 +15,20 @@ // Forward declarations class TGeoHMatrix; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { + // Forward declarations class DetElement; - /** @class Alignment Readoutn.h DD4hep/Alignment.h - * - * @author M.Frank - * @version 1.0 + /// DetectorAlignment. DetElement Handle supporting alignment operations. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_ALIGN */ class DetectorAlignment : public DetElement { protected: diff --git a/DDCond/include/DDCond/ConditionValidator.h b/DDCond/include/DDCond/ConditionValidator.h index 7413544f4..796c876ef 100644 --- a/DDCond/include/DDCond/ConditionValidator.h +++ b/DDCond/include/DDCond/ConditionValidator.h @@ -12,26 +12,17 @@ // Framework includes #include "DDCond/Condition.h" -using namespace std; -using namespace DD4hep; -using namespace DD4hep::Geometry; - -//DD4HEP_INSTANTIATE_HANDLE_NAMED(ConditionObject); - -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { - /** @class ConditionValidator ConditionValidator.h DD4hep/ConditionValidator.h - * - * @author M.Frank - * @version 1.0 + /// Conditions validation class. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_CONDITIONS */ class ConditionValidator { public: diff --git a/DDCond/include/DDCond/ConditionsHandler.h b/DDCond/include/DDCond/ConditionsHandler.h index 815e6e055..329252e18 100644 --- a/DDCond/include/DDCond/ConditionsHandler.h +++ b/DDCond/include/DDCond/ConditionsHandler.h @@ -12,29 +12,24 @@ // Framework include files #include "DDCond/ConditionsStack.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Conditions namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { /// Forward declarations class ConditionsStack; class LCDD; - /** @class ConditionsHandler ConditionsHandler.h DDCond/ConditionsHandler.h - * - * Class caching all known conditions operations for one LCDD instance. + /// Class caching all known conditions operations for one LCDD instance. + /** * Internally the instances are fragmented to subdetectors defined * by the next-to-top level detector elements. * - * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_CONDITIONS */ class ConditionsHandler { friend class LCDD; diff --git a/DDCond/include/DDCond/ConditionsOperators.h b/DDCond/include/DDCond/ConditionsOperators.h index 9930b22bb..a06a1485f 100644 --- a/DDCond/include/DDCond/ConditionsOperators.h +++ b/DDCond/include/DDCond/ConditionsOperators.h @@ -11,18 +11,12 @@ // Framework include files - // C/C++ include files - -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { diff --git a/DDCond/include/DDCond/ConditionsStack.h b/DDCond/include/DDCond/ConditionsStack.h index f0b5c408e..c9bf36a89 100644 --- a/DDCond/include/DDCond/ConditionsStack.h +++ b/DDCond/include/DDCond/ConditionsStack.h @@ -15,27 +15,22 @@ // C/C++ include files #include <memory> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { - // Forward declarations namespace ConditionsInterna { + // Forward declarations class Entry; } - /** @class ConditionsStack ConditionsStack.h DDCond/ConditionsStack.h - * - * The data class behind a conditions handle. - * - * @author M.Frank - * @version 1.0 + /// Implementation of a stack of conditions assembled before application + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_CONDITIONS */ class ConditionsStack { public: diff --git a/DDCond/include/DDCond/ConditionsTags.h b/DDCond/include/DDCond/ConditionsTags.h index 8b2b06a30..4353739b8 100644 --- a/DDCond/include/DDCond/ConditionsTags.h +++ b/DDCond/include/DDCond/ConditionsTags.h @@ -15,9 +15,11 @@ #define UNICODE(x) extern const Tag_t Unicode_##x #endif -// Unicode tags known to the conditions section +/// Namespace for the AIDA detector description toolkit namespace DD4hep { + /// Namespace for the AIDA detector description toolkit supporting XML utilities namespace XML { + /// Namespace of conditions unicode tags namespace Conditions { UNICODE(conditions); UNICODE(detelements); diff --git a/DDCond/include/DDCond/ConditionsTransaction.h b/DDCond/include/DDCond/ConditionsTransaction.h index 5a0bebd4a..60439455f 100644 --- a/DDCond/include/DDCond/ConditionsTransaction.h +++ b/DDCond/include/DDCond/ConditionsTransaction.h @@ -12,29 +12,24 @@ // Framework include files #include "DD4hep/Primitives.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { namespace XML { class Handle_t; } - /* - * Conditions namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { // Forward declarations class LCDD; class ConditionsHandler; - /** @class ConditionsTransaction - * - * Manage conditions transaction to the handler for a given LCDD instance - * - * @author M.Frank - * @version 1.0 - * @date 01/04/2014 + /// Manage conditions transaction to the handler for a given LCDD instance + /** + * \date 01/04/2014 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_CONDITIONS */ struct ConditionsTransaction { /// Internal flag to remember transaction contexts diff --git a/DDCore/include/DD4hep/Alignment.h b/DDCore/include/DD4hep/Alignment.h index 728b9e8bc..f1ced06e6 100644 --- a/DDCore/include/DD4hep/Alignment.h +++ b/DDCore/include/DD4hep/Alignment.h @@ -14,16 +14,13 @@ #include "DD4hep/Volumes.h" #include "TGeoPhysicalNode.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { + // Forward declarations class DetElement; /// Main handle class to hold a TGeo alignment object of type TGeoPhysicalNode @@ -31,8 +28,10 @@ namespace DD4hep { * See the ROOT documentation about the TGeoPhysicalNode for further details: * @see http://root.cern.ch/root/html/TGeoPhysicalNode.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY + * \ingroup DD4HEP_ALIGN */ class Alignment: public Handle<TGeoPhysicalNode> { public: diff --git a/DDCore/include/DD4hep/BasicGrammar.h b/DDCore/include/DD4hep/BasicGrammar.h index ddae34527..0aae6ca5f 100644 --- a/DDCore/include/DD4hep/BasicGrammar.h +++ b/DDCore/include/DD4hep/BasicGrammar.h @@ -13,15 +13,15 @@ #include <string> #include <typeinfo> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { /// Base class describing string evaluation to C++ objects using boost::spirit /** - * @author M.Frank - * @date 13.08.2013 + * \author M.Frank + * \version 1.0 + * \date 13.08.2013 + * \ingroup DD4HEP */ class BasicGrammar { public: diff --git a/DDCore/include/DD4hep/Callback.h b/DDCore/include/DD4hep/Callback.h index 9d64fd5bb..2b1aa2765 100644 --- a/DDCore/include/DD4hep/Callback.h +++ b/DDCore/include/DD4hep/Callback.h @@ -22,12 +22,15 @@ namespace DD4hep { /// Definition of the generic callback structure for member functions /** - * @author M.Frank - * @date 01/03/2013 - * @version 0.1 + * \author M.Frank + * \date 01/03/2013 + * \version 1.0 + * \ingroup DD4HEP */ - struct Callback { + class Callback { + public: typedef unsigned long (*func_t)(void* obj, const void* fun, const void* args[]); + /// Structure definition to store callback related data \ingroup DD4HEP typedef struct { void *first, *second; } mfunc_t; @@ -36,6 +39,7 @@ namespace DD4hep { void* par; func_t call; mfunc_t func; + /// Default constructor Callback() : par(0), call(0) { func.first = func.second = 0; @@ -64,9 +68,16 @@ namespace DD4hep { } /// Wrapper around a C++ member function pointer - template <typename T> struct Wrapper { + /** + * \author M.Frank + * \date 01/03/2013 + * \version 1.0 + * \ingroup DD4HEP + */ + template <typename T> class Wrapper { public: typedef T pmf_t; + /// Union to store pointers to member functions in callback objects union Functor { mfunc_t ptr; pmf_t pmf; diff --git a/DDCore/include/DD4hep/Conditions.h b/DDCore/include/DD4hep/Conditions.h index 2f8c89608..d64f16dd6 100644 --- a/DDCore/include/DD4hep/Conditions.h +++ b/DDCore/include/DD4hep/Conditions.h @@ -12,22 +12,19 @@ // Framework include files #include "DD4hep/Handle.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { /// Grammar definition for type binding class BasicGrammar; - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { // Forward declarations class DetElement; + /// Conditions intrnal namespace namespace ConditionsInterna { class ConditionContainer; class ConditionObject; @@ -40,8 +37,10 @@ namespace DD4hep { * Access methods are templated. Once the access is fixed * on the first call, the data type may not be changed anymore. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY + * \ingroup DD4HEP_CONDITIONS */ class Block { /// Access only through the conditions class! @@ -73,8 +72,10 @@ namespace DD4hep { * This objects allows access to the data block and * the interval of validity for a single condition. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY + * \ingroup DD4HEP_CONDITIONS */ class Condition: public Handle<ConditionsInterna::ConditionObject> { public: @@ -168,10 +169,13 @@ namespace DD4hep { * On deletion the detector element will destroy the container * and all associated entries. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY + * \ingroup DD4HEP_CONDITIONS */ - struct Conditions : public Handle<ConditionsInterna::ConditionContainer> { + class Conditions : public Handle<ConditionsInterna::ConditionContainer> { + public: /// Standard object type typedef ConditionsInterna::ConditionContainer Object; /// Local helper definition @@ -181,9 +185,7 @@ namespace DD4hep { typedef std::map<std::string, Condition> Entries; /// Default constructor - Conditions() - : Handle<Object>() { - } + Conditions(); /// Constructor to be used when reading the already parsed object template <typename Q> Conditions(const Conditions& c) : Handle<Object>(c) { @@ -208,6 +210,9 @@ namespace DD4hep { int set(Entry* data); }; + /// Default constructor + inline Conditions::Conditions() : Handle<Object>() { + } } /* End namespace Geometry */ } /* End namespace DD4hep */ diff --git a/DDCore/include/DD4hep/DetFactoryHelper.h b/DDCore/include/DD4hep/DetFactoryHelper.h index df8a1f302..ee7ee6b15 100644 --- a/DDCore/include/DD4hep/DetFactoryHelper.h +++ b/DDCore/include/DD4hep/DetFactoryHelper.h @@ -28,16 +28,13 @@ typedef DD4hep::XML::Document xml_doc_t; typedef DD4hep::XML::Strng_t Unicode; typedef DD4hep::Geometry::LCDD lcdd_t; -/* - * DD4hep namespace declaration - */ + /// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry sub-namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { - /// std::string conversion of XML strings (e.g. Unicode for Xerces-C) + + /// std::string conversion of XML strings (e.g. Unicode for Xerces-C) static inline std::string _toString(const DD4hep::XML::XmlChar* value) { return XML::_toString(value); } diff --git a/DDCore/include/DD4hep/Detector.h b/DDCore/include/DD4hep/Detector.h index 6b814f76d..d959ff769 100644 --- a/DDCore/include/DD4hep/Detector.h +++ b/DDCore/include/DD4hep/Detector.h @@ -23,24 +23,22 @@ #include <map> #include <typeinfo> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { + // Forward declarations class LCDD; class DetElementObject; class SensitiveDetectorObject; /// Handle class to hold the information of a sensitive detector. /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class SensitiveDetector: public Handle<SensitiveDetectorObject> { public: @@ -165,19 +163,19 @@ namespace DD4hep { * subdetectors or sizable parts of a subdetector. * A DetElement instance has the means to provide to clients information about * - * <ul> - * <li> the detector hierarchy by exposing its children. - * <li> its placement within the overall experiment if it represents an + * - the detector hierarchy by exposing its children. + * - its placement within the overall experiment if it represents an * entire subdetector or its placement with respect to its parent - * if the \tw{DetElement} represents a part of a subdetector. - * <li> information about the \tw{Readout} structure if the object is + * if the \em DetElement represents a part of a subdetector. + * - information about the \em Readout structure if the object is * instrumented and read-out. Otherwise this link is empty. - * <li> information about the environmental conditions etc. (\tw{conditons}). - * <li> alignment information. - * </ul> + * - information about the environmental conditions etc. \em conditons. + * - alignment information. + * . * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class DetElement: public Handle<DetElementObject> { public: diff --git a/DDCore/include/DD4hep/DetectorTools.h b/DDCore/include/DD4hep/DetectorTools.h index 88a7335df..92c88433e 100644 --- a/DDCore/include/DD4hep/DetectorTools.h +++ b/DDCore/include/DD4hep/DetectorTools.h @@ -27,8 +27,9 @@ namespace DD4hep { /// Helper namespace used to answer detector element specific questons /** * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ namespace DetectorTools { typedef std::vector<DetElement> ElementPath; diff --git a/DDCore/include/DD4hep/Exceptions.h b/DDCore/include/DD4hep/Exceptions.h index 0934cb723..59a59ae38 100644 --- a/DDCore/include/DD4hep/Exceptions.h +++ b/DDCore/include/DD4hep/Exceptions.h @@ -14,15 +14,14 @@ #include <typeinfo> #include <stdexcept> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { /// Exception class to signal operations on unrelated classes /** - * @author M.Frank - * @date 13.08.2013 + * \author M.Frank + * \date 13.08.2013 + * \ingroup DD4HEP */ struct unrelated_type_error : public std::runtime_error { static std::string msg(const std::type_info& typ1, const std::type_info& typ2, const std::string& text); @@ -33,8 +32,9 @@ namespace DD4hep { /// Exception class to signal operations on unrelated types of values /** - * @author M.Frank - * @date 13.08.2013 + * \author M.Frank + * \date 13.08.2013 + * \ingroup DD4HEP */ struct unrelated_value_error : public std::runtime_error { static std::string msg(const std::type_info& typ, const std::string& text); diff --git a/DDCore/include/DD4hep/Factories.h b/DDCore/include/DD4hep/Factories.h index fad46f1df..10d8e46ea 100644 --- a/DDCore/include/DD4hep/Factories.h +++ b/DDCore/include/DD4hep/Factories.h @@ -36,19 +36,26 @@ namespace DD4hep { class DetElement; /// Template class with a generic constructor signature + /** + * \author M.Frank + * \version 1.0 + * \date 2012/07/31 + * \ingroup DD4HEP_GEOMETRY + */ template <typename T> class ConstructionFactory { public: static void* create(const char* arg); }; /// Template class with a generic signature to apply LCDD plugins - /** @class ApplyFactory Factories.h DDCore/Factories.h + /** * Specialized factory to translate objects, which can be retrieved from LCDD * Example: Translate DD4hep geometry to Geant4 * - * @author M.Frank - * @version 1.0 - * @date 2012/07/31 + * \author M.Frank + * \version 1.0 + * \date 2012/07/31 + * \ingroup DD4HEP_GEOMETRY */ template <typename T> class ApplyFactory { public: @@ -56,13 +63,13 @@ namespace DD4hep { }; /// Specialized factory to translate objects, which can be retrieved from LCDD - /** @class TranslationFactory Factories.h DDCore/Factories.h - * + /** * Example: Translate DD4hep geometry to Geant4 * - * @author M.Frank - * @version 1.0 - * @date 2012/07/31 + * \author M.Frank + * \version 1.0 + * \date 2012/07/31 + * \ingroup DD4HEP_GEOMETRY */ template <typename T> class TranslationFactory { public: @@ -72,9 +79,10 @@ namespace DD4hep { /// Create an arbitrary object from it's XML representation. /** * - * @author M.Frank - * @version 1.0 - * @date 2012/07/31 + * \author M.Frank + * \version 1.0 + * \date 2012/07/31 + * \ingroup DD4HEP_GEOMETRY */ template <typename T> class XMLElementFactory { public: @@ -84,9 +92,10 @@ namespace DD4hep { /// Read an arbitrary XML document and analyze it's content /** * - * @author M.Frank - * @version 1.0 - * @date 2012/07/31 + * \author M.Frank + * \version 1.0 + * \date 2012/07/31 + * \ingroup DD4HEP_GEOMETRY */ template <typename T> class XMLDocumentReaderFactory { public: @@ -96,9 +105,10 @@ namespace DD4hep { /// Read an arbitrary XML document and analyze it's content /** * - * @author M.Frank - * @version 1.0 - * @date 2012/07/31 + * \author M.Frank + * \version 1.0 + * \date 2012/07/31 + * \ingroup DD4HEP_GEOMETRY */ template <typename T> class XMLConversionFactory { public: @@ -108,9 +118,10 @@ namespace DD4hep { /// Standard factory to create Detector elements from the compact XML representation. /** * - * @author M.Frank - * @version 1.0 - * @date 2012/07/31 + * \author M.Frank + * \version 1.0 + * \date 2012/07/31 + * \ingroup DD4HEP_GEOMETRY */ template <typename T> class DetElementFactory { public: diff --git a/DDCore/include/DD4hep/FieldTypes.h b/DDCore/include/DD4hep/FieldTypes.h index 04a58b7f0..d9611cd08 100644 --- a/DDCore/include/DD4hep/FieldTypes.h +++ b/DDCore/include/DD4hep/FieldTypes.h @@ -14,23 +14,20 @@ #include "DD4hep/Fields.h" #include <vector> -/* - * DD4hep namespace declaration - */ + +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geoemtry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { /// Implementation object of a field with constant strength - /** @class ConstantField FieldTypes.h - * + /** * Generic constant uniform field * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class ConstantField: public CartesianField::Object { public: @@ -46,12 +43,12 @@ namespace DD4hep { }; /// Implementation object of a solenoidal magnetic field. - /** @class SolenoidField FieldTypes.h DD4hep/FieldTypes.h - * + /** * Generic solonoid magnetic field * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class SolenoidField: public CartesianField::Object { public: @@ -70,12 +67,12 @@ namespace DD4hep { }; /// Implementation object of a dipole magnetic field. - /** @class DipoleField FieldTypes.h DD4hep/FieldTypes.h - * + /** * Generic solonoid magnetic field * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class DipoleField: public CartesianField::Object { public: diff --git a/DDCore/include/DD4hep/Fields.h b/DDCore/include/DD4hep/Fields.h index de56ede57..ea5589841 100644 --- a/DDCore/include/DD4hep/Fields.h +++ b/DDCore/include/DD4hep/Fields.h @@ -18,14 +18,10 @@ #include <vector> #include <map> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geoemtry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { // Forward declarations @@ -40,9 +36,10 @@ namespace DD4hep { * The actual behaviour is solely implemented in the underlying object * class. * - * @author M.Frank - * @version 1.0 - */ + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY + */ class CartesianField: public Ref_t { public: enum FieldType { @@ -52,6 +49,11 @@ namespace DD4hep { typedef std::map<std::string, PropertyValues> Properties; /// Internal data class shared by all handles of a given type + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY + */ class Object: public NamedObject { public: /// Field type @@ -122,8 +124,9 @@ namespace DD4hep { * The actual behaviour is solely implemented in the underlying object * class. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class OverlayedField: public Ref_t { public: @@ -133,6 +136,12 @@ namespace DD4hep { typedef std::map<std::string, std::string> PropertyValues; typedef std::map<std::string, PropertyValues> Properties; + /// Internal data class shared by all handles + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY + */ class Object: public NamedObject { public: int type; diff --git a/DDCore/include/DD4hep/GeoHandler.h b/DDCore/include/DD4hep/GeoHandler.h index 0a2ef3038..5af622f18 100644 --- a/DDCore/include/DD4hep/GeoHandler.h +++ b/DDCore/include/DD4hep/GeoHandler.h @@ -21,16 +21,13 @@ class TGeoMedium; class TGeoShape; class TGeoNode; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { + // Forward declarations class NamedObject; - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { class LCDD; @@ -41,10 +38,10 @@ namespace DD4hep { class VisAttrObject; /// Defintion of the object types used by generic geometry handlers - /** @class GeoHandlerTypes GeoHandler.h - * - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class GeoHandlerTypes { public: @@ -65,6 +62,13 @@ namespace DD4hep { typedef std::set<Ref_t> Fields; typedef std::set<TNamed*> ObjectSet; typedef LCDD::HandleMap DefinitionSet; + + /// Data container + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY + */ class GeometryInfo { public: SolidSet solids; @@ -80,16 +84,16 @@ namespace DD4hep { }; /// The base class for all DD4hep geometry crawlers - /** @class GeoHandler GeoHandler.h - * + /** * Geometry crawlers are used for multiple purposes, whenever entire * geometries must be traversed like e.g. to create a new geometry * for simulation etc. * While analysing the geometry, information is collected, which * may be later processed. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class GeoHandler: public GeoHandlerTypes { @@ -124,6 +128,11 @@ namespace DD4hep { }; /// Geometry scanner (handle object) + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY + */ struct GeoScan { protected: /// Data holder diff --git a/DDCore/include/DD4hep/Handle.h b/DDCore/include/DD4hep/Handle.h index 4c3c61455..b02351027 100644 --- a/DDCore/include/DD4hep/Handle.h +++ b/DDCore/include/DD4hep/Handle.h @@ -34,102 +34,153 @@ #define M_PI 3.14159265358979323846 #endif -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { // Forward declarations class NamedObject; - /* - * Geometry sub-namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { + + // Forward declarations class LCDD; + /// String conversions: boolean value to string \ingroup DD4HEP_GEOMETRY std::string _toString(bool value); + /// String conversions: integer value to string \ingroup DD4HEP_GEOMETRY std::string _toString(int value); + /// String conversions: float value to string \ingroup DD4HEP_GEOMETRY std::string _toString(float value); + /// String conversions: double value to string \ingroup DD4HEP_GEOMETRY std::string _toString(double value); + /// String conversions: string to boolean value \ingroup DD4HEP_GEOMETRY bool _toBool(const std::string& value); + /// String conversions: string to integer value \ingroup DD4HEP_GEOMETRY int _toInt(const std::string& value); + /// String conversions: string to long integer value \ingroup DD4HEP_GEOMETRY long _toLong(const std::string& value); + /// String conversions: string to float value \ingroup DD4HEP_GEOMETRY float _toFloat(const std::string& value); + /// String conversions: string to double value \ingroup DD4HEP_GEOMETRY double _toDouble(const std::string& value); + /// Void helper function to support formalisms \ingroup DD4HEP_GEOMETRY inline bool _toBool(bool value) { return value; } + /// Void helper function to support formalisms \ingroup DD4HEP_GEOMETRY inline int _toInt(int value) { return value; } + /// Void helper function to support formalisms \ingroup DD4HEP_GEOMETRY inline long _toLong(long value) { return value; } + /// Void helper function to support formalisms \ingroup DD4HEP_GEOMETRY inline float _toFloat(float value) { return value; } + /// Void helper function to support formalisms \ingroup DD4HEP_GEOMETRY inline double _toDouble(double value) { return value; } + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <class T> T _multiply(const std::string& left, T right); + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <class T> T _multiply(T left, const std::string& right); + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <class T> T _multiply(const std::string& left, const std::string& right); + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <> int _multiply<int>(const std::string& left, const std::string& right); + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <> inline int _multiply<int>(int left, const std::string& right) { return left * _toInt(right); } + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <> inline int _multiply<int>(const std::string& left, int right) { return _toInt(left) * right; } + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <> long _multiply<long>(const std::string& left, const std::string& right); + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <> inline long _multiply<long>(long left, const std::string& right) { return left * _toLong(right); } + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <> inline long _multiply<long>(const std::string& left, long right) { return _toLong(left) * right; } + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <> float _multiply<float>(const std::string& left, const std::string& right); + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <> inline float _multiply<float>(float left, const std::string& right) { return left * _toFloat(right); } + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <> inline float _multiply<float>(const std::string& left, float right) { return _toFloat(left) * right; } + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <> double _multiply<double>(const std::string& left, const std::string& right); + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <> inline double _multiply<double>(const std::string& left, double right) { return _toDouble(left) * right; } + /// Generic multiplication using the evaluator: result = left * right \ingroup DD4HEP_GEOMETRY template <> inline double _multiply<double>(double left, const std::string& right) { return left * _toDouble(right); } + /// Enter name value pair to the dictionary. \"valye\" must be a numerical expression, which is evaluated \ingroup DD4HEP_GEOMETRY void _toDictionary(const std::string& name, const std::string& value); long num_object_validations(); void increment_object_validations(); + /// Access to the magic word, which is protecting some objects against memory corruptions \ingroup DD4HEP_GEOMETRY inline unsigned long long int magic_word() { return 0xFEEDAFFEDEADFACEULL; } /// Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects. - /** @class Handle Handle.h + /** + * The Handle is the base class to access all objects in DD4hep. + * Objects, which consist ONLY of data are NEVER passed directly. + * They are ALWAYS passed using handles. Such handles are 'handy' ;-). + * Assignment is to and from different handles is possible using concrete + * type checking. + * + * Real benefits can result from sophisticated handle subclasses, which can + * implement any desired user functionality with out compromising the + * object's data content. This leads to very flexible implementations, + * where the same data may be shared by many handle implementations + * providing different functionality to the clients. + * + * In this sense, is the consequent use of handles to access data nothing + * else then the consequent application of component oriented programming + * using local objects from the heap. + * + * Note: + * If you cannot live with this approach, it is better you get hands of this + * software package, because you will try to consequently fight the framework, + * which will frustrate you (and also me). * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ template <typename T> class Handle { public: typedef T Implementation; typedef Handle<Implementation> handle_t; + /// Reference to the actual element. T* m_element; /// Defaulot constructor Handle() @@ -222,30 +273,30 @@ namespace DD4hep { /// Assign a new named object. Note: object references must be managed by the user void assign(Implementation* n, const std::string& nam, const std::string& title); }; - /// Default Ref_t definition describing named objects + /// Default Ref_t definition describing named objects \ingroup DD4HEP_GEOMETRY typedef Handle<NamedObject> Ref_t; - /// Helper to delete objects from heap and reset the handle + /// Helper to delete objects from heap and reset the handle \ingroup DD4HEP_GEOMETRY template <typename T> inline void destroyHandle(T& h) { deletePtr(h.m_element); } - /// Helper to delete objects from heap and reset the handle + /// Helper to delete objects from heap and reset the handle \ingroup DD4HEP_GEOMETRY template <typename T> inline void releaseHandle(T& h) { releasePtr(h.m_element); } - /// Functor to destroy handles and delete the cached object + /// Functor to destroy handles and delete the cached object \ingroup DD4HEP_GEOMETRY template <typename T> struct DestroyHandle { void operator()(T p) const { destroyHandle(p); } }; - /// Functor to destroy handles and delete the cached object + /// Functor to destroy handles and delete the cached object \ingroup DD4HEP_GEOMETRY template <typename T> struct ReleaseHandle { void operator()(T p) const { releaseHandle(p); } }; - /// map Functor to destroy handles and delete the cached object + /// map Functor to destroy handles and delete the cached object \ingroup DD4HEP_GEOMETRY template <typename M> struct DestroyHandles { M& object; DestroyHandles(M& m) diff --git a/DDCore/include/DD4hep/InstanceCount.h b/DDCore/include/DD4hep/InstanceCount.h index 8a72061ff..4756236de 100644 --- a/DDCore/include/DD4hep/InstanceCount.h +++ b/DDCore/include/DD4hep/InstanceCount.h @@ -13,18 +13,16 @@ #include <typeinfo> #include <string> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { /// Helper to support object counting when debugging memory leaks - /** @class InstanceCount InstanceCount.h StorageSvc/InstanceCount.h - * + /** * Small class to enable object construction/destruction tracing * - * @author Markus Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP */ struct InstanceCount { public: @@ -35,12 +33,12 @@ namespace DD4hep { }; /// Internal class to could object constructions and destructions - /** @class Counter - * + /** * Small class to enable object construction/destruction tracing. * - * @author Markus Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP */ class Counter { private: diff --git a/DDCore/include/DD4hep/LCDD.h b/DDCore/include/DD4hep/LCDD.h index c988e8f2e..4a0c2a7c0 100644 --- a/DDCore/include/DD4hep/LCDD.h +++ b/DDCore/include/DD4hep/LCDD.h @@ -28,16 +28,14 @@ // Forward declarations class TGeoManager; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { // Foward declarations class NamedObject; - /** @enum LCDDBuildType LCDD.h DD4hep/LCDD.h - * Detector description build types. + /// Detector description build types. + /** enum LCDDBuildType LCDD.h DD4hep/LCDD.h * The corresponding flag is ONLY valid while parsing the * compact description. If no eometry, ie. at all other times * the accessor to the flag returns BUILD_NONE. @@ -46,14 +44,11 @@ namespace DD4hep { BUILD_NONE = 0, BUILD_DEFAULT = 1, BUILD_SIMU = BUILD_DEFAULT, BUILD_RECO, BUILD_DISPLAY }; - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { - /// The main interface to the DD4hep detector description package - /** @class LCDD LCDD.h DD4hep/LCDD.h - * + /// The main interface to the DD4hep detector description package + /** * Note: The usage of the factory method: * * static LCDD& getInstance(void); @@ -62,11 +57,13 @@ namespace DD4hep { * * You should rather use the plugin mechanism to create a new instance. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class LCDD { public: + /// Type definition of a map of named handles typedef std::map<std::string, Handle<NamedObject> > HandleMap; typedef std::map<std::string, std::string> PropertyValues; typedef std::map<std::string, PropertyValues> Properties; diff --git a/DDCore/include/DD4hep/LCDDData.h b/DDCore/include/DD4hep/LCDDData.h index 77089ac9a..38bd14b3b 100644 --- a/DDCore/include/DD4hep/LCDDData.h +++ b/DDCore/include/DD4hep/LCDDData.h @@ -18,36 +18,46 @@ // C/C++ include files #include <stdexcept> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { // Foward declarations class NamedObject; - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { /// Data implementation class of the LCDD interface - /** @class LCDDData LCDDData.h DD4hep/LCDDData.h - * - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class LCDDData { public: - struct InvalidObjectError: public std::runtime_error { + /// Specialized exception class + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY + */ + struct InvalidObjectError: public std::runtime_error { InvalidObjectError(const std::string& msg) : std::runtime_error("DD4hep: " + msg) { } }; protected: - struct ObjectHandleMap: public LCDD::HandleMap { + /// Implementation of a map of named DD4hep Handles + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY + */ + class ObjectHandleMap: public LCDD::HandleMap { + public: + /// Default constructor ObjectHandleMap() { } void append(const Ref_t& e, bool throw_on_doubles = true) { diff --git a/DDCore/include/DD4hep/MatrixHelpers.h b/DDCore/include/DD4hep/MatrixHelpers.h index d02b01e04..564bdfbf5 100644 --- a/DDCore/include/DD4hep/MatrixHelpers.h +++ b/DDCore/include/DD4hep/MatrixHelpers.h @@ -19,34 +19,47 @@ class TGeoRotation; class TGeoHMatrix; class TGeoMatrix; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { + typedef Position XYZAngles; + /// Access the TGeo identity transformation \ingroup DD4HEP_GEOMETRY TGeoIdentity* identityTransform(); + /// Convert a Position object to a TGeoTranslation \ingroup DD4HEP_GEOMETRY TGeoTranslation* _translation(const Position& pos); + /// Convert a RotationZYX object to a TGeoRotation \ingroup DD4HEP_GEOMETRY TGeoRotation* _rotationZYX(const RotationZYX& rot); + /// Convert a Rotation3D object to a TGeoRotation \ingroup DD4HEP_GEOMETRY TGeoRotation* _rotation3D(const Rotation3D& rot); + /// Convert a Transform3D object to a TGeoHMatrix \ingroup DD4HEP_GEOMETRY TGeoHMatrix* _transform(const Transform3D& trans); + /// Convert a Position object to a TGeoHMatrix \ingroup DD4HEP_GEOMETRY TGeoHMatrix* _transform(const Position& pos); + /// Convert a RotationZYX object to a TGeoHMatrix \ingroup DD4HEP_GEOMETRY TGeoHMatrix* _transform(const RotationZYX& rot); + /// Convert a Rotation3D object to a TGeoHMatrix \ingroup DD4HEP_GEOMETRY TGeoHMatrix* _transform(const Rotation3D& rot3D); + /// Convert a Position followed by a RotationZYX to a TGeoHMatrix \ingroup DD4HEP_GEOMETRY TGeoHMatrix* _transform(const Position& pos, const RotationZYX& rot); + /// Convert a TGeoMatrix object to a generic Transform3D \ingroup DD4HEP_GEOMETRY Transform3D _transform(const TGeoMatrix* matrix); + /// Decompose a generic Transform3D into a translation (Position) and a RotationZYX \ingroup DD4HEP_GEOMETRY void _decompose(const Transform3D& trafo, Position& pos, RotationZYX& rot); + /// Decompose a generic Transform3D into a translation (Position) and XYZAngles \ingroup DD4HEP_GEOMETRY void _decompose(const Transform3D& trafo, Position& pos, XYZAngles& rot); + /// Decompose a generic Transform3D into a translation (Translation3D) and a RotationZYX \ingroup DD4HEP_GEOMETRY void _decompose(const Transform3D& trafo, Translation3D& pos, RotationZYX& rot); + /// Decompose a generic Transform3D into a translation (Translation3D) and XYZAngles \ingroup DD4HEP_GEOMETRY void _decompose(const Transform3D& trafo, Translation3D& pos, XYZAngles& rot); + /// Convert a 3x3 rotation matrix to XYZAngles \ingroup DD4HEP_GEOMETRY XYZAngles _XYZangles(const double* matrix); + /// Convert a the rotation part of a TGeoMatrix to XYZAngles \ingroup DD4HEP_GEOMETRY XYZAngles _XYZangles(const TGeoMatrix* matrix); } /* End namespace Geometry */ diff --git a/DDCore/include/DD4hep/NamedObject.h b/DDCore/include/DD4hep/NamedObject.h index 04b626afb..6ed319c84 100644 --- a/DDCore/include/DD4hep/NamedObject.h +++ b/DDCore/include/DD4hep/NamedObject.h @@ -16,12 +16,12 @@ namespace DD4hep { /// Implementation of a named object - /** @class Container NamedObject.h DD4hep/NamedObject.h - * - * The data class behind a conditions container handle. + /** + * The data class behind named object handles. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class NamedObject { public: diff --git a/DDCore/include/DD4hep/ObjectExtensions.h b/DDCore/include/DD4hep/ObjectExtensions.h index d48498386..b40b3af5a 100644 --- a/DDCore/include/DD4hep/ObjectExtensions.h +++ b/DDCore/include/DD4hep/ObjectExtensions.h @@ -17,12 +17,12 @@ namespace DD4hep { /// Implementation of an object supporting arbitrary user extensions - /** @class ObjectExtensions DetectorInterna.h DD4hep/objects/DetectorInterna.h - * + /** * Usage by inheritance of the client supporting the functionality * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class ObjectExtensions { public: diff --git a/DDCore/include/DD4hep/Objects.h b/DDCore/include/DD4hep/Objects.h index 24a09d858..82ead32b3 100644 --- a/DDCore/include/DD4hep/Objects.h +++ b/DDCore/include/DD4hep/Objects.h @@ -65,8 +65,9 @@ namespace DD4hep { /// Handle class describing an author identity /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class Author: public Ref_t { public: @@ -108,8 +109,9 @@ namespace DD4hep { /** * Description of the geometry header. Containes useful auxiliary information. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class Header: public Handle<HeaderObject> { public: @@ -170,8 +172,9 @@ namespace DD4hep { * Constant objects are parsed by the expression evaluator and * are subsequently available for expression evaluation. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class Constant: public Ref_t { public: @@ -217,31 +220,32 @@ namespace DD4hep { * This is sometimes referred to as the Euler 321 sequence. * It has not to be confused with the typical Goldstein definition of the Euler Angles * (Z-X-Z or 313 sequence) which is used by the ROOT::Math::EulerAngles class. - * @see http://root.cern.ch/root/html/ROOT__Math__RotationZYX.html + * \see http://root.cern.ch/root/html/ROOT__Math__RotationZYX.html */ typedef ROOT::Math::RotationZYX RotationZYX; - /** @see http://root.cern.ch/root/html/ROOT__Math__RotationZ.html */ + /** \see http://root.cern.ch/root/html/ROOT__Math__RotationZ.html */ typedef ROOT::Math::RotationZ RotationZ; - /** @see http://root.cern.ch/root/html/ROOT__Math__RotationY.html */ + /** \see http://root.cern.ch/root/html/ROOT__Math__RotationY.html */ typedef ROOT::Math::RotationY RotationY; - /** @see http://root.cern.ch/root/html/ROOT__Math__RotationX.html */ + /** \see http://root.cern.ch/root/html/ROOT__Math__RotationX.html */ typedef ROOT::Math::RotationX RotationX; - /** @see http://root.cern.ch/root/html/ROOT__Math__Rotation3D.html */ + /** \see http://root.cern.ch/root/html/ROOT__Math__Rotation3D.html */ typedef ROOT::Math::Rotation3D Rotation3D; - /** @see http://root.cern.ch/root/html/ROOT__Math__EulerAngels.html */ + /** \see http://root.cern.ch/root/html/ROOT__Math__EulerAngels.html */ typedef ROOT::Math::EulerAngles EulerAngles; - /** @see http://root.cern.ch/root/html/ROOT__Math__Transform3D.html */ + /** \see http://root.cern.ch/root/html/ROOT__Math__Transform3D.html */ typedef ROOT::Math::Transform3D Transform3D; - /** @see http://root.cern.ch/root/html/ROOT__Math__Translations3D.html */ + /** \see http://root.cern.ch/root/html/ROOT__Math__Translations3D.html */ typedef ROOT::Math::Translation3D Translation3D; /// Handle class describing an element in the periodic table /** * For details please see the ROOT TGeo information: - * @see http://root.cern.ch/root/html/TGeoElement.html + * \see http://root.cern.ch/root/html/TGeoElement.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class Atom: public Handle<TGeoElement> { public: @@ -270,10 +274,11 @@ namespace DD4hep { /** @class Material Objects.h * * For details please see the ROOT TGeo information: - * @see http://root.cern.ch/root/html/TGeoMedium.html + * \see http://root.cern.ch/root/html/TGeoMedium.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class Material: public Handle<TGeoMedium> { public: @@ -312,8 +317,9 @@ namespace DD4hep { /// Handle class describing visualization attributes /** @class VisAttr Objects.h * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class VisAttr: public Handle<VisAttrObject> { public: @@ -414,8 +420,9 @@ namespace DD4hep { /// Small object describing a limit structure acting on a particle type /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class Limit { public: @@ -444,8 +451,9 @@ namespace DD4hep { /// Handle class describing a set of limits as they are used for simulation /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class LimitSet: public Handle<LimitSetObject> { public: @@ -479,8 +487,9 @@ namespace DD4hep { /// Handle class describing a region as used in simulation /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class Region: public Handle<RegionObject> { public: diff --git a/DDCore/include/DD4hep/Parsers.h b/DDCore/include/DD4hep/Parsers.h index 9ce843027..802c8cf25 100644 --- a/DDCore/include/DD4hep/Parsers.h +++ b/DDCore/include/DD4hep/Parsers.h @@ -64,9 +64,10 @@ namespace DD4hep { /// Namespace for the AIDA detector for utilities using boost::spirit parsers namespace Parsers { + // ======================================================================== - /** parse the <c>bool</c> value - * @see DD4hep::Parsers::BoolGrammar + /// parse the <c>bool</c> value + /** @see DD4hep::Parsers::BoolGrammar * @param result (output) boolean result * @param input (input) the string to be parsed * @return status code @@ -77,8 +78,8 @@ namespace DD4hep { */ PARSERS_DECL_FOR_SINGLE(bool) // ======================================================================== - /** parse the <c>char</c> value - * + /// parse the <c>char</c> value + /** * @see DD4hep::Parsers::CharGrammar * @param result (output) boolean result * @param input (input) the string to be parsed @@ -94,8 +95,8 @@ namespace DD4hep { /// @see DD4hep::Parsers::parser(char&,std::string&) PARSERS_DECL_FOR_SINGLE(signed char) // ======================================================================== - /** parse the <c>int</c> value - * + /// parse the <c>int</c> value + /** * @see DD4hep::Parsers::IntGrammar * @param result (output) integer result * @param input (input) the string to be parsed @@ -121,8 +122,8 @@ namespace DD4hep { /// @see DD4hep::Parsers::parser( int&, const std::string& ) PARSERS_DECL_FOR_SINGLE(unsigned long long) // ======================================================================== - /** parse the <c>double</c> value - * + /// parse the <c>double</c> value + /** * @see DD4hep::Parsers::RealGrammar * @param result (output) double result * @param input (input) the string to be parsed @@ -174,8 +175,8 @@ namespace DD4hep { // ======================================================================== // Advanced parses // ======================================================================== - /** parse the <c>std::pair\<double,double\></c> value - * + /// parse the <c>std::pair\<double,double\></c> value + /** * @see DD4hep::Parsers::PairGrammar * @see DD4hep::Parsers::RealGrammar * @param result (output) pair of doubles @@ -202,8 +203,9 @@ namespace DD4hep { */ PARSERS_DECL_FOR_PAIR(int, int) // ======================================================================== - /** parse the <c>std::vector\<std::pair\<double,double\> \></c> value - * + + /// parse the <c>std::vector\<std::pair\<double,double\> \></c> value + /** * @see DD4hep::Parsers::VectorGrammar * @see DD4hep::Parsers::PairGrammar * @see DD4hep::Parsers::RealGrammar @@ -217,8 +219,8 @@ namespace DD4hep { */ int parse(std::vector<std::pair<double, double> >& result, const std::string& input); // ======================================================================== - /** parse the <c>std::vector\<std::pair\<int,int\> \></c> value - * + /// parse the <c>std::vector\<std::pair\<int,int\> \></c> value + /** * @see DD4hep::Parsers::VectorGrammar * @see DD4hep::Parsers::PairGrammar * @see DD4hep::Parsers::IntGrammar @@ -234,8 +236,8 @@ namespace DD4hep { // ======================================================================== // vector< vector< TYPE > > // ======================================================================== - /** parse the <c>std::vector\<std::vector\<std::string\> \></c> value - * + /// parse the <c>std::vector\<std::vector\<std::string\> \></c> value + /** * @see DD4hep::Parsers::VectorGrammar * @see DD4hep::Parsers::StringGrammar * @param result (output) vector with vectors of strings @@ -248,8 +250,8 @@ namespace DD4hep { */ int parse(std::vector<std::vector<std::string> >& result, const std::string& input); // ======================================================================== - /** parse the <c>std::vector\<std::vector\<double\> \></c> value - * + /// parse the <c>std::vector\<std::vector\<double\> \></c> value + /** * @see DD4hep::Parsers::VectorGrammar * @see DD4hep::Parsers::RealGrammar * @param result (output) vector with vectors of doubles @@ -264,8 +266,8 @@ namespace DD4hep { // ======================================================================== // map< TYPE, TYPE > // ======================================================================== - /** parse the <c>std::map\<int , int\></c> value - * + /// parse the <c>std::map\<int , int\></c> value + /** * @see DD4hep::Parsers::MapGrammar * @see DD4hep::Parsers::IntGrammar * @param result (output) map with integer key and double value @@ -278,8 +280,8 @@ namespace DD4hep { */ int parse(std::map<int, int>& result, const std::string& input); // ======================================================================== - /** parse the <c>std::map\<int , double\></c> value - * + /// parse the <c>std::map\<int , double\></c> value + /** * @see DD4hep::Parsers::MapGrammar * @see DD4hep::Parsers::IntGrammar * @see DD4hep::Parsers::RealGrammar @@ -293,8 +295,8 @@ namespace DD4hep { */ int parse(std::map<int, double>& result, const std::string& input); // ======================================================================== - /** parse the <c>std::map\<std::string , std::string\></c> value - * + /// parse the <c>std::map\<std::string , std::string\></c> value + /** * @see DD4hep::Parsers::MapGrammar * @see DD4hep::Parsers::StringGrammar * @param result (output) map with string key and value @@ -307,8 +309,8 @@ namespace DD4hep { */ int parse(std::map<std::string, std::string>& result, const std::string& input); // ======================================================================== - /** parse the <c>std::map\<std::string , int\></c> value - * + /// parse the <c>std::map\<std::string , int\></c> value + /** * @see DD4hep::Parsers::MapGrammar * @see DD4hep::Parsers::StringGrammar * @see DD4hep::Parsers::IntGrammar @@ -322,8 +324,8 @@ namespace DD4hep { */ int parse(std::map<std::string, int>& result, const std::string& input); // ======================================================================== - /** parse the <c>std::map\<std::string , double\></c> value - * + /// parse the <c>std::map\<std::string , double\></c> value + /** * @see DD4hep::Parsers::MapGrammar * @see DD4hep::Parsers::StringGrammar * @see DD4hep::Parsers::RealGrammar @@ -337,9 +339,8 @@ namespace DD4hep { */ int parse(std::map<std::string, double>& result, const std::string& input); // ======================================================================== - /** parse the <c>std::map\<std::string , std::vector\<std::string\> \></c> - * value - * + /// parse the <c>std::map\<std::string , std::vector\<std::string\> \></c> value + /** * @see DD4hep::Parsers::MapGrammar * @see DD4hep::Parsers::StringGrammar * @see DD4hep::Parsers::VectorGrammar @@ -354,8 +355,8 @@ namespace DD4hep { */ int parse(std::map<std::string, std::vector<std::string> >& result, const std::string& input); // ======================================================================== - /** parse the <c>std::map\<std::string , std::vector\<int\> \></c> value - * + /// parse the <c>std::map\<std::string , std::vector\<int\> \></c> value + /** * @see DD4hep::Parsers::MapGrammar * @see DD4hep::Parsers::StringGrammar * @see DD4hep::Parsers::VectorGrammar @@ -371,8 +372,8 @@ namespace DD4hep { */ int parse(std::map<std::string, std::vector<int> >& result, const std::string& input); // ======================================================================== - /** parse the <c>std::map\<std::string , std::vector\<double\> \></c> value - * + /// parse the <c>std::map\<std::string , std::vector\<double\> \></c> value + /** * @see DD4hep::Parsers::MapGrammar * @see DD4hep::Parsers::StringGrammar * @see DD4hep::Parsers::VectorGrammar @@ -388,8 +389,8 @@ namespace DD4hep { */ int parse(std::map<std::string, std::vector<double> >& result, const std::string& input); // ======================================================================== - /** parse the <c>std::map\<int,std::string\> \></c> objects - * + /// parse the <c>std::map\<int,std::string\> \></c> objects + /** * @see DD4hep::Parsers::MapGrammar * @author Vanya BELYAEV ibelyaev@physics.syr.edu * @author Alexander MAZUROV Alexander.Mazurov@gmail.com @@ -397,8 +398,8 @@ namespace DD4hep { */ int parse(std::map<int, std::string>& result, const std::string& input); // ======================================================================== - /** parse the <c>std::map\<unsigned int,std::string\> \></c> objects - * + /// parse the <c>std::map\<unsigned int,std::string\> \></c> objects + /** * @see DD4hep::Parsers::MapGrammar * @author Vanya BELYAEV ibelyaev@physics.syr.edu * @author Alexander MAZUROV Alexander.Mazurov@gmail.com @@ -406,15 +407,15 @@ namespace DD4hep { */ int parse(std::map<unsigned int, std::string>& result, const std::string& input); // ======================================================================== - /** parse the <c>std::map\<unsigned int,std::string\> \></c> objects - * + /// parse the <c>std::map\<unsigned int,std::string\> \></c> objects + /** * @see DD4hep::Parsers::MapGrammar */ int parse(std::map<std::string, unsigned int>& result, const std::string& input); // ======================================================================== - /** parse the pair expression (map-component) " 'name' :value" - * + /// parse the pair expression (map-component) " 'name' :value" + /** * @code * * const std::string input = "'PackageName':DD4hepKernel" ; @@ -442,8 +443,8 @@ namespace DD4hep { int parse(std::string& name, std::string& value, const std::string& input); // ======================================================================== - /** helper function, needed for implementation of map of pairs - * It is very useful construction for monitoring to + /// helper function, needed for implementation of map of pairs + /** It is very useful construction for monitoring to * represent the value and error or the allowed range for * some parameter * @param params the map of pair @@ -454,13 +455,14 @@ namespace DD4hep { * @date 2009-05-19 */ int parse(std::map<std::string, std::pair<double, double> >& params, const std::string& input); + // ======================================================================== - /** parser function for C-arrays - * @param params C-array - * @param input the string to be parsed - * @return status code - * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl - * @date 2009-09-15 + /// parser function for C-arrays + /** @param result C-array + * @param input the string to be parsed + * @return status code + * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl + * @date 2009-09-15 */ template <class T, unsigned int N> int parse(T (&result)[N], const std::string& input) { @@ -480,12 +482,12 @@ namespace DD4hep { return 1; // RETURN } // ======================================================================== - /** parser function for C-strings - * @param params C-string - * @param input the string to be parsed - * @return status code - * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl - * @date 2009-09-15 + /// parser function for C-strings + /** @param result C-string + * @param input the string to be parsed + * @return status code + * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl + * @date 2009-09-15 */ template <unsigned int N> int parse(char (&result)[N], const std::string& input) { @@ -511,8 +513,8 @@ namespace DD4hep { } // ======================================================================== - /** parse 3D-point - * + /// parse 3D-point + /** * Valid representations of 3D-point: * * - a'la python tuple with 3 elements ("canonical") @@ -549,8 +551,8 @@ namespace DD4hep { int parse(ROOT::Math::XYZPoint& result, const std::string& input); // ======================================================================== - /** parse 3D-vector - * + /// parse 3D-vector + /** * Valid representations of 3D-vector: * * - a'la python tuple with 3 elements ("canonical") @@ -587,8 +589,8 @@ namespace DD4hep { int parse( ROOT::Math::XYZVector& result, const std::string& input); // ======================================================================== - /** parse PxPyPzEVector - * + /// parse PxPyPzEVector + /** * Valid representations of Lorenzt vector * * - a'la python tuple with 4 elements ("canonical") @@ -657,31 +659,31 @@ namespace DD4hep { */ int parse(ROOT::Math::PxPyPzEVector& result, const std::string& input); // ======================================================================== - /** parse the vector of points - * @param resut (OUTPUT) the parser vector - * @param input (INPIUT) the string to be parsed - * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl - * @date 2009-09-05 + /// parse the vector of points + /** @param result (OUTPUT) the parser vector + * @param input (INPIUT) the string to be parsed + * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl + * @date 2009-09-05 */ int parse( std::vector<ROOT::Math::XYZPoint>& result, const std::string& input); int parse( std::list<ROOT::Math::XYZPoint>& result, const std::string& input); int parse( std::set<ROOT::Math::XYZPoint>& result, const std::string& input); // ======================================================================== - /** parse the vector of vectors - * @param resut (OUTPUT) the parser vector - * @param input (INPIUT) the string to be parsed - * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl - * @date 2009-09-05 + /// parse the vector of vectors + /** @param result (OUTPUT) the parser vector + * @param input (INPIUT) the string to be parsed + * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl + * @date 2009-09-05 */ int parse( std::vector<ROOT::Math::XYZVector>& result, const std::string& input); int parse( std::list<ROOT::Math::XYZVector>& result, const std::string& input); int parse( std::set<ROOT::Math::XYZVector>& result, const std::string& input); // ======================================================================== - /** parse the vector of vectors - * @param resut (OUTPUT) the parser vector - * @param input (INPIUT) the string to be parsed - * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl - * @date 2009-09-05 + /// parse the vector of vectors + /** @param result (OUTPUT) the parser vector + * @param input (INPIUT) the string to be parsed + * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl + * @date 2009-09-05 */ int parse(std::vector<ROOT::Math::PxPyPzEVector>& result, const std::string& input); int parse(std::list<ROOT::Math::PxPyPzEVector>& result, const std::string& input); @@ -690,7 +692,7 @@ namespace DD4hep { // ======================================================================== }// end of namespace Parsers // ========================================================================== -}// end of namespace DD4hep +}// end of namespace DD4hep // ============================================================================ // The END // ============================================================================ diff --git a/DDCore/include/DD4hep/Printout.h b/DDCore/include/DD4hep/Printout.h index 9a1c95a23..54c541e45 100644 --- a/DDCore/include/DD4hep/Printout.h +++ b/DDCore/include/DD4hep/Printout.h @@ -6,12 +6,10 @@ // Author : M.Frank // //==================================================================== - #ifndef DD4HEP_PRINTOUT_H #define DD4HEP_PRINTOUT_H // Framework include files -//#include "DD4hep/Handle.h" // C/C++ include files #include <cstdio> @@ -27,10 +25,12 @@ class TNamed; /// Namespace for the AIDA detector description toolkit namespace DD4hep { + // Forward declarations class NamedObject; /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { + // Forward declarations class LCDD; class VisAttr; @@ -141,6 +141,7 @@ namespace DD4hep { /// Access the current printer level PrintLevel printLevel(); + /// Helper class template to implement ASCII object dumps /** @class Printer Conversions.h DD4hep/compact/Conversions.h * * Small helper class to print objects @@ -169,6 +170,7 @@ namespace DD4hep { return os; } + /// Helper class template to implement ASCII dumps of named objects maps /** @class PrintMap Conversions.h DD4hep/compact/Conversions.h * * Small helper class to print maps of objects diff --git a/DDCore/include/DD4hep/Readout.h b/DDCore/include/DD4hep/Readout.h index b520f4ace..bdd515c51 100644 --- a/DDCore/include/DD4hep/Readout.h +++ b/DDCore/include/DD4hep/Readout.h @@ -31,9 +31,9 @@ namespace DD4hep { /// Handle to the implementation of the readout structure of a subdetector /** - * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct Readout: public Handle<ReadoutObject> { public: diff --git a/DDCore/include/DD4hep/Segmentations.h b/DDCore/include/DD4hep/Segmentations.h index 18a6f021e..db4b59946 100644 --- a/DDCore/include/DD4hep/Segmentations.h +++ b/DDCore/include/DD4hep/Segmentations.h @@ -28,9 +28,9 @@ namespace DD4hep { /// Implementation class supporting generic Segmentation of sensitive detectors /** - * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class SegmentationObject : public DDSegmentation::Segmentation { public: @@ -78,8 +78,9 @@ namespace DD4hep { /// Handle class supporting generic Segmentation of sensitive detectors /** * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct Segmentation: public Handle<SegmentationObject> { public: diff --git a/DDCore/include/DD4hep/Shapes.h b/DDCore/include/DD4hep/Shapes.h index 14ec159ae..22e561741 100644 --- a/DDCore/include/DD4hep/Shapes.h +++ b/DDCore/include/DD4hep/Shapes.h @@ -42,10 +42,11 @@ namespace DD4hep { * Generic handle holding an object of base TGeoShape. * * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoShape.html + * \see http://root.cern.ch/root/html/TGeoShape.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ template <typename T> struct Solid_type: public Handle<T> { protected: @@ -94,11 +95,12 @@ namespace DD4hep { /// Class describing a box shape /** * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoBBox.html + * \see http://root.cern.ch/root/html/TGeoBBox.html * * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct Box: public Solid_type<TGeoBBox> { protected: @@ -147,11 +149,12 @@ namespace DD4hep { * * * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoPcon.html + * \see http://root.cern.ch/root/html/TGeoPcon.html * * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct Polycone: public Solid_type<TGeoPcon> { /// Constructor to be used when reading the already parsed polycone object @@ -176,10 +179,11 @@ namespace DD4hep { * half-length dz, inner and outer radii specified at -dz and +dz. * * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoConeSeg.html + * \see http://root.cern.ch/root/html/TGeoConeSeg.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct ConeSegment: public Solid_type<TGeoConeSeg> { /// Constructor to be used when reading the already parsed ConeSegment object @@ -196,6 +200,7 @@ namespace DD4hep { double phi2 = 2.0 * M_PI); }; + /// Intermediate class to overcome drawing probles with the TGeoTubeSeg struct MyConeSeg: public TGeoConeSeg { public: MyConeSeg() @@ -217,10 +222,11 @@ namespace DD4hep { * inner radius, outer radius and half-length dz. * * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoConeSeg.html + * \see http://root.cern.ch/root/html/TGeoConeSeg.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct Tube: public Solid_type< /*TGeoTubeSeg */MyConeSeg> { protected: @@ -271,10 +277,11 @@ namespace DD4hep { /// Class describing a cone shape /** * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoCone.html + * \see http://root.cern.ch/root/html/TGeoCone.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct Cone: public Solid_type<TGeoCone> { protected: @@ -305,10 +312,11 @@ namespace DD4hep { /// Class describing a trap shape /** * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoTrap.html + * \see http://root.cern.ch/root/html/TGeoTrap.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct Trap: public Solid_type<TGeoTrap> { private: @@ -343,11 +351,12 @@ namespace DD4hep { /// Class describing a Trapezoid shape /** * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoTrd2.html + * \see http://root.cern.ch/root/html/TGeoTrd2.html * * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct Trapezoid: public Solid_type<TGeoTrd2> { private: @@ -375,10 +384,11 @@ namespace DD4hep { /// Class describing a Torus shape /** * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoTorus.html + * \see http://root.cern.ch/root/html/TGeoTorus.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct Torus: public Solid_type<TGeoTorus> { private: @@ -407,11 +417,12 @@ namespace DD4hep { /// Class describing a sphere shape /** * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoSphere.html + * \see http://root.cern.ch/root/html/TGeoSphere.html * * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct Sphere: public Solid_type<TGeoSphere> { /// Constructor to be used when passing an already created object @@ -432,11 +443,12 @@ namespace DD4hep { /// Class describing a Paraboloid shape /** * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoParaboloid.html + * \see http://root.cern.ch/root/html/TGeoParaboloid.html * * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct Paraboloid: public Solid_type<TGeoParaboloid> { /// Constructor to be used when passing an already created object @@ -456,10 +468,11 @@ namespace DD4hep { /// Class describing a regular polyhedron shape /** * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoPgon.html + * \see http://root.cern.ch/root/html/TGeoPgon.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct PolyhedraRegular: public Solid_type<TGeoPgon> { protected: @@ -488,10 +501,11 @@ namespace DD4hep { /// Class describing an arbitray solid defined by 8 vertices. /** * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoArb8.html + * \see http://root.cern.ch/root/html/TGeoArb8.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct EightPointSolid: public Solid_type<TGeoArb8> { private: @@ -513,10 +527,11 @@ namespace DD4hep { /// Base class describing boolean (=union,intersection,subtraction) solids /** * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoCompositeShape.html + * \see http://root.cern.ch/root/html/TGeoCompositeShape.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct BooleanSolid: public Solid_type<TGeoCompositeShape> { protected: @@ -536,11 +551,12 @@ namespace DD4hep { /// Class describing boolean subtraction solid /** * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoCompositeShape.html - * @see http://root.cern.ch/root/html/TGeoSubtraction.html + * \see http://root.cern.ch/root/html/TGeoCompositeShape.html + * \see http://root.cern.ch/root/html/TGeoSubtraction.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct SubtractionSolid: public BooleanSolid { /// Default constructor @@ -570,11 +586,12 @@ namespace DD4hep { /// Class describing boolean union solid /** * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoCompositeShape.html - * @see http://root.cern.ch/root/html/TGeoUnion.html + * \see http://root.cern.ch/root/html/TGeoCompositeShape.html + * \see http://root.cern.ch/root/html/TGeoUnion.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct UnionSolid: public BooleanSolid { /// Default constructor @@ -604,11 +621,12 @@ namespace DD4hep { /// Class describing boolean intersection solid /** * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoCompositeShape.html - * @see http://root.cern.ch/root/html/TGeoIntersection.html + * \see http://root.cern.ch/root/html/TGeoCompositeShape.html + * \see http://root.cern.ch/root/html/TGeoIntersection.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct IntersectionSolid: public BooleanSolid { /// Default constructor diff --git a/DDCore/include/DD4hep/ToStream.h b/DDCore/include/DD4hep/ToStream.h index a61655ce9..d690f2875 100644 --- a/DDCore/include/DD4hep/ToStream.h +++ b/DDCore/include/DD4hep/ToStream.h @@ -47,8 +47,8 @@ namespace DD4hep { template <class TYPE> std::ostream& toStream(const TYPE& obj, std::ostream& s); // ======================================================================== - /** the helper function to print the sequence - * @param first (INPUT) begin-iterator for the sequence + /// the helper function to print the sequence + /** @param first (INPUT) begin-iterator for the sequence * @param last (INPUT) end-iterator for the sequence * @param s (UPDATE) the stream itself * @param open (INPUT) "open"-symbol @@ -66,8 +66,8 @@ namespace DD4hep { const std::string& close, // closing const std::string& delim); // delimiter // ======================================================================== - /** the printtout of the strings. - * the string is printed a'la Python using the quotes + /// the printtout of the strings. + /** the string is printed a'la Python using the quotes * @author Alexander MAZUROV Alexander.Mazurov@gmail.com * @author Vanya BELYAEV ibelyaev@physics.syr.edu * @date 2006-05-12 @@ -81,31 +81,31 @@ namespace DD4hep { } return s; } - /** the printout of boolean values "a'la Python" - * @author Vanya BELYAEV ibelyaev@physics.syr.edu + /// the printout of boolean values "a'la Python" + /** @author Vanya BELYAEV ibelyaev@physics.syr.edu * @date 2006-09-09 */ inline std::ostream& toStream(const bool obj, std::ostream& s) { return s << (obj ? "True" : "False"); } - /** the printout of float values with the reasonable precision - * @author Vanya BELYAEV ibelyaev@physics.syr.edu + /// the printout of float values with the reasonable precision + /** @author Vanya BELYAEV ibelyaev@physics.syr.edu * @date 2006-09-09 */ inline std::ostream& toStream(const float obj, std::ostream& s, const int prec = 6) { const int p = s.precision(); return s << std::setprecision(prec) << obj << std::setprecision(p); } - /** the printout of double values with the reasonable precision - * @author Vanya BELYAEV ibelyaev@physics.syr.edu + /// the printout of double values with the reasonable precision + /** @author Vanya BELYAEV ibelyaev@physics.syr.edu * @date 2006-09-09 */ inline std::ostream& toStream(const double obj, std::ostream& s, const int prec = 8) { const int p = s.precision(); return s << std::setprecision(prec) << obj << std::setprecision(p); } - /** the printout of long double values with the reasonable precision - * @author Vanya BELYAEV ibelyaev@physics.syr.edu + /// the printout of long double values with the reasonable precision + /** @author Vanya BELYAEV ibelyaev@physics.syr.edu * @date 2006-09-09 */ inline std::ostream& toStream(const long double obj, std::ostream& s, const int prec = 10) { diff --git a/DDCore/include/DD4hep/VolumeManager.h b/DDCore/include/DD4hep/VolumeManager.h index 853fc77d9..a023fd51a 100644 --- a/DDCore/include/DD4hep/VolumeManager.h +++ b/DDCore/include/DD4hep/VolumeManager.h @@ -31,7 +31,7 @@ namespace DD4hep { class VolumeManagerObject; /// Class to support the retrieval of detector elements and volumes given a valid identifier - /** @class VolumeManager VolumeManager.h DD4hep/lcdd/VolumeManager.h + /** * * The VolumeManager manages the repository of sensitive physical * volumes (placements). These volumes can then be accessed together with @@ -58,8 +58,9 @@ namespace DD4hep { * handle is destroyed once no other references are present. * [call DestroyHandle(VolumeManager)] * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct VolumeManager: public Handle<VolumeManagerObject> { public: diff --git a/DDCore/include/DD4hep/Volumes.h b/DDCore/include/DD4hep/Volumes.h index bb9c302ec..3cfe751f1 100644 --- a/DDCore/include/DD4hep/Volumes.h +++ b/DDCore/include/DD4hep/Volumes.h @@ -57,16 +57,22 @@ namespace DD4hep { /// Implementation class extending the ROOT placed volume /** - * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoExtension.html + * For any further documentation please see the following ROOT documentation: + * \see http://root.cern.ch/root/html/TGeoExtension.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class PlacedVolumeExtension : public TGeoExtension { public: typedef std::pair<std::string, int> VolID; /// Volume ID container + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY + */ class VolIDs: public std::vector<VolID> { public: typedef std::vector<VolID> Base; @@ -106,10 +112,11 @@ namespace DD4hep { /// Handle class holding a placed volume (also called physical volume) /** * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoNode.html + * \see http://root.cern.ch/root/html/TGeoNode.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class PlacedVolume : public Handle<TGeoNode> { public: @@ -156,13 +163,14 @@ namespace DD4hep { /// Implementation class extending the ROOT volume (TGeoVolume) /** - * Internal data structure optional to TGeo data. + * Internal data structure optional to TGeo data. * - * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoExtension.html + * For any further documentation please see the following ROOT documentation: + * \see http://root.cern.ch/root/html/TGeoExtension.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class VolumeExtension : public TGeoExtension { public: @@ -201,10 +209,11 @@ namespace DD4hep { * Handle describing a Volume * * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoVolume.html + * \see http://root.cern.ch/root/html/TGeoVolume.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class Volume: public Handle<TGeoVolume> { @@ -311,10 +320,11 @@ namespace DD4hep { * Handle describing a volume assembly. * * For any further documentation please see the following ROOT documentation: - * @see http://root.cern.ch/root/html/TGeoVolumeAssembly.html + * \see http://root.cern.ch/root/html/TGeoVolumeAssembly.html * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class Assembly: public Volume { public: diff --git a/DDCore/include/DD4hep/config.h b/DDCore/include/DD4hep/config.h index e6eb9c81b..8fbc91e3d 100644 --- a/DDCore/include/DD4hep/config.h +++ b/DDCore/include/DD4hep/config.h @@ -19,15 +19,12 @@ #define DECREMENT_COUNTER #endif -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry sub-namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { + } /* End namespace Geometry */ } /* End namespace DD4hep */ #endif /* DD4HEP_CONFIG_H */ diff --git a/DDCore/include/DD4hep/objects/BasicGrammar_inl.h b/DDCore/include/DD4hep/objects/BasicGrammar_inl.h index 014ce2bcd..2db0c23b4 100644 --- a/DDCore/include/DD4hep/objects/BasicGrammar_inl.h +++ b/DDCore/include/DD4hep/objects/BasicGrammar_inl.h @@ -31,17 +31,17 @@ namespace DD4hep { XmlTools::Evaluator& g4Evaluator(); } namespace { static XmlTools::Evaluator& s__eval(DD4hep::g4Evaluator()); } -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /** @class PropertyGrammarCollection - * - * @author M.Frank - * @date 13.08.2013 + /// Concrete type dependent grammar definition + /** + * \author M.Frank + * \date 13.08.2013 + * \ingroup DD4HEP */ - template <typename TYPE> struct Grammar : public BasicGrammar { + template <typename TYPE> class Grammar : public BasicGrammar { + public: /// Standarsd constructor Grammar(); /// Default destructor @@ -123,6 +123,7 @@ namespace DD4hep { #endif } + /// Helper function to parse data type static std::string pre_parse_obj(const std::string& in) { std::string res = ""; res.reserve(1024); diff --git a/DDCore/include/DD4hep/objects/ConditionsInterna.h b/DDCore/include/DD4hep/objects/ConditionsInterna.h index 98eb97f75..32b6eb9d5 100644 --- a/DDCore/include/DD4hep/objects/ConditionsInterna.h +++ b/DDCore/include/DD4hep/objects/ConditionsInterna.h @@ -14,25 +14,21 @@ #include "DD4hep/BasicGrammar.h" #include "DD4hep/NamedObject.h" +// C/C++ include files #include <map> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { // Forward declarations class DetElement; class Condition; - /* - * Conditions internal namespace declaration - * Internally defined datastructures are not presented to the + /// Conditions internal namespace declaration + /** Internally defined datastructures are not presented to the * user directly, but are used by dedicated views. * */ @@ -42,13 +38,12 @@ namespace DD4hep { class Entry; class IOV; - /** @class IOV ConditionsInterna.h DD4hep/ConditionsInterna.h + /// Class describing the interval of validty + /** * - * Class describing the interval of validty - * - * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class IOV { friend class Condition; @@ -72,12 +67,12 @@ namespace DD4hep { std::string str(); }; - /** @class Block ConditionsInterna.h DD4hep/ConditionsInterna.h - * - * Class describing an opaque conditions data block + /// Class describing an opaque conditions data block + /** * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class BlockData : public Block { friend class Condition; @@ -114,12 +109,12 @@ namespace DD4hep { void assign(const void* ptr,const std::type_info& typ); }; - /** @class Entry ConditionsInterna.h DD4hep/ConditionsInterna.h - * - * The intermediate conditions data + /// The intermediate conditions data + /** * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class Entry : public NamedObject { public: @@ -143,12 +138,12 @@ namespace DD4hep { Entry& operator=(const Entry& c); }; - /** @class Object ConditionsInterna.h DD4hep/ConditionsInterna.h - * - * The data class behind a conditions handle. + /// The data class behind a conditions handle. + /** * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class ConditionObject : public NamedObject { public: @@ -174,12 +169,12 @@ namespace DD4hep { ConditionObject& move(ConditionObject& from); }; - /** @class Container ConditionsInterna.h DD4hep/ConditionsInterna.h - * - * The data class behind a conditions container handle. + /// The data class behind a conditions container handle. + /** * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class ConditionContainer : public NamedObject { public: diff --git a/DDCore/include/DD4hep/objects/DetectorInterna.h b/DDCore/include/DD4hep/objects/DetectorInterna.h index 0c17f371f..c49cb5594 100644 --- a/DDCore/include/DD4hep/objects/DetectorInterna.h +++ b/DDCore/include/DD4hep/objects/DetectorInterna.h @@ -20,24 +20,23 @@ #include "DD4hep/ObjectExtensions.h" #include "TGeoMatrix.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { class LCDD; class DetElementObject; class SensitiveDetectorObject; - /** @class SensitiveDetectorObject DetectorInterna.h DD4hep/objects/DetectorInterna.h + /// Data class with properties of sensitive detectors + /** * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * + * \ingroup DD4HEP DD4HEP_GEOMETRY */ class SensitiveDetectorObject: public NamedObject, public ObjectExtensions { public: @@ -58,10 +57,13 @@ namespace DD4hep { virtual ~SensitiveDetectorObject(); }; - /** @class DetElementObject DetectorInterna.h DD4hep/objects/DetectorInterna.h + /// Data class with properties of a detector element + /** + * + * \author M.Frank + * \version 1.0 * - * @author M.Frank - * @version 1.0 + * \ingroup DD4HEP DD4HEP_GEOMETRY */ class DetElementObject: public NamedObject, public ObjectExtensions { public: @@ -97,8 +99,8 @@ namespace DD4hep { PlacedVolume idealPlace; /// The subdetector placement corresponding to the actual detector element's volume PlacedVolume placement; - /** The cached VolumeID of this subdetector element - * Please note: + /// The cached VolumeID of this subdetector element + /** Please note: * These values are set when populating the volume manager. * There are restrictions: e.g. only sensitive subdetectors are present. */ @@ -112,7 +114,7 @@ namespace DD4hep { /// Placeholder for structure with update callbacks UpdateCallbacks updateCalls; - /**@info: Additional information set externally to facilitate the processing of event data */ + //@{ Additional information set externally to facilitate the processing of event data */ /// Basic detector element alignment entry Alignment alignment; /// Basic detector element alignment entry containing the survey data @@ -123,16 +125,16 @@ namespace DD4hep { std::vector<Alignment> volume_surveys; /// The detector elements condition entry Conditions conditions; - - /**@info: Cached information of the detector element */ + //@} + //@{ Cached information of the detector element /// Intermediate buffer to store the transformation to the world coordination system TGeoHMatrix worldTrafo; /// Intermediate buffer to store the transformation to the parent detector element TGeoHMatrix parentTrafo; /// Intermediate buffer for the transformation to an arbitrary DetElement TGeoHMatrix* referenceTrafo; - - /**@info: Public methods to ease the usage of the data. */ + //@} + //@{ Public methods to ease the usage of the data. */ /// Initializing constructor DetElementObject(const std::string& nam, int ident); /// Default constructor @@ -141,7 +143,7 @@ namespace DD4hep { virtual ~DetElementObject(); /// Deep object copy to replicate DetElement trees e.g. for reflection virtual DetElementObject* clone(int new_id, int flag) const; - + //@} /// Create cached matrix to transform to world coordinates const TGeoHMatrix& worldTransformation(); /// Create cached matrix to transform to parent coordinates diff --git a/DDCore/include/DD4hep/objects/ObjectsInterna.h b/DDCore/include/DD4hep/objects/ObjectsInterna.h index 11796be87..c30d11515 100644 --- a/DDCore/include/DD4hep/objects/ObjectsInterna.h +++ b/DDCore/include/DD4hep/objects/ObjectsInterna.h @@ -21,22 +21,18 @@ // Forward declarations class TColor; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { - /** @class HeaderObject ObjectsInterna.h DD4hep/objects/ObjectsInterna.h + /// Concrete object implementation for the Header handle + /** * - * - * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class HeaderObject: public NamedObject { public: @@ -56,12 +52,12 @@ namespace DD4hep { HeaderObject& operator=(const HeaderObject&) { return *this; } }; - /** @class VisAttrObject ObjectsInterna.h DD4hep/objects/ObjectsInterna.h - * - * + /// Concrete object implementation of the VisAttr Handle + /** * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class VisAttrObject: public NamedObject { public: @@ -76,12 +72,12 @@ namespace DD4hep { virtual ~VisAttrObject(); }; - /** @class RegionObject ObjectsInterna.h DD4hep/objects/ObjectsInterna.h - * - * + /// Concrete object implementation of the Region Handle + /** * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class RegionObject: public NamedObject { public: @@ -97,12 +93,12 @@ namespace DD4hep { virtual ~RegionObject(); }; - /** @class LimitSetObject ObjectsInterna.h DD4hep/objects/ObjectsInterna.h + /// Concrete object implementation of the LimitSet Handle + /** * - * - * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class LimitSetObject: public NamedObject, public std::set<Limit> { public: @@ -112,12 +108,15 @@ namespace DD4hep { virtual ~LimitSetObject(); }; - /** @class Readout::Object Readout.h DD4hep/Readout.h + /// Concrete object implementation of the Readout Handle + /** * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ - struct ReadoutObject: public NamedObject { + class ReadoutObject: public NamedObject { + public: /// Handle to the readout segmentation Segmentation segmentation; /// Handle to the volume @@ -130,11 +129,13 @@ namespace DD4hep { virtual ~ReadoutObject(); }; - /** @class IDDescriptor::Object IDDescriptor.h DDCore/IDDescriptor.h + /// Concrete object implementation of the IDDescriptorObject Handle + /** * - * @author M.Frank - * @version 1.0 - * @date 2012/07/31 + * \author M.Frank + * \version 1.0 + * \date 2012/07/31 + * \ingroup DD4HEP_GEOMETRY */ class IDDescriptorObject: public NamedObject, public BitField64 { public: diff --git a/DDCore/include/DD4hep/objects/VolumeManagerInterna.h b/DDCore/include/DD4hep/objects/VolumeManagerInterna.h index f31db2774..e1883f801 100644 --- a/DDCore/include/DD4hep/objects/VolumeManagerInterna.h +++ b/DDCore/include/DD4hep/objects/VolumeManagerInterna.h @@ -17,14 +17,11 @@ // ROOT include files #include "TGeoMatrix.h" -/* - * DD4hep namespace declaration - */ + +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { // Forward declarations @@ -32,12 +29,12 @@ namespace DD4hep { class VolumeManagerContext; class VolumeManagerObject; - /** @class VolumeManagerContext VolumeManager.h DD4hep/lcdd/VolumeManager.h - * - * This structure describes the cached data for one placement + /// This structure describes the cached data for one placement held by the volume manager + /** * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ class VolumeManagerContext { public: @@ -69,13 +66,13 @@ namespace DD4hep { virtual ~VolumeManagerContext(); }; - /** @class VolumeManagerObject VolumeManager.h DD4hep/lcdd/VolumeManager.h + /// This structure describes the internal data of the volume manager object + /** * - * This structure describes the internal data of the volume manager object - * - * @author M.Frank - * @version 1.0 - */ + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY + */ struct VolumeManagerObject: public NamedObject { public: typedef IDDescriptor::Field Field; diff --git a/DDCore/include/XML/Conversions.h b/DDCore/include/XML/Conversions.h index fa894596f..c0eb8fa4d 100644 --- a/DDCore/include/XML/Conversions.h +++ b/DDCore/include/XML/Conversions.h @@ -14,20 +14,19 @@ #include <iostream> #include "DD4hep/LCDD.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - // Forward declarations + /// Namespace for the AIDA detector description toolkit supporting XML utilities namespace XML { struct Handle_t; } /// Basic conversion objects for handling DD4hep XML files. /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ template <typename T> struct Converter { typedef T to_type; diff --git a/DDCore/include/XML/DocumentHandler.h b/DDCore/include/XML/DocumentHandler.h index 877544266..f3fbd7ad3 100644 --- a/DDCore/include/XML/DocumentHandler.h +++ b/DDCore/include/XML/DocumentHandler.h @@ -22,15 +22,16 @@ namespace DD4hep { namespace XML { // Forward declarations - struct DocumentErrorHandler; + class DocumentErrorHandler; /// Class supporting to read and parse XML documents. /** * Wrapper object around the document parser. * Supports both, XercesC and TiXml. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ class DocumentHandler { protected: diff --git a/DDCore/include/XML/Evaluator.h b/DDCore/include/XML/Evaluator.h index 66abfbbae..cd24242bd 100644 --- a/DDCore/include/XML/Evaluator.h +++ b/DDCore/include/XML/Evaluator.h @@ -5,6 +5,7 @@ #ifndef XMLTOOLS_EVALUATOR_H #define XMLTOOLS_EVALUATOR_H +/// Namespace containing XML tools. namespace XmlTools { /// Evaluator of arithmetic expressions with an extendable dictionary. diff --git a/DDCore/include/XML/Layering.h b/DDCore/include/XML/Layering.h index 52755f2a7..f8a95ef72 100644 --- a/DDCore/include/XML/Layering.h +++ b/DDCore/include/XML/Layering.h @@ -13,33 +13,56 @@ #include <vector> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - struct LayerSlice { + /// Class to describe the slice of one layer in a layering stack + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP + */ + class LayerSlice { + public: bool _sensitive; double _thickness; std::string _material; - LayerSlice(bool s, double t, const std::string& m) - : _sensitive(s), _thickness(t), _material(m) { - } - LayerSlice(const LayerSlice& c) - : _sensitive(c._sensitive), _thickness(c._thickness), _material(c._material) { - } + /// Initializing constructor + LayerSlice(bool s, double t, const std::string& m); + /// Copy constructor + LayerSlice(const LayerSlice& c); + /// Assignment operator LayerSlice& operator=(const LayerSlice& c); }; + + /// Initializing constructor + inline LayerSlice::LayerSlice(bool s, double t, const std::string& m) + : _sensitive(s), _thickness(t), _material(m) { + } + /// Copy constructor + inline LayerSlice::LayerSlice(const LayerSlice& c) + : _sensitive(c._sensitive), _thickness(c._thickness), _material(c._material) { + } - struct Layer { + /// Class to describe one layer in a layering stack + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP + */ + class Layer { + public: double _thickness; double _preOffset; std::vector<LayerSlice> _slices; - Layer() - : _thickness(0.), _preOffset(0.) { - } + + /// Default constructor + Layer(); + /// Copy constructor Layer(const Layer& c); + /// Assignment operator Layer& operator=(const Layer& c); + void compute(); double thickness() const { return _thickness; @@ -52,17 +75,30 @@ namespace DD4hep { } }; - struct LayerStack { + /// Default constructor + inline Layer::Layer() : _thickness(0.), _preOffset(0.) { + } + + + /// Class to describe a layering stack + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP + */ + class LayerStack { + public: std::vector<Layer*> _layers; - LayerStack() { - } - LayerStack(const LayerStack& c) - : _layers(c._layers) { - } + /// Default constructor + LayerStack(); + /// Copy constructor + LayerStack(const LayerStack& c); + /// Default destructor ~LayerStack() { } + /// Assignment operator LayerStack& operator=(const LayerStack& c) { - _layers = c._layers; + if ( &c != this ) _layers = c._layers; return *this; } std::vector<Layer*>& layers() { @@ -77,33 +113,63 @@ namespace DD4hep { } }; - struct Layering { + /// Default constructor + inline LayerStack::LayerStack() { + } + /// Copy constructor + inline LayerStack::LayerStack(const LayerStack& c) + : _layers(c._layers) { + } + + /// Class to convert a layering object from the compact notation + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP + */ + class Layering { + public: LayerStack _stack; + /// Default constructor Layering(); + /// Initializing constructor Layering(XML::Element e); + /// Default destructor virtual ~Layering(); + std::vector<Layer*>& layers() { return _stack.layers(); } const Layer* layer(size_t which) const; + double totalThickness() const { return _stack.totalThickness(); } double singleLayerThickness(XML::Element e) const; }; - /* - * XML namespace declaration - */ + /// Namespace containing utilities to parse XML files using XercesC or TinyXML namespace XML { - // Tag and attribute objects. See XMLTags.cpp for the instantiation - struct LayeringCnv: public Element { - LayeringCnv(Element e) - : Element(e) { - } + /// XML converter for layering objects + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML + */ + class LayeringCnv: public Element { + public: + /// Initializing constructor + LayeringCnv(Element e); + /// Invoke converter void fromCompact(Layering& layering) const; }; + + /// Initializing constructor + inline LayeringCnv::LayeringCnv(Element e) + : Element(e) { + } + } } /* End namespace DD4hep */ diff --git a/DDCore/include/XML/UnicodeValues.h b/DDCore/include/XML/UnicodeValues.h index 15394768f..cbbfde10c 100644 --- a/DDCore/include/XML/UnicodeValues.h +++ b/DDCore/include/XML/UnicodeValues.h @@ -1,4 +1,7 @@ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { + + /// Namespace for the AIDA detector description toolkit supporting XML utilities namespace XML { extern const Tag_t Unicode_NULL; diff --git a/DDCore/include/XML/XMLDetector.h b/DDCore/include/XML/XMLDetector.h index 9d22d735c..f96a77947 100644 --- a/DDCore/include/XML/XMLDetector.h +++ b/DDCore/include/XML/XMLDetector.h @@ -12,14 +12,10 @@ // Framework include files #include "XML/XMLDimension.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * XML namespace declaration - */ + /// Namespace for the AIDA detector description toolkit supporting XML utilities namespace XML { /// XML Handle class extending the XML handle Dimension @@ -27,8 +23,9 @@ namespace DD4hep { * Helper class to access any field in a xml tag. * Specialized for attributes of a detector sub-element. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ struct Component: public Dimension { /// Constructor from Handle @@ -50,8 +47,9 @@ namespace DD4hep { * Helper class to access any field in a xml tag. * Specialized for some of the attributes of a detector element. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ struct DetElement: public Dimension { /// Constructor from Handle diff --git a/DDCore/include/XML/XMLDimension.h b/DDCore/include/XML/XMLDimension.h index 2f4b66fb6..f66e1b59e 100644 --- a/DDCore/include/XML/XMLDimension.h +++ b/DDCore/include/XML/XMLDimension.h @@ -12,14 +12,10 @@ // Framework include files #include "XML/XMLTags.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * XML namespace declaration - */ + /// Namespace for the AIDA detector description toolkit supporting XML utilities namespace XML { /// XML Handle to xml elements with predefined attribute access @@ -43,8 +39,9 @@ namespace DD4hep { * Run-time exceptions occur however, if non-exiting attributes * are accessed. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ struct Dimension: public Element { /// Default constructor diff --git a/DDCore/include/XML/XMLElements.h b/DDCore/include/XML/XMLElements.h index 1102516db..a59bbacd7 100644 --- a/DDCore/include/XML/XMLElements.h +++ b/DDCore/include/XML/XMLElements.h @@ -26,11 +26,10 @@ #define M_PI 3.14159265358979323846 #endif -/* - * Gaudi namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { + /// Namespace for the AIDA detector description toolkit supporting XML utilities namespace XML { typedef const XmlAttr* Attribute; @@ -42,9 +41,10 @@ namespace DD4hep { * where this class does the unicode translations and * en/decoding. * - * @author M.Frank - * @version 1.0 - */ + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML + */ class XmlString { public: /// Replicate string: internally allocates new string, which must be free'ed with release @@ -66,8 +66,9 @@ namespace DD4hep { * Currently no real use. Present to make Xerces happy, * which has such a class. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ class XmlException { public: @@ -88,43 +89,46 @@ namespace DD4hep { /// Dump DOM tree of a document void dumpTree(XmlDocument* doc); - /// Convert xml attribute to STL string + /// Convert xml attribute to STL string \ingroup DD4HEP_XML std::string _toString(const Attribute attr); - /// Convert xml string to STL string + /// Convert xml string to STL string \ingroup DD4HEP_XML std::string _toString(const XmlChar *toTranscode); - /// Do-nothing version. Present for completeness and argument interchangeability + /// Do-nothing version. Present for completeness and argument interchangeability \ingroup DD4HEP_XML std::string _toString(const char* s); - /// Do-nothing version. Present for completeness and argument interchangeability + /// Do-nothing version. Present for completeness and argument interchangeability \ingroup DD4HEP_XML std::string _toString(const std::string& s); - /// Format unsigned long integer to string with atrbitrary format + /// Format unsigned long integer to string with atrbitrary format \ingroup DD4HEP_XML std::string _toString(unsigned long i, const char* fmt = "%ul"); - /// Format unsigned integer (32 bits) to string with atrbitrary format + /// Format unsigned integer (32 bits) to string with atrbitrary format \ingroup DD4HEP_XML std::string _toString(unsigned int i, const char* fmt = "%u"); - /// Format signed integer (32 bits) to string with atrbitrary format + /// Format signed integer (32 bits) to string with atrbitrary format \ingroup DD4HEP_XML std::string _toString(int i, const char* fmt = "%d"); - /// Format signed long integer to string with atrbitrary format + /// Format signed long integer to string with atrbitrary format \ingroup DD4HEP_XML std::string _toString(long i, const char* fmt = "%fd"); - /// Format single procision float number (32 bits) to string with atrbitrary format + /// Format single procision float number (32 bits) to string with atrbitrary format \ingroup DD4HEP_XML std::string _toString(float d, const char* fmt = "%f"); - /// Format double procision float number (64 bits) to string with atrbitrary format + /// Format double procision float number (64 bits) to string with atrbitrary format \ingroup DD4HEP_XML std::string _toString(double d, const char* fmt = "%f"); - /// Helper function to populate the evaluator dictionary + /// Helper function to populate the evaluator dictionary \ingroup DD4HEP_XML void _toDictionary(const XmlChar* name, const XmlChar* value); + /// Helper function to populate the evaluator dictionary \ingroup DD4HEP_XML template <typename T> void _toDictionary(const XmlChar* name, T value); + /// Helper function to populate the evaluator dictionary \ingroup DD4HEP_XML void _toDictionary(const XmlChar* name, float value); + /// Helper function to populate the evaluator dictionary \ingroup DD4HEP_XML void _toDictionary(const XmlChar* name, double value); - /// Conversion function from raw unicode string to bool + /// Conversion function from raw unicode string to bool \ingroup DD4HEP_XML bool _toBool(const XmlChar* value); - /// Conversion function from raw unicode string to int + /// Conversion function from raw unicode string to int \ingroup DD4HEP_XML int _toInt(const XmlChar* value); - /// Conversion function from raw unicode string to long + /// Conversion function from raw unicode string to long \ingroup DD4HEP_XML long _toLong(const XmlChar* value); - /// Conversion function from raw unicode string to float + /// Conversion function from raw unicode string to float \ingroup DD4HEP_XML float _toFloat(const XmlChar* value); - /// Conversion function from raw unicode string to double + /// Conversion function from raw unicode string to double \ingroup DD4HEP_XML double _toDouble(const XmlChar* value); /// Helper class to encapsulate a unicode string. @@ -132,8 +136,9 @@ namespace DD4hep { * Simple conversion from ascii strings to unicode strings. * Useful when using XercesC - dummy implementation for TiXml. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ class Strng_t { public: @@ -180,25 +185,25 @@ namespace DD4hep { Strng_t& operator=(const std::string& s); }; - /// Unicode string concatenation of a normal ASCII string from right side + /// Unicode string concatenation of a normal ASCII string from right side \ingroup DD4HEP_XML Strng_t operator+(const Strng_t& a, const char* b); - /// Unicode string concatenation of a encapsulated and an STL string from right side + /// Unicode string concatenation of a encapsulated and an STL string from right side \ingroup DD4HEP_XML Strng_t operator+(const Strng_t& a, const std::string& b); - /// Unicode string concatenation of a encapsulated and an encapsulated string from right side + /// Unicode string concatenation of a encapsulated and an encapsulated string from right side \ingroup DD4HEP_XML Strng_t operator+(const Strng_t& a, const Strng_t& b); - /// Unicode string concatenation of a normal ASCII string from left side + /// Unicode string concatenation of a normal ASCII string from left side \ingroup DD4HEP_XML Strng_t operator+(const char* a, const Strng_t& b); - /// Unicode string concatenation of a STL string and an encapsulated string from the left. + /// Unicode string concatenation of a STL string and an encapsulated string from the left. \ingroup DD4HEP_XML Strng_t operator+(const std::string& a, const Strng_t& b); #ifndef __TIXML__ - /// Unicode string concatenation of a encapsulated and raw unicode string from right side + /// Unicode string concatenation of a encapsulated and raw unicode string from right side \ingroup DD4HEP_XML Strng_t operator+(const Strng_t& a, const XmlChar* b); - /// Unicode string concatenation of a encapsulated and raw unicode string from left side + /// Unicode string concatenation of a encapsulated and raw unicode string from left side \ingroup DD4HEP_XML Strng_t operator+(const XmlChar* a, const Strng_t& b); - /// Unicode string concatenation of a raw unicode and an STL string from the right + /// Unicode string concatenation of a raw unicode and an STL string from the right \ingroup DD4HEP_XML Strng_t operator+(const XmlChar* a, const std::string& b); - /// Unicode string concatenation of a raw unicode and an STL string from the left + /// Unicode string concatenation of a raw unicode and an STL string from the left \ingroup DD4HEP_XML Strng_t operator+(const std::string& a, const XmlChar* b); #endif @@ -211,8 +216,9 @@ namespace DD4hep { * -- const char*. * Internally a copy representation as an std::string is kept. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ class Tag_t : public Strng_t { public: @@ -263,17 +269,17 @@ namespace DD4hep { } }; - /// Tag/string concatenation with a normal ASCII string from right side + /// Tag/string concatenation with a normal ASCII string from right side \ingroup DD4HEP_XML Tag_t operator+(const Tag_t& a, const char* b); - /// Tag/string concatenation with a normal ASCII string from left side + /// Tag/string concatenation with a normal ASCII string from left side \ingroup DD4HEP_XML Tag_t operator+(const char* a, const Tag_t& b); - /// Tag/string concatenation with a unicode string from right side + /// Tag/string concatenation with a unicode string from right side \ingroup DD4HEP_XML Tag_t operator+(const Tag_t& a, const XmlChar* b); - /// Tag/string concatenation with a internal Xml string from right side + /// Tag/string concatenation with a internal Xml string from right side \ingroup DD4HEP_XML Tag_t operator+(const Tag_t& a, const Strng_t& b); - /// Tag/string concatenation with a STL string from right side + /// Tag/string concatenation with a STL string from right side \ingroup DD4HEP_XML Tag_t operator+(const Tag_t& a, const std::string& b); - /// Equality operator between tag object and STL string + /// Equality operator between tag object and STL string \ingroup DD4HEP_XML inline bool operator==(const std::string& c, const Tag_t& b) { return c == b.m_str; } @@ -286,8 +292,9 @@ namespace DD4hep { * string tag need to be replicated using strdup/free * (or when using xerces the corresponding unicode routines). * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ class NodeList { public: @@ -316,8 +323,9 @@ namespace DD4hep { * Note: The assignmant operator as well as the copy constructor * do not have to be implemented, they are aut-generated by the compiler! * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ class Handle_t { public: @@ -506,9 +514,9 @@ namespace DD4hep { /// Class to support the access to collections of XmlNodes (or XmlElements) /** - * Typical - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ class Collection_t : public Handle_t { public: @@ -567,8 +575,9 @@ namespace DD4hep { * User class encapsulating a DOM document. * Nothing special - normal handle around pointer. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ class Document { public: @@ -608,8 +617,9 @@ namespace DD4hep { * XML document shall be destroyed and the corresponding * resources released. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ class DocumentHolder : public Document { public: @@ -629,8 +639,9 @@ namespace DD4hep { * analysing the xml documents for constructing * sub-detectors etc. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ class Element { public: @@ -770,8 +781,9 @@ namespace DD4hep { * corresponding "ref" attribute. The value of "name" * and "ref" must match to establish the reference. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_XML */ class RefElement : public Element { public: diff --git a/DDCore/include/XML/config.h b/DDCore/include/XML/config.h index 01768796b..0c17a6c0d 100644 --- a/DDCore/include/XML/config.h +++ b/DDCore/include/XML/config.h @@ -17,9 +17,13 @@ /* Setup XML parsing for the use of Apache Xerces-C and TiXml * - * @author M.Frank */ + + +/// Namespace for the AIDA detector description toolkit namespace DD4hep { + + /// Namespace for the AIDA detector description toolkit supporting XML utilities namespace XML { class XmlElement; class XmlDocument; diff --git a/DDCore/src/ConditionsInterna.cpp b/DDCore/src/ConditionsInterna.cpp index bf2a9a07e..89df3fb71 100644 --- a/DDCore/src/ConditionsInterna.cpp +++ b/DDCore/src/ConditionsInterna.cpp @@ -24,7 +24,7 @@ DD4HEP_INSTANTIATE_HANDLE_NAMED(ConditionsInterna::ConditionContainer); /// Initializing constructor IOV::IOV(int t) : type(t) { - data[0]=data[1]=data[2]=data[3]=data[4]=0; + data[0]=data[1]=data[2]=data[3]=0; } /// Standard Destructor @@ -34,7 +34,7 @@ IOV::~IOV() { /// Move the data content: 'from' will be reset to NULL void IOV::move(IOV& from) { ::memcpy(this,&from,sizeof(IOV)); - from.data[0]=from.data[1]=from.data[2]=from.data[3]=from.data[4]=0; + from.data[0]=from.data[1]=from.data[2]=from.data[3]=0; from.type = UNKNOWN_IOV; } diff --git a/DDCore/src/GeometryTreeDump.h b/DDCore/src/GeometryTreeDump.h index dce23e7b2..399b4f0a6 100644 --- a/DDCore/src/GeometryTreeDump.h +++ b/DDCore/src/GeometryTreeDump.h @@ -17,20 +17,17 @@ class TGeoVolume; class TGeoNode; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { - /** @class GeometryTreeDump GeometryTreeDump.h - * - * @author M.Frank - * @version 1.0 + /// Geometry to screen dump action + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct GeometryTreeDump: public GeoHandler { GeometryTreeDump() { diff --git a/DDCore/src/LCDDImp.h b/DDCore/src/LCDDImp.h index 74040a1c4..fd56e8b71 100644 --- a/DDCore/src/LCDDImp.h +++ b/DDCore/src/LCDDImp.h @@ -6,7 +6,6 @@ // Author : M.Frank // //==================================================================== - #ifndef DD4hep_LCDDGEOIMP_H #define DD4hep_LCDDGEOIMP_H @@ -20,16 +19,13 @@ class TGeoManager; // C/C++ include files #include <map> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * XML namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { + /// Concrete implementation class of the LCDD interface /** @class LCDDImp LCDDImp.h src/LCDDImp.h * * @author M.Frank diff --git a/DDCore/src/SimpleGDMLWriter.h b/DDCore/src/SimpleGDMLWriter.h index 92fcdbce5..27816abb1 100644 --- a/DDCore/src/SimpleGDMLWriter.h +++ b/DDCore/src/SimpleGDMLWriter.h @@ -17,20 +17,17 @@ class TGeoVolume; class TGeoNode; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geometry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { - /** @class SimpleGDMLWriter SimpleGDMLWriter.h - * - * @author M.Frank - * @version 1.0 + /// Simple GDML creator from TGeo geometries in memory + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct SimpleGDMLWriter: public GeoHandler { diff --git a/DDCore/src/XML/DocumentHandler.cpp b/DDCore/src/XML/DocumentHandler.cpp index f08fcca96..8247b56ff 100644 --- a/DDCore/src/XML/DocumentHandler.cpp +++ b/DDCore/src/XML/DocumentHandler.cpp @@ -34,9 +34,14 @@ using namespace DD4hep::XML; #include "xercesc/sax/ErrorHandler.hpp" using namespace xercesc; +/// Namespace for the AIDA detector description toolkit namespace DD4hep { + + /// Namespace containing utilities to parse XML files using XercesC or TinyXML namespace XML { + namespace { + /// Helper function to create a XercesC pareser XercesDOMParser* make_parser(xercesc::ErrorHandler* err_handler = 0) { XercesDOMParser* parser = new XercesDOMParser; parser->setValidationScheme(XercesDOMParser::Val_Auto); @@ -49,6 +54,7 @@ namespace DD4hep { return parser; } + /// Helper function to parse a DOM document using an instance of the XercesC pareser Document parse_document(const void* bytes, size_t length, xercesc::ErrorHandler* err_handler) { auto_ptr<XercesDOMParser> parser(make_parser(err_handler)); MemBufInputSource src((const XMLByte*) bytes, length, "memory"); @@ -60,7 +66,10 @@ namespace DD4hep { return (XmlDocument*) doc; } } - struct DocumentErrorHandler: public ErrorHandler, public DOMErrorHandler { + + /// XML-DOM ERror handler class for the XercesC document parser. + class DocumentErrorHandler: public ErrorHandler, public DOMErrorHandler { + public: /// Constructor DocumentErrorHandler() { } @@ -78,8 +87,11 @@ namespace DD4hep { void error(const SAXParseException& e); /// Fatal error handler void fatalError(const SAXParseException& e); + /// Dom Error handler callback virtual bool handleError(const DOMError& domError); }; + + /// Dom Error handler callback bool DocumentErrorHandler::handleError(const DOMError& domError) { string err = "DOM UNKNOWN: "; switch (domError.getSeverity()) { @@ -104,6 +116,7 @@ namespace DD4hep { } return false; } + /// Error handler void DocumentErrorHandler::error(const SAXParseException& e) { string m(_toString(e.getMessage())); if (m.find("The values for attribute 'name' must be names or name tokens") != string::npos @@ -117,6 +130,7 @@ namespace DD4hep { printout(ERROR,"XercesC","+++ Error at file \"%s\", Line %d Column: %d Message:%s", sys.c_str(), int(e.getLineNumber()), int(e.getColumnNumber()), m.c_str()); } + /// Fatal error handler void DocumentErrorHandler::fatalError(const SAXParseException& e) { string m(_toString(e.getMessage())); string sys(_toString(e.getSystemId())); @@ -124,6 +138,7 @@ namespace DD4hep { sys.c_str(), int(e.getLineNumber()), int(e.getColumnNumber()), m.c_str()); } + /// Dump DOM tree using XercesC handles void dumpTree(xercesc::DOMDocument* doc) { DOMImplementation *imp = DOMImplementationRegistry::getDOMImplementation(Strng_t("LS")); XMLFormatTarget *tar = new StdOutFormatTarget(); @@ -225,8 +240,14 @@ int DocumentHandler::output(Document doc, const string& fname) const { #endif #include <sys/stat.h> -namespace DD4hep {namespace XML { +/// Namespace for the AIDA detector description toolkit +namespace DD4hep { + /// Namespace containing utilities to parse XML files using XercesC or TinyXML + namespace XML { + + /// XML-DOM ERror handler class for the TinyXML document parser (Compatibility class) struct DocumentErrorHandler {}; + union Xml { Xml(void* ptr) : p(ptr) {} Xml(const void* ptr) : cp(ptr) {} diff --git a/DDCore/src/plugins/LCDDConverter.h b/DDCore/src/plugins/LCDDConverter.h index d60774995..6976b4726 100644 --- a/DDCore/src/plugins/LCDDConverter.h +++ b/DDCore/src/plugins/LCDDConverter.h @@ -27,25 +27,20 @@ class TGeoMedium; class TGeoNode; class TGeoMatrix; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Geomentry namespace declaration - */ + /// Namespace for the geometry part of the AIDA detector description toolkit namespace Geometry { // Forward declarations class SensitiveDetectorObject; - /** @class LCDDConverter LCDDConverter.h XML/LCDDConverter.h - * - * Geometry converter from DD4hep to Geant 4. - * - * @author M.Frank - * @version 1.0 + /// Geometry converter from DD4hep to Geant 4 in LCDD format. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY */ struct LCDDConverter: public GeoHandler { typedef XML::XmlElement XmlElement; @@ -61,6 +56,12 @@ namespace DD4hep { typedef std::map<const TGeoShape*, XmlElement*> SolidMap; typedef std::map<OverlayedField, XmlElement*> FieldMap; typedef std::map<const TGeoMatrix*, XmlElement*> TrafoMap; + /// Data structure of the geometry converter from DD4hep to Geant 4 in LCDD format. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_GEOMETRY + */ struct GeometryInfo: public GeoHandler::GeometryInfo { ElementMap xmlElements; MaterialMap xmlMaterials; diff --git a/DDG4/include/DDG4/ComponentProperties.h b/DDG4/include/DDG4/ComponentProperties.h index 4e2d0b66f..122acf054 100644 --- a/DDG4/include/DDG4/ComponentProperties.h +++ b/DDG4/include/DDG4/ComponentProperties.h @@ -27,6 +27,11 @@ namespace DD4hep { class PropertyGrammar; /// Heler class to configure properties + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ class PropertyConfigurator { protected: virtual ~PropertyConfigurator(); @@ -36,10 +41,10 @@ namespace DD4hep { /// Class describing the grammar representation of a given data type - /** @class PropertyGrammar - * - * @author M.Frank - * @date 13.08.2013 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class PropertyGrammar { protected: @@ -70,8 +75,9 @@ namespace DD4hep { * between types, which are initially unrelated such as * e.g. vector<int> and list<short>. * - * @author M.Frank - * @date 13.08.2013 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Property { protected: @@ -125,8 +131,9 @@ namespace DD4hep { /// Concrete template instantiation of a combined property value pair. /** - * @author M.Frank - * @date 13.08.2013 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ template <class TYPE> class PropertyValue : private Property { public: @@ -167,8 +174,9 @@ namespace DD4hep { /// Manager to ease the handling of groups of properties. /** - * @author M.Frank - * @date 13.08.2013 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class PropertyManager { public: diff --git a/DDG4/include/DDG4/Factories.h b/DDG4/include/DDG4/Factories.h index c7ab324a8..99fa0fdc7 100644 --- a/DDG4/include/DDG4/Factories.h +++ b/DDG4/include/DDG4/Factories.h @@ -47,10 +47,12 @@ namespace DD4hep { class Geant4UserPhysics; class Geant4PhysicsListActionSequence; + /// Templated factory method to invoke setup action template <typename T> class Geant4SetupAction { public: static long create(Geometry::LCDD& lcdd, const Geant4Converter& cnv, const std::map<std::string, std::string>& attrs); }; + /// Deprecated: Templated factory method to create sensitive detector template <typename T> class Geant4SensitiveDetectorFactory { public: static G4VSensitiveDetector* create(const std::string& name, DD4hep::Geometry::LCDD& lcdd); diff --git a/DDG4/include/DDG4/Geant4Action.h b/DDG4/include/DDG4/Geant4Action.h index 1daffe7d0..45fe18060 100644 --- a/DDG4/include/DDG4/Geant4Action.h +++ b/DDG4/include/DDG4/Geant4Action.h @@ -30,19 +30,16 @@ class G4UIdirectory; #include <string> #include <cstdarg> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { // Forward declarations class Geant4UIMessenger; + /// Cast operator template <typename TO, typename FROM> TO fast_cast(FROM from) { #ifdef USE_FASTCAST return static_cast<TO>(from); @@ -51,7 +48,15 @@ namespace DD4hep { #endif } - struct TypeName : public std::pair<std::string, std::string> { + /// Helper class to handle strings of the format "type/name" + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ + class TypeName : public std::pair<std::string, std::string> { + public: + /// Default constructor TypeName() : std::pair<std::string, std::string>() { } @@ -72,8 +77,9 @@ namespace DD4hep { * This is a utility class supporting properties, output and access to * event and run objects through the context. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4Action { protected: @@ -97,9 +103,10 @@ namespace DD4hep { // as it is used in SequenceHdl::setContextToClients() public: /// Functor to update the context of a Geant4Action object - /** - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class ContextUpdate { public: @@ -114,11 +121,13 @@ namespace DD4hep { protected: /// Actor class to manipulate action groups - /** - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ - template <typename T> struct Actors { + template <typename T> class Actors { + public: typedef typename std::vector<T*> _V; _V m_v; Actors() { diff --git a/DDG4/include/DDG4/Geant4ActionPhase.h b/DDG4/include/DDG4/Geant4ActionPhase.h index 41f65e1d9..517ef4e17 100644 --- a/DDG4/include/DDG4/Geant4ActionPhase.h +++ b/DDG4/include/DDG4/Geant4ActionPhase.h @@ -15,14 +15,10 @@ // C/C++ include files #include <vector> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { /* @@ -40,12 +36,11 @@ namespace DD4hep { */ - /** @class Invoke Geant4ActionPhase.h DDG4/Geant4ActionPhase.h - * - * Default base class for all geant 4 actions and derivates thereof. - * - * @author M.Frank - * @version 1.0 + /// Action phase definition. Client callback at various stage of the simulation processing + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4ActionPhase : public Geant4Action { public: diff --git a/DDG4/include/DDG4/Geant4AssemblyVolume.h b/DDG4/include/DDG4/Geant4AssemblyVolume.h index cd53dcbf3..dc267d7f0 100644 --- a/DDG4/include/DDG4/Geant4AssemblyVolume.h +++ b/DDG4/include/DDG4/Geant4AssemblyVolume.h @@ -2,12 +2,26 @@ #include "G4AssemblyVolume.hh" #undef private -namespace DD4hep { namespace Simulation { - struct Geant4AssemblyVolume : public G4AssemblyVolume { +/// Namespace for the AIDA detector description toolkit +namespace DD4hep { + + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit + namespace Simulation { + + /// Hack! Wrapper around G4AssemblyVolume to access protected members. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ + class Geant4AssemblyVolume : public G4AssemblyVolume { + public: std::vector<const TGeoNode*> m_entries; typedef std::vector<const TGeoNode*> Chain; + /// Default constructor Geant4AssemblyVolume() { } + /// Default destructor virtual ~Geant4AssemblyVolume() { } //std::vector<G4AssemblyTriplet>& triplets() { return fTriplets; } @@ -32,4 +46,5 @@ namespace DD4hep { namespace Simulation { G4int copyNumBase, G4bool surfCheck ); }; - }} + } +} diff --git a/DDG4/include/DDG4/Geant4Call.h b/DDG4/include/DDG4/Geant4Call.h index 1f517ad84..9dcb2ce19 100644 --- a/DDG4/include/DDG4/Geant4Call.h +++ b/DDG4/include/DDG4/Geant4Call.h @@ -9,22 +9,17 @@ #ifndef DD4HEP_DDG4_GEANT4CALL_H #define DD4HEP_DDG4_GEANT4CALL_H -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { - /** @class Geant4Call Geant4Call.h DDG4/Geant4Call.h - * - * Callback interface class with argument - * - * @author M.Frank - * @version 1.0 + /// Callback interface class with argument + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4Call { public: diff --git a/DDG4/include/DDG4/Geant4Config.h b/DDG4/include/DDG4/Geant4Config.h index 194823065..d91288dd7 100644 --- a/DDG4/include/DDG4/Geant4Config.h +++ b/DDG4/include/DDG4/Geant4Config.h @@ -12,16 +12,13 @@ #ifndef DDG4_GEANT4CONFIG_H #define DDG4_GEANT4CONFIG_H -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { + // Forward declarations template <typename TYPE> class Geant4Handle; class Geant4Kernel; class Geant4Action; @@ -45,9 +42,7 @@ namespace DD4hep { class Geant4PhysicsListActionSequence; class Geant4SensDetActionSequence; - /* - * Simulation setup namespace declaration - */ + /// Convenience namespace to ease the setupup of DDG4 applications namespace Setup { // Basics typedef Geant4Kernel Kernel; diff --git a/DDG4/include/DDG4/Geant4Context.h b/DDG4/include/DDG4/Geant4Context.h index 50a4c1c2e..e722e19a0 100644 --- a/DDG4/include/DDG4/Geant4Context.h +++ b/DDG4/include/DDG4/Geant4Context.h @@ -20,9 +20,7 @@ class G4Event; class G4VTrajectory; class G4TrackingManager; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { // Forward declarations @@ -31,9 +29,7 @@ namespace DD4hep { class DetElement; } - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { class Geant4Run; @@ -62,8 +58,9 @@ namespace DD4hep { * across different runs. * Hence: They are only useful to extend data of an run. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4Run : public ObjectExtensions { /// Reference to the original Geant4 run object @@ -115,8 +112,9 @@ namespace DD4hep { * from this location. The framework ensures that the same seeded * sequence is used throughout the processing of one single event. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4Event : public ObjectExtensions { /// Reference to the original Geant4 event object @@ -157,9 +155,9 @@ namespace DD4hep { /// Generic context to extend user, run and event information /** - * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4Context { public: diff --git a/DDG4/include/DDG4/Geant4Converter.h b/DDG4/include/DDG4/Geant4Converter.h index 14a309b15..0ce5cc8f3 100644 --- a/DDG4/include/DDG4/Geant4Converter.h +++ b/DDG4/include/DDG4/Geant4Converter.h @@ -13,22 +13,17 @@ #include "DD4hep/Printout.h" #include "DDG4/Geant4Mapping.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { - /** @class Geant4Converter Geant4Converter.h DDG4/Geant4Converter.h - * - * Geometry converter from DD4hep to Geant 4. - * - * @author M.Frank - * @version 1.0 + /// Geometry converter from DD4hep to Geant 4. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4Converter : public Geometry::GeoHandler, public Geant4Mapping { public: @@ -84,6 +79,7 @@ namespace DD4hep { /// Print the geometry type SensitiveDetector virtual void* printSensitive(SensitiveDetector sens_det, const std::set<const TGeoVolume*>& volumes) const; + /// Print Geant4 placement virtual void* printPlacement(const std::string& name, const TGeoNode* node) const; }; diff --git a/DDG4/include/DDG4/Geant4Data.h b/DDG4/include/DDG4/Geant4Data.h index 9011e5de7..f4157072b 100644 --- a/DDG4/include/DDG4/Geant4Data.h +++ b/DDG4/include/DDG4/Geant4Data.h @@ -35,8 +35,9 @@ namespace DD4hep { /** * Example class to store the run related information. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class SimpleRun { public: @@ -54,8 +55,9 @@ namespace DD4hep { /** * Example class to store the event related information. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class SimpleEvent { public: @@ -73,6 +75,11 @@ namespace DD4hep { }; /// Generic user-extendible data extension class. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ class DataExtension { public: /// Default constructor @@ -88,8 +95,9 @@ namespace DD4hep { * only dealing with the cellID. Users may add an extension * object, which normally should not be necessary. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4HitData { public: @@ -99,6 +107,11 @@ namespace DD4hep { std::auto_ptr<DataExtension> extension; /// Utility class describing the monte carlo contribution of a given particle to a hit. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ class MonteCarloContrib { public: /// Geant 4 Track identifier @@ -169,6 +182,11 @@ namespace DD4hep { }; /// Helper class to define structures used by the generic DDG4 tracker sensitive detector + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ class Geant4Tracker { public: /// DDG4 tracker hit class used by the generic DDG4 tracker sensitive detector @@ -176,8 +194,9 @@ namespace DD4hep { * Geant4 tracker hit class. Tracker hits contain the momentum * direction as well as the hit position. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Hit : public Geant4HitData { public: @@ -207,6 +226,11 @@ namespace DD4hep { }; /// Helper class to define structures used by the generic DDG4 calorimeter sensitive detector + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ class Geant4Calorimeter { public: @@ -215,8 +239,9 @@ namespace DD4hep { * Geant4 tracker hit class. Calorimeter hits contain the momentum * direction as well as the hit position. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Hit : public Geant4HitData { public: diff --git a/DDG4/include/DDG4/Geant4DataConversion.h b/DDG4/include/DDG4/Geant4DataConversion.h index 44a39ff07..c80d6ed8a 100644 --- a/DDG4/include/DDG4/Geant4DataConversion.h +++ b/DDG4/include/DDG4/Geant4DataConversion.h @@ -14,22 +14,20 @@ #include "DD4hep/Detector.h" #include <typeinfo> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { - /** @class Geant4ConversionHelper Geant4DataConversion.h DDG4/Geant4DataConversion.h - * - * @author M.Frank - * @date 13.08.2013 + /// Helper class for data conversion + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ - struct Geant4ConversionHelper { + class Geant4ConversionHelper { + public: /// Default constructor Geant4ConversionHelper(); /// Default destructor @@ -42,12 +40,14 @@ namespace DD4hep { static std::string encoding(Geometry::Readout ro); }; - /** @class Geant4Conversion Geant4DataConversion.h DDG4/Geant4DataConversion.h - * - * @author M.Frank - * @date 13.08.2013 + /// Data conversion class + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ - template <typename OUTPUT, typename ARGS> struct Geant4Conversion : public Geant4ConversionHelper { + template <typename OUTPUT, typename ARGS> class Geant4Conversion : public Geant4ConversionHelper { + public: typedef ARGS arg_t; typedef OUTPUT output_t; typedef Geant4Conversion<output_t, arg_t> self_t; @@ -109,13 +109,15 @@ namespace DD4hep { typeName(typ)); } - /** @class Geant4DataConversion Geant4DataConversion.h DDG4/Geant4DataConversion.h - * - * @author M.Frank - * @date 13.08.2013 + /// Template class for data conversion. To be specialized by the client. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ template <typename OUTPUT, typename ARGS, typename TAG> - struct Geant4DataConversion : public Geant4Conversion<OUTPUT,ARGS> { + class Geant4DataConversion : public Geant4Conversion<OUTPUT,ARGS> { + public: typedef TAG tag_t; typedef ARGS arg_t; typedef OUTPUT output_t; diff --git a/DDG4/include/DDG4/Geant4DataDump.h b/DDG4/include/DDG4/Geant4DataDump.h index 4d7065782..b6d2865cd 100644 --- a/DDG4/include/DDG4/Geant4DataDump.h +++ b/DDG4/include/DDG4/Geant4DataDump.h @@ -17,21 +17,17 @@ // C/C++ include files #include <vector> - -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { - /** Class to dump the records of the intrinsic Geant4 event model. - * - * @author M.Frank - * @version 1.0 + /// Class to dump the records of the intrinsic Geant4 event model. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4DataDump { public: diff --git a/DDG4/include/DDG4/Geant4DetectorConstruction.h b/DDG4/include/DDG4/Geant4DetectorConstruction.h index d67a6a9d8..0d127d732 100644 --- a/DDG4/include/DDG4/Geant4DetectorConstruction.h +++ b/DDG4/include/DDG4/Geant4DetectorConstruction.h @@ -11,9 +11,7 @@ #include "DD4hep/Printout.h" #include "G4VUserDetectorConstruction.hh" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { // Forward declarations @@ -21,12 +19,18 @@ namespace DD4hep { class LCDD; } - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { + + // Forward declarations class Geant4Kernel; + /// Class to create Geant4 detector geometry from TGeo representation in memory + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ class Geant4DetectorConstruction : public G4VUserDetectorConstruction { public: /// Initializing constructor for DDG4 diff --git a/DDG4/include/DDG4/Geant4EventAction.h b/DDG4/include/DDG4/Geant4EventAction.h index b8a788089..071f8ba5b 100644 --- a/DDG4/include/DDG4/Geant4EventAction.h +++ b/DDG4/include/DDG4/Geant4EventAction.h @@ -15,28 +15,23 @@ // Forward declarations class G4Event; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { - /** @class Geant4EventAction Geant4Action.h DDG4/Geant4Action.h - * - * Concrete basic implementation of the Geant4 event action - * + /// Concrete basic implementation of the Geant4 event action + /** * The EventAction is called for every event. * During the callback all particles are created which form the * microscopic kinematic action of the particle collision. * This input may either origin directly from an event generator * program or come from file. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4EventAction : public Geant4Action { public: @@ -50,15 +45,15 @@ namespace DD4hep { virtual void end(const G4Event* event); }; - /** @class Geant4EventActionSequence Geant4Action.h DDG4/Geant4Action.h - * - * Concrete implementation of the Geant4 event action sequence + /// Concrete implementation of the Geant4 event action sequence + /** * The sequence dispatches the callbacks at the beginning and the and * of an event to all registered Geant4EventAction members and all * registered callbacks. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4EventActionSequence : public Geant4Action { protected: diff --git a/DDG4/include/DDG4/Geant4Field.h b/DDG4/include/DDG4/Geant4Field.h index aad2b6033..8ccca0149 100644 --- a/DDG4/include/DDG4/Geant4Field.h +++ b/DDG4/include/DDG4/Geant4Field.h @@ -25,10 +25,11 @@ namespace DD4hep { // Forward declarations class Geant4Field; - /** @class Geant4Field Geant4Field.h DDG4/Geant4Field.h - * - * @author M.Frank - * @version 1.0 + /// Mediator class to allow Geant4 accessing magnetic fields defined in DD4hep + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4Field : public G4MagneticField { protected: diff --git a/DDG4/include/DDG4/Geant4GDMLDetector.h b/DDG4/include/DDG4/Geant4GDMLDetector.h index 6b8eae0c7..f94d306a0 100644 --- a/DDG4/include/DDG4/Geant4GDMLDetector.h +++ b/DDG4/include/DDG4/Geant4GDMLDetector.h @@ -11,20 +11,24 @@ #include "G4VUserDetectorConstruction.hh" #include <string> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { + /// Class to read Geant4 geometry from GDML file + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ class Geant4GDMLDetector : public G4VUserDetectorConstruction { public: + /// Constructor to open gdml file Geant4GDMLDetector(const std::string& gdmlFile); + /// Default destructor virtual ~Geant4GDMLDetector() { } G4VPhysicalVolume* Construct(); diff --git a/DDG4/include/DDG4/Geant4GeneratorAction.h b/DDG4/include/DDG4/Geant4GeneratorAction.h index 44b66aac9..b1fd2f9fe 100644 --- a/DDG4/include/DDG4/Geant4GeneratorAction.h +++ b/DDG4/include/DDG4/Geant4GeneratorAction.h @@ -12,22 +12,17 @@ // Framework include files #include "DDG4/Geant4Action.h" +// Forward declaration class G4Event; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { - /** @class Geant4GeneratorAction Geant4GeneratorAction.h DDG4/Geant4GeneratorAction.h - * - * Concrete implementation of the Geant4 generator action base class - * + /// Concrete implementation of the Geant4 generator action base class + /** * The Geant4GeneratorAction is called for every event. * During the callback all particles are created which form the * microscopic kinematic action of the particle collision. @@ -36,8 +31,9 @@ namespace DD4hep { * * The callback signature is: void operator()(G4Event* event) * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4GeneratorAction : public Geant4Action { protected: @@ -52,18 +48,17 @@ namespace DD4hep { } }; - /** @class Geant4GeneratorActionSequence Geant4GeneratorAction.h DDG4/Geant4GeneratorAction.h - * - * Concrete implementation of the Geant4 generator action sequence - * + /// Concrete implementation of the Geant4 generator action sequence + /** * The sequence dispatches the callbacks at the beginning * of an event to all registered Geant4GeneratorAction members and all * registered callbacks. * * The callback signature is: void operator()(G4Event* event) * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4GeneratorActionSequence : public Geant4Action { protected: diff --git a/DDG4/include/DDG4/Geant4GeneratorActionInit.h b/DDG4/include/DDG4/Geant4GeneratorActionInit.h index 700b6817f..dda4dc771 100644 --- a/DDG4/include/DDG4/Geant4GeneratorActionInit.h +++ b/DDG4/include/DDG4/Geant4GeneratorActionInit.h @@ -16,17 +16,14 @@ class G4Event; class G4Run; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { - /** Geant4Action to collect the MC particle information. + /// Initialize the Geant4Event objects to host generator and MC truth related information + /** Geant4 actions to collect the MC particle information. * * This action should register all event extension required for the further * processing. We want to avoid that every client has to check if a given @@ -45,8 +42,9 @@ namespace DD4hep { * This map has directly the correct particle offsets, so that the merging of * Geant4PrimaryInteraction particles and the simulation particles is easy.... * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4GeneratorActionInit : public Geant4GeneratorAction { protected: diff --git a/DDG4/include/DDG4/Geant4GeometryInfo.h b/DDG4/include/DDG4/Geant4GeometryInfo.h index 9e999e91c..fe6fe13f6 100644 --- a/DDG4/include/DDG4/Geant4GeometryInfo.h +++ b/DDG4/include/DDG4/Geant4GeometryInfo.h @@ -36,20 +36,22 @@ class G4VPhysicalVolume; class G4AssemblyVolume; class G4VSensitiveDetector; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { // Forward declarations class Geant4Mapping; class Geant4AssemblyVolume; + /// Helper namespace defining data types for the relation information between geant4 objects and dd4hep objects. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ namespace Geant4GeometryMaps { using Geometry::Atom; using Geometry::Material; @@ -85,7 +87,13 @@ namespace DD4hep { std::string placementPath(const Geant4PlacementPath& path, bool reverse=true); } - struct Geant4GeometryInfo : public TNamed, public Geometry::GeoHandlerTypes::GeometryInfo { + /// Concreate class holding the relation information between geant4 objects and dd4hep objects. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ + class Geant4GeometryInfo : public TNamed, public Geometry::GeoHandlerTypes::GeometryInfo { public: Geant4GeometryMaps::ElementMap g4Elements; Geant4GeometryMaps::MaterialMap g4Materials; diff --git a/DDG4/include/DDG4/Geant4Handle.h b/DDG4/include/DDG4/Geant4Handle.h index b8f2be8c6..513a8ee9e 100644 --- a/DDG4/include/DDG4/Geant4Handle.h +++ b/DDG4/include/DDG4/Geant4Handle.h @@ -28,11 +28,11 @@ namespace DD4hep { class Geant4Action; /// Handle to Geant4 actions with built-in creation mechanism - /** @class Geant4Handle Geant4Handle.h DDG4/Geant4Handle.h - * - * @author M.Frank - * @version 1.0 - */ + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ template <typename TYPE> class Geant4Handle { protected: void checked_assign(TYPE* p); @@ -63,10 +63,10 @@ namespace DD4hep { }; /// Handle to Geant4 actions with built-in creation mechanism - /** @class Geant4Handle Geant4Handle.h DDG4/Geant4Handle.h - * - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class KernelHandle { public: diff --git a/DDG4/include/DDG4/Geant4HierarchyDump.h b/DDG4/include/DDG4/Geant4HierarchyDump.h index 6fa0e6c84..db19b2473 100644 --- a/DDG4/include/DDG4/Geant4HierarchyDump.h +++ b/DDG4/include/DDG4/Geant4HierarchyDump.h @@ -11,9 +11,7 @@ // Geant 4 include files #include "G4VPhysicalVolume.hh" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { // Forward declarations @@ -21,11 +19,15 @@ namespace DD4hep { class LCDD; } - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { + /// Helper to dump Geant4 volume hierarchy + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ class Geant4HierarchyDump { public: typedef Geometry::LCDD LCDD; diff --git a/DDG4/include/DDG4/Geant4HitCollection.h b/DDG4/include/DDG4/Geant4HitCollection.h index 0a12e0327..c7fdb6a93 100644 --- a/DDG4/include/DDG4/Geant4HitCollection.h +++ b/DDG4/include/DDG4/Geant4HitCollection.h @@ -33,14 +33,14 @@ namespace DD4hep { class Geant4HitWrapper; /// Generic wrapper class for hit structures created in Geant4 sensitive detectors - /** @class Geant4HitWrapper Geant4HitCollection.h DDG4/Geant4HitCollection.h - * + /** * Default base class for all geant 4 created hits. * The hit is stored in an opaque way and can be accessed by the * collection. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4HitWrapper: public G4VHit { private: @@ -52,6 +52,11 @@ namespace DD4hep { }; /// Generic type manipulation class for generic hit structures created in Geant4 sensitive detectors + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ class HitManipulator { public: typedef std::pair<void*, HitManipulator*> Wrapper; @@ -158,15 +163,15 @@ namespace DD4hep { }; /// Generic hit container class using Geant4HitWrapper objects - /** @class Geant4HitCollection Geant4HitCollection.h DDG4/Geant4HitCollection.h - * + /** * Opaque hit collection. * This hit collection is for good reasons homomorph, * Polymorphism without an explicit type would only * confuse most users. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4HitCollection: public G4VHitsCollection { public: @@ -177,12 +182,13 @@ namespace DD4hep { typedef Geant4HitWrapper::HitManipulator Manip; /// Generic class template to compare/select hits in Geant4HitCollection objects - /** @class Compare Geant4HitCollection.h DDG4/Geant4HitCollection.h + /** * * Base class for hit comparisons. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Compare { public: @@ -293,12 +299,12 @@ namespace DD4hep { /// Specialized hit selector based on the hit's position. - /** @class PositionCompare Geant4HitCollection.h DDG4/Geant4HitCollection.h - * + /** * Class for hit matching using the hit position. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ template<typename TYPE, typename POS> class PositionCompare : public Geant4HitCollection::Compare { public: @@ -316,12 +322,12 @@ namespace DD4hep { } /// Specialized hit selector based on the hit's cell identifier. - /** @class PositionCompare Geant4HitCollection.h DDG4/Geant4HitCollection.h - * + /** * Class for hit matching using the hit's cell identifier. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ template<typename TYPE> class CellIDCompare : public Geant4HitCollection::Compare { public: diff --git a/DDG4/include/DDG4/Geant4InputAction.h b/DDG4/include/DDG4/Geant4InputAction.h index 37a9823b3..faa7ef808 100644 --- a/DDG4/include/DDG4/Geant4InputAction.h +++ b/DDG4/include/DDG4/Geant4InputAction.h @@ -24,13 +24,13 @@ namespace DD4hep { namespace Simulation { /// Basic geant4 event reader class. This interface/base-class must be implemented by concrete readers. - /** @class Geant4EventReader Geant4EventReader.h DDG4/Geant4EventReader.h - * + /** * Base class to read input files containing simulation data. * - * @author P.Kostka (main author) - * @author M.Frank (code reshuffeling into new DDG4 scheme) - * @version 1.0 + * \author P.Kostka (main author) + * \author M.Frank (code reshuffeling into new DDG4 scheme) + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4EventReader { @@ -56,14 +56,14 @@ namespace DD4hep { }; /// Generic input action capable of using the Geant4EventReader class. - /** @class Geant4InputAction Geant4InputAction.h DDG4/Geant4InputAction.h - * + /** * Concrete implementation of the Geant4 generator action base class * populating Geant4 primaries from Geant4 and HepStd files. * - * @author P.Kostka (main author) - * @author M.Frank (code reshuffeling into new DDG4 scheme) - * @version 1.0 + * \author P.Kostka (main author) + * \author M.Frank (code reshuffeling into new DDG4 scheme) + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4InputAction : public Geant4GeneratorAction { diff --git a/DDG4/include/DDG4/Geant4InteractionMerger.h b/DDG4/include/DDG4/Geant4InteractionMerger.h index 5ea520561..32c97877a 100644 --- a/DDG4/include/DDG4/Geant4InteractionMerger.h +++ b/DDG4/include/DDG4/Geant4InteractionMerger.h @@ -24,8 +24,9 @@ namespace DD4hep { /// Geant4Action to merge several independent interaction to one /** Geant4Action to convert the particle information to Geant4 * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4InteractionMerger : public Geant4GeneratorAction { /// Append input interaction to global output diff --git a/DDG4/include/DDG4/Geant4InteractionVertexBoost.h b/DDG4/include/DDG4/Geant4InteractionVertexBoost.h index ef20db2c6..6371ebc4a 100644 --- a/DDG4/include/DDG4/Geant4InteractionVertexBoost.h +++ b/DDG4/include/DDG4/Geant4InteractionVertexBoost.h @@ -12,9 +12,6 @@ // Framework include files #include "DDG4/Geant4GeneratorAction.h" -// ROOT include files -#include "Math/Vector4D.h" - /// Namespace for the AIDA detector description toolkit namespace DD4hep { @@ -26,8 +23,9 @@ namespace DD4hep { * The vertex smearing is steered by the Lorentz transformation angle. * The interaction to be modified is identified by the interaction's unique mask. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4InteractionVertexBoost: public Geant4GeneratorAction { protected: diff --git a/DDG4/include/DDG4/Geant4InteractionVertexSmear.h b/DDG4/include/DDG4/Geant4InteractionVertexSmear.h index 69f9c7017..c95940db2 100644 --- a/DDG4/include/DDG4/Geant4InteractionVertexSmear.h +++ b/DDG4/include/DDG4/Geant4InteractionVertexSmear.h @@ -27,8 +27,9 @@ namespace DD4hep { * the corresponding errors. The interaction to be modified is identified by the * interaction's unique mask. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4InteractionVertexSmear: public Geant4GeneratorAction { protected: diff --git a/DDG4/include/DDG4/Geant4IsotropeGenerator.h b/DDG4/include/DDG4/Geant4IsotropeGenerator.h index e1b56c736..7fc7eb7fb 100644 --- a/DDG4/include/DDG4/Geant4IsotropeGenerator.h +++ b/DDG4/include/DDG4/Geant4IsotropeGenerator.h @@ -22,9 +22,9 @@ namespace DD4hep { namespace Simulation { /// Generate particles isotrop in space around origine (0,0,0) /** - * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4IsotropeGenerator: public Geant4GeneratorAction { protected: diff --git a/DDG4/include/DDG4/Geant4Kernel.h b/DDG4/include/DDG4/Geant4Kernel.h index 234f2377b..dd220a19d 100644 --- a/DDG4/include/DDG4/Geant4Kernel.h +++ b/DDG4/include/DDG4/Geant4Kernel.h @@ -51,11 +51,10 @@ namespace DD4hep { class Geant4SensDetSequences; /// Class, which allows all Geant4Action derivatives to access the DDG4 kernel structures. - /** @class Invoke Geant4Kernel.h DDG4/Geant4Kernel.h - * - * - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4Kernel { public: diff --git a/DDG4/include/DDG4/Geant4Mapping.h b/DDG4/include/DDG4/Geant4Mapping.h index 1efd0714d..c5c54f2c5 100644 --- a/DDG4/include/DDG4/Geant4Mapping.h +++ b/DDG4/include/DDG4/Geant4Mapping.h @@ -22,12 +22,12 @@ namespace DD4hep { namespace Simulation { /// Geometry mapping from DD4hep to Geant 4. - /** @class Geant4Mapping Geant4Mapping.h DDG4/Geant4Mapping.h - * - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ - struct Geant4Mapping: public Geometry::GeoHandlerTypes { + class Geant4Mapping: public Geometry::GeoHandlerTypes { public: typedef Geometry::LCDD LCDD; typedef Geometry::DetElement DetElement; diff --git a/DDG4/include/DDG4/Geant4MonteCarloTruth.h b/DDG4/include/DDG4/Geant4MonteCarloTruth.h index c637fd09f..ffcb8c25a 100644 --- a/DDG4/include/DDG4/Geant4MonteCarloTruth.h +++ b/DDG4/include/DDG4/Geant4MonteCarloTruth.h @@ -20,24 +20,20 @@ class G4Step; class G4Track; class G4Event; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { // Forward declarations class Geant4Particle; /// Default Interface class to handle monte carlo truth records - /** @class Geant4MonteCarloTruth Geant4MonteCarloTruth.h DDG4/Geant4MonteCarloTruth.h - * - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4MonteCarloTruth { public: @@ -68,21 +64,18 @@ namespace DD4hep { virtual void mark(const G4Step* step, int reason) = 0; }; - /** @class Geant4DummyTruthHandler Geant4DummyTruthHandler.h DDG4/Geant4DummyTruthHandler.h - * - * Void implementation doing nothing at all. - * - * @author M.Frank - * @version 1.0 + /// Void implementation of the Monte-Carlo thruth handler doing nothing at all. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ - class Geant4DummyTruthHandler : - public Geant4Action, public Geant4MonteCarloTruth - { - protected: - /// Map with stored MC Particles - ParticleMap m_particleMap; - /// Map associating the G4Track identifiers with identifiers of existing MCParticles - TrackEquivalents m_equivalentTracks; + class Geant4DummyTruthHandler : public Geant4Action, public Geant4MonteCarloTruth { + protected: + /// Map with stored MC Particles + ParticleMap m_particleMap; + /// Map associating the G4Track identifiers with identifiers of existing MCParticles + TrackEquivalents m_equivalentTracks; public: /// Standard constructor Geant4DummyTruthHandler(Geant4Context* ctxt,const std::string& nam); diff --git a/DDG4/include/DDG4/Geant4Output2ROOT.h b/DDG4/include/DDG4/Geant4Output2ROOT.h index dd86c7731..840e51d60 100644 --- a/DDG4/include/DDG4/Geant4Output2ROOT.h +++ b/DDG4/include/DDG4/Geant4Output2ROOT.h @@ -16,24 +16,19 @@ class TFile; class TTree; class TBranch; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { class ComponentCast; - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { - - /** @class Geant4Output2ROOT Geant4Output2ROOT.h DDG4/Geant4Output2ROOT.h - * - * Base class to output Geant4 event data to media - * - * @author M.Frank - * @version 1.0 + + /// Class to output Geant4 event data to ROOT files + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4Output2ROOT: public Geant4OutputAction { protected: diff --git a/DDG4/include/DDG4/Geant4OutputAction.h b/DDG4/include/DDG4/Geant4OutputAction.h index 9f438f06c..394a19434 100644 --- a/DDG4/include/DDG4/Geant4OutputAction.h +++ b/DDG4/include/DDG4/Geant4OutputAction.h @@ -25,10 +25,10 @@ namespace DD4hep { namespace Simulation { /// Base class to output Geant4 event data to persistent media - /** @class Geant4OutputAction Geant4OutputAction.h DDG4/Geant4OutputAction.h - * - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4OutputAction: public Geant4EventAction { protected: diff --git a/DDG4/include/DDG4/Geant4Particle.h b/DDG4/include/DDG4/Geant4Particle.h index fc3fa3399..278092f64 100644 --- a/DDG4/include/DDG4/Geant4Particle.h +++ b/DDG4/include/DDG4/Geant4Particle.h @@ -33,6 +33,11 @@ namespace DD4hep { class Geant4Particle; /// Base class to extend the basic particle class used by DDG4 with user information + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ class ParticleExtension { public: /// Default constructor @@ -82,8 +87,9 @@ namespace DD4hep { /// Data structure to store the MC particle information /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4Particle { private: @@ -135,8 +141,9 @@ namespace DD4hep { /// Data structure to access derived MC particle information /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4ParticleHandle { public: @@ -183,11 +190,11 @@ namespace DD4hep { /// Various output formats: - /// Output type 1:+++ <tag> 10 def:0xde4eaa8 [gamma , gamma] reason: 20 E:+1.017927e+03 #Par: 1/4 #Dau: 2 + /// Output type 1:+++ "tag" 10 def:0xde4eaa8 [gamma , gamma] reason: 20 E:+1.017927e+03 \#Par: 1/4 \#Dau: 2 void dump1(int level, const std::string& src, const char* tag) const; - /// Output type 2:+++ <tag> 20 G4: 7 def:0xde4eaa8 [gamma , gamma] reason: 20 E:+3.304035e+01 in record:YES #Par: 1/18 #Dau: 0 + /// Output type 2:+++ "tag" 20 G4: 7 def:0xde4eaa8 [gamma , gamma] reason: 20 E:+3.304035e+01 in record:YES \#Par: 1/18 \#Dau: 0 void dump2(int level, const std::string& src, const char* tag, int g4id, bool inrec) const; - /// Output type 3:+++ <tag> ID: 0 e- status:00000014 type: 11 Vertex:(+0.00e+00,+0.00e+00,+0.00e+00) [mm] time: +0.00e+00 [ns] #Par: 0 #Dau: 4 + /// Output type 3:+++ "tag" ID: 0 e- status:00000014 type: 11 Vertex:(+0.00e+00,+0.00e+00,+0.00e+00) [mm] time: +0.00e+00 [ns] \#Par: 0 \#Dau: 4 void dump3(int level, const std::string& src, const char* tag) const; void dump4(int level, const std::string& src, const char* tag) const; @@ -272,8 +279,9 @@ namespace DD4hep { * Note: This object takes OWNERSHIP of the inserted particles! * beware of double deletion of objects! * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4ParticleMap { public: diff --git a/DDG4/include/DDG4/Geant4ParticleGun.h b/DDG4/include/DDG4/Geant4ParticleGun.h index 0e4deacf1..efc9734f0 100644 --- a/DDG4/include/DDG4/Geant4ParticleGun.h +++ b/DDG4/include/DDG4/Geant4ParticleGun.h @@ -22,11 +22,11 @@ namespace DD4hep { namespace Simulation { /// Implementation of a particle gun using Geant4Particles. - /** @class Geant4ParticleGun Geant4ParticleGun.h DDG4/Geant4ParticleGun.h - * - * @author M.Frank - * @version 1.0 - */ + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ class Geant4ParticleGun: public Geant4GeneratorAction { protected: /// Property: Position and shooting direction of the gun diff --git a/DDG4/include/DDG4/Geant4ParticleHandler.h b/DDG4/include/DDG4/Geant4ParticleHandler.h index 3a48615a4..787b4c35f 100644 --- a/DDG4/include/DDG4/Geant4ParticleHandler.h +++ b/DDG4/include/DDG4/Geant4ParticleHandler.h @@ -35,8 +35,9 @@ namespace DD4hep { /** * Extract the relevant particle information during the simulation step. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4ParticleHandler : public Geant4GeneratorAction, public Geant4MonteCarloTruth { #ifdef __MAKECINT__ @@ -51,6 +52,12 @@ namespace DD4hep { public: typedef std::vector<std::string> Processes; + /// Functor to select particles from a integer map by the identifier. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ class FindParticleByID { protected: int pid; diff --git a/DDG4/include/DDG4/Geant4ParticlePrint.h b/DDG4/include/DDG4/Geant4ParticlePrint.h index 0a84b94af..c4df649cd 100644 --- a/DDG4/include/DDG4/Geant4ParticlePrint.h +++ b/DDG4/include/DDG4/Geant4ParticlePrint.h @@ -26,8 +26,9 @@ namespace DD4hep { /// Geant4Action to print MC particle information. /** * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4ParticlePrint : public Geant4EventAction { public: diff --git a/DDG4/include/DDG4/Geant4PhysicsList.h b/DDG4/include/DDG4/Geant4PhysicsList.h index 784a55c22..7bc408f9b 100644 --- a/DDG4/include/DDG4/Geant4PhysicsList.h +++ b/DDG4/include/DDG4/Geant4PhysicsList.h @@ -26,11 +26,10 @@ namespace DD4hep { namespace Simulation { /// Interface class exposing some of the G4VUserPhysicsList class. - /** @class Geant4UserPhysics Geant4PhysicsList.h DDG4/Geant4PhysicsList.h - * - * - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4UserPhysics { protected: @@ -46,22 +45,22 @@ namespace DD4hep { }; /// Concrete basic implementation of a Geant4 physics list action - /** @class Geant4PhysicsList Geant4PhysicsList.h DDG4/Geant4PhysicsList.h - * - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4PhysicsList: public Geant4Action { public: /// Structure describing a G4 process - /** @class PhysicsConstructor Geant4PhysicsList.h DDG4/Geant4PhysicsList.h - * + /** * Image of a physics constructor holding all stub information to attach * the concrete process contributing to the user physics list. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Process { public: @@ -95,7 +94,12 @@ namespace DD4hep { typedef std::vector<ParticleConstructor> ParticleConstructors; /// Structure describing a G4 physics constructor - class PhysicsConstructor: public std::string { + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ + class PhysicsConstructor: public std::string { public: /// Default constructor PhysicsConstructor() @@ -173,13 +177,13 @@ namespace DD4hep { }; /// The implementation of the single Geant4 physics list action sequence - /** @class Geant4PhysicsListActionSequence Geant4Action.h DDG4/Geant4Action.h - * + /** * Concrete implementation of the Geant4 physics list sequence. * A list to setup the physics content in a modular form * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4PhysicsListActionSequence: public Geant4Action { public: diff --git a/DDG4/include/DDG4/Geant4Primary.h b/DDG4/include/DDG4/Geant4Primary.h index 8c2cd18ed..56d7f3ca6 100644 --- a/DDG4/include/DDG4/Geant4Primary.h +++ b/DDG4/include/DDG4/Geant4Primary.h @@ -33,6 +33,11 @@ namespace DD4hep { class Geant4Vertex; /// Base structure to extend primary information with user data + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ class PrimaryExtension { public: /// Default constructor @@ -46,8 +51,9 @@ namespace DD4hep { * This data structure is added to the Geant4Event data extensions * by the Geant4GenerationInit action. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4PrimaryMap { public: @@ -63,8 +69,9 @@ namespace DD4hep { /// Class modelling a single interaction with multiple primary vertices and particles /* - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4PrimaryInteraction { private: @@ -108,8 +115,9 @@ namespace DD4hep { /* * Multiple interactions allow a simple handling of overlay events * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4PrimaryEvent { private: diff --git a/DDG4/include/DDG4/Geant4PrimaryHandler.h b/DDG4/include/DDG4/Geant4PrimaryHandler.h index b8b4a797a..0ea34e2d2 100644 --- a/DDG4/include/DDG4/Geant4PrimaryHandler.h +++ b/DDG4/include/DDG4/Geant4PrimaryHandler.h @@ -20,8 +20,9 @@ namespace DD4hep { /// Geant4Action to convert the particle information to Geant4 /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4PrimaryHandler : public Geant4GeneratorAction { public: diff --git a/DDG4/include/DDG4/Geant4Random.h b/DDG4/include/DDG4/Geant4Random.h index 714c4eee6..027458bb9 100644 --- a/DDG4/include/DDG4/Geant4Random.h +++ b/DDG4/include/DDG4/Geant4Random.h @@ -36,8 +36,9 @@ namespace DD4hep { * if the generation functions will have to become virtual.... * Future will tell us. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4Random { friend class Geant4Exec; diff --git a/DDG4/include/DDG4/Geant4RunAction.h b/DDG4/include/DDG4/Geant4RunAction.h index 7e36d7c62..d7a624b87 100644 --- a/DDG4/include/DDG4/Geant4RunAction.h +++ b/DDG4/include/DDG4/Geant4RunAction.h @@ -22,15 +22,15 @@ namespace DD4hep { namespace Simulation { /// Concrete basic implementation of the Geant4 run action base class. - /** @class Geant4RunAction Geant4RunAction.h DDG4/Geant4RunAction.h - * + /** * The Run Action is called once per start and end of a run. * i.e. a series of generated events. These two callbacks * allow clients to define run-dependent actions such as statistics * summaries etc. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4RunAction: public Geant4Action { public: @@ -45,15 +45,15 @@ namespace DD4hep { }; /// Concrete basic implementation of the Geant4 run action sequencer. - /** @class Geant4RunActionSequence Geant4RunAction.h DDG4/Geant4RunAction.h - * + /** * Concrete implementation of the Geant4 run action sequence. * The sequence dispatches the callbacks at the beginning and the and * of a run to all registered Geant4RunAction members and all * registered callbacks. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4RunActionSequence: public Geant4Action { protected: diff --git a/DDG4/include/DDG4/Geant4SensDetAction.h b/DDG4/include/DDG4/Geant4SensDetAction.h index 9cd797dfd..70f8a96fd 100644 --- a/DDG4/include/DDG4/Geant4SensDetAction.h +++ b/DDG4/include/DDG4/Geant4SensDetAction.h @@ -46,9 +46,9 @@ namespace DD4hep { /// Interface class to access properties of the underlying Geant4 sensitive detector structure /** - * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4ActionSD: virtual public Geant4Action { protected: @@ -72,10 +72,10 @@ namespace DD4hep { }; /// Base class to construct filters for Geant4 sensitive detectors - /** @class Geant4Filter Geant4SensDetAction.h DDG4/Geant4SensDetAction.h - * - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4Filter: public Geant4Action { public: @@ -88,10 +88,10 @@ namespace DD4hep { }; /// The base class for Geant4 sensitive detector actions implemented by users - /** @class Geant4Sensitive Geant4SensDetAction.h DDG4/Geant4SensDetAction.h - * - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4Sensitive: public Geant4Action { public: @@ -247,12 +247,12 @@ namespace DD4hep { }; /// The sequencer to host Geant4 sensitive actions called if particles interact with sensitive elements - /** @class Geant4SensDetActionSequence Geant4SensDetAction.h DDG4/Geant4SensDetAction.h - * + /** * Concrete implementation of the sensitive detector action sequence * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4SensDetActionSequence: public Geant4Action { public: @@ -370,12 +370,12 @@ namespace DD4hep { }; /// Geant4SensDetSequences: class to access groups of sensitive actions - /** @class Geant4SensDetActionSequences Geant4SensDetAction.h DDG4/Geant4SensDetAction.h - * + /** * Concrete implementation of the sensitive detector action sequence * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4SensDetSequences { public: @@ -413,8 +413,7 @@ namespace DD4hep { } /// Template class to ease the construction of sensitive detectors using particle template specialization - /** @class Geant4SensitiveAction Geant4SensDetAction.h DDG4/Geant4SensDetAction.h - * + /** * Templated implementation to realize sensitive detectors. * Default implementations for all functions are provided in the file * DDG4/Geant4SensDetAction.inl. @@ -423,8 +422,9 @@ namespace DD4hep { * of the base class using explicit template specialization. * An example may be found in DDG4/plugins/eant4SDActions. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ template <typename T> class Geant4SensitiveAction : public Geant4Sensitive { protected: diff --git a/DDG4/include/DDG4/Geant4SensitiveDetector.h b/DDG4/include/DDG4/Geant4SensitiveDetector.h index d3bc80652..ec32ace3e 100644 --- a/DDG4/include/DDG4/Geant4SensitiveDetector.h +++ b/DDG4/include/DDG4/Geant4SensitiveDetector.h @@ -33,9 +33,8 @@ namespace DD4hep { class Geant4SensitiveDetector; /// Deprecated: Example G4VSensitiveDetector implementation. - /** @class Geant4SensitiveDetector Geant4SensitiveDetector.h DDG4/Geant4SensitiveDetector.h - * - * \deprecated{Deprecated class. Not supported by the DDG4 kernel.} + /** \deprecated + * Deprecated class. Not supported by the DDG4 kernel. * * @author M.Frank * @version 1.0 @@ -124,10 +123,13 @@ namespace DD4hep { * will be deleted automatically. */ virtual void clear(); - }; + /// Deprecated: Example G4VSensitiveDetector implementation. + /** \deprecated + * Deprecated class. Not supported by the DDG4 kernel. + */ template <class T> class Geant4GenericSD : public Geant4SensitiveDetector { T userData; public: diff --git a/DDG4/include/DDG4/Geant4StackingAction.h b/DDG4/include/DDG4/Geant4StackingAction.h index b560c1244..b08bad4ba 100644 --- a/DDG4/include/DDG4/Geant4StackingAction.h +++ b/DDG4/include/DDG4/Geant4StackingAction.h @@ -19,10 +19,10 @@ namespace DD4hep { namespace Simulation { /// Concrete implementation of the Geant4 stacking action base class - /** @class Geant4StackingAction Geant4Action.h DDG4/Geant4Action.h - * - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4StackingAction: public Geant4Action { public: @@ -39,14 +39,14 @@ namespace DD4hep { }; /// Concrete implementation of the Geant4 stacking action sequence - /** @class Geant4StackingActionSequence Geant4Action.h DDG4/Geant4Action.h - * + /** * The sequence dispatches the callbacks for each stepping action * to all registered Geant4StackingAction members and all * registered callbacks. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4StackingActionSequence: public Geant4Action { protected: diff --git a/DDG4/include/DDG4/Geant4StepHandler.h b/DDG4/include/DDG4/Geant4StepHandler.h index bfdd55f0a..834914bba 100644 --- a/DDG4/include/DDG4/Geant4StepHandler.h +++ b/DDG4/include/DDG4/Geant4StepHandler.h @@ -29,13 +29,14 @@ namespace DD4hep { class Geant4StepHandler; /// Helper class to ease the extraction of information from a G4Step object. - /** @class Geant4StepHandler Geant4SensitiveDetector.h DDG4/Geant4SensitiveDetector.h + /** * * Tiny helper/utility class to easily access Geant4 step information. * Born by lazyness: Avoid typing millions of statements! * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4StepHandler { public: diff --git a/DDG4/include/DDG4/Geant4SteppingAction.h b/DDG4/include/DDG4/Geant4SteppingAction.h index 2603773be..c5de1bd20 100644 --- a/DDG4/include/DDG4/Geant4SteppingAction.h +++ b/DDG4/include/DDG4/Geant4SteppingAction.h @@ -16,22 +16,17 @@ class G4SteppingManager; class G4Step; -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { - /** @class Geant4SteppingAction Geant4Action.h DDG4/Geant4Action.h - * - * Concrete implementation of the Geant4 stepping action sequence - * - * @author M.Frank - * @version 1.0 + /// Concrete implementation of the Geant4 stepping action sequence + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4SteppingAction: public Geant4Action { public: @@ -43,16 +38,15 @@ namespace DD4hep { virtual void operator()(const G4Step* step, G4SteppingManager* mgr); }; - /** @class Geant4SteppingActionSequence Geant4Action.h DDG4/Geant4Action.h - * - * Concrete implementation of the Geant4 stepping action sequence - * + /// Concrete implementation of the Geant4 stepping action sequence + /** * The sequence dispatches the callbacks for each stepping action * to all registered Geant4SteppingAction members and all * registered callbacks. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4SteppingActionSequence: public Geant4Action { protected: diff --git a/DDG4/include/DDG4/Geant4TestActions.h b/DDG4/include/DDG4/Geant4TestActions.h index 4e2005548..e5b86d959 100644 --- a/DDG4/include/DDG4/Geant4TestActions.h +++ b/DDG4/include/DDG4/Geant4TestActions.h @@ -27,13 +27,14 @@ namespace DD4hep { /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { + /// Convenience namespace to separate test classes from the DDG4 simulation toolkit namespace Test { /// Common base class for test action /** - * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4TestBase { protected: @@ -50,8 +51,9 @@ namespace DD4hep { /// Example generator action doing nothing, but print /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4TestGeneratorAction: public Geant4GeneratorAction, public Geant4TestBase { public: @@ -65,8 +67,9 @@ namespace DD4hep { /// Example run action doing nothing, but print /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4TestRunAction: public Geant4RunAction, public Geant4TestBase { public: @@ -86,8 +89,9 @@ namespace DD4hep { /// Example event action doing nothing, but print /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4TestEventAction: public Geant4EventAction, public Geant4TestBase { public: @@ -107,8 +111,10 @@ namespace DD4hep { /// Example tracking action doing nothing, but print /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ class Geant4TestTrackAction: public Geant4TrackingAction, public Geant4TestBase { public: @@ -124,8 +130,9 @@ namespace DD4hep { /// Example stepping action doing nothing, but print /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4TestStepAction: public Geant4SteppingAction, public Geant4TestBase { public: @@ -139,8 +146,9 @@ namespace DD4hep { /// Example sensitve detector action doing nothing, but print /** - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4TestSensitive: public Geant4Sensitive, public Geant4TestBase { protected: diff --git a/DDG4/include/DDG4/Geant4TouchableHandler.h b/DDG4/include/DDG4/Geant4TouchableHandler.h index 04b226d4c..9e1ade4d4 100644 --- a/DDG4/include/DDG4/Geant4TouchableHandler.h +++ b/DDG4/include/DDG4/Geant4TouchableHandler.h @@ -28,13 +28,13 @@ namespace DD4hep { class Geant4TouchableHandler; /// Helper class to ease the extraction of information from a G4Touchable object. - /** @class Geant4TouchableHandler Geant4SensitiveDetector.h DDG4/Geant4SensitiveDetector.h - * + /** * Tiny helper/utility class to easily access Geant4 touchable information. * Born by lazyness: Avoid typing millions of statements! * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4TouchableHandler { public: diff --git a/DDG4/include/DDG4/Geant4TrackHandler.h b/DDG4/include/DDG4/Geant4TrackHandler.h index ce1636565..768a413aa 100644 --- a/DDG4/include/DDG4/Geant4TrackHandler.h +++ b/DDG4/include/DDG4/Geant4TrackHandler.h @@ -26,7 +26,6 @@ class G4VTouchableHandle; class G4VUserTrackInformation; - /// Namespace for the AIDA detector description toolkit namespace DD4hep { @@ -37,13 +36,13 @@ namespace DD4hep { class Geant4TrackHandler; /// Helper class to ease the extraction of information from a G4Track object. - /** @class Geant4TrackHandler Geant4SensitiveDetector.h DDG4/Geant4SensitiveDetector.h - * + /** * Tiny helper/utility class to easily access Geant4 track information. * Born by lazyness: Avoid typing millions of statements! * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4TrackHandler { public: diff --git a/DDG4/include/DDG4/Geant4TrackInformation.h b/DDG4/include/DDG4/Geant4TrackInformation.h index cb3f47d34..215ef66dc 100644 --- a/DDG4/include/DDG4/Geant4TrackInformation.h +++ b/DDG4/include/DDG4/Geant4TrackInformation.h @@ -12,17 +12,14 @@ // Framework include files #include "G4VUserTrackInformation.hh" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { - /** @class Geant4TrackInformation Geant4Action.h DDG4/Geant4Action.h + /// Unused. + /** * * @author M.Frank * @version 1.0 diff --git a/DDG4/include/DDG4/Geant4TrackManager.h b/DDG4/include/DDG4/Geant4TrackManager.h deleted file mode 100644 index 872136cef..000000000 --- a/DDG4/include/DDG4/Geant4TrackManager.h +++ /dev/null @@ -1,99 +0,0 @@ -// $Id: Geant4Hits.h 513 2013-04-05 14:31:53Z gaede $ -//==================================================================== -// AIDA Detector description implementation -//-------------------------------------------------------------------- -// -// Author : M.Frank -// -//==================================================================== -#ifndef DD4HEP_DDG4_GEANT4TRACKMANAGER_H -#define DD4HEP_DDG4_GEANT4TRACKMANAGER_H - -// Framework include files -#include "DDG4/Geant4Action.h" -#include "DDG4/Geant4TrackingAction.h" -#include "Math/PxPyPzE4D.h" -#include "G4VUserTrackInformation.hh" - -// C/C++ include files -#include <map> -#include <string> -#include <typeinfo> - -// Forward declarations -class G4Track; - -/* - * DD4hep namespace declaration - */ -namespace DD4hep { - - /* - * Simulation namespace declaration - */ - namespace Simulation { - - // Forward declarations - - /** @class Geant4TrackManager Geant4TrackManager.h DDG4/Geant4TrackManager.h - * - * Default base class for all geant 4 actions and derivates thereof. - * - * @author M.Frank - * @version 1.0 - */ - class Geant4TrackManager : public Geant4Action { - public: - typedef ROOT::Math::PxPyPzE4D<double> FourMomentum; - - /** @class Geant4TrackManager::TrackInfo Geant4TrackManager.h DDG4/Geant4TrackManager.h - * - * - * - * @author M.Frank - * @version 1.0 - */ - class TrackInfo : public G4VUserTrackInformation { - public: - /// Pointer to self - Geant4TrackManager* manager; - /// Pointer to the track - const G4Track* track; - /// Flag to store the track - bool store; - /// Initial 4-momentum at the beginning of the tracking action - FourMomentum initialMomentum; - - public: - /// Standard constructor - TrackInfo(); - /// Default destructor - virtual ~TrackInfo(); - /// Clear alkl stored information for this track - void set(const G4Track* trk); - }; - protected: - - /// Information block for current track - Geant4TrackManager::TrackInfo m_current; - - public: - /// Standard constructor - Geant4TrackManager(Geant4Context* context, const std::string& nam); - /// Default destructor - virtual ~Geant4TrackManager(); - /// Access the Geant4 tracking manager. Only use between tracking pre- and post action - G4TrackingManager* trackMgr() const { - return m_context->trackMgr(); - } - /// Store a track - void mark(const G4Track* track); - /// Pre-track action callback - virtual void begin(const G4Track* track); - /// Post-track action callback - virtual void end(const G4Track* track); - }; - } // End namespace Simulation -} // End namespace DD4hep - -#endif // DD4HEP_DDG4_GEANT4TRACKMANAGER_H diff --git a/DDG4/include/DDG4/Geant4TrackingAction.h b/DDG4/include/DDG4/Geant4TrackingAction.h index 9d57b66f6..d9d29e4d1 100644 --- a/DDG4/include/DDG4/Geant4TrackingAction.h +++ b/DDG4/include/DDG4/Geant4TrackingAction.h @@ -26,10 +26,10 @@ namespace DD4hep { class Geant4TrackInformation; /// Default base class for all geant 4 tracking actions used in DDG4. - /** @class Geant4TrackingAction Geant4Action.h DDG4/Geant4Action.h - * - * @author M.Frank - * @version 1.0 + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4TrackingAction: public Geant4Action { public: @@ -56,14 +56,14 @@ namespace DD4hep { }; /// Concrete implementation of the Geant4 tracking action sequence - /** @class Geant4EventActionSequence Geant4Action.h DDG4/Geant4Action.h - * + /** * The sequence dispatches the callbacks for each tracking action * to all registered Geant4SteppingAction members and all * registered callbacks. * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4TrackingActionSequence: public Geant4Action { protected: diff --git a/DDG4/include/DDG4/Geant4TrackingPostAction.h b/DDG4/include/DDG4/Geant4TrackingPostAction.h index 24868d4a2..6336bf375 100644 --- a/DDG4/include/DDG4/Geant4TrackingPostAction.h +++ b/DDG4/include/DDG4/Geant4TrackingPostAction.h @@ -13,22 +13,17 @@ #include "DDG4/Geant4TrackingAction.h" #include <vector> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { - /** @class Geant4TrackingPostAction Geant4TrackingPostAction.h DDG4/Geant4TrackingPostAction.h - * - * Default base class for all geant 4 tracking actions. - * - * @author M.Frank - * @version 1.0 + /// Default base class for all geant 4 tracking actions. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4TrackingPostAction: public Geant4TrackingAction { protected: diff --git a/DDG4/include/DDG4/Geant4TrackingPreAction.h b/DDG4/include/DDG4/Geant4TrackingPreAction.h index 4c9cc244f..5b13baf6d 100644 --- a/DDG4/include/DDG4/Geant4TrackingPreAction.h +++ b/DDG4/include/DDG4/Geant4TrackingPreAction.h @@ -12,22 +12,17 @@ // Framework include files #include "DDG4/Geant4TrackingAction.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { - /** @class Geant4TrackingPreAction Geant4TrackingPreAction.h DDG4/Geant4TrackingPreAction.h - * - * Default base class for all geant 4 tracking actions. - * - * @author M.Frank - * @version 1.0 + /// Default base class for all geant 4 tracking actions. + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4TrackingPreAction: public Geant4TrackingAction { public: diff --git a/DDG4/include/DDG4/Geant4Vertex.h b/DDG4/include/DDG4/Geant4Vertex.h index 222ea5752..fc28e58d9 100644 --- a/DDG4/include/DDG4/Geant4Vertex.h +++ b/DDG4/include/DDG4/Geant4Vertex.h @@ -13,19 +13,16 @@ #include <set> #include <memory> -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { // Forward declarations class Geant4Vertex; + /// Base class to extend the basic vertex class used by DDG4 with user information class VertexExtension { public: /// Default constructor diff --git a/DDG4/lcio/Geant4Output2LCIO.cpp b/DDG4/lcio/Geant4Output2LCIO.cpp index 19159214c..26014ee69 100644 --- a/DDG4/lcio/Geant4Output2LCIO.cpp +++ b/DDG4/lcio/Geant4Output2LCIO.cpp @@ -18,24 +18,19 @@ #include "IO/LCWriter.h" #include "IMPL/LCEventImpl.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { class ComponentCast; - /* - * Simulation namespace declaration - */ - namespace Simulation { + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit + namespace Simulation { - /** @class Geant4Output2LCIO Geant4Output2LCIO.h DDG4/Geant4Output2LCIO.h - * - * Base class to output Geant4 event data to media - * - * @author M.Frank - * @version 1.0 + /// Base class to output Geant4 event data to media + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4Output2LCIO : public Geant4OutputAction { protected: diff --git a/DDG4/lcio/HepEventReader.cpp b/DDG4/lcio/HepEventReader.cpp index 60596e130..a1124beba 100644 --- a/DDG4/lcio/HepEventReader.cpp +++ b/DDG4/lcio/HepEventReader.cpp @@ -11,25 +11,24 @@ // C/C++ include files #include <fstream> -/* - * DD4hep namespace declaration - */ -namespace DD4hep { - /* - * lcio namespace declaration - */ - namespace Simulation { - - /** @class HepEventReader HepEventReader.h DDG4/HepEventReader.h +/// Namespace for the AIDA detector description toolkit +namespace DD4hep { + + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit + namespace Simulation { + + /// File reader to load StdHep format (ASCII) + /** * * Class to populate Geant4 primary particles and vertices from a - * file in StdHep format (ASCII) + * file in HepEvent format (ASCII) * - * @author P.Kostka (main author) - * @author M.Frank (code reshuffeling into new DDG4 scheme) - * @version 1.0 + * \author P.Kostka (main author) + * \author M.Frank (code reshuffeling into new DDG4 scheme) + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ - struct HepEventReader : public LCIOEventReader { + class HepEventReader : public LCIOEventReader { protected: std::ifstream m_input; int m_format; diff --git a/DDG4/lcio/LCIOEventReader.h b/DDG4/lcio/LCIOEventReader.h index ffb6587c1..8cb923d73 100644 --- a/DDG4/lcio/LCIOEventReader.h +++ b/DDG4/lcio/LCIOEventReader.h @@ -13,26 +13,21 @@ // Forward declarations namespace EVENT { class LCCollection; } -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { // Forward declarations class Geant4Particle; - /** @class EventReader EventReader.h DDG4/EventReader.h - * - * Base class to read lcio files. - * - * @author P.Kostka (main author) - * @author M.Frank (code reshuffeling into new DDG4 scheme) - * @version 1.0 + /// Base class to read lcio files. + /** + * \author P.Kostka (main author) + * \author M.Frank (code reshuffeling into new DDG4 scheme) + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class LCIOEventReader { diff --git a/DDG4/lcio/LCIOFileReader.cpp b/DDG4/lcio/LCIOFileReader.cpp index 433506fef..0b3db53bd 100644 --- a/DDG4/lcio/LCIOFileReader.cpp +++ b/DDG4/lcio/LCIOFileReader.cpp @@ -13,24 +13,20 @@ // Forward declarations namespace IO { class LCReader; } -/* - * DD4hep namespace declaration - */ -namespace DD4hep { - /* - * lcio namespace declaration - */ - namespace Simulation { +/// Namespace for the AIDA detector description toolkit +namespace DD4hep { - /** @class LcioEventReader LcioEventReader.h DDG4/LcioEventReader.h - * - * Base class to read lcio event files - * - * @author P.Kostka (main author) - * @author M.Frank (code reshuffeling into new DDG4 scheme) - * @version 1.0 + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit + namespace Simulation { + + /// Base class to read lcio event files + /** + * \author P.Kostka (main author) + * \author M.Frank (code reshuffeling into new DDG4 scheme) + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ - struct LCIOFileReader : public LCIOEventReader { + class LCIOFileReader : public LCIOEventReader { protected: /// Reference to reader object IO::LCReader* m_reader; diff --git a/DDG4/lcio/LCIOInputAction.h b/DDG4/lcio/LCIOInputAction.h index 36e9c3d24..035dee40a 100644 --- a/DDG4/lcio/LCIOInputAction.h +++ b/DDG4/lcio/LCIOInputAction.h @@ -40,8 +40,8 @@ namespace DD4hep { class Geant4Particle; class LCIOEventReader; - /** @class InputAction Geant4GeneratorAction.h DDG4/Geant4GeneratorAction.h - * + /// Input action reading LCIO files + /** * Concrete implementation of the Geant4 generator action base class * populating Geant4 primaries from LCIO and HepStd files. * diff --git a/DDG4/lcio/LCIOSDTestActions.cpp b/DDG4/lcio/LCIOSDTestActions.cpp index e24eb1400..171003684 100644 --- a/DDG4/lcio/LCIOSDTestActions.cpp +++ b/DDG4/lcio/LCIOSDTestActions.cpp @@ -22,11 +22,16 @@ using namespace DD4hep::Simulation; using namespace DD4hep; +/// Test namespace. namespace Tests { // copied from Geant4SDActions.cpp (why is this not a public class ??????) - /** Simple SensitiveAction class ... + /// Deprecated: Simple SensitiveAction class ... + /** + * \deprecated + * \author M.Frank + * \version 1.0 */ template <typename T> class Geant4SensitiveAction : public Geant4Sensitive { protected: @@ -71,10 +76,18 @@ namespace Tests { }; - /// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - /// Geant4SensitiveAction<SimpleTracker> - /// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - struct LcioTestTracker; + // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // Geant4SensitiveAction<SimpleTracker> + // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + /// Deprecated: Simple SensitiveAction class ... + /** + * \deprecated + * \author M.Frank + * \version 1.0 + */ + class LcioTestTracker {}; + /// Define collections created by this sensitivie action object template <> void Geant4SensitiveAction<LcioTestTracker>::defineCollections() { m_collectionID = Base::defineCollection<lcio::SimTrackerHitImpl>(m_sensitive.readout().name()); diff --git a/DDG4/lcio/LCIOStdHepReader.cpp b/DDG4/lcio/LCIOStdHepReader.cpp index a9641b9ca..2458ba353 100644 --- a/DDG4/lcio/LCIOStdHepReader.cpp +++ b/DDG4/lcio/LCIOStdHepReader.cpp @@ -12,24 +12,20 @@ // Forward declarations namespace UTIL { class LCStdHepRdr; } -/* - * DD4hep namespace declaration - */ -namespace DD4hep { - /* - * Simulation namespace declaration - */ - namespace Simulation { +/// Namespace for the AIDA detector description toolkit +namespace DD4hep { - /** @class LCIOStdHepReader LCIOStdHepReader.h DDG4/LCIOStdHepReader.h - * - * Base class to read StdHep files with lcio - * - * @author P.Kostka (main author) - * @author M.Frank (code reshuffeling into new DDG4 scheme) - * @version 1.0 + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit + namespace Simulation { + + /// Base class to read StdHep files with lcio + /** + * \author P.Kostka (main author) + * \author M.Frank (code reshuffeling into new DDG4 scheme) + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ - struct LCIOStdHepReader : public LCIOEventReader { + class LCIOStdHepReader : public LCIOEventReader { protected: /// Reference to Reader object UTIL::LCStdHepRdr* m_reader; diff --git a/DDG4/plugins/Geant4EscapeCounter.cpp b/DDG4/plugins/Geant4EscapeCounter.cpp index a520ebd59..bbab87fbf 100644 --- a/DDG4/plugins/Geant4EscapeCounter.cpp +++ b/DDG4/plugins/Geant4EscapeCounter.cpp @@ -14,22 +14,19 @@ #include "DDG4/Geant4SensDetAction.h" #include "DDG4/Geant4SteppingAction.h" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { + /// Class to measure the energy of escaping tracks /** Class to measure the energy of escaping tracks of a detector using Geant 4 - * * Measure escaping energy.... * - * @author M.Frank - * @version 1.0 + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ class Geant4EscapeCounter : /* virtual public Geant4SteppingAction, virtual */ public Geant4Sensitive { /// Collection identifiers diff --git a/DDG4/plugins/Geant4HepEventReader.cpp b/DDG4/plugins/Geant4HepEventReader.cpp index 09918713b..666a91af5 100644 --- a/DDG4/plugins/Geant4HepEventReader.cpp +++ b/DDG4/plugins/Geant4HepEventReader.cpp @@ -11,25 +11,23 @@ // C/C++ include files #include <fstream> -/* - * DD4hep namespace declaration - */ -namespace DD4hep { - /* - * lcio namespace declaration - */ +/// Namespace for the AIDA detector description toolkit +namespace DD4hep { + + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { - /** @class HepEventReader HepEventReader.h DDG4/HepEventReader.h - * + /// Class to populate Geant4 primaries from StdHep files. + /** * Class to populate Geant4 primary particles and vertices from a * file in StdHep format (ASCII) * - * @author P.Kostka (main author) - * @author M.Frank (code reshuffeling into new DDG4 scheme) - * @version 1.0 + * \author P.Kostka (main author) + * \author M.Frank (code reshuffeling into new DDG4 scheme) + * \version 1.0 + * \ingroup DD4HEP_SIMULATION */ - struct Geant4HepEventReader : public Geant4EventReader { + class Geant4HepEventReader : public Geant4EventReader { protected: std::ifstream m_input; int m_format; diff --git a/DDG4/plugins/Geant4HitExtractor.cpp b/DDG4/plugins/Geant4HitExtractor.cpp index 54830c789..efeace86c 100644 --- a/DDG4/plugins/Geant4HitExtractor.cpp +++ b/DDG4/plugins/Geant4HitExtractor.cpp @@ -3,16 +3,32 @@ using namespace DD4hep; using namespace DD4hep::Simulation; +/// Namespace for the AIDA detector description toolkit namespace DD4hep { + + /// Namespace for the DD4hep event display specializations namespace DDEve { + + /// SimulationHit definition + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + * \ingroup DD4HEP_EVE + */ class SimulationHit { public: Position position; float deposit; + /// Default constructor SimulationHit() : deposit(0.0) {} + /// Standard initializing constructor SimulationHit(const Position& p, float d) : position(p), deposit(d) {} + /// Copy constructor SimulationHit(const SimulationHit& c) : position(c.position), deposit(c.deposit) {} + /// Standard Destructor ~SimulationHit() {} + /// Assignment operator SimulationHit& operator=(const SimulationHit& c) { if ( this != &c ) { position = c.position; @@ -24,6 +40,7 @@ namespace DD4hep { } } +/// Hit conversion function \ingroup DD4HEP_EVE static void* _convertHitCollection(const char* source) { typedef DD4hep::DDEve::SimulationHit SimulationHit; const std::vector<SimpleHit*>* c = (std::vector<SimpleHit*>*)source; diff --git a/DDG4/plugins/Geant4SDActions.cpp b/DDG4/plugins/Geant4SDActions.cpp index 511ceca1f..8322f81d4 100644 --- a/DDG4/plugins/Geant4SDActions.cpp +++ b/DDG4/plugins/Geant4SDActions.cpp @@ -26,9 +26,10 @@ namespace DD4hep { typedef Geant4HitData::Contribution HitContribution; - /// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - /// Geant4SensitiveAction<Geant4Tracker> - /// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // Geant4SensitiveAction<Geant4Tracker> + // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + /// Define collections created by this sensitivie action object template <> void Geant4SensitiveAction<Geant4Tracker>::defineCollections() { m_collectionID = defineCollection<Geant4Tracker::Hit>(m_sensitive.readout().name()); @@ -77,9 +78,10 @@ namespace DD4hep { } typedef Geant4SensitiveAction<Geant4Tracker> Geant4TrackerAction; - /// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - /// Geant4SensitiveAction<Calorimeter> - /// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // Geant4SensitiveAction<Calorimeter> + // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + /// Define collections created by this sensitivie action object template <> void Geant4SensitiveAction<Geant4Calorimeter>::defineCollections() { m_collectionID = defineCollection<Geant4Calorimeter::Hit>(m_sensitive.readout().name()); @@ -117,10 +119,18 @@ namespace DD4hep { } typedef Geant4SensitiveAction<Geant4Calorimeter> Geant4CalorimeterAction; - /// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - /// Geant4SensitiveAction<OpticalCalorimeter> - /// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // Geant4SensitiveAction<OpticalCalorimeter> + // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + /// Helper class to define properti4es of optical calorimeters. UNTESTED + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ struct Geant4OpticalCalorimeter {}; + /// Define collections created by this sensitivie action object template <> void Geant4SensitiveAction<Geant4OpticalCalorimeter>::defineCollections() { m_collectionID = defineCollection<Geant4Calorimeter::Hit>(m_sensitive.readout().name()); diff --git a/DDG4/plugins/Geant4SensDet.cpp b/DDG4/plugins/Geant4SensDet.cpp index 63fb17fbb..6e1456cd3 100644 --- a/DDG4/plugins/Geant4SensDet.cpp +++ b/DDG4/plugins/Geant4SensDet.cpp @@ -18,23 +18,29 @@ #include "G4Event.hh" #include "G4Run.hh" -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ - namespace Simulation { + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit + namespace Simulation { Geant4Context* ddg4_globalContext(); - template <typename T> struct RefCountedSequence { + /// Private helper to support sequence reference counting + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ + template <typename T> class RefCountedSequence { + public: typedef RefCountedSequence<T> Base; T* m_sequence; + /// Default constructor RefCountedSequence() : m_sequence(0) { } + /// Initializing constructor RefCountedSequence(T* seq) { _aquire(seq); } + /// Default destructor virtual ~RefCountedSequence() { _release(); } void _aquire(T* s) { InstanceCount::increment(this); @@ -47,11 +53,18 @@ namespace DD4hep { } }; - struct Geant4SensDet : virtual public G4VSensitiveDetector, - virtual public G4VSDFilter, - virtual public Geant4ActionSD, - virtual public RefCountedSequence<Geant4SensDetActionSequence> + /// Concrete implementation of the G4VSensitiveDetector calling the registered sequence object + /** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ + class Geant4SensDet : virtual public G4VSensitiveDetector, + virtual public G4VSDFilter, + virtual public Geant4ActionSD, + virtual public RefCountedSequence<Geant4SensDetActionSequence> { + public: /// Constructor. The detector element is identified by the name Geant4SensDet(const std::string& nam, Geometry::LCDD& lcdd) : G4VSensitiveDetector(nam), G4VSDFilter(nam), diff --git a/DDG4/plugins/Geant4TCUserParticleHandler.cpp b/DDG4/plugins/Geant4TCUserParticleHandler.cpp index c803945b0..792f5e388 100644 --- a/DDG4/plugins/Geant4TCUserParticleHandler.cpp +++ b/DDG4/plugins/Geant4TCUserParticleHandler.cpp @@ -12,20 +12,14 @@ // Framework include files #include "DDG4/Geant4UserParticleHandler.h" - -/* - * DD4hep namespace declaration - */ +/// Namespace for the AIDA detector description toolkit namespace DD4hep { - /* - * Simulation namespace declaration - */ + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace Simulation { + /// Rejects to keep particles, which are created outside a tracking cylinder. /** Geant4TCUserParticleHandler - * - * Rejects to keep particles, which are created outside a tracking cylinder. * * TC stands for TrackingCylinder ;-) * diff --git a/DDG4/plugins/Geant4XMLSetup.cpp b/DDG4/plugins/Geant4XMLSetup.cpp index b85a2c3c8..25244b52b 100644 --- a/DDG4/plugins/Geant4XMLSetup.cpp +++ b/DDG4/plugins/Geant4XMLSetup.cpp @@ -7,118 +7,132 @@ // //==================================================================== // Framework include files -#include "DD4hep/Handle.h" +#include "DD4hep/LCDD.h" #include "DD4hep/Printout.h" -#include "XML/Conversions.h" -#include "XML/XMLElements.h" #include "DD4hep/DetFactoryHelper.h" -#include "DDG4/Factories.h" -#include "DDG4/Geant4Converter.h" +#include "XML/Conversions.h" #include "DDG4/Geant4Config.h" -using namespace std; -using namespace DD4hep; -using namespace DD4hep::Simulation; -typedef DD4hep::Geometry::LCDD lcdd_t; +/// Namespace for the AIDA detector description toolkit +namespace DD4hep { -namespace DD4hep { - - struct XMLSetup; - struct ActionSequence; + // Forward declarations + class ActionSequence; + using namespace std; using namespace DD4hep::Simulation; using namespace DD4hep::Simulation::Setup; - template <typename TYPE, typename PTR> TYPE* _action(PTR* in) { - return dynamic_cast<TYPE*>(in); - } - template <typename T> static void installMessenger(const T& handle) { - handle->installMessengers(); - } + typedef DD4hep::Geometry::LCDD lcdd_t; + typedef DD4hep::Geometry::DetElement DetElement; + + /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit + namespace Simulation { + + // Forward declarations + class XMLSetup; - template <typename T> static void _setAttributes(const T& handle, xml_h& e) { - XML::Handle_t props(e); - // Now we set the object properties - vector<XML::Attribute> attrs = props.attributes(); - for(vector<XML::Attribute>::iterator i=attrs.begin(); i!=attrs.end(); ++i) { - XML::Attribute a = *i; - handle[XML::_toString(props.attr_name(a))].str(props.attr<string>(a)); + /// Action cast + template <typename TYPE, typename PTR> TYPE* _action(PTR* in) { + return dynamic_cast<TYPE*>(in); } - } - template <typename T> static void _setProperties(const T& handle, xml_h& e) { - xml_comp_t action(e); - // Now we set the object properties - XML::Handle_t props = action.child(_Unicode(properties),false); - if ( props ) { - _setAttributes(handle, props); + + /// Install Geant4 mesenger to action objects + template <typename T> static void installMessenger(const T& handle) { + handle->installMessengers(); } - if ( action.hasAttr(_Unicode(Control)) ) { - handle["Control"].str(props.attr<string>(_Unicode(Control))); + + /// Set the properties of a Geant4 Action object from XML object attributes + template <typename T> static void _setAttributes(const T& handle, xml_h& e) { + XML::Handle_t props(e); + // Now we set the object properties + vector<XML::Attribute> attrs = props.attributes(); + for(vector<XML::Attribute>::iterator i=attrs.begin(); i!=attrs.end(); ++i) { + XML::Attribute a = *i; + handle[XML::_toString(props.attr_name(a))].str(props.attr<string>(a)); + } } - } - static Action _convertSensitive(LCDD& lcdd, xml_h e, const string& detector) { - xml_comp_t action(e); - Kernel& kernel = Kernel::access(lcdd); - TypeName tn = TypeName::split(action.attr<string>(_U(name))); - // Create the object using the factory method - Sensitive handle(kernel,action.attr<string>(_U(name)),detector); - _setProperties(Action(handle.get()),e); - for(xml_coll_t f(e,_Unicode(filter)); f; ++f) { - string nam = f.attr<string>(_U(name)); - Filter filter(kernel.globalFilter(nam,false)); - handle->adopt(filter); + /// Set the properties of a Geant4 Action object from <properties/> XML subsection + template <typename T> static void _setProperties(const T& handle, xml_h& e) { + xml_comp_t action(e); + // Now we set the object properties + XML::Handle_t props = action.child(_Unicode(properties),false); + if ( props ) { + _setAttributes(handle, props); + } + if ( action.hasAttr(_Unicode(Control)) ) { + handle["Control"].str(props.attr<string>(_Unicode(Control))); + } } - installMessenger(handle); - printout(INFO,"Geant4Setup","+++ Added sensitive element %s of type %s", - tn.second.c_str(),tn.first.c_str()); - return Action(handle); - } - static Action _convertAction(LCDD& lcdd, xml_h e) { - xml_comp_t action(e); - Kernel& kernel = Kernel::access(lcdd); - TypeName tn = TypeName::split(action.attr<string>(_U(name))); - // Create the object using the factory method - Action handle(kernel,action.attr<string>(_U(name))); - _setProperties(handle,e); - printout(INFO,"Geant4Setup","+++ Added action %s of type %s",tn.second.c_str(),tn.first.c_str()); - installMessenger(handle); + /// Create/Configure Geant4 sensitive action object from XML + static Action _convertSensitive(lcdd_t& lcdd, xml_h e, const string& detector) { + xml_comp_t action(e); + Kernel& kernel = Kernel::access(lcdd); + TypeName tn = TypeName::split(action.attr<string>(_U(name))); + // Create the object using the factory method + Sensitive handle(kernel,action.attr<string>(_U(name)),detector); + _setProperties(Action(handle.get()),e); + for(xml_coll_t f(e,_Unicode(filter)); f; ++f) { + string nam = f.attr<string>(_U(name)); + Filter filter(kernel.globalFilter(nam,false)); + handle->adopt(filter); + } + installMessenger(handle); + printout(INFO,"Geant4Setup","+++ Added sensitive element %s of type %s", + tn.second.c_str(),tn.first.c_str()); + return Action(handle); + } + + /// Create/Configure Action object from XML + static Action _convertAction(lcdd_t& lcdd, xml_h e) { + xml_comp_t action(e); + Kernel& kernel = Kernel::access(lcdd); + TypeName tn = TypeName::split(action.attr<string>(_U(name))); + // Create the object using the factory method + Action handle(kernel,action.attr<string>(_U(name))); + _setProperties(handle,e); + printout(INFO,"Geant4Setup","+++ Added action %s of type %s",tn.second.c_str(),tn.first.c_str()); + installMessenger(handle); - if ( action.hasChild(_Unicode(adopt)) ) { - xml_comp_t child = action.child(_Unicode(adopt)); - Geant4Action* user = kernel.globalAction(child.nameStr()); - Geant4ParticleHandler* ph = dynamic_cast<Geant4ParticleHandler*>(handle.get()); - if ( ph ) { - ph->adopt(user); + if ( action.hasChild(_Unicode(adopt)) ) { + xml_comp_t child = action.child(_Unicode(adopt)); + Geant4Action* user = kernel.globalAction(child.nameStr()); + Geant4ParticleHandler* ph = dynamic_cast<Geant4ParticleHandler*>(handle.get()); + if ( ph ) { + ph->adopt(user); + } } + return handle; } - return handle; - } - enum { SENSITIVE, ACTION, FILTER }; - Action _createAction(LCDD& lcdd, xml_h a, const std::string& seqType, int what) { - string nam = a.attr<string>(_U(name)); - TypeName typ = TypeName::split(nam); - Kernel& kernel = Kernel::access(lcdd); - Action action((what==FILTER) ? (Geant4Action*)kernel.globalFilter(typ.second,false) - : (what==ACTION) ? kernel.globalAction(typ.second,false) - /// : (what==FILTER) ? kernel.globalAction(typ.second,false) - : 0); - // Create the object using the factory method - if ( !action ) { - action = (what == SENSITIVE) ? Action(_convertSensitive(lcdd, a, seqType)) - : (what==ACTION) ? _convertAction(lcdd, a) - : (what==FILTER) ? _convertAction(lcdd, a) - : Action(); + enum { SENSITIVE, ACTION, FILTER }; + /// Create/Configure Action object from XML + Action _createAction(lcdd_t& lcdd, xml_h a, const string& seqType, int what) { + string nam = a.attr<string>(_U(name)); + TypeName typ = TypeName::split(nam); + Kernel& kernel = Kernel::access(lcdd); + Action action((what==FILTER) ? (Geant4Action*)kernel.globalFilter(typ.second,false) + : (what==ACTION) ? kernel.globalAction(typ.second,false) + /// : (what==FILTER) ? kernel.globalAction(typ.second,false) + : 0); + // Create the object using the factory method if ( !action ) { - throw runtime_error(format("Geant4ActionSequence","DDG4: The action '%s'" - " cannot be created. [Action-Missing]",nam.c_str())); + action = (what == SENSITIVE) ? Action(_convertSensitive(lcdd, a, seqType)) + : (what==ACTION) ? _convertAction(lcdd, a) + : (what==FILTER) ? _convertAction(lcdd, a) + : Action(); + if ( !action ) { + throw runtime_error(format("Geant4ActionSequence","DDG4: The action '%s'" + " cannot be created. [Action-Missing]",nam.c_str())); + } } + return action; } - return action; } - /** Convert Geant4Action objects + /// Convert Geant4Action objects + /** * <actions> * <action name="Geant4PostTrackingAction/PostTrackAction" * <properties @@ -132,8 +146,8 @@ namespace DD4hep { Kernel::access(lcdd).registerGlobalAction(a); } - /** Convert Sensitive detector filters - * + /// Convert Sensitive detector filters + /** * Note: Filters are Geant4Actions and - if global - may also receive properties! * * <filters> @@ -148,7 +162,8 @@ namespace DD4hep { Kernel::access(lcdd).registerGlobalFilter(a); } - /** Convert Geant4Phase objects + /// Convert Geant4Phase objects + /** * <phases> * <phase name="Geant4PostTrackingPhase/PostTrackPhase" * <properties @@ -245,7 +260,8 @@ namespace DD4hep { } } - /** Convert Action sequences into objects + /// Convert Action sequences into objects + /** * <sequences> * <sequence name="Geant4EventActionSequence/EventAction" * <member name="" type="Geant4TrackerEventMonitor/TrackerEvtAction"/> @@ -333,7 +349,8 @@ namespace DD4hep { } } - /** Convert PhysicsList objects + /// Create/Configure PhysicsList objects + /** * <physicslist> * <processes> * <particle name="'e-'"> @@ -361,7 +378,8 @@ namespace DD4hep { } } - /** Convert PhysicsList objects: Particle constructors + /// Create/Configure PhysicsList objects: Particle constructors + /** * <physicslist> * <particles> * <construct name="G4Electron"/> @@ -380,7 +398,8 @@ namespace DD4hep { printout(INFO,"Geant4Setup","+++ ParticleConstructor: Add Geant4 particle constructor '%s'",n.c_str()); } - /** Convert PhysicsList objects: Physics constructors + /// Create/Configure PhysicsList objects: Physics constructors + /** * <physicslist> * <physics> * <construct name="G4EmStandardPhysics"/> @@ -396,8 +415,8 @@ namespace DD4hep { printout(INFO,"Geant4Setup","+++ PhysicsConstructor: Add Geant4 physics constructor '%s'",n.c_str()); } - - /** Convert PhysicsList objects: Predefined Geant4 Physics lists + /// Create/Configure PhysicsList extension objects: Predefined Geant4 Physics lists + /** * <physicslist> * <list name="TQGSP_FTFP_BERT_95"/> * </physicslist> @@ -411,6 +430,7 @@ namespace DD4hep { printout(INFO,"Geant4Setup","+++ PhysicsListExtension: Set predefined Geant4 physics list to '%s'",ext.c_str()); } + /// Create/Configure PhysicsList objects: Predefined Geant4 Physics lists template <> void Converter<PhysicsList>::operator()(xml_h e) const { string name = e.attr<string>(_U(name)); Kernel& kernel = Kernel::access(lcdd); @@ -423,6 +443,7 @@ namespace DD4hep { kernel.physicsList().adopt(handle); } + /// Create/Configure Geant4Kernel objects template <> void Converter<Kernel>::operator()(xml_h e) const { Kernel& kernel = Kernel::access(lcdd); xml_comp_t k(e); @@ -432,6 +453,7 @@ namespace DD4hep { kernel.property("UI").str(k.attr<string>(_Unicode(UI))); } + /// Main entry point to configure Geant4 with XML template <> void Converter<XMLSetup>::operator()(xml_h seq) const { xml_elt_t compact(seq); // First execute the basic setup from the plugins module @@ -453,8 +475,11 @@ namespace DD4hep { xml_coll_t(compact,_Unicode(physicslist)).for_each(Converter<PhysicsList>(lcdd,param)); } } + +/// Factory method static long setup_Geant4(lcdd_t& lcdd, const xml_h& element) { - (Converter<XMLSetup>(lcdd))(element); + (DD4hep::Converter<DD4hep::Simulation::XMLSetup>(lcdd))(element); return 1; } +// Factory declaration DECLARE_XML_DOC_READER(geant4_setup,setup_Geant4) diff --git a/DDG4/src/Geant4Particle.cpp b/DDG4/src/Geant4Particle.cpp index 69b10132a..3dea8117b 100644 --- a/DDG4/src/Geant4Particle.cpp +++ b/DDG4/src/Geant4Particle.cpp @@ -211,7 +211,7 @@ void Geant4ParticleHandle::offset(int off) const { p->parents.insert((*i)+off); } -/// Output type 1:+++ <tag> 10 def:0xde4eaa8 [gamma , gamma] reason: 20 E:+1.017927e+03 #Par: 1/4 #Dau: 2 +/// Output type 1:+++ <tag> 10 def:0xde4eaa8 [gamma , gamma] reason: 20 E:+1.017927e+03 \#Par: 1/4 \#Dau: 2 void Geant4ParticleHandle::dump1(int level, const std::string& src, const char* tag) const { char text[256]; Geant4ParticleHandle p(*this); @@ -235,7 +235,7 @@ void Geant4ParticleHandle::dump1(int level, const std::string& src, const char* int(p->parents.size()),text); } -/// Output type 2:+++ <tag> 20 G4: 7 def:0xde4eaa8 [gamma , gamma] reason: 20 E:+3.304035e+01 in record:YES #Par: 1/18 #Dau: 0 +/// Output type 2:+++ <tag> 20 G4: 7 def:0xde4eaa8 [gamma , gamma] reason: 20 E:+3.304035e+01 in record:YES \#Par: 1/18 \#Dau: 0 void Geant4ParticleHandle::dump2(int level, const std::string& src, const char* tag, int g4id, bool inrec) const { char text[32]; Geant4ParticleHandle p(*this); @@ -255,7 +255,7 @@ void Geant4ParticleHandle::dump2(int level, const std::string& src, const char* int(p->daughters.size())); } -/// Output type 3:+++ <tag> ID: 0 e- status:00000014 type: 11 Vertex:(+0.00e+00,+0.00e+00,+0.00e+00) [mm] time: +0.00e+00 [ns] #Par: 0 #Dau: 4 +/// Output type 3:+++ <tag> ID: 0 e- status:00000014 type: 11 Vertex:(+0.00e+00,+0.00e+00,+0.00e+00) [mm] time: +0.00e+00 [ns] \#Par: 0 \#Dau: 4 void Geant4ParticleHandle::dump3(int level, const std::string& src, const char* tag) const { char text[256]; Geant4ParticleHandle p(*this); diff --git a/DDG4/src/Geant4TrackingPostAction.cpp b/DDG4/src/Geant4TrackingPostAction.cpp index 47f8eb7f4..9498cb32e 100644 --- a/DDG4/src/Geant4TrackingPostAction.cpp +++ b/DDG4/src/Geant4TrackingPostAction.cpp @@ -20,6 +20,12 @@ using namespace std; using namespace DD4hep::Simulation; +/// Helper class to manipulate strings +/** + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ struct FindString { const std::string& m_name; FindString(const std::string& n) diff --git a/doc/doxygen/DD4hepFigures.dox b/doc/doxygen/DD4hepFigures.dox index 7bcd78e37..1503ff959 100644 --- a/doc/doxygen/DD4hepFigures.dox +++ b/doc/doxygen/DD4hepFigures.dox @@ -1,5 +1,5 @@ -// Nothing serious +/// Nothing serious namespace DoxygenFigures { /// Dummy header to just include figures used in Doxygen to ensure the files are copied to the output diff --git a/doc/doxygen/DD4hepGroups.h b/doc/doxygen/DD4hepGroups.h new file mode 100644 index 000000000..69e9a910d --- /dev/null +++ b/doc/doxygen/DD4hepGroups.h @@ -0,0 +1,84 @@ + +/// Generic shared objects and functions for all DD4hep areas +/** + * \defgroup DD4HEP DD4hep classes and objects + * @{ + */ + +/**@}*/ + +/// DD4hep XML utilities +/** + * \defgroup DD4HEP_XML DD4hep::XML classes and objects + * Summary of all XML utilities present in the DD4hep toolkit. + * @{ + */ +/**@}*/ + + +/// DD4hep geometry components, classes and functions +/** + * \defgroup DD4HEP_GEOMETRY DD4hep::Geometry components, classes and objects + * @{ + */ + +/**@}*/ + +/// DD4hep Simulation components, classes and functions +/** + * \defgroup DD4HEP_SIMULATION DD4hep::Simulation components, classes and objects + * @{ + */ + +/**@}*/ + +/// DD4hep Alignment components, classes and functions +/** + * \defgroup DD4HEP_ALIGN DDAlign: DD4hep Detector geometry alignment components. + * @{ + */ + +/**@}*/ + +/// DD4hep Detector Conditions components, classes and functions +/** + * \defgroup DD4HEP_CONDITIONS DDCond: DD4hep Detector Conditions components, classes and functions + * @{ + */ + +/**@}*/ + +/// DD4hep Event display components, classes and functions +/** + * \defgroup DD4HEP_EVE DDEve: DD4hep event display components, classes and objects + * @{ + */ + +/**@}*/ + + +/// XercesC internal class. Not described here. +class ErrorHandler {}; + +/// XercesC internal class. Not described here. +class DOMErrorHandler {}; + +/// LCIO stuff +/** + * \defgroup LCIO LCIO components, classes and objects + * @{ + */ + +/// LCIO namespace. See http://lcio.desy.de \ingroup LCIO +namespace EVENT {} + +/// LCIO namespace. See http://lcio.desy.de \ingroup LCIO +namespace IMPL {} + +/// LCIO namespace. See http://lcio.desy.de \ingroup LCIO +namespace IO {} + +/// LCIO namespace. See http://lcio.desy.de \ingroup LCIO +namespace UTIL {} + +/**@}*/ diff --git a/doc/doxygen/DD4hepMainpage.dox b/doc/doxygen/DD4hepMainpage.dox index 8bf8500dc..24e16deeb 100644 --- a/doc/doxygen/DD4hepMainpage.dox +++ b/doc/doxygen/DD4hepMainpage.dox @@ -123,7 +123,6 @@ be adequate later in the detector life cycle and is likely to be replaced or refined when a more realistic detector with deviations from the ideal would be needed by the experiment. - In the compact description the detector is parametrized in minimalistic terms with user provided parameters in XML. XML is an open format, the DD4hep parsers do not validate against a fix schema @@ -133,7 +132,6 @@ supporting flexibility. Such a compact detector descriptions cannot be interpreted in a general manner, therefore so called $Detector$ $Constructors$ are needed. - <img src="../doc/LaTex/DD4hep_classes.png" height="400"/> <b>Class diagram with the main classes and their relations for the Generic Detector Description Model. The implementing @@ -159,7 +157,6 @@ compiler time, but the code is slightly more technical. The other is based on Python fragments, the code is more readable and compact but errors are only detected at execution time. -\noindent The compact description together with the detector constructors are sufficient to build the detector model and to visualize it. If during the lifetime of the experiment the detector model changes, the corresponding constructors will @@ -202,7 +199,6 @@ Applications may access the full experiment geometry and all connected data through a singleton object called $LCDD$, which provides management, bookkeeping and ownership to the model instances. -\noindent The geometry is implemented using the ROOT geometry classes, which are used directly without unnecessary interfaces to isolate the end-user from the actual ROOT based implementation. There is one exception: diff --git a/doc/doxygen/Geant4Classes.h b/doc/doxygen/Geant4Classes.h new file mode 100644 index 000000000..00c8cdfa9 --- /dev/null +++ b/doc/doxygen/Geant4Classes.h @@ -0,0 +1,60 @@ + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4AssemblyVolume {}; + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4MagneticField {}; + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4UImessenger {}; + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4UserEventAction {}; + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4UserRunAction {}; + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4UserStackingAction {}; + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4UserSteppingAction {}; + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4UserTrackingAction {}; + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4VHit {}; + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4VHitsCollection {}; + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4VSDFilter {}; + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4VSensitiveDetector {}; + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4VUserDetectorConstruction {}; + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4VUserPrimaryGeneratorAction {}; + +/// Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference +/** Class of the Geant4 toolkit. \see http://www-geant4.kek.jp/Reference */ +class G4VUserTrackInformation {}; diff --git a/doc/doxygen/ROOTClasses.h b/doc/doxygen/ROOTClasses.h new file mode 100644 index 000000000..717760732 --- /dev/null +++ b/doc/doxygen/ROOTClasses.h @@ -0,0 +1,23 @@ + +/// Class of the ROOT toolkit. See http://root.cern.ch/root/htmldoc/ClassIndex.html +/** \see http://root.cern.ch/root/htmldoc/ClassIndex.html */ +class TGeoConeSeg {}; + +/// Class of the ROOT toolkit. See http://root.cern.ch/root/htmldoc/ClassIndex.html +/** \see http://root.cern.ch/root/htmldoc/ClassIndex.html */ +class TGeoExtension {}; + +/// Class of the ROOT toolkit. See http://root.cern.ch/root/htmldoc/ClassIndex.html +/** \see http://root.cern.ch/root/htmldoc/ClassIndex.html */ +class TNamed {}; + +/// Class of the ROOT toolkit. See http://root.cern.ch/root/htmldoc/ClassIndex.html +/** \see http://root.cern.ch/root/htmldoc/ClassIndex.html */ +class TObject {}; + +/// ROOT utility namespace +namespace ROOT { + /// ROOT namespace for mathematical operations and corresponding classes. + namespace Math { + } +} diff --git a/doc/doxygen/TiXMLClasses.h b/doc/doxygen/TiXMLClasses.h new file mode 100644 index 000000000..3dfd50401 --- /dev/null +++ b/doc/doxygen/TiXMLClasses.h @@ -0,0 +1,60 @@ + +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlAttribute {}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlAttributeSet {}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlBase { + /// TinyXML class. See http://www.grinninglizard.com/tinyxml + /** See \see http://www.grinninglizard.com/tinyxml */ + class Entity {}; +}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlComment {}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlCursor {}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlDeclaration {}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlDocument {}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlElement {}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlHandle {}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlNode {}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlOutStream {}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlParsingData {}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlPrinter {}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlString { + /// TinyXML class. See http://www.grinninglizard.com/tinyxml + /** See \see http://www.grinninglizard.com/tinyxml */ + class Rep {}; +}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlText {}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlUnknown {}; +/// TinyXML class. See http://www.grinninglizard.com/tinyxml +/** See \see http://www.grinninglizard.com/tinyxml */ +class TiXmlVisitor {}; diff --git a/doc/release.notes b/doc/release.notes index bfa80c226..fe0fab277 100644 --- a/doc/release.notes +++ b/doc/release.notes @@ -4,6 +4,12 @@ DD4hep ---- Release Notes ================================= +2014/09/26 Markus Frank +----------------------- + - Quite some effort to improve the doxygen documentation. + The current revision is can be found at: + https://cern.ch/frankm/DD4hep/html/index.html + 2014/08/15 Markus Frank ----------------------- - DDG4: Impreoved LCIO handling for DDG4 -- GitLab