14 #include "CLHEP/Random/RandGauss.h" 108 theAlignableTracker(nullptr) {
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);
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 *)
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
Geom::Phi< T > phi() const
TrackerGeometry * build(const GeometricDet *gd, const PTrackerAdditionalParametersPerDet *ptitp, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
cond::Time_t beginOfTime() const
Sin< T >::type sin(const T &t)
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)
const edm::ESGetToken< Alignments, TrackerAlignmentRcd > aliToken_
const PositionType & globalPosition() const
Return the global position of the object.
void analyze(const edm::Event &, const edm::EventSetup &) override
double m_telescopeEpsilon
align::GlobalVector findSystematicMis(const align::PositionType &, const bool blindToZ, const bool blindToR)
Cos< T >::type cos(const T &t)
TrackerSystematicMisalignments(const edm::ParameterSet &)
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
#define DEFINE_FWK_MODULE(type)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
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_
const DetId & geomDetId() const
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)
Log< level::Warning, false > LogWarning
const edm::ESGetToken< Alignments, GlobalPositionRcd > gprToken_
static constexpr auto TEC