|
ATLAS Offline Software
|
Go to the documentation of this file.
22 #include "CLHEP/Units/SystemOfUnits.h"
26 const std::string &
name,
35 const int numberOfStations = layersInStations.size();
36 std::list<std::vector< std::vector<ROOT::Math::Transform3D> >
::iterator> iterators;
39 for (std::vector< std::vector<ROOT::Math::Transform3D> >* theMatrix : matrices) {
40 theMatrix->resize(numberOfStations);
41 iterators.push_back(theMatrix->begin());
45 for (
const int layersN : layersInStations)
46 for (std::vector< std::vector<ROOT::Math::Transform3D> >::
iterator& matrixIter : iterators)
47 (*(matrixIter++)) = std::vector<ROOT::Math::Transform3D> (layersN);
52 using TransformVec_t = std::vector<std::vector<ROOT::Math::Transform3D>>;
54 std::list<TransformVec_t*> matricesForLayersInit;
62 unsigned int totalLayersN = 0;
64 totalLayersN += layersN;
67 bool useDefualtTransformation =
true;
76 layerTransform.SetComponents(valueIter, valueIter+12);
83 layerTransform.SetComponents(valueErrIter, valueErrIter+12);
87 useDefualtTransformation =
false;
90 ATH_MSG_WARNING(
"Incorrect number of elements in transformationErr vector in job options. Should be "<<totalLayersN<<
"x4x3="<<totalLayersN*4*3<<
". Is "<<
m_transformationsErrInit.size()<<
". Will use default transformation.");
93 ATH_MSG_WARNING(
"Incorrect number of elements in transformation vector in job options. Should be "<<totalLayersN<<
"x4x3="<<totalLayersN*4*3<<
". Is "<<
m_transformationsInit.size()<<
". Will use default transformation.");
96 ATH_MSG_INFO(
"In job options m_transformationsInit and m_transformationsErrInit are not defined simultaneously, so default transformations will be used.");
99 if (useDefualtTransformation) {
159 int stationCounter(0);
160 ATH_MSG_DEBUG(
"The following transformation matrices will be used");
162 int layersCounter (0);
169 ATH_MSG_DEBUG(
"The following transformation matrices for errors will be used");
171 int layersCounter (0);
177 return StatusCode::SUCCESS;
181 return StatusCode::SUCCESS;
201 float flipAC = (
stationID<2 ? -1. : +1.);
208 const ROOT::Math::RotationZYX locRotation(flipAC*LA.
alpha(), -1.*flipAC*LA.
gamma(), LA.
beta());
212 ROOT::Math::XYZPoint localCS = globTranslation*locTranslation*locRotation*
m_transformations.at(
stationID).at(layerID)*horizVertID;
215 auto *xAODCluster = xAODContainer->
push_back(std::make_unique<xAOD::AFPSiHitsCluster>());
218 xAODCluster->setDepositedCharge(cluster.
charge());
219 xAODCluster->setNHits(cluster.
hits().size());
221 ATH_MSG_DEBUG(
"Cluster info: station="<<
stationID<<
" layer="<<layerID<<
" horizID="<<cluster.
horizID()<<
" vertID="<<cluster.
vertID()<<
"\tcoordinates: x="<<xAODCluster->xLocal()<<
" y="<<xAODCluster->yLocal());
224 ATH_MSG_DEBUG(
"("<<theHit->pixelHorizID()<<
", "<<theHit->pixelVertID()<<
")");
228 catch (
const std::out_of_range& outOfRange) {
229 ATH_MSG_WARNING(
"Transformation matrix for station or pixel ID outside expected range. Aborting transformation to xAOD.");
JetConstituentVector::iterator iterator
double charge() const
charge of the cluster
Class representing a hit in silicon detector.
static constexpr double SiT_Plate_zsep
void setXLocal(float newXLocal)
Set cluster position along X axis in station local coordinate system.
void setYLocal(float newYLocal)
Set cluster position along Y axis in station local coordinate system.
void setZLocalErr(float newZLocalErr)
Set uncertainty of cluster position along Z axis in station local coordinate system.
static constexpr double SiT_Plate_rot_xz
double alpha() const
Rotation angle.
void setZLocal(float newZLocal)
Set cluster position along Z axis in station local coordinate system.
double gamma() const
Rotation angle.
Class representing basic silicon pixels cluster, designed to be used for creating the clusters.
::StatusCode StatusCode
StatusCode definition for legacy code.
Eigen::Affine3d Transform3D
void setStationID(int stationID)
Set index of the station with pixel hit.
constexpr uint8_t stationID
Large or Small wedge.
void setYLocalErr(float newYLocalErr)
Set uncertainty of cluster position along Y axis in station local coordinate system.
float horizID() const
horizontal position (ID number) of the cluster (float because it can be weighted mean of hits)
float horizIDErr() const
uncertainty of horizontal position (ID number) in fraction
static constexpr double SiT_Pixel_amount_x
void setPixelLayerID(int layerID)
Method setting index of the detector layer with the cluster.
double yShift() const
Shift of the plane in Y direction with respect to the nominal position.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
float vertIDErr() const
uncertainty of vertical position (ID number) in fraction
Class storing information about alignment.
#define ATH_MSG_WARNING(x)
double zShift() const
Shift of the plane in Z direction with respect to the nominal position.
Eigen::Translation< double, 3 > Translation3D
Class representing a cluster of AFP pixel hits.
double xShift() const
Shift of the plane in X direction with respect to the nominal position.
std::list< const xAOD::AFPSiHit * > & hits()
list of pixels used to form the cluster
float vertID() const
vertical position (ID number) of the cluster (float because it can be weighted mean of hits)
void setXLocalErr(float newXLocalErr)
Set uncertainty of cluster position along X axis in station local coordinate system.
double beta() const
Rotation angle.