EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
NumSigmaPid.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file NumSigmaPid.cxx
1
#include "
eicsmear/smear/NumSigmaPid.h
"
2
3
namespace
Smear {
4
5
// -----------------------------------------------------------
6
NumSigmaPid::NumSigmaPid
(){}
7
8
// -----------------------------------------------------------
9
void
NumSigmaPid::Smear
(
const
erhic::VirtualParticle
& prt,
10
ParticleMCS
& prtOut) {
11
auto
p
= prt.
GetP
();
12
auto
eta
= prt.
GetEta
();
13
// std::cout << "prt is at eta = " << eta << " p= " << p << std::endl;
14
if
(
ThePidObject
->valid(
eta
,
p
) ){
15
// std::cout << "--> prt is valid at eta = " << eta << " p= " << p << std::endl;
16
prtOut.
SetNumSigma
(
ThePidObject
->numSigma(
eta
,
p
,
EnumType
) );
17
// std::cout << EnumType << " " << ThePidObject->numSigma(eta, p, EnumType) << " " << prtOut.GetNumSigma() << std::endl;
18
}
19
}
20
21
// -----------------------------------------------------------
22
NumSigmaPid
*
NumSigmaPid::Clone
(
const
char
*)
const
{
23
// TODO: Probably should add a proper copy ctor to hand over type etc.
24
return
new
NumSigmaPid
(*
this
);
25
}
26
27
// -----------------------------------------------------------
28
void
NumSigmaPid::SetNumSigmaType
(
const
int
i ){
29
switch
( i ){
30
case
0 :
31
NumSigmaType
= 0;
32
EnumType
=
PID::pi_k
;
33
break
;
34
case
1 :
35
NumSigmaType
= 1;
36
EnumType
=
PID::k_p
;
37
break
;
38
default
:
39
std::cerr <<
"Unrecognized NumSigmaType "
<< i << std::endl;
40
throw
;
41
break
;
42
}
43
44
}
45
46
// -----------------------------------------------------------
47
int
NumSigmaPid::GetNumSigmaType
( )
const
{
48
return
NumSigmaType
;
49
}
50
51
// -----------------------------------------------------------
52
bool
NumSigmaPid::valid
(
double
eta
,
double
p
)
const
{
53
return
ThePidObject
->valid( eta, p);
54
}
55
56
double
NumSigmaPid::maxP
(
double
eta
,
double
numSigma,
PID::type
PID
)
const
{
57
return
ThePidObject
->maxP (eta, numSigma, PID );
58
}
59
60
double
NumSigmaPid::minP
(
double
eta
,
double
numSigma,
PID::type
PID
)
const
{
61
return
ThePidObject
->minP (eta, numSigma, PID );
62
}
63
64
std::string
NumSigmaPid::name
()
const
{
65
return
ThePidObject
->name();
66
}
67
68
void
NumSigmaPid::description
()
const
{
69
ThePidObject
->description();
70
}
71
// -----------------------------------------------------------
72
73
74
}
eic-smear
blob
master
src
smear
NumSigmaPid.cxx
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:32
using
1.8.2 with
EIC GitHub integration