00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // $Id$ 00028 // 00029 00030 #ifndef G4VHit_h 00031 #define G4VHit_h 1 00032 00033 #include "globals.hh" 00034 #include <vector> 00035 #include <map> 00036 00037 class G4AttDef; 00038 class G4AttValue; 00039 00040 // class description: 00041 // 00042 // This is the base class of hit object. The user should derive this 00043 // base class to make his/her own hit class. Two virtual method Draw() 00044 // and Print() can be implemented if the user wants these functionarities. 00045 // If a concrete hit class is used as a transient class, G4Allocator 00046 // must be used. 00047 00048 class G4VHit 00049 { 00050 00051 public: 00052 G4VHit(); 00053 virtual ~G4VHit(); 00054 00055 G4int operator==(const G4VHit &right) const; 00056 00057 virtual void Draw(); 00058 virtual void Print(); 00059 00060 virtual const std::map<G4String,G4AttDef>* GetAttDefs() const 00061 { return 0; } 00062 // If implemented by a derived class, returns a pointer to a map 00063 // of attribute definitions for the attribute values below. The 00064 // user must test the validity of this pointer. See 00065 // G4Trajectory for an example of a concrete implementation of 00066 // this method. 00067 virtual std::vector<G4AttValue>* CreateAttValues() const 00068 { return 0; } 00069 // If implemented by a derived class, returns a pointer to a 00070 // list of attribute values suitable, e.g., for picking. Each 00071 // must refer to an attribute definition in the above map; its 00072 // name is the key. The user must test the validity of this 00073 // pointer (it must be non-zero and conform to the G4AttDefs, 00074 // which may be checked with G4AttCheck) and delete the list 00075 // after use. See G4Trajectory for an example of a concrete 00076 // implementation of this method and 00077 // G4VTrajectory::ShowTrajectory for an example of its use. 00078 00079 }; 00080 00081 #endif