|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "CLHEP/Units/SystemOfUnits.h"
10 #include "Identifier/Identifier.h"
59 msg(MSG::INFO) <<
"initialize()" <<
endmsg;
60 msg(MSG::INFO) <<
"Algorithm Properties" <<
endmsg;
70 msg(MSG::INFO) <<
" Modules only - the 4 corner straws of each module will be printed. " <<
endmsg;
72 msg(MSG::INFO) <<
" NB. TestAllStraws flag is ignored" <<
endmsg;
86 return StatusCode::FAILURE;
93 return StatusCode::FAILURE;
98 const unsigned int nTests(3);
100 const double angles[nTests]={
atan(-0.0001639),
atan(0.0003195),
atan(0.0000053)};
104 Amg::Transform3D zRotations[nTests] = {zRotation(angles[0]), zRotation(angles[1]), zRotation(angles[2])};
105 Amg::Transform3D yTranslations[nTests]={yTranslation(distances[0]), yTranslation(distances[1]), yTranslation(distances[2])};
126 return StatusCode::SUCCESS;
156 return StatusCode::SUCCESS;
163 msg(MSG::INFO) <<
"finalize()" <<
endmsg;
164 return StatusCode::SUCCESS;
173 IdentifierHash idHash =
index;
181 for (
unsigned int iStraw = 0; iStraw < element->
nStraws(); iStraw++) {
189 cout <<
"No Element with id hash = " << idHash << endl;
198 if (numStrawLayers) {
204 cout <<
"ERROR: No Elements in this module!" << endl;
208 cout.precision(oldPrec);
234 cout <<
" Straw " <<
straw <<
": NO SHIFT" << endl;
236 cout <<
" Straw " <<
straw <<
": Global shift: " << globalDelta * zeroPoint << endl ;
238 cout <<
" center " << strawDefXF * zeroPoint <<
" -> " << strawXF * zeroPoint << endl;
239 cout <<
" diff = " << strawXF * zeroPoint - strawDefXF * zeroPoint << endl;
240 cout <<
" strawAxis " << strawDefXF *
zAxis <<
" -> " << strawXF *
zAxis << endl;
252 for (
int i=0;
i < 3;
i++){
253 for (
int j=0; j < 3; j++){
255 if (
diff > errRot)
return false;
259 for (
int ii = 0; ii < 3; ii++){
260 double diff = abs(
t1(ii,3) -
t2(ii,3));
261 if (
diff > errTrans)
return false;
def retrieve(aClass, aKey=None)
void printAlignmentShifts()
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
size_type straw_layer_hash_max(void) const
unsigned int nStraws() const
Number of straws in the element.
std::vector< ALFA_RawDataCollection_p1 > t1
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
virtual bool setAlignableTransformDelta(int level, const Identifier &id, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore) const override
Set alignable transforms: Amg based.
Identifier barrel_ec_id(int barrel_ec) const
For +/-barrel or +/-endcap id.
std::vector< Identifier >::const_iterator const_id_iterator
const_id_iterator module_begin(void) const
Iterators over full set of module ids. Module ids are sorted.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
const_id_iterator module_end(void) const
std::string m_managerName
::StatusCode StatusCode
StatusCode definition for legacy code.
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Eigen::Affine3d Transform3D
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
void compareEndStraws(const Identifier &id)
void addShiftModule(int bec, int phiMod, int layer, const Amg::Transform3D &transform)
const TRT_ID * m_idHelper
int straw_layer_max(const Identifier &id) const
Max values for each field (-999 == failure)
void addShiftTop(const Amg::Transform3D &transform)
void compareStraw(const InDetDD::TRT_BaseElement *element, int straw)
const InDetDD::TRT_DetectorManager * m_manager
const TRT_BaseElement * getElement(Identifier id) const
Access Elements Generically---------------------------------------------—.
void show(Identifier id, const IdContext *context=0, char sep='.') const
Short print out of any identifier (optionally provide separation character - default is '.
TestTRT_Alignment(const std::string &name, ISvcLocator *pSvcLocator)
Eigen::Matrix< double, 3, 1 > Vector3D
std::vector< ALFA_RawDataContainer_p1 > t2
const Amg::Transform3D & strawTransform(unsigned int straw) const
Straw transform - fast access in array, in Tracking frame: Amg.
bool testIdentity(const Amg::Transform3D &transform, double errRot=0, double errTrans=0)
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Eigen::Translation< double, 3 > Translation3D
Eigen::AngleAxisd AngleAxis3D
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Identifier module_id(int barrel_ec, int phi_module, int layer_or_wheel) const
For an individual module phi sector.
void addShift(int level, const Identifier &id, const Amg::Transform3D &transform)