Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-10 07:50:34

0001 #pragma once
0002 
0003 #include "scuda.h"
0004 
0005 #include <sstream>
0006 #include <string>
0007 #include "G4ThreeVector.hh"
0008 
0009 
0010 struct U4ThreeVector
0011 {
0012     static void FromFloat3( G4ThreeVector& v, const float3& f ); 
0013     static std::string Desc(const G4ThreeVector& v ); 
0014 }; 
0015 
0016 inline void U4ThreeVector::FromFloat3(G4ThreeVector& v, const float3& f )
0017 {
0018     v.set(double(f.x), double(f.y), double(f.z)); 
0019 }
0020 
0021 inline std::string U4ThreeVector::Desc(const G4ThreeVector& v )
0022 {
0023     std::stringstream ss ; 
0024     ss 
0025        << "(" 
0026        << " " << std::setw(10) << std::fixed << std::setprecision(3) << v.x() 
0027        << " " << std::setw(10) << std::fixed << std::setprecision(3) << v.y() 
0028        << " " << std::setw(10) << std::fixed << std::setprecision(3) << v.z() 
0029        << ")"
0030        ;
0031     std::string s = ss.str(); 
0032     return s ; 
0033 }