diff --git a/DDCore/include/DD4hep/DD4hepRootPersistency.h b/DDCore/include/DD4hep/DD4hepRootPersistency.h index 6f4b1a37a03b43dd51c61a6cff424a0464ead812..4cf76f316300e7a34beea53d9c70b74911b72919 100644 --- a/DDCore/include/DD4hep/DD4hepRootPersistency.h +++ b/DDCore/include/DD4hep/DD4hepRootPersistency.h @@ -37,10 +37,12 @@ public: DD4hepRootPersistency() : TNamed() {} /// Default destructor virtual ~DD4hepRootPersistency() {} + /// Save an existing detector description in memory to a ROOT file static int save(dd4hep::Detector& description, const char* fname, const char* instance = "Geometry"); /// Load an detector description from a ROOT file to memory static int load(dd4hep::Detector& description, const char* fname, const char* instance = "Geometry"); + /// Access the geometry manager of this instance TGeoManager& manager() const { return *m_data->m_manager; } /// Return handle to material describing air diff --git a/DDCore/include/DD4hep/DetType.h b/DDCore/include/DD4hep/DetType.h index 1bcec9b58e1d789c4aa9ed766c1a83f25774c217..f050937172e334183a8a877273f6efb13f00090e 100644 --- a/DDCore/include/DD4hep/DetType.h +++ b/DDCore/include/DD4hep/DetType.h @@ -17,7 +17,8 @@ /// Namespace for the AIDA detector description toolkit namespace dd4hep { - /** Helper class for encoding sub detector types in a flag word. + /// Helper class for encoding sub detector types in a flag word. + /** * Example:<br> * DetType type( DetType::TRACKER | DetType::STRIP | DetType::BARREL ) ; <br> * type.is( DetType::ELECTROMAGNETIC ) ; // false <br> @@ -33,29 +34,28 @@ namespace dd4hep { public: - enum { - IGNORE = 0 , - TRACKER = 1 << 0, - CALORIMETER = 1 << 1, - CHERENKOV = 1 << 2, - ENDCAP = 1 << 3, - BARREL = 1 << 4, - FORWARD = 1 << 5, - VERTEX = 1 << 6, - STRIP = 1 << 7, - PIXEL = 1 << 8, - GASEOUS = 1 << 9, - WIRE = 1 << 10, + /// Different detector type flags + enum DetectorTypeEnumeration { + IGNORE = 0 , + TRACKER = 1 << 0, + CALORIMETER = 1 << 1, + CHERENKOV = 1 << 2, + ENDCAP = 1 << 3, + BARREL = 1 << 4, + FORWARD = 1 << 5, + VERTEX = 1 << 6, + STRIP = 1 << 7, + PIXEL = 1 << 8, + GASEOUS = 1 << 9, + WIRE = 1 << 10, ELECTROMAGNETIC = 1 << 11, - HADRONIC = 1 << 12, - MUON = 1 << 13, - SUPPORT = 1 << 14, - BEAMPIPE = 1 << 15, - COIL = 1 << 16, - AUXILIARY = 1 << 17 - - } ; - + HADRONIC = 1 << 12, + MUON = 1 << 13, + SUPPORT = 1 << 14, + BEAMPIPE = 1 << 15, + COIL = 1 << 16, + AUXILIARY = 1 << 17 + }; /// default c'tor DetType( ) : _type(0) {} diff --git a/DDCore/include/DD4hep/GeoHandler.h b/DDCore/include/DD4hep/GeoHandler.h index 911deec554cb77c2f696dda562c72677fbe1f256..4cba4d5efaf2ed99f8b6ec19ed0bdaf2eb95d1bf 100644 --- a/DDCore/include/DD4hep/GeoHandler.h +++ b/DDCore/include/DD4hep/GeoHandler.h @@ -59,7 +59,7 @@ namespace dd4hep { typedef std::set<LimitSet> LimitSetSet; typedef std::set<TNamed*> ObjectSet; #endif - /// Data container + /// Data container to store information obtained during the geometry scan /** * \author M.Frank * \version 1.0 diff --git a/DDCore/include/DD4hep/PluginTester.h b/DDCore/include/DD4hep/PluginTester.h index 6bb661f5ae1ebdef83b272141298c109f5cac21c..33f39d0859bcd5803a3a050a8238ce673ab2fa39 100644 --- a/DDCore/include/DD4hep/PluginTester.h +++ b/DDCore/include/DD4hep/PluginTester.h @@ -25,13 +25,17 @@ /// Namespace for the AIDA detector description toolkit namespace dd4hep { + + /// Helper class to ease testing of plugins: Effectively a container of object extensions. class PluginTester { public: /// Definition of the extension type typedef std::pair<const std::type_info*,std::string> key_type; + /// Mapped extension type typedef std::map<key_type, void*> Extensions; /// Extensions destructor type typedef void (*destruct_t)(void*); + /// Defintiion of the extension entry struct Entry { destruct_t destruct; diff --git a/DDEve/include/DDEve/Display.h b/DDEve/include/DDEve/Display.h index 3904268f66f6a5b0d3634aa92070f394d8c99e5b..39ae3715070e9fa5b5faad2f8b25691c19411bcb 100644 --- a/DDEve/include/DDEve/Display.h +++ b/DDEve/include/DDEve/Display.h @@ -100,10 +100,15 @@ namespace dd4hep { Topics m_geoTopics; /// Event data topics Topics m_eveTopics; + /// Container with configured event views Views m_eveViews; + /// Container with top level menues Menus m_menus; + /// Container with view configurations ViewConfigurations m_viewConfigs; + /// Container with calorimeter data display configurations DataConfigurations m_calodataConfigs; + /// Container with non-calorimeter data display configurations DataConfigurations m_collectionsConfigs; /// Container with calorimeter data (projections) Calodata m_calodata; diff --git a/DDEve/include/DDEve/DisplayConfiguration.h b/DDEve/include/DDEve/DisplayConfiguration.h index 177b20ef5ff8d81de4ef801a038aa55ab034b13b..0dd485a815c6ab26948faf0cd4ea69764c289b04 100644 --- a/DDEve/include/DDEve/DisplayConfiguration.h +++ b/DDEve/include/DDEve/DisplayConfiguration.h @@ -41,6 +41,7 @@ namespace dd4hep { protected: Display* m_display; public: + enum { NO_DATA = 0, CALODATA = 1<<1, DETELEMENT = 1<<2, @@ -90,6 +91,7 @@ namespace dd4hep { /// Container with full display configuration class Config { public: + /// Union to store specific data. Discriminator is Config::type union Values { double vals[20]; Defaults defaults; diff --git a/DDG4/plugins/Geant4EventReaderGuineaPig.cpp b/DDG4/plugins/Geant4EventReaderGuineaPig.cpp index fea7aa2f1ea813553249ef991cc848401bf10e46..b81c0ba660ea0d7593c2926c62299d3dc0060b31 100644 --- a/DDG4/plugins/Geant4EventReaderGuineaPig.cpp +++ b/DDG4/plugins/Geant4EventReaderGuineaPig.cpp @@ -23,6 +23,7 @@ namespace dd4hep { /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace sim { + /// Reader for ascii files with e+e- pairs created from GuineaPig. /** * Reader for ascii files with e+e- pairs created from GuineaPig. * Will read complete the file into one event - unless skip N events is diff --git a/DDG4/plugins/Geant4EventSeed.h b/DDG4/plugins/Geant4EventSeed.h index 0114affedc9dbcd03913b2e8bb51cb3529fcafff..67dab26da86909a9e6741d4343c28439b624a8b9 100644 --- a/DDG4/plugins/Geant4EventSeed.h +++ b/DDG4/plugins/Geant4EventSeed.h @@ -22,7 +22,6 @@ namespace dd4hep { /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit namespace sim { - /// Plugin class to set the event seed for each event /** * \addtogroup Geant4RunActions * @{ @@ -38,6 +37,7 @@ namespace dd4hep { * \ingroup DD4HEP_SIMULATION * @} */ + /// Plugin class to set the event seed for each event class Geant4EventSeed: public Geant4RunAction { protected: diff --git a/DDG4/plugins/Geant4SDActions.cpp b/DDG4/plugins/Geant4SDActions.cpp index 8b637442d43d896d4adbf0286e79a0a29936c5a6..2bc1c08837696267af45e2ff51b007715c3e80ae 100644 --- a/DDG4/plugins/Geant4SDActions.cpp +++ b/DDG4/plugins/Geant4SDActions.cpp @@ -154,7 +154,6 @@ namespace dd4hep { // Geant4SensitiveAction<OpticalCalorimeter> // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - /// Helper class to define properties of optical calorimeters. UNTESTED /** * \author M.Frank * \version 1.0 @@ -168,6 +167,7 @@ namespace dd4hep { * * @} */ + /// Helper class to define properties of optical calorimeters. UNTESTED struct Geant4OpticalCalorimeter {}; /// Define collections created by this sensitivie action object @@ -217,7 +217,6 @@ namespace dd4hep { // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - /// Class to implement the standard sensitive detector for scintillator calorimeters /* \addtogroup Geant4SDActionPlugin * * @{ @@ -228,6 +227,7 @@ namespace dd4hep { * * @} */ + /// Class to implement the standard sensitive detector for scintillator calorimeters struct Geant4ScintillatorCalorimeter {}; /// Define collections created by this sensitivie action object @@ -284,15 +284,7 @@ namespace dd4hep { } typedef Geant4SensitiveAction<Geant4ScintillatorCalorimeter> Geant4ScintillatorCalorimeterAction; - /// Geant4 sensitive detector combining all deposits of one G4Track within one sensitive element. /** - * Geant4SensitiveAction<TrackerCombine> - * - * - * \author M.Frank - * \version 1.0 - * \ingroup DD4HEP_SIMULATION - * * * \addtogroup Geant4SDActionPlugin * @{ @@ -305,6 +297,15 @@ namespace dd4hep { * * @} */ + /// Geant4 sensitive detector combining all deposits of one G4Track within one sensitive element. + /** + * Geant4SensitiveAction<TrackerCombine> + * + * + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ struct TrackerCombine { Geant4Tracker::Hit pre, post; Position mean_pos; diff --git a/DDG4/plugins/Geant4TrackerWeightedSD.cpp b/DDG4/plugins/Geant4TrackerWeightedSD.cpp index 5edc5b2be12da5b77227d7fffb894ceccaa21ef0..93c5a62a4289d833bdc6cb096ac426cc76b55f18 100644 --- a/DDG4/plugins/Geant4TrackerWeightedSD.cpp +++ b/DDG4/plugins/Geant4TrackerWeightedSD.cpp @@ -34,15 +34,7 @@ namespace dd4hep { using namespace detail; - /// Geant4 sensitive detector combining all deposits of one G4Track within one sensitive element. /** - * Geant4SensitiveAction<TrackerWeighted> - * - * - * \author M.Frank - * \version 1.0 - * \ingroup DD4HEP_SIMULATION - * * \addtogroup Geant4SDActionPlugin * * @{ @@ -62,6 +54,15 @@ namespace dd4hep { * * @} */ + /// Geant4 sensitive detector combining all deposits of one G4Track within one sensitive element. + /** + * Geant4SensitiveAction<TrackerWeighted> + * + * + * \author M.Frank + * \version 1.0 + * \ingroup DD4HEP_SIMULATION + */ struct TrackerWeighted { /// Enumeration to define the calculation of the position of the energy deposit diff --git a/doc/LaTex/DDCond-ConditionsSlice.png b/doc/LaTex/DDCond-ConditionsSlice.png new file mode 100644 index 0000000000000000000000000000000000000000..6551dcc6a20f797c1cdbf0236d62398b62f81349 Binary files /dev/null and b/doc/LaTex/DDCond-ConditionsSlice.png differ diff --git a/doc/LaTex/DDConditionsManual.pdf b/doc/LaTex/DDConditionsManual.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7e7faf9535de9d1d74501d633bd7a6340e913a73 Binary files /dev/null and b/doc/LaTex/DDConditionsManual.pdf differ diff --git a/doc/LaTex/DDConditionsManual.tex b/doc/LaTex/DDConditionsManual.tex index 97129c57480bce7952e0b3e37d964f186c2635fa..1258bae142f59111b442382d66bbe2b0a8948edd 100644 --- a/doc/LaTex/DDConditionsManual.tex +++ b/doc/LaTex/DDConditionsManual.tex @@ -177,9 +177,12 @@ recorded at a specific time. Each of the individual conditions of the slice has a certain interval of validity, hence the validity of the entire slice is defined as the intersection of these validities. As a corollary, the slice may be valid for more than one event as long as the -event's time stamp is within this intersection. +event's time stamp is within this intersection. To maximize the flexibility, +and to allow users to implement private slice implementations, slices have +a common interface, the $ConditionsMap$ (See section~\ref{subsec:ddcond-conditionsmap}). +For most practical purposes and to share tools between slice implementations, +this interface is sufficient. -\newpage %============================================================================= \section{Generic Concepts and Design} \label{sec:ddcond-design-concepts} @@ -235,7 +238,7 @@ A conditions objects serves two purposes: For completeness we include here the basic data access methods of the conditions class\\ (see \detdesc{classdd4hep_1_1_condition.html}{DD4hep/Conditions.h}): -\vspace{-0.4cm} + \begin{unnumberedcode} class Condition: public Handle<detail::ConditionObject> { /** Interval of validity */ @@ -313,7 +316,8 @@ This is an example how to access already bound data: %============================================================================= \noindent -The $ConditionsMap$ interface defines the lowest common denominator to +The $ConditionsMap$ interface (see +defines the lowest common denominator to allow tools or clients to interact with conditions of a given slice. This interface defines the interaction of clients with a conditions slice. These interactions cover both the data access and the data management @@ -370,13 +374,31 @@ STL maps. The lookup key is constructed out of two elements: \end{itemize} An efficient implementation of a longword key would consist of the tuple: $$ -[ hash32(conditions-name) , hash32(det-element->path()) ], +[ hash32(conditions\ name) , hash32(det-element\ path) ], $$ which resembles to an ordered sequence of conditions according to their detector element. A special implementation, which implements this user interface is the $ConditionsSlice$ implemented in the \DDC package (See section \ref{subsec:ddcond-conditions-store} for details). +%============================================================================= +\subsection{Common Conditions Tools} +\label{subsec:ddcond-conditions-tools} +%============================================================================= + +\noindent +\begin{itemize} +\item \bold{ConditionsPrinter} A tool to print conditions by scanning conditions for a + single $DetElement$ or the entire sub-tree. See + \detdesc{classdd4hep_1_1cond_1_1_conditions_printer.html}{DDCore/ConditionsPrinter.h} + for details). +\item \bold{ConditionsProcessor} A wrapper to support condition functors implementing + the default callback: + $$ + int\ operator()\ (Condition\ consition); + $$ + The return value may be used to e.g. collect counters. +\end{itemize} \newpage %============================================================================= @@ -452,7 +474,9 @@ these fairly straight forward using a suited approach. \noindent As defined in section~\ref{subsec:ddcond-conditions-slices}, the conditions slice is the main entity to project conditions suitable to process a given particle -collision (see \detdesc{classdd4hep_1_1cond_1_1_conditions_content.html}{DDCond/ConditionsContent.h} for details). +collision (see \detdesc{classdd4hep_1_1cond_1_1_conditions_content.html}{DDCond/ConditionsContent.h} +for details). Figure~\ref{fig:ddcond-slice-definition} shows the data content of a +conditions slice. As shown also in Figure~\ref{fig:ddcond-slice-usage}, there are several steps to be performed before a conditions slice is ready to be used: \begin{enumerate}\itemcompact @@ -463,15 +487,26 @@ several steps to be performed before a conditions slice is ready to be used: \item Using the conditions data slice. \end{enumerate} +%============================================================================= +\begin{figure}[h] + \begin{center}\includegraphics[width=12cm] {DDCond-ConditionsSlice.png} + \caption{The data content of a $ConditionsSlice$ containing the + desired content ($ConditionsContent$), the pool to access the + conditions data by key ($UserPool$) and optional containers + showing the status of partial or unsuccessful load and prepare operations.} + \label{fig:ddcond-slice-usage} + \end{center} +\end{figure} + \noindent -The $ConditionsContent$ (see \detdesc{classdd4hep_1_1cond_1_1_conditions_slice.html}{DDCond/ConditionsSlice.h} for details) -is a simple object, which contains load addresses +The $ConditionsContent$ +(see \detdesc{classdd4hep_1_1cond_1_1_conditions_slice.html}{DDCond/ConditionsSlice.h} +for details) is a simple object, which contains load addresses to identify persistent conditions within the database/persistent schema used and a set of dependency rules to compute the corresponding derived conditions. - %============================================================================= -\begin{figure}[h] +\begin{figure}[t] \begin{center}\includegraphics[width=15cm] {DDCond-ConditionsAccess.png} \caption{The interaction of a user with the conditions data store using the $ConditionsSlice$ and the @@ -481,7 +516,6 @@ used and a set of dependency rules to compute the corresponding derived conditio \label{fig:ddcond-slice-usage} \end{center} \end{figure} -\vspace{-0.5cm} \noindent The $ConditionsSlice$ holds a consistent set of conditions valid for a given diff --git a/doc/doxygen/Geant4Classes.h b/doc/doxygen/Geant4Classes.h index db812ad0e4ee1eb09318166251230f8df2d2fc53..fe1da4393aac3129c06ce1fb2d8ce42739d16753 100644 --- a/doc/doxygen/Geant4Classes.h +++ b/doc/doxygen/Geant4Classes.h @@ -51,6 +51,10 @@ class G4VSDFilter {}; /** 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 G4VUserActionInitialization {}; + /// 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 {};