41 virtual void endJob()
override ;
84 std::cout <<
"analyze does nothing" << std::endl;
93 double tolerance= 1.0e-3;
95 std::ofstream rotationOS(rotationFileName.c_str());
96 std::cout <<
"RotationForOnline Analyzer..." << std::endl;
105 for (; rit !=
red; ++rit) {
106 if (! rit->isDefined().second)
continue;
108 if ( *(rit->matrix()) == ident )
continue;
110 bool reflection =
false;
113 rit->matrix()->GetComponents(x, y, z);
114 if ( (1.0 + (x.Cross(y)).Dot(z)) <= tolerance ) {
119 double thetaX, phiX, thetaY, phiY, thetaZ, phiZ;
121 thetaX = std::acos(x.z());
122 phiX = ( x.y() == 0 && x.x() == 0.0) ? 0.0 : std::atan2(x.y(), x.x());
124 thetaY = std::acos(y.z());
125 phiY = ( y.y() == 0 && y.x() == 0.0) ? 0.0 : std::atan2(y.y(), y.x());
127 thetaZ = std::acos(z.z());
128 phiZ = ( z.y() == 0 && z.x() == 0.0) ? 0.0 : std::atan2(z.y(), z.x());
130 rotationOS<<
"," << thetaX
136 <<
"," << (int)reflection
def_type isDefined() const
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
#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 analyze(const edm::Event &, const edm::EventSetup &) override
virtual void endJob() override
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.