Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 /* 26 /* 27 * =========================================== 27 * ============================================================================= 28 * 28 * 29 * Filename: CexmcRun.hh 29 * Filename: CexmcRun.hh 30 * 30 * 31 * Description: run data (acceptances etc. 31 * Description: run data (acceptances etc.) 32 * 32 * 33 * Version: 1.0 33 * Version: 1.0 34 * Created: 19.12.2009 23:52:51 34 * Created: 19.12.2009 23:52:51 35 * Revision: none 35 * Revision: none 36 * Compiler: gcc 36 * Compiler: gcc 37 * 37 * 38 * Author: Alexey Radkov (), 38 * Author: Alexey Radkov (), 39 * Company: PNPI 39 * Company: PNPI 40 * 40 * 41 * =========================================== 41 * ============================================================================= 42 */ 42 */ 43 43 44 #ifndef CEXMC_RUN_HH 44 #ifndef CEXMC_RUN_HH 45 #define CEXMC_RUN_HH 45 #define CEXMC_RUN_HH 46 46 47 #include <map> 47 #include <map> 48 #include <G4Run.hh> 48 #include <G4Run.hh> 49 49 50 50 51 typedef std::map< G4int, G4int > Ce << 51 typedef std::map< G4int, G4int > CexmcNmbOfHitsInRanges; 52 << 53 typedef CexmcNmbOfHitsInRanges::value_type Ce << 54 52 55 53 56 class CexmcRun : public G4Run 54 class CexmcRun : public G4Run 57 { 55 { 58 public: 56 public: 59 CexmcRun(); 57 CexmcRun(); 60 58 61 public: 59 public: 62 void IncrementNmbOfHitsSampled( G4int 60 void IncrementNmbOfHitsSampled( G4int index ); 63 61 64 void IncrementNmbOfHitsSampledFull( G 62 void IncrementNmbOfHitsSampledFull( G4int index ); 65 63 66 void IncrementNmbOfHitsTriggeredRealR 64 void IncrementNmbOfHitsTriggeredRealRange( G4int index ); 67 65 68 void IncrementNmbOfHitsTriggeredRecRa 66 void IncrementNmbOfHitsTriggeredRecRange( G4int index ); 69 67 70 void IncrementNmbOfOrphanHits( G4int 68 void IncrementNmbOfOrphanHits( G4int index ); 71 69 72 void IncrementNmbOfFalseHitsTriggered 70 void IncrementNmbOfFalseHitsTriggeredEDT( void ); 73 71 74 void IncrementNmbOfFalseHitsTriggered 72 void IncrementNmbOfFalseHitsTriggeredRec( void ); 75 73 76 void IncrementNmbOfSavedEvents( void 74 void IncrementNmbOfSavedEvents( void ); 77 75 78 void IncrementNmbOfSavedFastEvents( v 76 void IncrementNmbOfSavedFastEvents( void ); 79 77 80 public: 78 public: 81 const CexmcNmbOfHitsInRanges & GetNmb 79 const CexmcNmbOfHitsInRanges & GetNmbOfHitsSampled( void ) const; 82 80 83 const CexmcNmbOfHitsInRanges & GetNmb 81 const CexmcNmbOfHitsInRanges & GetNmbOfHitsSampledFull( void ) const; 84 82 85 const CexmcNmbOfHitsInRanges & GetNmb 83 const CexmcNmbOfHitsInRanges & GetNmbOfHitsTriggeredRealRange( void ) 86 84 const; 87 85 88 const CexmcNmbOfHitsInRanges & GetNmb 86 const CexmcNmbOfHitsInRanges & GetNmbOfHitsTriggeredRecRange( void ) 89 87 const; 90 88 91 const CexmcNmbOfHitsInRanges & GetNmb 89 const CexmcNmbOfHitsInRanges & GetNmbOfOrphanHits( void ) const; 92 90 93 G4int GetNmbOfFalseHitsTriggeredEDT( 91 G4int GetNmbOfFalseHitsTriggeredEDT( void ) const; 94 92 95 G4int GetNmbOfFalseHitsTriggeredRec( 93 G4int GetNmbOfFalseHitsTriggeredRec( void ) const; 96 94 97 G4int GetNmbOfSavedEvents( void ) con 95 G4int GetNmbOfSavedEvents( void ) const; 98 96 99 G4int GetNmbOfSavedFastEvents( void ) 97 G4int GetNmbOfSavedFastEvents( void ) const; 100 98 101 private: 99 private: 102 CexmcNmbOfHitsInRanges nmbOfHitsSampl 100 CexmcNmbOfHitsInRanges nmbOfHitsSampled; 103 101 104 CexmcNmbOfHitsInRanges nmbOfHitsSampl 102 CexmcNmbOfHitsInRanges nmbOfHitsSampledFull; 105 103 106 CexmcNmbOfHitsInRanges nmbOfHitsTrigg 104 CexmcNmbOfHitsInRanges nmbOfHitsTriggeredRealRange; 107 105 108 CexmcNmbOfHitsInRanges nmbOfHitsTrigg 106 CexmcNmbOfHitsInRanges nmbOfHitsTriggeredRecRange; 109 107 110 CexmcNmbOfHitsInRanges nmbOfOrphanHit 108 CexmcNmbOfHitsInRanges nmbOfOrphanHits; 111 109 112 G4int nmbOfFalseHits 110 G4int nmbOfFalseHitsTriggeredEDT; 113 111 114 G4int nmbOfFalseHits 112 G4int nmbOfFalseHitsTriggeredRec; 115 113 116 G4int nmbOfSavedEven 114 G4int nmbOfSavedEvents; 117 115 118 G4int nmbOfSavedFast 116 G4int nmbOfSavedFastEvents; 119 }; 117 }; 120 118 121 119 122 inline const CexmcNmbOfHitsInRanges & 120 inline const CexmcNmbOfHitsInRanges & 123 CexmcRun::GetNmbOf 121 CexmcRun::GetNmbOfHitsSampled( void ) const 124 { 122 { 125 return nmbOfHitsSampled; 123 return nmbOfHitsSampled; 126 } 124 } 127 125 128 126 129 inline const CexmcNmbOfHitsInRanges & 127 inline const CexmcNmbOfHitsInRanges & 130 CexmcRun::GetNmbOf 128 CexmcRun::GetNmbOfHitsSampledFull( void ) const 131 { 129 { 132 return nmbOfHitsSampledFull; 130 return nmbOfHitsSampledFull; 133 } 131 } 134 132 135 133 136 inline const CexmcNmbOfHitsInRanges & 134 inline const CexmcNmbOfHitsInRanges & 137 CexmcRun::GetNmbOfHits 135 CexmcRun::GetNmbOfHitsTriggeredRealRange( void ) const 138 { 136 { 139 return nmbOfHitsTriggeredRealRange; 137 return nmbOfHitsTriggeredRealRange; 140 } 138 } 141 139 142 140 143 inline const CexmcNmbOfHitsInRanges & 141 inline const CexmcNmbOfHitsInRanges & 144 CexmcRun::GetNmbOfHits 142 CexmcRun::GetNmbOfHitsTriggeredRecRange( void ) const 145 { 143 { 146 return nmbOfHitsTriggeredRecRange; 144 return nmbOfHitsTriggeredRecRange; 147 } 145 } 148 146 149 147 150 inline const CexmcNmbOfHitsInRanges & 148 inline const CexmcNmbOfHitsInRanges & 151 CexmcRun::GetNmbOf 149 CexmcRun::GetNmbOfOrphanHits( void ) const 152 { 150 { 153 return nmbOfOrphanHits; 151 return nmbOfOrphanHits; 154 } 152 } 155 153 156 154 157 inline G4int CexmcRun::GetNmbOfFalseHitsTrigg 155 inline G4int CexmcRun::GetNmbOfFalseHitsTriggeredEDT( void ) const 158 { 156 { 159 return nmbOfFalseHitsTriggeredEDT; 157 return nmbOfFalseHitsTriggeredEDT; 160 } 158 } 161 159 162 160 163 inline G4int CexmcRun::GetNmbOfFalseHitsTrigg 161 inline G4int CexmcRun::GetNmbOfFalseHitsTriggeredRec( void ) const 164 { 162 { 165 return nmbOfFalseHitsTriggeredRec; 163 return nmbOfFalseHitsTriggeredRec; 166 } 164 } 167 165 168 166 169 inline G4int CexmcRun::GetNmbOfSavedEvents( v 167 inline G4int CexmcRun::GetNmbOfSavedEvents( void ) const 170 { 168 { 171 return nmbOfSavedEvents; 169 return nmbOfSavedEvents; 172 } 170 } 173 171 174 172 175 inline G4int CexmcRun::GetNmbOfSavedFastEvent 173 inline G4int CexmcRun::GetNmbOfSavedFastEvents( void ) const 176 { 174 { 177 return nmbOfSavedFastEvents; 175 return nmbOfSavedFastEvents; 178 } 176 } 179 177 180 178 181 #endif 179 #endif 182 180 183 181