14 #include "CLHEP/Random/RandGauss.h"
108 theAlignableTracker(nullptr) {
127 if (m_radialEpsilon > -990.0) {
130 if (m_telescopeEpsilon > -990.0) {
133 if (m_layerRotEpsilon > -990.0) {
136 if (m_bowingEpsilon > -990.0) {
139 if (m_zExpEpsilon > -990.0) {
142 if (m_twistEpsilon > -990.0) {
145 if (m_ellipticalEpsilon > -990.0) {
148 if (m_skewEpsilon > -990.0) {
151 if (m_sagittaEpsilon > -990.0) {
158 edm::LogWarning(
"MisalignedTracker") <<
"Blind movements suppressed (TIB/TOB in z, TID/TEC in r)";
164 edm::LogWarning(
"MisalignedTracker") <<
"Old z convention: dz --> -dz";
206 std::string theAlignRecordName =
"TrackerAlignmentRcd";
207 std::string theErrorRecordName =
"TrackerAlignmentErrorExtendedRcd";
211 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
215 myAlignmentErrorsExtended, poolDbService->
beginOfTime(), theErrorRecordName);
220 unsigned int nComp = comp.size();
223 bool usecomps =
true;
226 for (
unsigned int i = 0;
i < nComp; ++
i) {
232 bool blindToZ(
false), blindToR(
false);
252 if ((level == 1) || (level == 2)) {
261 const bool blindToR) {
268 const double oldX = globalPos.
x();
269 const double oldY = globalPos.
y();
270 const double oldZ = globalPos.
z();
271 const double oldPhi = globalPos.
phi();
272 const double oldR =
sqrt(globalPos.
x() * globalPos.
x() + globalPos.
y() * globalPos.
y());
284 const double Roffset = 57.0;
287 deltaX += (xP - oldX);
288 deltaY += (yP - oldY);
291 const double trackeredgePlusZ = 271.846;
292 const double bowfactor =
m_bowingEpsilon * (trackeredgePlusZ * trackeredgePlusZ - oldZ * oldZ);
293 deltaX += oldX * bowfactor;
294 deltaY += oldY * bowfactor;
302 deltaX += (xP - oldX);
303 deltaY += (yP - oldY);
void applySystematicMisalignment(Alignable *)
T getUntrackedParameter(std::string const &, T const &) const
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd > ptitpToken_
Alignments * alignments() const override
Return alignments, sorted by DetId.
Class to update a given geometry with a set of alignments.
static constexpr auto TID
#define DEFINE_FWK_MODULE(type)
TrackerGeometry * build(const GeometricDet *gd, const PTrackerAdditionalParametersPerDet *ptitp, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
void beginJob() override
Read ideal tracker geometry from DB.
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
AlignableTracker * theAlignableTracker
const edm::ESGetToken< AlignmentErrorsExtended, TrackerAlignmentErrorExtendedRcd > aliErrorToken_
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
bool getData(T &iHolder) const
const edm::ESGetToken< Alignments, TrackerAlignmentRcd > aliToken_
void analyze(const edm::Event &, const edm::EventSetup &) override
double m_telescopeEpsilon
cond::Time_t beginOfTime() const
align::GlobalVector findSystematicMis(const align::PositionType &, const bool blindToZ, const bool blindToR)
Cos< T >::type cos(const T &t)
TrackerSystematicMisalignments(const edm::ParameterSet &)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
virtual const Alignables & components() const =0
Return vector of all direct components.
static constexpr auto TOB
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
AlignmentErrorsExtended * alignmentErrors() const override
Return alignment errors, sorted by DetId.
double m_ellipticalEpsilon
static constexpr auto TIB
std::vector< Alignable * > Alignables
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
const PositionType & globalPosition() const
Return the global position of the object.
Log< level::Warning, false > LogWarning
const DetId & geomDetId() const
const edm::ESGetToken< Alignments, GlobalPositionRcd > gprToken_
static constexpr auto TEC