Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
KFMCVertex.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file KFMCVertex.h
1
/*
2
* This file is part of KFParticle package
3
* Copyright (C) 2007-2019 FIAS Frankfurt Institute for Advanced Studies
4
* 2007-2019 Goethe University of Frankfurt
5
* 2007-2019 Ivan Kisel <I.Kisel@compeng.uni-frankfurt.de>
6
* 2007-2019 Maksym Zyzak
7
*
8
* KFParticle is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation, either version 3 of the License, or
11
* (at your option) any later version.
12
*
13
* KFParticle is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20
*/
21
22
#ifndef KFMCVERTEX_H
23
#define KFMCVERTEX_H
24
25
#include <iostream>
26
#include <vector>
27
38
class
KFMCVertex
39
{
40
public
:
41
KFMCVertex
();
42
43
float
Par
(
int
i
)
const
{
return
fPar
[
i
]; }
44
45
float
X
()
const
{
return
fPar
[0]; }
46
float
Y
()
const
{
return
fPar
[1]; }
47
float
Z
()
const
{
return
fPar
[2]; }
48
49
const
float
*
GetPar
()
const
{
return
fPar
; }
50
51
void
SetPar
(
int
i
,
float
v
) {
fPar
[
i
] =
v
; }
52
53
void
SetX
(
float
v
) {
fPar
[0] =
v
; }
54
void
SetY
(
float
v
) {
fPar
[1] =
v
; }
55
void
SetZ
(
float
v
) {
fPar
[2] =
v
; }
56
57
int
NDaughterTracks
()
const
{
return
fDaughterTracks
.size(); }
58
int
NReconstructedDaughterTracks
()
const
{
return
fNReconstructedDaughters
; }
59
void
AddDaughterTrack
(
int
iTr ) {
fDaughterTracks
.push_back(iTr); }
60
int
DaughterTrack
(
int
iTr )
const
61
{
65
if
(iTr >=
NDaughterTracks
())
66
{
67
std::cout <<
"ERROR!!!! MC PV contains only "
<<
NDaughterTracks
() <<
" tracks"
<< std::endl;
68
return
-1;
69
}
70
return
fDaughterTracks
[iTr];
71
}
72
73
bool
IsMCReconstructable
()
const
{
return
fIsMCReconstructable
; }
74
bool
IsReconstructable
()
const
{
return
fIsReconstructable
; }
75
bool
IsReconstructed
()
const
{
return
fIsReconstructed
; }
76
77
void
SetReconstructable
() {
fIsReconstructable
= 1; }
78
void
SetUnReconstructable
() {
fIsReconstructable
= 0; }
79
80
void
SetMCReconstructable
() {
fIsMCReconstructable
= 1; }
81
void
SetMCUnReconstructable
() {
fIsMCReconstructable
= 0; }
82
83
void
SetReconstructed
() {
fIsReconstructed
= 1; }
84
void
SetUnReconstructed
() {
fIsReconstructed
= 0; }
85
86
void
SetNReconstructedDaughters
(
int
n
) {
fNReconstructedDaughters
=
n
; }
87
88
bool
IsTriggerPV
()
const
{
return
fIsTriggerPV
; }
89
void
SetTriggerPV
() {
fIsTriggerPV
= 1; }
90
91
friend
std::ostream&
operator<<
(std::ostream&
out
,
const
KFMCVertex
&
a
);
92
friend
std::istream&
operator>>
(std::istream&
in
,
KFMCVertex
&
a
);
93
94
protected
:
95
96
float
fPar
[3];
97
std::vector<int>
fDaughterTracks
;
98
bool
fIsReconstructable
;
99
bool
fIsMCReconstructable
;
100
bool
fIsReconstructed
;
101
int
fNReconstructedDaughters
;
102
bool
fIsTriggerPV
;
103
};
104
105
#endif
KFParticle
blob
master
KFParticlePerformance
KFMCVertex.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:26
using
1.8.2 with
sPHENIX GitHub integration