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10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /externals/clhep/include/CLHEP/Vector/RotationX.icc (Version 11.3.0) and /externals/clhep/include/CLHEP/Vector/RotationX.icc (Version 9.4.p4)


  1 // -*- C++ -*-                                      1 
  2 // -------------------------------------------    
  3 //                                                
  4 // This file is a part of the CLHEP - a Class     
  5 //                                                
  6 // This is the definitions of the inline membe    
  7 // HepRotationX class                             
  8 //                                                
  9                                                   
 10 #include <cmath>                                  
 11 #include "CLHEP/Units/PhysicalConstants.h"        
 12                                                   
 13 namespace CLHEP {                                 
 14                                                   
 15 inline double HepRotationX::yy() const { retur    
 16 inline double HepRotationX::yz() const { retur    
 17 inline double HepRotationX::zy() const { retur    
 18 inline double HepRotationX::zz() const { retur    
 19                                                   
 20 inline double HepRotationX::xx() const { retur    
 21 inline double HepRotationX::xy() const { retur    
 22 inline double HepRotationX::xz() const { retur    
 23 inline double HepRotationX::yx() const { retur    
 24 inline double HepRotationX::zx() const { retur    
 25                                                   
 26 inline HepRep3x3 HepRotationX::rep3x3() const     
 27   return HepRep3x3 ( 1.0,    0.0,      0.0,       
 28                      0.0,  its_c,   -its_s,       
 29                      0.0,  its_s,    its_c  );    
 30 }                                                 
 31                                                   
 32 inline HepRotationX::HepRotationX() : its_d(0.    
 33                                                   
 34 inline HepRotationX::HepRotationX(const HepRot    
 35   its_d(orig.its_d), its_s(orig.its_s), its_c(    
 36 {}                                                
 37                                                   
 38 inline HepRotationX::HepRotationX(double dd, d    
 39   its_d(dd), its_s(ss), its_c(cc)                 
 40 {}                                                
 41                                                   
 42 inline HepRotationX & HepRotationX::operator=     
 43   its_d = orig.its_d;                             
 44   its_s = orig.its_s;                             
 45   its_c = orig.its_c;                             
 46   return *this;                                   
 47 }                                                 
 48                                                   
 49 inline HepRotationX::~HepRotationX() {}           
 50                                                   
 51 inline Hep3Vector HepRotationX::colX() const      
 52         { return Hep3Vector ( 1.0, 0.0, 0.0 );    
 53 inline Hep3Vector HepRotationX::colY() const      
 54         { return Hep3Vector ( 0.0,  its_c,  it    
 55 inline Hep3Vector HepRotationX::colZ() const      
 56         { return Hep3Vector ( 0.0, -its_s,  it    
 57                                                   
 58 inline Hep3Vector HepRotationX::rowX() const      
 59         { return Hep3Vector ( 1.0, 0.0, 0.0 );    
 60 inline Hep3Vector HepRotationX::rowY() const      
 61         { return Hep3Vector ( 0.0,  its_c, -it    
 62 inline Hep3Vector HepRotationX::rowZ() const      
 63         { return Hep3Vector ( 0.0,  its_s,  it    
 64                                                   
 65 inline double  HepRotationX::getPhi  () const     
 66 inline double  HepRotationX::getTheta() const     
 67 inline double  HepRotationX::getPsi  () const     
 68 inline double  HepRotationX::getDelta() const     
 69 inline Hep3Vector HepRotationX::getAxis () con    
 70                                                   
 71 inline double  HepRotationX::delta() const { r    
 72 inline Hep3Vector HepRotationX::axis() const {    
 73                                                   
 74 inline HepAxisAngle HepRotationX::axisAngle()     
 75   return HepAxisAngle ( axis(), delta() );        
 76 }                                                 
 77                                                   
 78 inline void HepRotationX::getAngleAxis            
 79       (double & ddelta, Hep3Vector & aaxis) co    
 80   ddelta = its_d;                                 
 81   aaxis  = getAxis();                             
 82 }                                                 
 83                                                   
 84 inline HepLorentzVector HepRotationX::col1() c    
 85         { return HepLorentzVector (colX(), 0);    
 86 inline HepLorentzVector HepRotationX::col2() c    
 87         { return HepLorentzVector (colY(), 0);    
 88 inline HepLorentzVector HepRotationX::col3() c    
 89         { return HepLorentzVector (colZ(), 0);    
 90 inline HepLorentzVector HepRotationX::col4() c    
 91         { return HepLorentzVector (0,0,0,1); }    
 92 inline HepLorentzVector HepRotationX::row1() c    
 93         { return HepLorentzVector (rowX(), 0);    
 94 inline HepLorentzVector HepRotationX::row2() c    
 95         { return HepLorentzVector (rowY(), 0);    
 96 inline HepLorentzVector HepRotationX::row3() c    
 97         { return HepLorentzVector (rowZ(), 0);    
 98 inline HepLorentzVector HepRotationX::row4() c    
 99         { return HepLorentzVector (0,0,0,1); }    
100 inline double HepRotationX::xt() const { retur    
101 inline double HepRotationX::yt() const { retur    
102 inline double HepRotationX::zt() const { retur    
103 inline double HepRotationX::tx() const { retur    
104 inline double HepRotationX::ty() const { retur    
105 inline double HepRotationX::tz() const { retur    
106 inline double HepRotationX::tt() const { retur    
107                                                   
108 inline HepRep4x4 HepRotationX::rep4x4() const     
109   return HepRep4x4 ( 1.0,   0.0,    0.0, 0.0,     
110                      0.0, its_c, -its_s, 0.0,     
111                      0.0, its_s,  its_c, 0.0,     
112                      0.0,   0.0,    0.0, 1.0 )    
113 }                                                 
114                                                   
115 inline bool HepRotationX::isIdentity() const {    
116   return ( its_d==0 );                            
117 }                                                 
118                                                   
119 inline int HepRotationX::compare ( const HepRo    
120   if (its_d > r.its_d) return 1; else if (its_    
121 }                                                 
122                                                   
123 inline bool HepRotationX::operator==(const Hep    
124   { return (its_d==r.its_d); }                    
125 inline bool HepRotationX::operator!=(const Hep    
126   { return (its_d!=r.its_d); }                    
127 inline bool HepRotationX::operator>=(const Hep    
128   { return (its_d>=r.its_d); }                    
129 inline bool HepRotationX::operator<=(const Hep    
130   { return (its_d<=r.its_d); }                    
131 inline bool HepRotationX::operator> (const Hep    
132   { return (its_d> r.its_d); }                    
133 inline bool HepRotationX::operator< (const Hep    
134   { return (its_d< r.its_d); }                    
135                                                   
136 inline void HepRotationX::rectify() {             
137   its_d = proper(its_d);  // Just in case!        
138   its_s = std::sin(its_d);                        
139   its_c = std::cos(its_d);                        
140 }                                                 
141                                                   
142 inline Hep3Vector HepRotationX::operator() (co    
143   double x = p.x();                               
144   double y = p.y();                               
145   double z = p.z();                               
146   return  Hep3Vector(  x,                         
147                        y * its_c - z * its_s,     
148                        z * its_c + y * its_s      
149 }                                                 
150                                                   
151 inline Hep3Vector HepRotationX::operator * (co    
152   return operator()(p);                           
153 }                                                 
154                                                   
155 inline HepLorentzVector HepRotationX::operator    
156       ( const HepLorentzVector & w ) const {      
157   return  HepLorentzVector( operator() (w.vect    
158 }                                                 
159                                                   
160 inline HepLorentzVector HepRotationX::operator    
161           (const HepLorentzVector & p) const {    
162   return operator()(p);                           
163 }                                                 
164                                                   
165 inline HepRotationX & HepRotationX::operator *    
166   return *this = (*this) * (m1);                  
167 }                                                 
168                                                   
169 inline HepRotationX & HepRotationX::transform(    
170   return *this = m1 * (*this);                    
171 }                                                 
172                                                   
173 inline double HepRotationX::proper( double dde    
174   // -PI < d <= PI                                
175   if ( std::fabs(ddelta) < CLHEP::pi ) {          
176     return  ddelta;                               
177   } else {                                        
178     double x = ddelta / (CLHEP::twopi);           
179     return  (CLHEP::twopi) * ( x + std::floor(    
180   }                                               
181 }  // proper()                                    
182                                                   
183 inline HepRotationX HepRotationX::operator * (    
184   return HepRotationX ( HepRotationX::proper(i    
185                         its_s*rx.its_c + its_c    
186                         its_c*rx.its_c - its_s    
187 }                                                 
188                                                   
189 inline HepRotationX HepRotationX::inverse() co    
190   return HepRotationX( proper(-its_d), -its_s,    
191 }                                                 
192                                                   
193 inline HepRotationX inverseOf(const HepRotatio    
194   return r.inverse();                             
195 }                                                 
196                                                   
197 inline HepRotationX & HepRotationX::invert() {    
198   return *this=inverse();                         
199 }                                                 
200                                                   
201 inline double HepRotationX::getTolerance() {      
202   return Hep4RotationInterface::tolerance;        
203 }                                                 
204 inline double HepRotationX::setTolerance(doubl    
205   return Hep4RotationInterface::setTolerance(t    
206 }                                                 
207                                                   
208 }  // namespace CLHEP                             
209