#include using std::cout; using std::cerr; using std::cin; using std::endl; #include using std::valarray; #include using std::vector; #include using std::string; #include using std::list; #include using std::map; #include #include using std::fstream; using std::ostream; using std::istream; #include using std::pair; #include "TVector3.h" #include "Math/Vector3D.h" using ROOT::Math::XYZVector; #include "Math/Point3D.h" using ROOT::Math::XYZPoint; #include "Math/Transform3D.h" using ROOT::Math::Transform3D; #include "Math/RotationX.h" using ROOT::Math::RotationX; #include "Math/RotationY.h" using ROOT::Math::RotationY; #include "Math/RotationZ.h" using ROOT::Math::RotationZ; #include "Math/Rotation3D.h" using ROOT::Math::Rotation3D; #include "PndDrcUtil.h" string itoa1(int i) { if (i<0 || i>9) { std::cerr<<" *** itoa: i="<0) or i<0 if (idigits!=0 && (idigits1>idigits || i<0)) { int idigits2 = idigits; while ((idigits2--)>0) { sresult += "#"; } return sresult; } // too many digits (idigits>0) or i<0 if (idigits==0 && (idigits1>idigmax || i<0)) { //idigits1 = idigmax; while ((idigits1--)>0) { sresult += "#"; } return sresult; } // free number of digits if (idigits==0) { i1 = i; while ((idigits1--)>0) { int i2 = i1/(int)pow(iten,idigits1); sresult += itoa1(i2); i1 -= i2*(int)pow(iten,idigits1); } return sresult; } // fixed number of digits else { i1 = i; int idigits2 = idigits; while ((idigits2--)>0) { int i2 = i1/(int)pow(iten,idigits2); sresult += itoa1(i2); i1 -= i2*(int)pow(iten,idigits2); } return sresult; } } //--------------------------------------------------------- const XYZVector angle_tra(const XYZVector &p1, const double &the, const double &phi) { double px = p1.X(); double py = p1.Y(); double pz = p1.Z(); double p_abs,the_00,phi_00,sp,cp,st,ct,arg; double px_1,py_1,pz_1; XYZVector p2; p_abs = sqrt(px*px+py*py+pz*pz); // calculate angles of p_in arg = pz/p_abs; //if (arg > 1.0) arg = 1.0; //if (arg < -1.0) arg = -1.0; the_00 = acos(arg); //if (px==0 && py==0) { //phi_00 = 0.0; //} //else { phi_00 = atan2(px,py); //} //std::cout<<" inne = "<