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
EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
BeastMagneticField
delphes_EIC
Doxygen_Assist
east
eic-smear
blob
master
cint
eicpy
include
scripts
src
erhic
hadronic
smear
Acceptance.cxx
Bremsstrahlung.cxx
Detector.cxx
Device.cxx
Distributor.cxx
EventDisFactory.cxx
EventSmear.cxx
FormulaString.cxx
NumSigmaPid.cxx
ParticleID.cxx
ParticleMCS.cxx
PerfectID.cxx
PlanarTracker.cxx
RadialTracker.cxx
Smear.cxx
SmearTree.cxx
Tracker.cxx
functions.cxx
gzstream.cc
EicRoot
eicsmear-jetexample
eicsmeardetectors
EicToyModel
estarlight
Fun4All-lmon
fun4all_coresoftware
fun4all_eic_qa
fun4all_eic_tutorials
fun4all_eicdetectors
fun4all_eicmacros
fun4all_g4jleic
fun4all_GenFit
fun4all_macros
fun4all_tutorials
g4exampledetector
g4lblvtx
online_distribution
PEPSI
doxygen_mainpage.h
File Members
External Links
•
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