5 #include "CLHEP/Vector/RotationInterfaces.h"
41 #include "CLHEP/Vector/ThreeVector.h"
64 referenceTracker(nullptr),
65 dummyTracker(nullptr),
66 currentTracker(nullptr),
68 theSurveyValues(nullptr),
69 theSurveyErrors(nullptr),
70 levelStrings_(cfg.getUntrackedParameter<std::
vector<std::
string> >(
"levels")),
71 fromDD4hep_(cfg.getUntrackedParameter<bool>(
"fromDD4hep")),
72 writeToDB_(cfg.getUntrackedParameter<bool>(
"writeToDB")),
73 commonTrackerLevel_(align::invalid),
74 moduleListFile_(nullptr),
76 inputRootFile1_(nullptr),
77 inputRootFile2_(nullptr),
78 inputTree01_(nullptr),
79 inputTree02_(nullptr),
80 inputTree11_(nullptr),
81 inputTree12_(nullptr),
108 fin.open(detIdFlagFile_.c_str());
110 while (!fin.eof() && fin.good()) {
120 std::ifstream inFile;
121 inFile.open(weightByIdFile_.c_str());
123 while (!inFile.eof()) {
127 inFile.ignore(256,
'\n');
135 theFile_ =
new TFile(filename_.c_str(),
"RECREATE");
138 alignTree_->Branch(
"id", &
id_,
"id/I");
139 alignTree_->Branch(
"badModuleQuality", &
badModuleQuality_,
"badModuleQuality/I");
140 alignTree_->Branch(
"inModuleList", &
inModuleList_,
"inModuleList/I");
141 alignTree_->Branch(
"level", &
level_,
"level/I");
142 alignTree_->Branch(
"mid", &
mid_,
"mid/I");
143 alignTree_->Branch(
"mlevel", &
mlevel_,
"mlevel/I");
144 alignTree_->Branch(
"sublevel", &
sublevel_,
"sublevel/I");
145 alignTree_->Branch(
"x", &
xVal_,
"x/F");
146 alignTree_->Branch(
"y", &
yVal_,
"y/F");
147 alignTree_->Branch(
"z", &
zVal_,
"z/F");
148 alignTree_->Branch(
"r", &
rVal_,
"r/F");
149 alignTree_->Branch(
"phi", &
phiVal_,
"phi/F");
150 alignTree_->Branch(
"eta", &
etaVal_,
"eta/F");
151 alignTree_->Branch(
"alpha", &
alphaVal_,
"alpha/F");
152 alignTree_->Branch(
"beta", &
betaVal_,
"beta/F");
153 alignTree_->Branch(
"gamma", &
gammaVal_,
"gamma/F");
154 alignTree_->Branch(
"dx", &
dxVal_,
"dx/F");
155 alignTree_->Branch(
"dy", &
dyVal_,
"dy/F");
156 alignTree_->Branch(
"dz", &
dzVal_,
"dz/F");
157 alignTree_->Branch(
"dr", &
drVal_,
"dr/F");
158 alignTree_->Branch(
"dphi", &
dphiVal_,
"dphi/F");
159 alignTree_->Branch(
"dalpha", &
dalphaVal_,
"dalpha/F");
160 alignTree_->Branch(
"dbeta", &
dbetaVal_,
"dbeta/F");
161 alignTree_->Branch(
"dgamma", &
dgammaVal_,
"dgamma/F");
162 alignTree_->Branch(
"du", &
duVal_,
"du/F");
163 alignTree_->Branch(
"dv", &
dvVal_,
"dv/F");
164 alignTree_->Branch(
"dw", &
dwVal_,
"dw/F");
165 alignTree_->Branch(
"da", &
daVal_,
"da/F");
166 alignTree_->Branch(
"db", &
dbVal_,
"db/F");
167 alignTree_->Branch(
"dg", &
dgVal_,
"dg/F");
168 alignTree_->Branch(
"useDetId", &
useDetId_,
"useDetId/I");
169 alignTree_->Branch(
"detDim", &
detDim_,
"detDim/I");
170 alignTree_->Branch(
"surW", &
surWidth_,
"surW/F");
171 alignTree_->Branch(
"surL", &
surLength_,
"surL/F");
172 alignTree_->Branch(
"surRot", &
surRot_,
"surRot[9]/D");
173 alignTree_->Branch(
"identifiers", &
identifiers_,
"identifiers[6]/I");
174 alignTree_->Branch(
"type", &
type_,
"type/I");
175 alignTree_->Branch(
"surfDeform", &
surfDeform_,
"surfDeform[13]/D");
177 for (std::vector<TrackerMap>::iterator it =
m_vtkmap_.begin(); it !=
m_vtkmap_.end(); ++it) {
186 for (
int ii = 0;
ii < 13; ++
ii) {
187 std::stringstream histname0;
188 histname0 <<
"SurfDeform_Par_" <<
ii;
189 m_h1_[histname0.str()] = subDir_All.
make<TH1D>(
192 std::stringstream histname1;
193 histname1 <<
"SurfDeform_PixelBarrel_Par_" <<
ii;
194 m_h1_[histname1.str()] = subDir_PXB.
make<TH1D>(
197 std::stringstream histname2;
198 histname2 <<
"SurfDeform_PixelEndcap_Par_" <<
ii;
199 m_h1_[histname2.str()] = subDir_PXF.
make<TH1D>(
208 for (std::vector<TrackerMap>::iterator it =
m_vtkmap_.begin(); it !=
m_vtkmap_.end(); ++it) {
209 std::stringstream mapname;
210 mapname <<
"TkMap_SurfDeform" << iname <<
".png";
211 it->save(
true, 0, 0, mapname.str());
214 mapname <<
"TkMap_SurfDeform" << iname <<
".pdf";
215 it->save(
true, 0, 0, mapname.str());
262 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
266 *myAlignmentErrorsExtended, poolDbService->
beginOfTime(),
"TrackerAlignmentErrorExtendedRcd");
274 int inputRawId1, inputRawId2;
275 double inputX1, inputY1, inputZ1, inputX2, inputY2, inputZ2;
276 double inputAlpha1, inputBeta1, inputGamma1, inputAlpha2, inputBeta2, inputGamma2;
290 edm::LogInfo(
"TrackerGeometryCompare") <<
"Error: Module list not found! Please verify that given list exists!";
299 inputTree01_->SetBranchAddress(
"rawid", &inputRawId1);
300 inputTree01_->SetBranchAddress(
"x", &inputX1);
301 inputTree01_->SetBranchAddress(
"y", &inputY1);
302 inputTree01_->SetBranchAddress(
"z", &inputZ1);
303 inputTree01_->SetBranchAddress(
"alpha", &inputAlpha1);
304 inputTree01_->SetBranchAddress(
"beta", &inputBeta1);
305 inputTree01_->SetBranchAddress(
"gamma", &inputGamma1);
307 int nEntries1 = inputTree01_->GetEntries();
309 for (
int i = 0;
i < nEntries1; ++
i) {
310 inputTree01_->GetEntry(
i);
311 CLHEP::Hep3Vector translation1(inputX1, inputY1, inputZ1);
312 CLHEP::HepEulerAngles eulerangles1(inputAlpha1, inputBeta1, inputGamma1);
313 uint32_t detid1 = inputRawId1;
315 alignments1->
m_align.push_back(transform1);
318 CLHEP::HepSymMatrix clhepSymMatrix(3, 0);
320 alignmentErrors1->
m_alignError.push_back(transformError);
324 std::sort(alignments1->
m_align.begin(), alignments1->
m_align.end());
333 inputTree02_->SetBranchAddress(
"rawid", &inputRawId2);
334 inputTree02_->SetBranchAddress(
"x", &inputX2);
335 inputTree02_->SetBranchAddress(
"y", &inputY2);
336 inputTree02_->SetBranchAddress(
"z", &inputZ2);
337 inputTree02_->SetBranchAddress(
"alpha", &inputAlpha2);
338 inputTree02_->SetBranchAddress(
"beta", &inputBeta2);
339 inputTree02_->SetBranchAddress(
"gamma", &inputGamma2);
341 int nEntries2 = inputTree02_->GetEntries();
343 for (
int i = 0;
i < nEntries2; ++
i) {
344 inputTree02_->GetEntry(
i);
345 CLHEP::Hep3Vector translation2(inputX2, inputY2, inputZ2);
346 CLHEP::HepEulerAngles eulerangles2(inputAlpha2, inputBeta2, inputGamma2);
347 uint32_t detid2 = inputRawId2;
349 alignments2->
m_align.push_back(transform2);
352 CLHEP::HepSymMatrix clhepSymMatrix(3, 0);
354 alignmentErrors2->
m_alignError.push_back(transformError);
358 std::sort(alignments2->
m_align.begin(), alignments2->
m_align.end());
379 &(*theRefTracker), &(*alignments1), &(*alignmentErrors1),
AlignTransform());
386 int inputDtype1, inputDtype2;
387 std::vector<double> inputDpar1;
388 std::vector<double> inputDpar2;
389 std::vector<double>* p_inputDpar1 = &inputDpar1;
390 std::vector<double>* p_inputDpar2 = &inputDpar2;
397 inputTree11_->SetBranchAddress(
"irawid", &inputRawid1);
398 inputTree11_->SetBranchAddress(
"dtype", &inputDtype1);
399 inputTree11_->SetBranchAddress(
"dpar", &p_inputDpar1);
401 unsigned int nEntries11 = inputTree11_->GetEntries();
402 edm::LogInfo(
"TrackerGeometryCompare") <<
" nentries11 = " << nEntries11;
403 for (
unsigned int iEntry = 0; iEntry < nEntries11; ++iEntry) {
404 inputTree11_->GetEntry(iEntry);
408 if (
int(comp1[iEntry]->
id()) == inputRawid1) {
409 comp1[iEntry]->setSurfaceDeformation(surfDef1,
true);
419 &(*theCurTracker), &(*alignments2), &(*alignmentErrors2),
AlignTransform());
428 inputTree12_->SetBranchAddress(
"irawid", &inputRawid2);
429 inputTree12_->SetBranchAddress(
"dtype", &inputDtype2);
430 inputTree12_->SetBranchAddress(
"dpar", &p_inputDpar2);
432 unsigned int nEntries12 = inputTree12_->GetEntries();
433 edm::LogInfo(
"TrackerGeometryCompare") <<
" nentries12 = " << nEntries12;
434 for (
unsigned int iEntry = 0; iEntry < nEntries12; ++iEntry) {
435 inputTree12_->GetEntry(iEntry);
439 if (
int(comp2[iEntry]->
id()) == inputRawid2) {
440 comp2[iEntry]->setSurfaceDeformation(surfDef2,
true);
446 delete alignmentErrors1;
448 delete alignmentErrors2;
455 int inputSubdetid1, inputSubdetid2;
456 int inputDtype1, inputDtype2;
457 std::vector<double> inputDpar1;
458 std::vector<double> inputDpar2;
459 std::vector<double>* p_inputDpar1 = &inputDpar1;
460 std::vector<double>* p_inputDpar2 = &inputDpar2;
463 refTree->SetBranchAddress(
"irawid", &inputRawid1);
464 refTree->SetBranchAddress(
"subdetid", &inputSubdetid1);
465 refTree->SetBranchAddress(
"dtype", &inputDtype1);
466 refTree->SetBranchAddress(
"dpar", &p_inputDpar1);
469 curTree->SetBranchAddress(
"irawid", &inputRawid2);
470 curTree->SetBranchAddress(
"subdetid", &inputSubdetid2);
471 curTree->SetBranchAddress(
"dtype", &inputDtype2);
472 curTree->SetBranchAddress(
"dpar", &p_inputDpar2);
474 unsigned int nEntries11 = refTree->GetEntries();
475 unsigned int nEntries12 = curTree->GetEntries();
477 if (nEntries11 != nEntries12) {
478 edm::LogError(
"TrackerGeometryCompare") <<
" Surface deformation parameters in two geometries differ!\n";
482 for (
unsigned int iEntry = 0; iEntry < nEntries12; ++iEntry) {
483 refTree->GetEntry(iEntry);
484 curTree->GetEntry(iEntry);
485 for (
int ii = 0;
ii < 13; ++
ii) {
488 for (
int npar = 0; npar < int(inputDpar2.size()); ++npar) {
489 if (inputRawid1 == inputRawid2) {
490 surfDeform_[npar] = inputDpar2.at(npar) - inputDpar1.at(npar);
491 std::stringstream histname0;
492 histname0 <<
"SurfDeform_Par_" << npar;
495 if (inputSubdetid1 == 1 && inputSubdetid2 == 1) {
496 std::stringstream histname1;
497 histname1 <<
"SurfDeform_PixelBarrel_Par_" << npar;
501 if (inputSubdetid1 == 2 && inputSubdetid2 == 2) {
502 std::stringstream histname2;
503 histname2 <<
"SurfDeform_PixelEndcap_Par_" << npar;
516 std::vector<double> inputDpar2;
517 std::vector<double>* p_inputDpar2 = &inputDpar2;
520 curTree->SetBranchAddress(
"irawid", &inputRawid2);
521 curTree->SetBranchAddress(
"subdetid", &inputSubdetid2);
522 curTree->SetBranchAddress(
"dtype", &inputDtype2);
523 curTree->SetBranchAddress(
"dpar", &p_inputDpar2);
525 unsigned int nEntries12 = curTree->GetEntries();
527 for (
unsigned int iEntry = 0; iEntry < nEntries12; ++iEntry) {
528 curTree->GetEntry(iEntry);
529 for (
int ii = 0;
ii < 12; ++
ii) {
532 for (
int npar = 0; npar < int(inputDpar2.size()); ++npar) {
534 std::stringstream histname0;
535 histname0 <<
"SurfDeform_Par_" << npar;
538 if (inputSubdetid2 == 1) {
539 std::stringstream histname1;
540 histname1 <<
"SurfDeform_PixelBarrel_Par_" << npar;
544 if (inputSubdetid2 == 2) {
545 std::stringstream histname2;
546 histname2 <<
"SurfDeform_PixelEndcap_Par_" << npar;
558 std::vector<double> inputDpar1;
559 std::vector<double>* p_inputDpar1 = &inputDpar1;
562 refTree->SetBranchAddress(
"irawid", &inputRawid1);
563 refTree->SetBranchAddress(
"subdetid", &inputSubdetid1);
564 refTree->SetBranchAddress(
"dtype", &inputDtype1);
565 refTree->SetBranchAddress(
"dpar", &p_inputDpar1);
567 unsigned int nEntries11 = refTree->GetEntries();
569 for (
unsigned int iEntry = 0; iEntry < nEntries11; ++iEntry) {
570 refTree->GetEntry(iEntry);
571 for (
int ii = 0;
ii < 12; ++
ii) {
574 for (
int npar = 0; npar < int(inputDpar1.size()); ++npar) {
576 std::stringstream histname0;
577 histname0 <<
"SurfDeform_Par_" << npar;
580 if (inputSubdetid1 == 1) {
581 std::stringstream histname1;
582 histname1 <<
"SurfDeform_PixelBarrel_Par_" << npar;
586 if (inputSubdetid1 == 2) {
587 std::stringstream histname2;
588 histname2 <<
"SurfDeform_PixelEndcap_Par_" << npar;
597 edm::LogInfo(
"TrackerGeometryCompare") <<
">>>> Comparing IDEAL with IDEAL: nothing to do! <<<<\n";
607 using namespace align;
612 unsigned int nComp = refComp.size();
614 bool useLevel =
false;
627 CLHEP::Hep3Vector Rtotal, Wtotal, lRtotal, lWtotal;
628 Rtotal.set(0., 0., 0.);
629 Wtotal.set(0., 0., 0.);
630 lRtotal.set(0., 0., 0.);
631 lWtotal.set(0., 0., 0.);
633 bool converged =
false;
637 for (
int i = 0;
i < 100;
i++) {
646 CLHEP::Hep3Vector dR(-diff[0], -diff[1], -diff[2]);
647 CLHEP::Hep3Vector dW(diff[3], diff[4], diff[5]);
648 CLHEP::Hep3Vector dRLocal(-diff[6], -diff[7], -diff[8]);
649 CLHEP::Hep3Vector dWLocal(diff[9], diff[10], diff[11]);
656 CLHEP::HepRotation
rot(Wtotal.unit(), Wtotal.mag());
657 CLHEP::HepRotation drot(dW.unit(), dW.mag());
659 Wtotal.set(rot.axis().x() * rot.delta(), rot.axis().y() * rot.delta(), rot.axis().z() * rot.delta());
661 CLHEP::HepRotation rotLocal(lWtotal.unit(), lWtotal.mag());
662 CLHEP::HepRotation drotLocal(dWLocal.unit(), dWLocal.mag());
663 rotLocal *= drotLocal;
664 lWtotal.set(rotLocal.axis().x() * rotLocal.delta(),
665 rotLocal.axis().y() * rotLocal.delta(),
666 rotLocal.axis().z() * rotLocal.delta());
687 <<
", rawId: " << refAli->
geomDetId().
rawId() <<
", subdetId: " << detid.subdetId() <<
"): " << diff <<
check;
688 throw cms::Exception(
"Tolerance in TrackerGeometryCompare exceeded");
693 TRtot(1) = Rtotal.x();
694 TRtot(2) = Rtotal.y();
695 TRtot(3) = Rtotal.z();
696 TRtot(4) = Wtotal.x();
697 TRtot(5) = Wtotal.y();
698 TRtot(6) = Wtotal.z();
700 TRtot(7) = lRtotal.x();
701 TRtot(8) = lRtotal.y();
702 TRtot(9) = lRtotal.z();
703 TRtot(10) = lWtotal.x();
704 TRtot(11) = lWtotal.y();
705 TRtot(12) = lWtotal.z();
707 fillTree(refAli, TRtot, tTopo, iSetup);
711 for (
unsigned int i = 0;
i < nComp; ++
i)
716 edm::LogInfo(
"TrackerGeometryCompare") <<
"Setting Common Tracker System....";
731 edm::LogInfo(
"TrackerGeometryCompare") <<
"what we get from overlaying the pixels..." << theR <<
", " <<
rot;
747 TrackerCommonTR(1) = theRprime.x();
748 TrackerCommonTR(2) = theRprime.y();
749 TrackerCommonTR(3) = theRprime.z();
754 edm::LogInfo(
"TrackerGeometryCompare") <<
"and after the transformation: " << TrackerCommonTR;
763 unsigned int nComp = refComp.size();
765 bool useLevel =
false;
771 CLHEP::Hep3Vector Rtotal, Wtotal;
772 Rtotal.set(0., 0., 0.);
773 Wtotal.set(0., 0., 0.);
776 CLHEP::Hep3Vector dR(diff[0], diff[1], diff[2]);
778 CLHEP::Hep3Vector dW(diff[3], diff[4], diff[5]);
779 CLHEP::HepRotation
rot(Wtotal.unit(), Wtotal.mag());
780 CLHEP::HepRotation drot(dW.unit(), dW.mag());
782 Wtotal.set(rot.axis().x() * rot.delta(), rot.axis().y() * rot.delta(), rot.axis().z() * rot.delta());
789 for (
unsigned int i = 0;
i < nComp; ++
i)
918 std::copy(detPB.begin(), detPB.end(), std::back_inserter(allGeomDets));
919 std::copy(detPEC.begin(), detPEC.end(), std::back_inserter(allGeomDets));
920 std::copy(detTIB.begin(), detTIB.end(), std::back_inserter(allGeomDets));
921 std::copy(detTID.begin(), detTID.end(), std::back_inserter(allGeomDets));
922 std::copy(detTOB.begin(), detTOB.end(), std::back_inserter(allGeomDets));
923 std::copy(detTEC.begin(), detTEC.end(), std::back_inserter(allGeomDets));
926 for (
const auto&
i : allGeomDets) {
927 if (
i->components().size() == 1) {
928 rcdAlis.push_back(
i);
929 }
else if (
i->components().size() > 1) {
930 rcdAlis.push_back(
i);
931 const auto&
comp =
i->components();
932 for (
const auto&
j :
comp)
933 rcdAlis.push_back(
j);
938 for (
const auto&
k : rcdAlis) {
942 CLHEP::Hep3Vector clhepVector(pos.x(), pos.y(), pos.z());
943 CLHEP::HepRotation clhepRotation(
959 unsigned int nComp =
comp.size();
961 for (
unsigned int i = 0;
i < nComp; ++
i)
967 throw cms::Exception(
"DatabaseError") <<
"Error reading survey info from DB. Mismatched id!";
975 align::RotationType(rot.xx(), rot.xy(), rot.xz(), rot.yx(), rot.yy(), rot.yz(), rot.zx(), rot.zy(), rot.zz()));
989 for (
int i = 0;
i < nEntries;
i++) {
998 switch (subdetlevel) {
1054 edm::LogInfo(
"TrackerGeometryCompare") <<
"Error: bad subdetid!!";
align::Scalar width() const
align::StructureType stringToId(const char *) const
align::ID id() const
Return the ID of Alignable, i.e. DetId of 'first' component GeomDet(Unit).
std::ifstream moduleListFile_
T getUntrackedParameter(std::string const &, T const &) const
Alignables & pixelHalfBarrelGeomDets()
Return pixel barrel GeomDets.
std::string inputFilename2_
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
unsigned int tibLayer(const DetId &id) const
unsigned int tidRing(const DetId &id) const
align::GlobalVector TrackerCommonR_
uint16_t *__restrict__ id
Alignments * alignments() const override
Return alignments, sorted by DetId.
Vector3DBase< Scalar, GlobalTag > GlobalVector
void compareGeometries(Alignable *refAli, Alignable *curAli, const TrackerTopology *tTopo, const edm::EventSetup &iSetup)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Class to update a given geometry with a set of alignments.
std::vector< unsigned int > tidModuleInfo(const DetId &id) const
std::vector< align::StructureType > m_theLevels
#define DEFINE_FWK_MODULE(type)
unsigned int pxfDisk(const DetId &id) const
ErrorMatrix matrix() const
const std::vector< std::string > levelStrings_
const Alignments * theSurveyValues
TrackerGeometry * build(const GeometricDet *gd, const PTrackerAdditionalParametersPerDet *ptitp, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
unsigned int tecRing(const DetId &id) const
ring id
void addSurveyInfo(Alignable *ali)
Geom::Phi< T > phi() const
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd > ptitpToken_
unsigned int pxbLadder(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
AlgebraicVector diffAlignables(Alignable *refAli, Alignable *curAli, const std::string &weightBy, bool weightById, const std::vector< unsigned int > &weightByIdVector)
std::vector< TrackerMap > m_vtkmap_
void diffCommonTrackerSystem(Alignable *refAli, Alignable *curAli)
unsigned int tidWheel(const DetId &id) const
unsigned int pxbModule(const DetId &id) const
const RotationType & globalRotation() const
Return the global orientation of the object.
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
void setWidth(align::Scalar width)
Log< level::Error, false > LogError
uint8_t structureType() const
std::vector< unsigned int > tibStringInfo(const DetId &id) const
std::map< std::string, TH1D * > m_h1_
std::vector< int > moduleList_
std::vector< AlignTransform > m_align
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
const edm::ESGetToken< SiStripQuality, SiStripQualityRcd > stripQualityToken_
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
const align::RotationType & rotation() const
void setLength(align::Scalar length)
bool getData(T &iHolder) const
const align::PositionType & position() const
std::vector< uint32_t > detIdFlagVector_
std::vector< unsigned int > tecPetalInfo(const DetId &id) const
unsigned int tidSide(const DetId &id) const
std::vector< unsigned int > tobRodInfo(const DetId &id) const
Alignables & innerBarrelGeomDets()
Return inner barrel GeomDets.
cond::Time_t beginOfTime() const
const edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
std::vector< unsigned int > weightByIdVector_
Alignables & TIDGeomDets()
Return TID GeomDets.
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)
bool IsModuleBad(const uint32_t &detid) const
void beginJob() override
Read from DB and print survey info.
void analyze(const edm::Event &, const edm::EventSetup &) override
std::string inputFilename1_
TrackerGeometryCompare(const edm::ParameterSet &)
Do nothing. Required by framework.
T * make(const Args &...args) const
make new ROOT object
align::GlobalVector TrackerCommonT_
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
virtual const Alignables & components() const =0
Return vector of all direct components.
const AlignableObjectId & objectIdProvider() const
Return tracker alignable object ID provider derived from the tracker's geometry.
bool IsModuleBad(const uint32_t &detid) const
std::string inputTreenameAlign_
Alignables & endcapGeomDets()
Return endcap GeomDets.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
unsigned int tibModule(const DetId &id) const
Alignables & pixelEndcapGeomDets()
Return pixel endcap GeomDets.
unsigned int pxfModule(const DetId &id) const
void fillTree(Alignable *refAli, const AlgebraicVector &diff, const TrackerTopology *tTopo, const edm::EventSetup &iSetup)
unsigned int pxbLayer(const DetId &id) const
unsigned int tecModule(const DetId &id) const
Log< level::Info, false > LogInfo
CLHEP::HepVector AlgebraicVector
AlgebraicVector EulerAngles
align::Scalar length() const
Alignables & outerBarrelGeomDets()
Return outer barrel GeomDets.
AlignableTracker * currentTracker
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
const Alignables & deepComponents() const
void surveyToTracker(AlignableTracker *ali, Alignments *alignVals, AlignmentErrorsExtended *alignErrors)
std::vector< AlignTransformErrorExtended > m_alignError
void setSurvey(const SurveyDet *)
Set survey info.
void setCommonTrackerSystem()
std::string setCommonTrackerSystem_
const edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4hep_
align::StructureType commonTrackerLevel_
void fillIdentifiers(int subdetlevel, int rawid, const TrackerTopology *tTopo)
AlignmentErrorsExtended * alignmentErrors() const override
Return alignment errors, sorted by DetId.
unsigned int theSurveyIndex
std::vector< Alignable * > Alignables
unsigned int tobModule(const DetId &id) const
AlignableTracker * referenceTracker
std::string moduleListName_
std::string detIdFlagFile_
void createROOTGeometry(const edm::EventSetup &iSetup)
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
align::PositionType TrackerCommonCM_
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
std::string inputTreenameDeform_
unsigned int pxfSide(const DetId &id) const
const SurveyErrors * theSurveyErrors
const PositionType & globalPosition() const
Return the global position of the object.
std::vector< SurveyError > m_surveyErrors
unsigned int tecWheel(const DetId &id) const
void moveAlignable(Alignable *ali, AlgebraicVector diff)
Moves the alignable by the AlgebraicVector.
Alignable * mother() const
Return pointer to container alignable (if any)
const DetId & geomDetId() const
unsigned int pxfPanel(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const
std::string weightByIdFile_
unsigned int tobLayer(const DetId &id) const
void compareSurfaceDeformations(TTree *_inputTree11, TTree *_inputTree12)
unsigned int tecSide(const DetId &id) const
const edm::ESGetToken< SiPixelQuality, SiPixelQualityRcd > pixQualityToken_