![]() |
|
|||
File indexing completed on 2025-09-18 09:16:01
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // G4VHit 0027 // 0028 // Class description: 0029 // 0030 // This is the base class of hit object. The user should derive this 0031 // base class to make his/her own hit class. Two virtual method Draw() 0032 // and Print() can be implemented if the user wants these functionalities. 0033 // If a concrete hit class is used as a transient class, G4Allocator 0034 // must be used. 0035 // 0036 // Author: Makoto Asai 0037 // -------------------------------------------------------------------- 0038 #ifndef G4VHit_h 0039 #define G4VHit_h 1 0040 0041 #include "globals.hh" 0042 0043 #include <map> 0044 #include <vector> 0045 0046 class G4AttDef; 0047 class G4AttValue; 0048 0049 class G4VHit 0050 { 0051 public: 0052 0053 G4VHit() = default; 0054 virtual ~G4VHit() = default; 0055 0056 G4bool operator==(const G4VHit&) const { return false; } 0057 0058 virtual void Draw() {} 0059 virtual void Print() {} 0060 0061 // Returns pointer to map of attribute definitions for this hit 0062 // Caller is responsible for checking validity of returned pointer. 0063 // See `G4Trajectory` for a concrete implementation. 0064 virtual const std::map<G4String, G4AttDef>* GetAttDefs() const { return nullptr; } 0065 0066 // Returns pointer to list of attributes for this hit 0067 // Each attribute must correspond to a definition returned by `GetAffDefs`. 0068 // Caller is responsible for checking validity of returned pointer. 0069 // See `G4Trajectory` for a concrete implementation, and 0070 // `G4VTrajectory::ShowTrajectory` for an example of its use. 0071 virtual std::vector<G4AttValue>* CreateAttValues() const { return nullptr; } 0072 }; 0073 0074 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |