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 ( const edm::EventSetup eSetup)

Definition at line 7 of file ThrParameters.cc.

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

8 {
9  // Read the threshold DB
10  ESHandle<DYTThrObject> dytThresholdsH;
11 
12  // This try catch is just temporary and
13  // will be removed as soon as the DYTThrObject
14  // record is included in a GT.
15  // It is necessary here for testing
16  try {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(); it++ ) {
28  CLHEP::HepSymMatrix error = (*it).matrix();
29  GlobalError glbErr(error[0][0], error[1][0], error[1][1], error[2][0], error[2][1], error[2][2]);
30  DTChamberId DTid((*it).rawId());
31  dtApeMap.insert( pair<DTChamberId, GlobalError> (DTid, glbErr) );
32  }
33  ESHandle<AlignmentErrorsExtended> cscAlignmentErrorsExtended;
34  eSetup->get<CSCAlignmentErrorExtendedRcd>().get( cscAlignmentErrorsExtended );
35  for ( std::vector<AlignTransformErrorExtended>::const_iterator it = cscAlignmentErrorsExtended->m_alignError.begin();
36  it != cscAlignmentErrorsExtended->m_alignError.end(); it++ ) {
37  CLHEP::HepSymMatrix error = (*it).matrix();
38  GlobalError glbErr(error[0][0], error[1][0], error[1][1], error[2][0], error[2][1], error[2][2]);
39  CSCDetId CSCid((*it).rawId());
40  cscApeMap.insert( pair<CSCDetId, GlobalError> (CSCid, glbErr) );
41  }
42 }
const DYTThrObject * dytThresholds
Definition: ThrParameters.h:36
std::vector< AlignTransformErrorExtended > m_alignError
std::map< CSCDetId, GlobalError > cscApeMap
Definition: ThrParameters.h:38
T get() const
Definition: EventSetup.h:68
T const * product() const
Definition: ESHandle.h:84
std::map< DTChamberId, GlobalError > dtApeMap
Definition: ThrParameters.h:37
ThrParameters::~ThrParameters ( )

Definition at line 44 of file ThrParameters.cc.

44 {}

Member Function Documentation

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

Definition at line 30 of file ThrParameters.h.

References cscApeMap.

30 {return cscApeMap;};
std::map< CSCDetId, GlobalError > cscApeMap
Definition: ThrParameters.h:38
const std::map<DTChamberId, GlobalError>& ThrParameters::GetDTApeMap ( )
inline

Definition at line 29 of file ThrParameters.h.

References dtApeMap.

29 {return dtApeMap;};
std::map< DTChamberId, GlobalError > dtApeMap
Definition: ThrParameters.h:37
const DYTThrObject* ThrParameters::getInitialThresholds ( )
inline

Definition at line 31 of file ThrParameters.h.

References dytThresholds.

31 {return dytThresholds;}
const DYTThrObject * dytThresholds
Definition: ThrParameters.h:36
const bool ThrParameters::isValidThdDB ( )
inline

Definition at line 28 of file ThrParameters.h.

References isValidThdDB_.

Referenced by DynamicTruncation::DynamicTruncation().

28 {return isValidThdDB_;};
void ThrParameters::setInitialThr ( double  thr0)
inline

Definition at line 27 of file ThrParameters.h.

References x0.

27 {x0 = thr0;};

Member Data Documentation

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

Definition at line 38 of file ThrParameters.h.

Referenced by GetCSCApeMap().

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

Definition at line 37 of file ThrParameters.h.

Referenced by GetDTApeMap().

const DYTThrObject* ThrParameters::dytThresholds
private

Definition at line 36 of file ThrParameters.h.

Referenced by getInitialThresholds().

bool ThrParameters::isValidThdDB_
private

Definition at line 35 of file ThrParameters.h.

Referenced by isValidThdDB().

double ThrParameters::x0
private

Definition at line 34 of file ThrParameters.h.

Referenced by setInitialThr().