Geant4
v4-10.4-release
메인 페이지
관련된 페이지
모듈
네임스페이스
클래스
파일들
파일 목록
파일 멤버
모두
클래스
네임스페이스들
파일들
함수
변수
타입정의
열거형 타입
열거형 멤버
Friends
매크로
그룹들
페이지들
examples
advanced
ChargeExchangeMC
src
CexmcTrackPointInfo.cc
이 파일의 문서화 페이지로 가기
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
* ============================================================================
28
*
29
* Filename: CexmcTrackPointInfo.cc
30
*
31
* Description: single track point information
32
*
33
* Version: 1.0
34
* Created: 28.12.2009 22:55:18
35
* Revision: none
36
* Compiler: gcc
37
*
38
* Author: Alexey Radkov (),
39
* Company: PNPI
40
*
41
* ============================================================================
42
*/
43
44
#include <iostream>
45
#include "
CexmcTrackPointInfo.hh
"
46
47
48
std::ostream &
operator<<
( std::ostream & out,
49
const
CexmcTrackPointInfo
& trackPointInfo )
50
{
51
if
( ! trackPointInfo.
IsValid
() )
52
return
out <<
"tp is not valid"
;
53
54
const
char
* trackTypeInfo =
"???"
;
55
56
switch
( trackPointInfo.
trackType
)
57
{
58
case
CexmcBeamParticleTrack
:
59
trackTypeInfo =
"bp"
;
60
break
;
61
case
CexmcOutputParticleTrack
:
62
trackTypeInfo =
"op"
;
63
break
;
64
case
CexmcNucleusParticleTrack
:
65
trackTypeInfo =
"np"
;
66
break
;
67
case
CexmcOutputParticleDecayProductTrack
:
68
trackTypeInfo =
"opdp"
;
69
break
;
70
default
:
71
break
;
72
}
73
74
std::ostream::fmtflags savedFlags( out.flags() );
75
std::streamsize
prec
( out.precision() );
76
77
out.precision( 4 );
78
79
out << trackPointInfo.
particle
->
GetParticleName
() <<
" ["
<<
80
trackPointInfo.
trackId
<<
","
<< trackTypeInfo <<
"] "
<<
81
G4BestUnit
( trackPointInfo.
momentumAmp
,
"Energy"
) <<
" : "
<<
82
G4BestUnit
( trackPointInfo.
positionLocal
,
"Length"
) <<
" ["
<<
83
trackPointInfo.
directionLocal
.
x
() <<
", "
<<
84
trackPointInfo.
directionLocal
.
y
() <<
", "
<<
85
trackPointInfo.
directionLocal
.
z
() <<
"]"
;
86
#ifdef CEXMC_DEBUG_TP
87
out << std::endl <<
" < in world: "
<<
88
G4BestUnit
( trackPointInfo.
positionWorld
,
"Length"
) <<
" ["
<<
89
trackPointInfo.
directionWorld
.
x
() <<
", "
<<
90
trackPointInfo.
directionWorld
.
y
() <<
", "
<<
91
trackPointInfo.
directionWorld
.
z
() <<
"] >"
;
92
#endif
93
94
out.precision(
prec
);
95
out.flags( savedFlags );
96
97
return
out;
98
}
99
CLHEP::prec
static const double prec
Definition:
RanecuEngine.cc:58
HepGeom::BasicVector3D::operator<<
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
Definition:
BasicVector3D.cc:107
CexmcTrackPointInfo::directionWorld
G4ThreeVector directionWorld
Definition:
CexmcTrackPointInfo.hh:92
CexmcNucleusParticleTrack
Definition:
CexmcCommon.hh:120
G4ParticleDefinition::GetParticleName
const G4String & GetParticleName() const
Definition:
G4ParticleDefinition.hh:121
CLHEP::Hep3Vector::z
double z() const
CexmcTrackPointInfo::trackId
G4int trackId
Definition:
CexmcTrackPointInfo.hh:98
CexmcOutputParticleTrack
Definition:
CexmcCommon.hh:119
CexmcTrackPointInfo::trackType
CexmcTrackType trackType
Definition:
CexmcTrackPointInfo.hh:100
CexmcTrackPointInfo
Definition:
CexmcTrackPointInfo.hh:56
CexmcTrackPointInfo::IsValid
G4bool IsValid(void) const
Definition:
CexmcTrackPointInfo.hh:77
CexmcTrackPointInfo::positionWorld
G4ThreeVector positionWorld
Definition:
CexmcTrackPointInfo.hh:88
CexmcOutputParticleDecayProductTrack
Definition:
CexmcCommon.hh:121
CexmcTrackPointInfo::momentumAmp
G4double momentumAmp
Definition:
CexmcTrackPointInfo.hh:94
G4BestUnit
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
Definition:
G4SteppingVerbose.cc:53
CexmcTrackPointInfo.hh
CexmcTrackPointInfo::positionLocal
G4ThreeVector positionLocal
Definition:
CexmcTrackPointInfo.hh:86
CLHEP::Hep3Vector::x
double x() const
CexmcTrackPointInfo::directionLocal
G4ThreeVector directionLocal
Definition:
CexmcTrackPointInfo.hh:90
CexmcBeamParticleTrack
Definition:
CexmcCommon.hh:118
CLHEP::Hep3Vector::y
double y() const
CexmcTrackPointInfo::particle
const G4ParticleDefinition * particle
Definition:
CexmcTrackPointInfo.hh:96
다음에 의해 생성됨 :
1.8.5