38 convert(
eventSetup, alphaVec, betaVec, gammaVec, xtranslVec, ytranslVec, ztranslVec, vali);
44 edm::LogVerbatim(
"WriteESAlignments") <<
"Uploading ES alignments to the database";
49 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
67 const AliVec& vaPrev(pA.m_align);
70 for (
unsigned int i(0);
i !=
k_nA; ++
i) {
77 double zPlanePrev(
geom->getGeometry(
id)->getPosition().z());
78 const double zAlignPrev(vaPrev[
i].translation().
z());
79 const Trl q_I(0, 0, zPlanePrev - zAlignPrev);
80 const Trl& s_p(vaPrev[
i].translation());
90 const Rot InvL_n(L_n.inverse());
92 const Rot G_n(InvL_n * G_p);
94 const Trl s_n(t_n + s_p + q_I - InvL_n * q_I);
102 <<
" For i = " <<
i <<
", L_n = " << L_n <<
" Euler angles=" << InvL_n.eulerAngles() <<
"\n";
105 <<
"For i = " <<
i <<
", G_p=" << G_p <<
" Euler angles=" << G_p.eulerAngles() <<
"\n";
107 <<
" For i = " <<
i <<
", InvL_n = " << InvL_n <<
" Euler angles=" << InvL_n.eulerAngles() <<
"\n";
109 <<
" For i =" <<
i <<
", G_n = " << G_n <<
" Euler angles=" << G_n.eulerAngles() <<
"\n";
AlignTransform::Rotation Rot
Log< level::Info, true > LogVerbatim
AlignTransform::Translation Trl
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
std::vector< AlignTransform > AliVec
uint32_t cc[maxCellsPerHit]
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
WriteESAlignments(edm::ConsumesCollector &&cc)
cond::Time_t currentTime() const
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
void write(const Alignments &ali)
static unsigned int numberOfAlignments()
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometryToken_
static const unsigned int k_nA
std::vector< double > DVec
void convert(const edm::EventSetup &eS, const DVec &a, const DVec &b, const DVec &g, const DVec &x, const DVec &y, const DVec &z, AliVec &va)
void writeAlignments(const edm::EventSetup &eventSetup, const DVec &alphaVec, const DVec &betaVec, const DVec &gammaVec, const DVec &xtranslVec, const DVec &ytranslVec, const DVec &ztranslVec)
edm::ESGetToken< Alignments, ESAlignmentRcd > alignmentToken_