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
examples
extended
geometry
olap
include
OlapEventAction.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
//
28
//
29
//
30
// $Id$
31
//
32
//
33
// --------------------------------------------------------------
34
// OlapEventAction
35
//
36
// Author: Martin Liendl - Martin.Liendl@cern.ch
37
//
38
// --------------------------------------------------------------
39
//
40
#ifndef OlapEventAction_h
41
#define OlapEventAction_h
42
43
#include <vector>
44
#include "
G4UserEventAction.hh
"
45
#include "
globals.hh
"
46
#include "
G4ThreeVector.hh
"
47
#include "
G4NavigationHistory.hh
"
48
#include "
OlapSteppingAction.hh
"
49
50
class
OlapRunAction
;
51
class
OlapDetConstr
;
52
53
// class to collect detected overlaps
54
class
OlapInfo
55
{
56
public
:
57
OlapInfo
(
G4NavigationHistory
&
h1
,
58
G4NavigationHistory
&
h2
,
59
G4ThreeVector
& p1,
60
G4ThreeVector
& p2,
61
G4int
a
=0,
62
G4LogicalVolume
* original=0)
63
:
hist1
(h1),
hist2
(h2),
v1
(p1),
v2
(p2),
axis
(
a
),
64
info
(
""
),
probNot
(false),
originalMother
(original) {}
65
66
~OlapInfo
();
67
68
G4bool
operator==
(
const
OlapInfo
&);
69
70
G4NavigationHistory
hist1
,
hist2
;
71
G4ThreeVector
v1
,
v2
;
72
G4int
axis
;
73
// geantino ray travelling parallel to that axis detected the olap
74
std::vector<OlapStepInfo *>
stAB
;
75
std::vector<OlapStepInfo *>
stBA
;
76
G4String
info
;
77
G4bool
probNot
;
78
G4LogicalVolume
*
originalMother
;
79
};
80
81
std::ostream &
operator<<
(std::ostream& flux,
OlapInfo
& oi);
82
83
// ------------==============-------------==============----------------
84
85
class
OlapEventAction
:
public
G4UserEventAction
86
{
87
public
:
88
OlapEventAction
(
OlapRunAction
*);
89
~OlapEventAction
();
90
91
void
BeginOfEventAction
(
const
G4Event
* anEvent);
92
void
EndOfEventAction
(
const
G4Event
* anEvent);
93
94
// returns true, if new olverlap was detected!
95
G4bool
InsertOI
(
OlapInfo
*);
96
97
OlapRunAction
*
theRunAction
;
98
OlapDetConstr
*
theDet
;
99
std::vector<OlapStepInfo*>
ABSteps
;
100
std::vector<OlapStepInfo*>
BASteps
;
101
G4bool
dontDelete
;
102
};
103
104
#endif
Generated on Sat May 25 2013 14:32:27 for Geant4 by
1.8.4