CMS 3D CMS Logo

ThrParameters.cc
Go to the documentation of this file.
3 
4 using namespace edm;
5 using namespace std;
6 
8  // Read the threshold DB
9  ESHandle<DYTThrObject> dytThresholdsH;
10 
11  // This try catch is just temporary and
12  // will be removed as soon as the DYTThrObject
13  // record is included in a GT.
14  // It is necessary here for testing
15  try {
16  eSetup->get<DYTThrObjectRcd>().get(dytThresholdsH);
17  dytThresholds = dytThresholdsH.product();
18  isValidThdDB_ = true;
19  } catch (...) {
20  isValidThdDB_ = false;
21  }
22 
23  // Ape are always filled even they're null
24  ESHandle<AlignmentErrorsExtended> dtAlignmentErrorsExtended;
25  eSetup->get<DTAlignmentErrorExtendedRcd>().get(dtAlignmentErrorsExtended);
26  for (std::vector<AlignTransformErrorExtended>::const_iterator it = dtAlignmentErrorsExtended->m_alignError.begin();
27  it != dtAlignmentErrorsExtended->m_alignError.end();
28  it++) {
29  CLHEP::HepSymMatrix error = (*it).matrix();
30  GlobalError glbErr(error[0][0], error[1][0], error[1][1], error[2][0], error[2][1], error[2][2]);
31  DTChamberId DTid((*it).rawId());
32  dtApeMap.insert(pair<DTChamberId, GlobalError>(DTid, glbErr));
33  }
34  ESHandle<AlignmentErrorsExtended> cscAlignmentErrorsExtended;
35  eSetup->get<CSCAlignmentErrorExtendedRcd>().get(cscAlignmentErrorsExtended);
36  for (std::vector<AlignTransformErrorExtended>::const_iterator it = cscAlignmentErrorsExtended->m_alignError.begin();
37  it != cscAlignmentErrorsExtended->m_alignError.end();
38  it++) {
39  CLHEP::HepSymMatrix error = (*it).matrix();
40  GlobalError glbErr(error[0][0], error[1][0], error[1][1], error[2][0], error[2][1], error[2][2]);
41  CSCDetId CSCid((*it).rawId());
42  cscApeMap.insert(pair<CSCDetId, GlobalError>(CSCid, glbErr));
43  }
44 }
45 
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
ESHandle.h
edm
HLT enums.
Definition: AlignableModifier.h:19
relativeConstraints.error
error
Definition: relativeConstraints.py:53
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
edm::ESHandle
Definition: DTSurvey.h:22
DTAlignmentErrorExtendedRcd
Definition: DTAlignmentErrorExtendedRcd.h:6
DYTThrObjectRcd
Definition: DYTThrObjectRcd.h:6
CSCAlignmentErrorExtendedRcd
Definition: CSCAlignmentErrorExtendedRcd.h:6
ThrParameters::ThrParameters
ThrParameters(const edm::EventSetup *)
Definition: ThrParameters.cc:7
edm::get
T const & get(Event const &event, InputTag const &tag) noexcept(false)
Definition: Event.h:671
CSCDetId
Definition: CSCDetId.h:26
GlobalErrorBase< double, ErrorMatrixTag >
edm::EventSetup
Definition: EventSetup.h:57
std
Definition: JetResolutionObject.h:76
ThrParameters::~ThrParameters
~ThrParameters()
Definition: ThrParameters.cc:46
ThrParameters.h
AlignmentErrorsExtended::m_alignError
std::vector< AlignTransformErrorExtended > m_alignError
Definition: AlignmentErrorsExtended.h:19
DTChamberId
Definition: DTChamberId.h:14