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
PidInfo_RICH_v1.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PidInfo_RICH_v1.cc
1
#include "
PidInfo_RICH_v1.h
"
2
3
using namespace
std;
4
5
PidInfo_RICH_v1::PidInfo_RICH_v1
(
const
int
id
):
6
PidInfo
( id ),
7
_trackid( id ),
8
_track_state( nullptr ),
9
_pid_candidate_loglikelihood()
10
{}
11
12
void
13
PidInfo_RICH_v1::Reset
()
14
{
15
_pid_candidate_loglikelihood
.clear();
16
}
17
18
float
PidInfo_RICH_v1::get_likelihood
(
const
PidInfo::PID_CANDIDATE
candidate)
19
{
20
std::map<PidInfo::PID_CANDIDATE,float>::const_iterator citer =
_pid_candidate_loglikelihood
.find(candidate);
21
if
(citer ==
_pid_candidate_loglikelihood
.end())
return
NAN;
22
return
citer->second;
23
}
24
25
/* //(for copy constructor:)
26
27
// copy over particle id probabilities
28
std::vector<PID_CANDIDATE> pid_candidates;
29
pid_candidates.push_back(SvtxTrack::ELECTRON);
30
pid_candidates.push_back(SvtxTrack::CHARGEDPION);
31
pid_candidates.push_back(SvtxTrack::CHARGEDKAON);
32
pid_candidates.push_back(SvtxTrack::PROTON);
33
34
_pid_candidate_loglikelihood.clear();
35
36
for (unsigned int i=0; i<pid_candidates.size(); ++i) {
37
if ( !isnan( track.get_pid_likelihood ( pid_candidates[i] ) ) )
38
set_pid_likelihood( pid_candidates[i], track.get_pid_likelihood( pid_candidates[i] ) );
39
}
40
*/
analysis
blob
master
ParticleID
RICHAnalysis
PidInfo_RICH_v1.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:54
using
1.8.2 with
sPHENIX GitHub integration