63 const string inputFile = inputFileInPath.fullPath();
71 const double a_x = (de_x2 - de_x1) / (
z2 - z1), b_x = de_x1 - a_x * z1;
72 const double a_y = (de_y2 - de_y1) / (
z2 - z1), b_y = de_y1 - a_y * z1;
73 const double a_rho = (de_rho2 - de_rho1) / (
z2 - z1), b_rho = de_rho1 - a_rho * z1;
80 const auto &
input = inputSequence.begin()->second;
85 for (
auto &
it :
input.getSensorMap()) {
86 const auto &sensorId =
it.first;
88 const auto &
c =
geometry.sensorTranslation(sensorId);
91 const double z =
c.z();
93 double de_ShX = a_x *
z + b_x;
94 double de_ShY = a_y *
z + b_y;
95 const double de_RotZ = a_rho *
z + b_rho;
98 de_ShX -= +de_RotZ * (
c.y() + de_ShY);
99 de_ShY -= -de_RotZ * (
c.x() + de_ShX);
102 d.setShX(
d.getShX() + de_ShX);
103 d.setShY(
d.getShY() + de_ShY);
104 d.setRotZ(
d.getRotZ() + de_RotZ);
106 output.setSensorCorrection(sensorId,
d);
110 vector<unsigned int> rps;
111 unsigned int last_rp = 123456;
112 for (
auto &
it :
input.getSensorMap()) {
114 unsigned int rpDecId = senId.
arm() * 100 + senId.
station() * 10 + senId.
rp();
116 if (last_rp != rpDecId) {
117 rps.push_back(rpDecId);
124 vector<unsigned int> excludePlanes;
131 const bool equalWeights =
false;
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Time sequence of alignment corrections. I/O methods have been factored out to: CondFormats/PPSObjects...
Modifies the alignment modes unconstrained by the track-based alignment.
void analyze(const edm::Event &e, const edm::EventSetup &es) override
static void buildGeometry(const std::vector< unsigned int > &rpDecIds, const std::vector< unsigned int > &excludedSensors, const CTPPSGeometry *, double z0, AlignmentGeometry &geometry)
builds the alignment geometry
static std::string const input
T getUntrackedParameter(std::string const &, T const &) const
static CTPPSRPAlignmentCorrectionsDataSequence loadFromXML(const std::string &fileName)
loads sequence of alignment corrections from XML file
#define DEFINE_FWK_MODULE(type)
void factorRPFromSensorCorrections(const CTPPSRPAlignmentCorrectionsData &input, CTPPSRPAlignmentCorrectionsData &expanded, CTPPSRPAlignmentCorrectionsData &factored, const AlignmentGeometry &, bool equalWeights=false, unsigned int verbosity=0)
PPSModifySingularModes(const edm::ParameterSet &ps)
Base class for CTPPS detector IDs.
Container for CTPPS RP alignment corrections. The corrections are stored on two levels - RP and senso...
static void writeToXML(const CTPPSRPAlignmentCorrectionsDataSequence &seq, const std::string &fileName, bool precise=false, bool wrErrors=true, bool wrSh_xy=true, bool wrSh_z=false, bool wrRot_xy=false, bool wrRot_z=true)
writes sequence of alignment corrections into a single XML file
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > tokenRealGeometry_
Alignment correction for an element of the CT-PPS detector. Within the geometry description, every sensor (more generally every element) is given its translation and rotation. These two quantities shall be understood in local-to-global coordinate transform. That is, if r_l is a point in local coordinate system and x_g in global, then it holds.
void beginRun(edm::Run const &, edm::EventSetup const &) override