Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CMFlashClusterv1.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CMFlashClusterv1.cc
1 
7 #include "CMFlashClusterv1.h"
8 
9 #include <cmath>
10 #include <utility> // for swap
11 
12 void CMFlashClusterv1::identify(std::ostream& os) const
13 {
14  os << "---CMFlashClusterv1--------------------" << std::endl;
15 
16  os << " (x,y,z) = (" << m_pos[0];
17  os << ", " << m_pos[1] << ", ";
18  os << m_pos[2] << ") cm";
19 
20  os << " adc = " << getAdc() << std::endl;
21 
22  os << std::endl;
23  os << "-----------------------------------------------" << std::endl;
24 
25  return;
26 }
27 
29 {
30  if(std::isnan(getX())) return 0;
31  if(std::isnan(getY())) return 0;
32  if(std::isnan(getZ())) return 0;
33 
34  if (m_adc == 0xFFFFFFFF) return 0;
35 
36  return 1;
37 }
38 
40 {
41  // do nothing if copying onto oneself
42  if( this == &source ) return;
43 
44  // parent class method
45  CMFlashCluster::CopyFrom( source );
46 
47  setX( source.getX() );
48  setY( source.getY() );
49  setZ( source.getZ() );
50  setAdc( source.getAdc() );
51 
52 }
53