26 #include "CLHEP/Random/RandGauss.h" 42 : theAlignableTracker(
nullptr) {
61 if (m_radialEpsilon > -990.0) {
64 if (m_telescopeEpsilon > -990.0) {
67 if (m_layerRotEpsilon > -990.0) {
70 if (m_bowingEpsilon > -990.0) {
73 if (m_zExpEpsilon > -990.0) {
76 if (m_twistEpsilon > -990.0) {
79 if (m_ellipticalEpsilon > -990.0) {
82 if (m_skewEpsilon > -990.0) {
85 if (m_sagittaEpsilon > -990.0) {
92 edm::LogWarning(
"MisalignedTracker") <<
"Blind movements suppressed (TIB/TOB in z, TID/TEC in r)";
143 Alignments* myAlignments = theAlignableTracker->alignments();
148 std::string theAlignRecordName =
"TrackerAlignmentRcd";
149 std::string theErrorRecordName =
"TrackerAlignmentErrorExtendedRcd";
153 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
157 &(*myAlignmentErrorsExtended), poolDbService->
beginOfTime(), theErrorRecordName);
162 unsigned int nComp = comp.size();
165 bool usecomps =
true;
168 for (
unsigned int i = 0;
i < nComp; ++
i) {
174 bool blindToZ(
false), blindToR(
false);
194 if ((level == 1) || (level == 2)) {
203 const bool blindToR) {
210 const double oldX = globalPos.
x();
211 const double oldY = globalPos.
y();
212 const double oldZ = globalPos.
z();
213 const double oldPhi = globalPos.
phi();
214 const double oldR =
sqrt(globalPos.
x() * globalPos.
x() + globalPos.
y() * globalPos.
y());
226 const double Roffset = 57.0;
229 deltaX += (xP - oldX);
230 deltaY += (yP - oldY);
233 const double trackeredgePlusZ = 271.846;
234 const double bowfactor =
m_bowingEpsilon * (trackeredgePlusZ * trackeredgePlusZ - oldZ * oldZ);
235 deltaX += oldX * bowfactor;
236 deltaY += oldY * bowfactor;
244 deltaX += (xP - oldX);
245 deltaY += (yP - oldY);
void applySystematicMisalignment(Alignable *)
T getUntrackedParameter(std::string const &, T const &) const
Class to update a given geometry with a set of alignments.
static constexpr auto TID
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
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.
virtual const Alignables & components() const =0
Return vector of all direct components.
AlignableTracker * theAlignableTracker
#define DEFINE_FWK_MODULE(type)
void analyze(const edm::Event &, const edm::EventSetup &) override
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
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) ...
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
static constexpr auto TOB
void applyAlignments(C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
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.
T const * product() const
const DetId & geomDetId() const
static constexpr auto TEC