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<AlignmentErrors> dtAlignmentErrors;
25  eSetup->get<DTAlignmentErrorRcd>().get( dtAlignmentErrors );
26  for ( std::vector<AlignTransformError>::const_iterator it = dtAlignmentErrors->m_alignError.begin();
27  it != dtAlignmentErrors->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<AlignmentErrors> cscAlignmentErrors;
34  eSetup->get<CSCAlignmentErrorRcd>().get( cscAlignmentErrors );
35  for ( std::vector<AlignTransformError>::const_iterator it = cscAlignmentErrors->m_alignError.begin();
36  it != cscAlignmentErrors->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:55
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().