Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CMFlashDifferencev1.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CMFlashDifferencev1.cc
1 
7 #include "CMFlashDifferencev1.h"
8 
9 #include <cmath>
10 #include <utility> // for swap
11 
12 void CMFlashDifferencev1::identify(std::ostream& os) const
13 {
14  os << "---CMFlashDifferencev1--------------------" << std::endl;
15 
16  os << "nclusters: " << m_nclusters << std::dec << std::endl;
17 
18  os << " truth Phi = " << m_Phi[0];
19  os << ", reco Phi = " << m_Phi[1] << ") rad";
20 
21  os << " truth R = " << m_R[0];
22  os << ", reco R = " << m_R[1] << ") cm";
23 
24  os << " truth Z = " << m_Z[0];
25  os << ", reco Z = " << m_Z[1] << ") cm";
26 
27  os << std::endl;
28  os << "-----------------------------------------------" << std::endl;
29 
30  return;
31 }
32 
34 {
35  if (m_nclusters == UINT_MAX) return 0;
36 
37  if(std::isnan(getTruthPhi())) return 0;
38  if(std::isnan(getTruthR())) return 0;
39  if(std::isnan(getTruthZ())) return 0;
40 
41  if(std::isnan(getRecoPhi())) return 0;
42  if(std::isnan(getRecoR())) return 0;
43  if(std::isnan(getRecoZ())) return 0;
44 
45 
46  return 1;
47 }
48 
50 {
51  // do nothing if copying onto oneself
52  if( this == &source ) return;
53 
54  // parent class method
56 
57  setNclusters( source.getNclusters() );
58 
59  setTruthPhi( source.getTruthPhi() );
60  setTruthR( source.getTruthR() );
61  setTruthZ( source.getTruthZ() );
62 
63  setRecoPhi( source.getRecoPhi() );
64  setRecoR( source.getRecoR() );
65  setRecoZ( source.getRecoZ() );
66 
67 }
68