Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:50

0001 #include "BbcVertexv2.h"
0002 
0003 #include <cmath>
0004 
0005 BbcVertexv2::BbcVertexv2()
0006 {
0007   for (int i = 0; i < 2; i++)
0008   {
0009     _bbc_ns_npmt[i] = 0;
0010     _bbc_ns_q[i] = std::numeric_limits<float>::quiet_NaN();
0011     _bbc_ns_t[i] = std::numeric_limits<float>::quiet_NaN();
0012   }
0013 }
0014 
0015 void BbcVertexv2::identify(std::ostream& os) const
0016 {
0017   os << "---BbcVertexv2--------------------------------" << std::endl;
0018   os << "vertexid: " << get_id() << std::endl;
0019   os << " t = " << get_t() << " +/- " << get_t_err() << std::endl;
0020   os << " z =  " << get_z() << " +/- " << get_z_err() << std::endl;
0021   os << "-----------------------------------------------" << std::endl;
0022 
0023   return;
0024 }
0025 
0026 int BbcVertexv2::isValid() const
0027 {
0028   if (_id == 0xFFFFFFFF)
0029   {
0030     return 0;
0031   }
0032   if (std::isnan(_t))
0033   {
0034     return 0;
0035   }
0036   if (std::isnan(_t_err))
0037   {
0038     return 0;
0039   }
0040   if (std::isnan(_z))
0041   {
0042     return 0;
0043   }
0044   if (std::isnan(_z_err))
0045   {
0046     return 0;
0047   }
0048 
0049   return 1;
0050 }