CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ThrParameters Class Reference

#include <ThrParameters.h>

Public Member Functions

const std::map< CSCDetId, GlobalError > & GetCSCApeMap ()
 
const std::map< DTChamberId, GlobalError > & GetDTApeMap ()
 
const DYTThrObjectgetInitialThresholds ()
 
const bool isValidThdDB ()
 
void setInitialThr (double thr0)
 
 ThrParameters (const edm::EventSetup *)
 
 ~ThrParameters ()
 

Private Attributes

std::map< CSCDetId, GlobalErrorcscApeMap
 
std::map< DTChamberId, GlobalErrordtApeMap
 
const DYTThrObjectdytThresholds
 
bool isValidThdDB_
 
double x0
 

Detailed Description

Definition at line 21 of file ThrParameters.h.

Constructor & Destructor Documentation

◆ ThrParameters()

ThrParameters::ThrParameters ( const edm::EventSetup eSetup)

Definition at line 7 of file ThrParameters.cc.

7  {
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 }

References relativeConstraints::error, edm::EventSetup::get(), edm::get(), AlignmentErrorsExtended::m_alignError, and edm::ESHandle< T >::product().

◆ ~ThrParameters()

ThrParameters::~ThrParameters ( )

Definition at line 46 of file ThrParameters.cc.

46 {}

Member Function Documentation

◆ GetCSCApeMap()

const std::map<CSCDetId, GlobalError>& ThrParameters::GetCSCApeMap ( )
inline

Definition at line 29 of file ThrParameters.h.

29 { return cscApeMap; };

References cscApeMap.

◆ GetDTApeMap()

const std::map<DTChamberId, GlobalError>& ThrParameters::GetDTApeMap ( )
inline

Definition at line 28 of file ThrParameters.h.

28 { return dtApeMap; };

References dtApeMap.

◆ getInitialThresholds()

const DYTThrObject* ThrParameters::getInitialThresholds ( )
inline

Definition at line 30 of file ThrParameters.h.

30 { return dytThresholds; }

References dytThresholds.

◆ isValidThdDB()

const bool ThrParameters::isValidThdDB ( )
inline

Definition at line 27 of file ThrParameters.h.

27 { return isValidThdDB_; };

References isValidThdDB_.

Referenced by DynamicTruncation::DynamicTruncation().

◆ setInitialThr()

void ThrParameters::setInitialThr ( double  thr0)
inline

Definition at line 26 of file ThrParameters.h.

26 { x0 = thr0; };

References x0.

Member Data Documentation

◆ cscApeMap

std::map<CSCDetId, GlobalError> ThrParameters::cscApeMap
private

Definition at line 37 of file ThrParameters.h.

Referenced by GetCSCApeMap().

◆ dtApeMap

std::map<DTChamberId, GlobalError> ThrParameters::dtApeMap
private

Definition at line 36 of file ThrParameters.h.

Referenced by GetDTApeMap().

◆ dytThresholds

const DYTThrObject* ThrParameters::dytThresholds
private

Definition at line 35 of file ThrParameters.h.

Referenced by getInitialThresholds().

◆ isValidThdDB_

bool ThrParameters::isValidThdDB_
private

Definition at line 34 of file ThrParameters.h.

Referenced by isValidThdDB().

◆ x0

double ThrParameters::x0
private

Definition at line 33 of file ThrParameters.h.

Referenced by setInitialThr().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
ThrParameters::dtApeMap
std::map< DTChamberId, GlobalError > dtApeMap
Definition: ThrParameters.h:36
relativeConstraints.error
error
Definition: relativeConstraints.py:53
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
ThrParameters::dytThresholds
const DYTThrObject * dytThresholds
Definition: ThrParameters.h:35
edm::ESHandle
Definition: DTSurvey.h:22
ThrParameters::x0
double x0
Definition: ThrParameters.h:33
DTAlignmentErrorExtendedRcd
Definition: DTAlignmentErrorExtendedRcd.h:6
DYTThrObjectRcd
Definition: DYTThrObjectRcd.h:6
CSCAlignmentErrorExtendedRcd
Definition: CSCAlignmentErrorExtendedRcd.h:6
ThrParameters::cscApeMap
std::map< CSCDetId, GlobalError > cscApeMap
Definition: ThrParameters.h:37
CSCDetId
Definition: CSCDetId.h:26
GlobalErrorBase< double, ErrorMatrixTag >
get
#define get
AlignmentErrorsExtended::m_alignError
std::vector< AlignTransformErrorExtended > m_alignError
Definition: AlignmentErrorsExtended.h:19
DTChamberId
Definition: DTChamberId.h:14
ThrParameters::isValidThdDB_
bool isValidThdDB_
Definition: ThrParameters.h:34