Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
event
include
G4CellScorerStore.hh
Go to the documentation of this file.
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
//
27
// $Id$
28
//
29
// ----------------------------------------------------------------------
30
// Class G4CellScorerStore
31
//
32
// Class description:
33
//
34
// This class stores pointers to G4CellScorer. Objects of G4CellScorer for
35
// each cell may be created the first time a cell is hit: therefore
36
// SetAutoScorerCreate() has to be called before the run starts.
37
// Alternative the store may be filled with pointers to G4CellScorer
38
// before the run. In this case only the cells for which a G4CellScorer
39
// exists are scored.
40
//
41
42
// Author: Michael Dressel (Michael.Dressel@cern.ch)
43
// ----------------------------------------------------------------------
44
45
#ifndef G4CellScorerStore_hh
46
#define G4CellScorerStore_hh G4CellScorerStore_hh
47
48
#include <map>
49
#include "
G4GeometryCell.hh
"
50
51
#include "
globals.hh
"
52
#include "
G4VCellScorerStore.hh
"
53
#include "
G4GeometryCellComp.hh
"
54
55
class
G4CellScorer
;
56
57
typedef
std::map<G4GeometryCell, G4CellScorer *, G4GeometryCellComp>
G4MapGeometryCellCellScorer
;
58
59
class
G4CellScorerStore
:
public
G4VCellScorerStore
{
60
public
:
// with description
61
62
G4CellScorerStore
();
63
64
virtual
~G4CellScorerStore
();
65
66
virtual
G4VCellScorer
*
GetCellScore
(
const
G4GeometryCell
&gCell);
67
// return the current cell scorer
68
69
void
SetAutoScorerCreate
();
70
// if this function is called cell scorers will be created
71
// automatically for a cell the first time a track hits the cell
72
73
G4CellScorer
*
AddCellScorer
(
const
G4GeometryCell
&gCell);
74
// add a G4CellScorer for the given cell, needed if
75
// SetAutoScorerCreate is not called. This way the user
76
// may specify to score only for the given cells.
77
78
79
G4CellScorer
*
AddCellScorer
(
G4VPhysicalVolume
&vol,
G4int
repnum = 0);
80
// same functionallity as above only that the cell is specified
81
// by the physical volume and a replica number
82
83
84
const
G4MapGeometryCellCellScorer
&
GetMapGeometryCellCellScorer
()
const
;
85
// return the map of GeometryCell to the G4CellScorer
86
87
void
DeleteAllScorers
();
88
89
private
:
90
G4MapGeometryCellCellScorer
fMapGeometryCellCellScorer;
91
G4bool
fAutoCreate;
92
};
93
94
#endif
Generated on Sat May 25 2013 14:33:05 for Geant4 by
1.8.4