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;
88 msg(MSG::DEBUG) <<
"Manager found" <<
endmsg;
92 msg(MSG::FATAL) <<
"Could not get TRT ID helper" <<
endmsg;
93 return StatusCode::FAILURE;
98 const unsigned int nTests(3);
99 const double distances[nTests]={0.2679 * CLHEP::mm, -0.4254 * CLHEP::mm, 0.0264 * CLHEP::mm};
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;
171 unsigned int maxHash =
m_idHelper->straw_layer_hash_max();
181 for (
unsigned int iStraw = 0; iStraw < element->
nStraws(); iStraw++) {
189 cout <<
"No Element with id hash = " << idHash << endl;
194 for (moduleIter =
m_idHelper->module_begin(); moduleIter !=
m_idHelper->module_end(); ++moduleIter) {
196 cout <<
"Module " <<
m_idHelper->show_to_string(moduleId) << endl;
197 int numStrawLayers =
m_idHelper->straw_layer_max(moduleId);
198 if (numStrawLayers) {
204 cout <<
"ERROR: No Elements in this module!" << endl;
208 cout.precision(oldPrec);
214 cout <<
" " <<
m_idHelper->show_to_string(
id) << endl;
219 cout <<
" No Element with id = " <<
m_idHelper->show_to_string(
id) << endl;
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++){
254 double diff = abs(t1(i,j) - t2(i,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;
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
This is an Identifier helper class for the TRT subdetector.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
This is a "hash" representation of an Identifier.
Virtual base class of TRT readout elements.
unsigned int nStraws() const
Number of straws in the element.
const Amg::Transform3D & strawTransform(unsigned int straw) const
Straw transform - fast access in array, in Tracking frame: Amg.
std::vector< Identifier >::const_iterator const_id_iterator
std::string m_managerName
void compareEndStraws(const Identifier &id)
bool testIdentity(const Amg::Transform3D &transform, double errRot=0, double errTrans=0)
const TRT_ID * m_idHelper
void addShiftModule(int bec, int phiMod, int layer, const Amg::Transform3D &transform)
void compareStraw(const InDetDD::TRT_BaseElement *element, int straw)
void printAlignmentShifts()
void addShiftTop(const Amg::Transform3D &transform)
TestTRT_Alignment(const std::string &name, ISvcLocator *pSvcLocator)
const InDetDD::TRT_DetectorManager * m_manager
void addShift(int level, const Identifier &id, const Amg::Transform3D &transform)
Eigen::AngleAxisd AngleAxis3D
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Translation< double, 3 > Translation3D