14 #include "CLHEP/Random/RandGauss.h" 106 theAlignableTracker(nullptr) {
156 edm::LogWarning(
"MisalignedTracker") <<
"Blind movements suppressed (TIB/TOB in z, TID/TEC in r)";
162 edm::LogWarning(
"MisalignedTracker") <<
"Old z convention: dz --> -dz";
203 std::string theAlignRecordName =
"TrackerAlignmentRcd";
204 std::string theErrorRecordName =
"TrackerAlignmentErrorExtendedRcd";
208 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
212 myAlignmentErrorsExtended, poolDbService->
beginOfTime(), theErrorRecordName);
217 unsigned int nComp =
comp.size();
220 bool usecomps =
true;
223 for (
unsigned int i = 0;
i < nComp; ++
i) {
229 bool blindToZ(
false), blindToR(
false);
258 const bool blindToR) {
265 const double oldX = globalPos.
x();
266 const double oldY = globalPos.
y();
267 const double oldZ = globalPos.
z();
268 const double oldPhi = globalPos.
phi();
269 const double oldR =
sqrt(globalPos.
x() * globalPos.
x() + globalPos.
y() * globalPos.
y());
281 const double Roffset = 57.0;
284 deltaX += (xP - oldX);
285 deltaY += (yP - oldY);
288 const double trackeredgePlusZ = 271.846;
289 const double bowfactor =
m_bowingEpsilon * (trackeredgePlusZ * trackeredgePlusZ - oldZ * oldZ);
290 deltaX += oldX * bowfactor;
291 deltaY += oldY * bowfactor;
299 deltaX += (xP - oldX);
300 deltaY += (yP - oldY);
void applySystematicMisalignment(Alignable *)
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
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.
TrackerGeometry * build(const GeometricDet *gd, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
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