test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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,
GlobalError
dtApeMap
 
const DYTThrObjectdytThresholds
 
bool isValidThdDB_
 
double x0
 

Detailed Description

Definition at line 18 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(), and edm::ESHandle< class >::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:33
std::map< CSCDetId, GlobalError > cscApeMap
Definition: ThrParameters.h:35
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
std::map< DTChamberId, GlobalError > dtApeMap
Definition: ThrParameters.h:34
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 27 of file ThrParameters.h.

References cscApeMap.

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

Definition at line 26 of file ThrParameters.h.

References dtApeMap.

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

Definition at line 28 of file ThrParameters.h.

References dytThresholds.

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

Definition at line 25 of file ThrParameters.h.

References isValidThdDB_.

Referenced by DynamicTruncation::DynamicTruncation().

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

Definition at line 24 of file ThrParameters.h.

References x0.

24 {x0 = thr0;};

Member Data Documentation

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

Definition at line 35 of file ThrParameters.h.

Referenced by GetCSCApeMap().

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

Definition at line 34 of file ThrParameters.h.

Referenced by GetDTApeMap().

const DYTThrObject* ThrParameters::dytThresholds
private

Definition at line 33 of file ThrParameters.h.

Referenced by getInitialThresholds().

bool ThrParameters::isValidThdDB_
private

Definition at line 32 of file ThrParameters.h.

Referenced by isValidThdDB().

double ThrParameters::x0
private

Definition at line 31 of file ThrParameters.h.

Referenced by setInitialThr().