|
|
|||
File indexing completed on 2026-04-04 07:52:13
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 B01Run.hh 0027 /// \brief Definition of the B01Run class 0028 0029 //--------------------------------------------------------------------- 0030 // (Purpose) 0031 // Example implementation for multi-functional-detector and 0032 // primitive scorer. 0033 // This B01Run class has collections which accumulate 0034 // a event information into a run information. 0035 // 0036 //--------------------------------------------------------------------- 0037 0038 #ifndef B01Run_h 0039 #define B01Run_h 1 0040 0041 #include "G4Event.hh" 0042 #include "G4Run.hh" 0043 #include "G4THitsMap.hh" 0044 0045 #include <vector> 0046 // 0047 class B01Run : public G4Run 0048 { 0049 public: 0050 // constructor and destructor. 0051 // vector of multifunctionaldetector name has to given to constructor. 0052 B01Run(const std::vector<G4String> mfdName); 0053 virtual ~B01Run(); 0054 0055 public: 0056 // virtual method from G4Run. 0057 // The method is overriden in this class for scoring. 0058 virtual void RecordEvent(const G4Event*); 0059 0060 // Access methods for scoring information. 0061 // - Number of HitsMap for this RUN. 0062 // This is equal to number of collections. 0063 G4int GetNumberOfHitsMap() const { return fRunMap.size(); } 0064 // - Get HitsMap of this RUN. 0065 // by sequential number, by multifucntional name and collection name, 0066 // and by collection name with full path. 0067 G4THitsMap<G4double>* GetHitsMap(G4int i) { return fRunMap[i]; } 0068 G4THitsMap<G4double>* GetHitsMap(const G4String& detName, const G4String& colName); 0069 G4THitsMap<G4double>* GetHitsMap(const G4String& fullName); 0070 // - Dump All HitsMap of this RUN. 0071 // This method calls G4THisMap::PrintAll() for individual HitsMap. 0072 void DumpAllScorer(); 0073 0074 virtual void Merge(const G4Run*); 0075 0076 private: 0077 std::vector<G4String> fCollName; 0078 std::vector<G4int> fCollID; 0079 std::vector<G4THitsMap<G4double>*> fRunMap; 0080 }; 0081 0082 // 0083 0084 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|