38 #include "CLHEP/Matrix/SymMatrix.h" 125 std::ifstream apeReadFile(
127 if (!apeReadFile.good()) {
129 <<
"Problem opening APE file: skipping" 133 std::set<int> apeList;
134 while (!apeReadFile.eof()) {
136 double x11, x21, x22, x31, x32, x33,
ignore;
138 apeReadFile >> apeId >> x11 >> x21 >> x22 >> x31 >> x32 >> x33 >> ignore >> ignore >> ignore >> ignore >>
139 ignore >> ignore >> ignore >> ignore >> ignore >> ignore >> ignore >> ignore >> ignore >> ignore >>
142 apeReadFile >> apeId >> x11 >> x22 >> x33 >> std::ws;
147 if (apeList.find(apeId) == apeList.end())
165 as[0][0] = x11 * x11;
166 as[1][1] = x22 * x22;
167 as[2][2] = x33 * x33;
184 GlobalErrorExtended(x11, x21, x31, 0, 0, 0, x22, x32, 0, 0, 0, x33, 0, 0, 0, 0, 0, 0, 0, 0, 0);
187 x11 * x11, 0, 0, 0, 0, 0, x22 * x22, 0, 0, 0, 0, x33 * x33, 0, 0, 0, 0, 0, 0, 0, 0, 0);
190 alidet->setAlignmentPositionError(globErr,
false);
191 apeList.insert(apeId);
194 <<
"Not Setting APE for Composite DetId " << apeId;
199 <<
"Skipping duplicate APE for DetId " << apeId;
205 <<
"Set " << apeList.size() <<
" APE values.";
215 std::ofstream apeSaveFile(
217 for (
int i = 0;
i < theSize; ++
i) {
235 sm = sm.similarity(am);
237 for (
int j = 0; j < sm.num_row(); ++j)
238 for (
int k = 0;
k <= j; ++
k)
239 apeSaveFile <<
" " << sm[j][
k];
241 apeSaveFile << std::endl;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
AlignableTracker * theTracker
~ApeSettingAlgorithm() override
Destructor.
def setup(process, global_tag, zero_tesla=False)
edm::ParameterSet theConfig
void run(const edm::EventSetup &setup, const EventInfo &eventInfo) override
Run the algorithm.
Interface/Base class for alignment algorithms, each alignment algorithm has to be derived from this c...
define event information passed to algorithms
ApeSettingAlgorithm(const edm::ParameterSet &cfg)
Constructor.
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
CLHEP::HepMatrix AlgebraicMatrix
AlignableNavigator * theAlignableNavigator
GlobalErrorBaseExtended< double, ErrorMatrixTag > GlobalErrorExtended
bool readFullLocalMatrix_
std::vector< AlignTransformErrorExtended > m_alignError
virtual void terminate()
Called at end of job (must be implemented in derived class)
AlignmentErrorsExtended * alignmentErrors() const override
Return alignment errors, sorted by DetId.
std::string fullPath() const
#define DEFINE_EDM_PLUGIN(factory, type, name)
eventInfo
add run, event number and lumi section
Constructor of the full muon geometry.
AlignableDetOrUnitPtr alignableFromDetId(const DetId &detid)
Returns AlignableDetOrUnitPtr corresponding to given DetId.
void initialize(const edm::EventSetup &setup, AlignableTracker *tracker, AlignableMuon *muon, AlignableExtras *extras, AlignmentParameterStore *store) override
Call at beginning of job.
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > AlgebraicMatrix33