1. Class Structure
Tables 1.1 through 1.3 show the list of C++ source and header files currently included in the simulation. Every class or object in the program always has a header and source file in which the class declaration and implementation are separated from each other. This enhances readability and organization.
Not all of theses classes are currently used in the
\textit{ QweakSimG4} program. The dictionary files (xxxDict.h or xxxDict.cc) are automatically generated by [2] and should not be edited. The classes \textit{QweakSimMagnetFieldMapMessenger}, \textit{QweakSimMiniMagnetMessenger}, \textit{QweakSimSteppingVerbose}, and \textit{QweakSimTrajectory} are available but currently not used. Most of the \textit{QweakSimG4} classes are derived, i.e. inherit some of their properties, from a small number of GEANT4 classes and some of the base classes are ROOT extensions.
Figures 1.1 and 1.2 show the inheritance structure for the simulation classes. Please refer to the GEANT4 manual on the properties of the base classes. Figure 1.1 only shows the base classes, some of which are turned into ROOT objects. All of the ROOT-object \textit{QweakSimG4} base classes (shown in yellow) are event counters which are stored in a ROOT \textit{tree} object after the simulation has completed and must therfore be declared as ROOT objects.
Figure 1.3 shows the interdependence of the classes. That is, one ore more instances of a class object is used in some other class. This is different from class interdependence due to inheritance. Briefly, the geometries and fields volumes are specified in the class \textit{QweakSimDetectorConstruction} using the various detector and other volumes classes (in blue) that feed directly into the \textit{QweakSimDetectorConstruction}.
The sensitivity of the various volumes is specified in the
sensitive detector classes (\textit{QweakSimXXXSD}), which process or validate the hits for the volume. Valid hits are stored in the hit classes (\textit{QweakSimXXXHit}), and are processed and stored in the root data tree classes (in yellow), in the class \textit{QweakSimEventAction}. The primary particles are specified via the class \textit{QweakSimPrimaryGeneratorAction} and the physics to be included is specified in the class \textit{QweakSimPhysicsList}. The classes \textit{QweakSimSteppingAction}, \textit{QweakSimTrackingAction}, \textit{QweakSimTrackInformation}, and \textit{QweakSimUserInformation} provide access to and storage of track and step specific data that can be used to further collect and store data, as well as further validate the sensitive volume hits. Currently the class \textit{QweakSimCerenkovDetector} and the PMT sensitive volume \textit{QweakSimCerenkovDetector_PMTSD} are the only classes that make use of step by step data validation and collection. The information obtained in \textit{QweakSimSteppingAction} is passed to both the PMT sensitive volume and \textit{QweakSimEventAction} via the class \textit{QweakSimUSerInformation}.
Each class in the library has a reasonably well defined purpose and the class names are supposed to be indicative of this purpose. The details for each class are described in the following chapters, including their overall purpose and an explanation of their member functions and data members.
1.1 Table 1.1
Class List 1
|
Header
| Source
|
QweakSimAnalysis.hh
| QweakSimAnalysis.cc
|
QweakSimCerenkovDetector.hh
| QweakSimCerenkovDetector.cc
|
QweakSimCerenkov_DetectorHit.hh
| QweakSimCerenkov_DetectorHit.cc
|
QweakSimCerenkovDetectorMessenger.hh
| QweakSimCerenkovDetectorMessenger.cc
|
QweakSimCerenkovDetector_PMTHit.hh
| QweakSimCerenkovDetector_PMTHit.cc
|
QweakSimCerenkovDetector_PMTSD.hh
| QweakSimCerenkovDetector_PMTSD.cc
|
QweakSimCerenkov_DetectorSD.hh
| QweakSimCerenkov_DetectorSD.cc
|
QweakSimCollimator.hh
| QweakSimCollimator.cc
|
QweakSimCollimatorSupport.hh
| QweakSimCollimatorSupport.cc
|
QweakSimDetectorConstruction.hh
| QweakSimDetectorConstruction.cc
|
QweakSimDetectorMessenger.hh
| QweakSimDetectorMessenger.cc
|
QweakSimEventAction.hh
| QweakSimEventAction.cc
|
QweakSimG3Ntuple.hh
| QweakSimG3Ntuple.cc
|
QweakSimG3NtupleReader.hh
| QweakSimG3NtupleReader.cc
|
QweakSimGEM.hh
| QweakSimGEM.cc
|
QweakSimGEMMessenger.hh
| QweakSimGEMMessenger.cc
|
QweakSimGEM_WirePlaneHit.hh
| QweakSimGEM_WirePlaneHit.cc
|
QweakSimGEM_WirePlaneSD.hh
| QweakSimGEM_WirePlaneSD.cc
|
QweakSimGlobalMagnetField.hh
| QweakSimGlobalMagnetField.cc
|
QweakSimHDC.hh
| QweakSimHDC.cc
|
QweakSimHDCMessenger.hh
| QweakSimHDCMessenger.cc
|
QweakSimHDC_WirePlaneHit.hh
| QweakSimHDC_WirePlaneHit.cc
|
QweakSimHDC_WirePlaneSD.hh
| QweakSimHDC_WirePlaneSD.cc
|
QweakSimInputRootFile_EventReader.hh
| QweakSimInputRootFile_EventReader.cc
|
QweakSimMagnet_CoilParameterisation.hh
| QweakSimMagnet_CoilParameterisation.cc
|
QweakSimMagnetFieldMap.hh
| QweakSimMagnetFieldMap.cc
|
QweakSimMagnetFieldMapMessenger.hh
| QweakSimMagnetFieldMapMessenger.cc
|
1.2 Table 1.2
Class List 2
|
Header
| Source
|
QweakSimMagnet_MiniTorusCoilParameterisation.hh
| QweakSimMagnet_MiniTorusCoilParameterisation.cc
|
QweakSimMainMagnet.hh
| QweakSimMainMagnet.cc
|
QweakSimMaterial.hh
| QweakSimMaterial.cc
|
QweakSimMiniMagnet.hh
| QweakSimMiniMagnet.cc
|
QweakSimMiniMagnetMessenger.hh
| QweakSimMiniMagnetMessenger.cc
|
QweakSimPhysicsList.hh
| QweakSimPhysicsList.cc
|
QweakSimPhysicsListMessenger.hh
| QweakSimPhysicsListMessenger.cc
|
QweakSimPrimaryGeneratorAction.hh
| QweakSimPrimaryGeneratorAction.cc
|
QweakSimPrimaryGeneratorActionMessenger.hh
| QweakSimPrimaryGeneratorActionMessenger.cc
|
QweakSimRunAction.hh
| QweakSimRunAction.cc
|
QweakSimShieldingWall.hh
| QweakSimShieldingWall.cc
|
QweakSimShieldingWallMessenger.hh
| QweakSimShieldingWallMessenger.cc
|
QweakSimStackingAction.hh
| QweakSimStackingAction.cc
|
QweakSimSteppingAction.hh
| QweakSimSteppingAction.cc
|
QweakSimSteppingVerbose.hh
| QweakSimSteppingVerbose.cc
|
QweakSimTarget.hh
| QweakSimTarget.cc
|
QweakSimTargetMessenger.hh
| QweakSimTargetMessenger.cc
|
QweakSimTrackHistory.hh
| QweakSimTrackHistory.cc
|
QweakSimTrackInformation.hh
| QweakSimTrackInformation.cc
|
QweakSimTrackingAction.hh
| QweakSimTrackingAction.cc
|
QweakSimTrackingActionMessenger.hh
| QweakSimTrackingActionMessenger.cc
|
QweakSimTrajectory.hh
| QweakSimTrajectory.cc
|
QweakSimTriggerScintillator.hh
| QweakSimTriggerScintillator.cc
|
QweakSimTriggerScintillator_DetectorHit.hh
| QweakSimTriggerScintillator_DetectorHit.cc
|
QweakSimTriggerScintillator_DetectorSD.hh
| QweakSimTriggerScintillator_DetectorSD.cc
|
QweakSimTriggerScintillatorMessenger.hh
| QweakSimTriggerScintillatorMessenger.cc
|
QweakSimUserCerenkov_DetectorEvent.hh
| QweakSimUserCerenkov_DetectorEvent.cc
|
1.3 Table 1.3
Class List 3
|
Header
| Source
|
QweakSimUserCerenkov_MainEvent.hh
| QweakSimUserCerenkov_MainEvent.cc
|
QweakSimUserCerenkov_OctantEvent.hh
| QweakSimUserCerenkov_OctantEvent.cc
|
QweakSimUserCerenkov_PMTEvent.hh
| QweakSimUserCerenkov_PMTEvent.cc
|
QweakSimUserGEM_MainEvent.hh
| QweakSimUserGEM_MainEvent.cc
|
QweakSimUserGEM_SingleGEMEvent.hh
| QweakSimUserGEM_SingleGEMEvent.cc
|
QweakSimUserGEM_WirePlaneEvent.hh
| QweakSimUserGEM_WirePlaneEvent.cc
|
QweakSimUserHDC_MainEvent.hh
| QweakSimUserHDC_MainEvent.cc
|
QweakSimUserHDC_SingleHDCEvent.hh
| QweakSimUserHDC_SingleHDCEvent.cc
|
QweakSimUserHDC_WirePlaneEvent.hh
| QweakSimUserHDC_WirePlaneEvent.cc
|
QweakSimUserInformation.hh
| QweakSimUserInformation.cc
|
QweakSimUserMainEvent.hh
| QweakSimUserMainEvent.cc
|
QweakSimUserPrimaryEvent.hh
| QweakSimUserPrimaryEvent.cc
|
QweakSimUserTriggerScintillator_DetectorEvent.hh
| QweakSimUserTriggerScintillator_DetectorEvent.cc
|
QweakSimUserTriggerScintillator_MainEvent.hh
| QweakSimUserTriggerScintillator_MainEvent.cc
|
QweakSimUserVDC_Config.hh
| QweakSimUserVDC_Config.cc
|
QweakSimUserVDC_DriftCellEvent.hh
| QweakSimUserVDC_DriftCellEvent.cc
|
QweakSimUserVDC_MainEvent.hh
| QweakSimUserVDC_MainEvent.cc
|
QweakSimUserVDC_SingleVDCEvent.hh
| QweakSimUserVDC_SingleVDCEvent.cc
|
QweakSimUserVDC_WirePlaneEvent.hh
| QweakSimUserVDC_WirePlaneEvent.cc
|
QweakSimVDC.hh
| QweakSimVDC.cc
|
QweakSimVDC_DriftCellBackSD.hh
| QweakSimVDC_DriftCellBackSD.cc
|
QweakSimVDC_DriftCellFrontSD.hh
| QweakSimVDC_DriftCellFrontSD.cc
|
QweakSimVDC_DriftCellHit.hh
| QweakSimVDC_DriftCellHit.cc
|
QweakSimVDC_DriftCellParameterisation.hh
| QweakSimVDC_DriftCellParameterisation.cc
|
QweakSimVDCMessenger.hh
| QweakSimVDCMessenger.cc
|
QweakSimVDCRotator.hh
| QweakSimVDCRotator.cc
|
QweakSimVDC_WirePlaneHit.hh
| QweakSimVDC_WirePlaneHit.cc
|
QweakSimVDC_WirePlaneSD.hh
| QweakSimVDC_WirePlaneSD.cc
|
1.4 Figure 1.1
Attach:QweakSimClassTree04.gif Δ | Base classes within the \textit{QweakSimG4} hierarchy. The yellow boxes indicate classes that are turned into ROOT objects. They are base classes within the Qweak simulation framework. However, some of them are derived from the ROOT \textit{TObject} class. The blue boxes indicate regular non-ROOT (true) base classes, while the green boxes show the non-ROOT Qweak Simulation classes that are derived from Geant4 classes. The latter form the main interface to the simulation engine, prodividing it with the geometry, the physics, tracking and information about sensitive detectors as well as hit counting.
1.5 Figure 1.2
Attach:QweakSimClassTree01-small.gif Δ | QweakSim Class Inheritance, from Geant4.
1.6 Figure 1.3
Attach:QweakSimClassTree05.gif Δ | Class Dependence for the geometry construction within the simulation. Material properties are all specified in \textit{QweakSimMaterial} and the spatial structure and volume properties are specified in the other volume definition classes. The overal geometry, together with any volume dependent field specifications are assembled in \textit{QweakSimDetectorConstruction} and passed to the Geant4 run manager.