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>
10 
11 namespace ctp
12 {
13 
14 
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 
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 
Class storing the result from the convolutional track PID.
float fPionScore
Definition: CTPResult.h:38
void Print() const
Definition: CTPResult.cxx:43
QTextStream & endl(QTextStream &s)
float fProtonScore
Definition: CTPResult.h:39
bool IsValid() const
Definition: CTPResult.cxx:39
float fMuonScore
Definition: CTPResult.h:37