File indexing completed on 2024-04-06 12:26:56
0001 #include "RecoMuon/GlobalTrackingTools/interface/ThrParameters.h"
0002 #include "FWCore/Framework/interface/ESHandle.h"
0003
0004 using namespace edm;
0005 using namespace std;
0006
0007 ThrParameters::ThrParameters(ESHandle<DYTThrObject> dytThresholdsH,
0008 const AlignmentErrorsExtended& dtAlignmentErrors,
0009 const AlignmentErrorsExtended& cscAlignmentErrors) {
0010 if (dytThresholdsH.isValid()) {
0011 dytThresholds = dytThresholdsH.product();
0012 isValidThdDB_ = true;
0013 } else {
0014 dytThresholds = nullptr;
0015 isValidThdDB_ = false;
0016 }
0017
0018
0019 for (std::vector<AlignTransformErrorExtended>::const_iterator it = dtAlignmentErrors.m_alignError.begin();
0020 it != dtAlignmentErrors.m_alignError.end();
0021 it++) {
0022 CLHEP::HepSymMatrix error = (*it).matrix();
0023 GlobalError glbErr(error[0][0], error[1][0], error[1][1], error[2][0], error[2][1], error[2][2]);
0024 DTChamberId DTid((*it).rawId());
0025 dtApeMap.insert(pair<DTChamberId, GlobalError>(DTid, glbErr));
0026 }
0027 for (std::vector<AlignTransformErrorExtended>::const_iterator it = cscAlignmentErrors.m_alignError.begin();
0028 it != cscAlignmentErrors.m_alignError.end();
0029 it++) {
0030 CLHEP::HepSymMatrix error = (*it).matrix();
0031 GlobalError glbErr(error[0][0], error[1][0], error[1][1], error[2][0], error[2][1], error[2][2]);
0032 CSCDetId CSCid((*it).rawId());
0033 cscApeMap.insert(pair<CSCDetId, GlobalError>(CSCid, glbErr));
0034 }
0035 }
0036
0037 ThrParameters::~ThrParameters() {}