Analysis Software
Documentation for sPHENIX simulation software
 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 
6  PidInfo( id ),
7  _trackid( id ),
8  _track_state( nullptr ),
9  _pid_candidate_loglikelihood()
10 {}
11 
12 void
14 {
16 }
17 
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 */