Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunereco
dunereco
TrackPID
products
CTPResult.cxx
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
/// \file CTPResult.cxx
3
/// \brief Class storing the result from the convolutional track PID
4
/// \author Leigh Whitehead - leigh.howard.whitehead@cern.ch
5
////////////////////////////////////////////////////////////////////////
6
7
#include <vector>
8
#include <iostream>
9
#include "
dunereco/TrackPID/products/CTPResult.h
"
10
11
namespace
ctp
12
{
13
14
15
CTPResult::CTPResult
(){
16
fMuonScore
= -1.;
17
fPionScore
= -1.;
18
fProtonScore
= -1.;
19
}
20
21
CTPResult::CTPResult
(
const
std::vector<float> &vals){
22
fMuonScore
= -1.;
23
fPionScore
= -1.;
24
fProtonScore
= -1.;
25
if
(vals.size() != 3){
26
std::cout <<
"CTPResult Error: there should be three input values"
<<
std::endl
;
27
}
28
else
{
29
fMuonScore
= vals.at(0);
30
fPionScore
= vals.at(1);
31
fProtonScore
= vals.at(2);
32
}
33
}
34
35
CTPResult::~CTPResult
(){
36
37
}
38
39
bool
CTPResult::IsValid
()
const
{
40
return
(
fMuonScore
> 0.) && (
fPionScore
> 0.) && (
fProtonScore
> 0.);
41
}
42
43
void
CTPResult::Print
()
const
{
44
std::cout <<
"==CTPResult: "
<<
fMuonScore
<<
", "
<<
fPionScore
<<
", "
<<
fProtonScore
<<
std::endl
;
45
}
46
47
}
48
CTPResult.h
Class storing the result from the convolutional track PID.
ctp::CTPResult::~CTPResult
~CTPResult()
Definition:
CTPResult.cxx:35
ctp::CTPResult::CTPResult
CTPResult()
Definition:
CTPResult.cxx:15
ctp
Definition:
CTPHelper.cxx:35
ctp::CTPResult::fPionScore
float fPionScore
Definition:
CTPResult.h:38
ctp::CTPResult::Print
void Print() const
Definition:
CTPResult.cxx:43
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
ctp::CTPResult::fProtonScore
float fProtonScore
Definition:
CTPResult.h:39
ctp::CTPResult::IsValid
bool IsValid() const
Definition:
CTPResult.cxx:39
ctp::CTPResult::fMuonScore
float fMuonScore
Definition:
CTPResult.h:37
Generated by
1.8.11