#include <global_angular.h>
Public Member Functions | |
bool | checkParameters () |
subclass must check the supplied parameters ParE_, ParS_ More... | |
void | checkTermination () |
for algorithms with incr_==0 the algorithm must check whether to terminate More... | |
int | copyno () const |
copy-number calculation More... | |
global_angular_0 (AlgoPos *, std::string label) | |
DDRotationMatrix | rotation () |
subclass must calculate a rotation matrix More... | |
void | stream (std::ostream &) const |
DDTranslation | translation () |
subclass must calculate a translation std::vector More... | |
~global_angular_0 () | |
Public Member Functions inherited from AlgoImpl | |
AlgoImpl (AlgoPos *, std::string label) | |
subclass must provide a similar constructor and call this one More... | |
Public Attributes | |
bool | alignSolid_ |
std::vector< double > | center_ |
double | delta_ |
int | incrCopyNo_ |
int | n_ |
DDRotationMatrix | planeRot_ |
double | radius_ |
double | rangeAngle_ |
std::vector< double > | rotate_ |
std::vector< double > | rotateSolid_ |
DDRotationMatrix | solidRot_ |
double | startAngle_ |
int | startCopyNo_ |
Additional Inherited Members | |
Protected Member Functions inherited from AlgoImpl | |
void | terminate () |
stop the current iteration of the algorithm (for incr_==0 types of algorithms) More... | |
virtual | ~AlgoImpl () |
Static Protected Member Functions inherited from AlgoImpl | |
static std::string | d2s (double x) |
ahh, converts a double into a std::string ... yet another one of this kind! More... | |
Protected Attributes inherited from AlgoImpl | |
const int & | count_ |
const int & | curr_ |
const int & | end_ |
std::string & | err_ |
const int & | incr_ |
std::string | label_ |
parE_type & | ParE_ |
parS_type & | ParS_ |
const int & | start_ |
bool & | terminate_ |
theta, phi, angle ... axis of rotation. Object will be placed in a plane going through the origin having the axis (theta,phi) perpendicular to itself. startAngle, rangeAngle ... position rotated object starting at startAngle going to startAngle+rangeAngle. startAngle = 0 denotes the x-axis in the local frame in case of (phi=0 and theta=0), otherwise it denotes the
Definition at line 36 of file global_angular.h.
global_angular_0::global_angular_0 | ( | AlgoPos * | a, |
std::string | label | ||
) |
Definition at line 20 of file global_angular.cc.
References DCOUT.
global_angular_0::~global_angular_0 | ( | ) |
Definition at line 37 of file global_angular.cc.
|
virtual |
subclass must check the supplied parameters ParE_, ParS_
whether they are correct and should select this paricular algorithm.
If the parameters are correct by should not select this particular algorithm, checkParamters must return false otherwise true.
The std::string err_ is to be used to be extended with error information in case any errors have been detected. Error information must be attached to err_ because of the possibility of already contained error information.
In case of errors: If an DDException is thrown by the algorithm implementation, further processing of any other implementations of the algorithm will be stopped. If no exception is thrown, checkParamters must return false. It's preferable not to throw an exception in case of errors. The algorithm implementation will throw if all checkParamters() of all registered algorithm implementations have returned false.
Implements AlgoImpl.
Definition at line 49 of file global_angular.cc.
References alignSolid_, center_, AlgoImpl::d2s(), DCOUT, delta_, AlgoImpl::err_, fUnitVector(), i, incrCopyNo_, n_, AlgoImpl::ParE_, AlgoImpl::ParS_, planeRot_, radius_, rangeAngle_, query::result, rotate_, rotateSolid_, solidRot_, startAngle_, startCopyNo_, and groupFilesInBlocks::temp.
|
virtual |
for algorithms with incr_==0 the algorithm must check whether to terminate
Overload this function in case the algorithm is a 'incr_==0' type. In this case provide some code which checks using perhaps the value of count_ and/or supplied algorithm parameters to check whether terminate() has to be called or not. If terminate() is called, the current iteration of the algorithm is not taken into account!
The default implementation will immidiately terminate the algorithm in case incr_==0.
In case of incr_!=0: checkTermination() is not called at all; the algorithm will terminate automatically when the specified range [start_, end_, incr_] has been covered or terminate() has been called from within translation() or rotation().
Reimplemented from AlgoImpl.
Definition at line 200 of file global_angular.cc.
References AlgoImpl::count_, n_, and AlgoImpl::terminate().
|
virtual |
copy-number calculation
In case incr_==0 it makes sense to overload this method, otherwise the invocation-count count_ will be returned as copy-number
If incr_ !=0 the copy-number will be curr_, the actual position in the range [start_,end_,incr_], unless this methods is overloaded.
Reimplemented from AlgoImpl.
Definition at line 189 of file global_angular.cc.
References AlgoImpl::copyno(), incrCopyNo_, and startCopyNo_.
|
virtual |
subclass must calculate a rotation matrix
depending on the current position curr_ in the range [start_,end_,incr_] and the user supplied parameters ParE_, ParS_
Implements AlgoImpl.
Definition at line 167 of file global_angular.cc.
References alignSolid_, angle(), AlgoImpl::count_, delta_, planeRot_, diffTwoXMLs::r2, makeMuonMisalignmentScenario::rot, rotate_, solidRot_, and startAngle_.
void global_angular_0::stream | ( | std::ostream & | os | ) | const |
Definition at line 206 of file global_angular.cc.
|
virtual |
subclass must calculate a translation std::vector
depending on the current position curr_ in the range [start_,end_,incr_] and the user supplied parameters ParE_, ParS_
Implements AlgoImpl.
Definition at line 149 of file global_angular.cc.
References angle(), center_, AlgoImpl::count_, DCOUT, delta_, fUnitVector(), planeRot_, radius_, rotate_, startAngle_, and v.
bool global_angular_0::alignSolid_ |
Definition at line 55 of file global_angular.h.
Referenced by checkParameters(), and rotation().
std::vector<double> global_angular_0::center_ |
Definition at line 54 of file global_angular.h.
Referenced by checkParameters(), and translation().
double global_angular_0::delta_ |
Definition at line 58 of file global_angular.h.
Referenced by checkParameters(), rotation(), and translation().
int global_angular_0::incrCopyNo_ |
Definition at line 56 of file global_angular.h.
Referenced by checkParameters(), and copyno().
int global_angular_0::n_ |
Definition at line 56 of file global_angular.h.
Referenced by checkParameters(), and checkTermination().
DDRotationMatrix global_angular_0::planeRot_ |
Definition at line 60 of file global_angular.h.
Referenced by checkParameters(), rotation(), and translation().
double global_angular_0::radius_ |
Definition at line 57 of file global_angular.h.
Referenced by checkParameters(), and translation().
double global_angular_0::rangeAngle_ |
Definition at line 57 of file global_angular.h.
Referenced by checkParameters().
std::vector<double> global_angular_0::rotate_ |
Definition at line 54 of file global_angular.h.
Referenced by checkParameters(), rotation(), and translation().
std::vector<double> global_angular_0::rotateSolid_ |
Definition at line 54 of file global_angular.h.
Referenced by checkParameters().
DDRotationMatrix global_angular_0::solidRot_ |
Definition at line 59 of file global_angular.h.
Referenced by checkParameters(), and rotation().
double global_angular_0::startAngle_ |
Definition at line 57 of file global_angular.h.
Referenced by checkParameters(), rotation(), and translation().
int global_angular_0::startCopyNo_ |
Definition at line 56 of file global_angular.h.
Referenced by checkParameters(), and copyno().