Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #include "SLOG.hh"
0002 #include "scuda.h"
0003 #include "squad.h"
0004 #include "SMath.hh"
0005 #include "SPhiCut.hh"
0006 
0007 const plog::Severity SPhiCut::LEVEL = SLOG::EnvLevel("SPhiCut", "DEBUG" ); 
0008 
0009 /**
0010 SPhiCut::PrepareParam 
0011 ------------------------
0012 
0013 This is used by
0014 
0015 * npy/NPhiCut.cpp
0016 * CSG/CSGNode.cc
0017 
0018 
0019 The input parameters: startPhi, deltaPhi configure two azimuthal angles in range [0., 2.] (units of pi)
0020 
0021 * startPhi
0022 * startPhi+deltaPhi
0023 
0024 A do nothing phicut shape would have have startPhi=0. deltaPhi=2. 
0025 
0026 
0027                Y
0028 
0029               0.5 
0030                :   /
0031                :  /
0032                : /
0033                :/ 
0034      1.0- - -  O - - -  0.0    X
0035                :\
0036                : \
0037                :  \
0038                :   \
0039 
0040               1.5 
0041 
0042 
0043 +---------------------------+----------------------+---------------------------------+-------------------------------+
0044 | (startPhi, deltaPhi)      | (phi0, phi1)         |  Notes                          |  Cutaway                      |
0045 +===========================+======================+=================================+===============================+
0046 |  (0.0, 2.0)               |  (0.0, 2.0)          |  Full range of phi              |                               |
0047 +---------------------------+----------------------+---------------------------------+-------------------------------+
0048 
0049 **/
0050 
0051 
0052 
0053 
0054 void SPhiCut::PrepareParam( quad& q0, double startPhi_pi, double deltaPhi_pi )
0055 {
0056     double phi0_pi = startPhi_pi ; 
0057     double phi1_pi = startPhi_pi + deltaPhi_pi ;
0058 
0059     double cosPhi0 = SMath::cos_pi(phi0_pi) ;
0060     double sinPhi0 = SMath::sin_pi(phi0_pi) ;
0061     double cosPhi1 = SMath::cos_pi(phi1_pi) ;
0062     double sinPhi1 = SMath::sin_pi(phi1_pi) ;
0063 
0064     q0.f.x = float(cosPhi0); 
0065     q0.f.y = float(sinPhi0); 
0066     q0.f.z = float(cosPhi1); 
0067     q0.f.w = float(sinPhi1); 
0068 
0069     LOG(LEVEL) 
0070         << " startPhi_pi " << startPhi_pi
0071         << " deltaPhi_pi " << deltaPhi_pi
0072         << " phi0_pi " << phi0_pi
0073         << " phi1_pi " << phi1_pi
0074         << " cosPhi0 " << cosPhi0
0075         << " sinPhi0 " << sinPhi0 
0076         << " cosPhi1 " << cosPhi1
0077         << " sinPhi1 " << sinPhi1
0078         ;   
0079 
0080 
0081 }
0082