![]() |
|
|||
File indexing completed on 2025-02-23 09:22:43
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 /// \file runAndEvent/RE02/include/RE02Run.hh 0027 /// \brief Definition of the RE02Run class 0028 // 0029 // 0030 // 0031 0032 #ifndef RE02Run_h 0033 #define RE02Run_h 1 0034 0035 #include "G4Event.hh" 0036 #include "G4Run.hh" 0037 #include "G4THitsMap.hh" 0038 0039 #include <vector> 0040 0041 //--------------------------------------------------------------------- 0042 /// User run class 0043 /// 0044 /// (Description) 0045 /// An example implementation for the multi-functional-detector and 0046 /// primitive scorers. 0047 /// This RE02Run class has collections which accumulate event information 0048 /// into run information. 0049 /// 0050 /// - constructor 0051 /// gets HitsCollection names, collection IDs and HitsMaps of 0052 /// primitive scorers from the muti-functional detector 0053 /// 0054 /// - void RecordEvent(const G4Event*) 0055 /// accumulates HitsMaps over all events into a run HitsMap 0056 /// 0057 /// - G4int GetNumberOfHitsMap() const 0058 /// gets the size of the run HitsMap 0059 /// 0060 /// - G4THitsMap<G4double>* GetHitsMap(G4int i) 0061 /// gets a run HitsMap of the i-th primitive scorer 0062 /// 0063 /// - G4THitsMap<G4double>* GetHitsMap(const G4String& detName, 0064 /// const G4String& colName) 0065 /// gets a run HitsMap with the detName and the colName 0066 /// 0067 /// - G4THitsMap<G4double>* GetHitsMap(const G4String& fullName) 0068 /// gets a run HitsMap with the fullName 0069 /// 0070 /// - void DumpAllScorer() 0071 /// shows all HitsMap information of this run. 0072 /// This method calls G4THisMap::PrintAll() for individual HitsMap. 0073 //--------------------------------------------------------------------- 0074 class RE02Run : public G4Run 0075 { 0076 public: 0077 // constructor and destructor. 0078 // vector of multifunctionaldetector name has to given to constructor. 0079 RE02Run(const std::vector<G4String> mfdName); 0080 virtual ~RE02Run(); 0081 0082 public: 0083 // virtual method from G4Run. 0084 // The method is overriden in this class for scoring. 0085 virtual void RecordEvent(const G4Event*); 0086 virtual void Merge(const G4Run*); 0087 0088 // Access methods for scoring information. 0089 // - Number of HitsMap for this RUN. 0090 // This is equal to number of collections. 0091 G4int GetNumberOfHitsMap() const { return fRunMap.size(); } 0092 // - Get HitsMap of this RUN. 0093 // by sequential number, by multifucntional name and collection name, 0094 // and by collection name with full path. 0095 G4THitsMap<G4double>* GetHitsMap(G4int i) { return fRunMap[i]; } 0096 G4THitsMap<G4double>* GetHitsMap(const G4String& detName, const G4String& colName); 0097 G4THitsMap<G4double>* GetHitsMap(const G4String& fullName); 0098 // - Dump All HitsMap of this RUN. 0099 // This method calls G4THisMap::PrintAll() for individual HitsMap. 0100 void DumpAllScorer(); 0101 0102 private: 0103 std::vector<G4String> fCollName; 0104 std::vector<G4int> fCollID; 0105 std::vector<G4THitsMap<G4double>*> fRunMap; 0106 }; 0107 0108 // 0109 0110 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |