Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:19

0001 /**
0002 
0003 ::
0004 
0005         .                            phi0=0.50
0006 
0007                                       Y
0008                                   .   -     
0009                               .       |         
0010                                       |    pp quadrant cutaway with pacmanpp
0011                            .          |           
0012                                       ^  (0,1,0) normal
0013                           .          /|\
0014                                       |             
0015         -X  0 -----------1------------2--->---------3---- phi1=2.0 --------- +X
0016                                       |  (1,0,0) dir 
0017          -150          -100           0            100
0018                                       |  
0019                            .          |          .
0020                                       |      
0021                               .       |       .
0022                                   .   -   .
0023 
0024 **/
0025 
0026 #include <vector>
0027 
0028 #include "scuda.h"
0029 #include "squad.h"
0030 #include "SPhiCut.hh"
0031 #include "SMath.hh"
0032 #include "OPTICKS_LOG.hh"
0033 
0034 
0035 int main(int argc, char** argv)
0036 {
0037     OPTICKS_LOG(argc, argv); 
0038 
0039     double phiStart_pi = 0.50 ; 
0040     double phiDelta_pi = 1.50 ; 
0041     double phi0_pi = phiStart_pi ; 
0042     double phi1_pi = phiStart_pi + phiDelta_pi ; 
0043 
0044     double cosPhi0 = std::cos(phi0_pi*M_PI ); 
0045     double sinPhi0 = std::sin(phi0_pi*M_PI ); 
0046     double cosPhi1 = std::cos(phi1_pi*M_PI ); 
0047     double sinPhi1 = std::sin(phi1_pi*M_PI ); 
0048 
0049     double _cosPhi0 = SMath::cos_pi(phi0_pi); 
0050     double _sinPhi0 = SMath::sin_pi(phi0_pi); 
0051     double _cosPhi1 = SMath::cos_pi(phi1_pi); 
0052     double _sinPhi1 = SMath::sin_pi(phi1_pi); 
0053 
0054     std::vector<std::pair<std::string, double>> pairs = 
0055     { 
0056         {"phiStart_pi", phiStart_pi },
0057         {"phiDelta_pi", phiDelta_pi },
0058         {"phi0_pi",     phi0_pi },
0059         {"phi1_pi",     phi1_pi },
0060         {"M_PIf",       M_PIf},
0061         {"M_PI",        M_PI},
0062         {"cosPhi0",     cosPhi0},
0063         {"sinPhi0",     sinPhi0},
0064         {"cosPhi1",     cosPhi1},
0065         {"sinPhi1",     sinPhi1},
0066         {"_cosPhi0",    _cosPhi0},
0067         {"_sinPhi0",    _sinPhi0},
0068         {"_cosPhi1",    _cosPhi1},
0069         {"_sinPhi1",    _sinPhi1},
0070     };  
0071 
0072     std::cout << SMath::Format(pairs); 
0073 
0074     quad q0 ; 
0075     SPhiCut::PrepareParam( q0, phiStart_pi, phiDelta_pi ); 
0076 
0077     LOG(info) << q0.f ; 
0078 
0079     return 0 ; 
0080 }