85 std::cout <<
"analyze does nothing" << std::endl;
94 double tolerance= 1.0e-3;
96 std::ofstream rotationOS(rotationFileName.c_str());
97 std::cout <<
"RotationForOnline Analyzer..." << std::endl;
106 for (; rit !=
red; ++rit) {
107 if (! rit->isDefined().second)
continue;
109 if ( *(rit->matrix()) == ident )
continue;
111 bool reflection =
false;
114 rit->matrix()->GetComponents(x, y, z);
115 if ( (1.0 + (x.Cross(y)).Dot(z)) <= tolerance ) {
120 double thetaX, phiX, thetaY, phiY, thetaZ, phiZ;
122 thetaX = std::acos(x.z());
123 phiX = ( x.y() == 0 && x.x() == 0.0) ? 0.0 : std::atan2(x.y(), x.x());
125 thetaY = std::acos(y.z());
126 phiY = ( y.y() == 0 && y.x() == 0.0) ? 0.0 : std::atan2(y.y(), y.x());
128 thetaZ = std::acos(z.z());
129 phiZ = ( z.y() == 0 && z.x() == 0.0) ? 0.0 : std::atan2(z.y(), z.x());
131 rotationOS<<
"," << thetaX
137 <<
"," << (int)reflection
def_type isDefined() const
#define DEFINE_FWK_MODULE(type)
Represents a uniquely identifyable rotation matrix.
RotationForOnline(const edm::ParameterSet &)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
static DDI::Store< DDName, DDRotationMatrix * >::iterator begin()
static DDI::Store< DDName, DDRotationMatrix * >::iterator end()
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.