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