CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
AlignPCLThresholds Class Reference

#include <AlignPCLThresholds.h>

Public Types

enum  coordType {
  X, Y, Z, theta_X,
  theta_Y, theta_Z, extra_DOF, endOfTypes
}
 
typedef std::map< std::string, AlignPCLThresholdthreshold_map
 

Public Member Functions

 AlignPCLThresholds ()
 
std::vector< std::string > getAlignableList () const
 
AlignPCLThreshold getAlignPCLThreshold (const std::string &AlignableId) const
 
AlignPCLThresholdgetAlignPCLThreshold (const std::string &AlignableId)
 
float getCut (const std::string &AlignableId, const coordType &type) const
 
std::array< float, 6 > getCut (const std::string &AlignableId) const
 
std::array< float, 4 > getExtraDOFCutsForAlignable (const std::string &AlignableId, const unsigned int i) const
 
std::string getExtraDOFLabelForAlignable (const std::string &AlignableId, const unsigned int i) const
 
float getMaxErrorCut (const std::string &AlignableId, const coordType &type) const
 
std::array< float, 6 > getMaxErrorCut (const std::string &AlignableId) const
 
float getMaxMoveCut (const std::string &AlignableId, const coordType &type) const
 
std::array< float, 6 > getMaxMoveCut (const std::string &AlignableId) const
 
const int & getNrecords () const
 
float getSigCut (const std::string &AlignableId, const coordType &type) const
 
std::array< float, 6 > getSigCut (const std::string &AlignableId) const
 
const threshold_mapgetThreshold_Map () const
 
void printAll () const
 
void setAlignPCLThreshold (const std::string &AlignableId, const AlignPCLThreshold &Threshold)
 
void setAlignPCLThresholds (const int &Nrecords, const threshold_map &Thresholds)
 
void setNRecords (const int &Nrecords)
 
double size () const
 
virtual ~AlignPCLThresholds ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

int m_nrecords
 
threshold_map m_thresholds
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 11 of file AlignPCLThresholds.h.

Member Typedef Documentation

Definition at line 13 of file AlignPCLThresholds.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

AlignPCLThresholds::AlignPCLThresholds ( )
inline

Definition at line 16 of file AlignPCLThresholds.h.

Referenced by setAlignPCLThresholds().

16 {}
virtual AlignPCLThresholds::~AlignPCLThresholds ( )
inlinevirtual

Member Function Documentation

std::vector< std::string > AlignPCLThresholds::getAlignableList ( ) const

Definition at line 221 of file AlignPCLThresholds.cc.

References m_thresholds.

Referenced by size().

221  {
222  std::vector<std::string> alignables_;
223  alignables_.reserve(m_thresholds.size());
224 
225  for(auto it = m_thresholds.begin(); it != m_thresholds.end() ; ++it){
226  alignables_.push_back(it->first);
227  }
228  return alignables_;
229 }
threshold_map m_thresholds
AlignPCLThreshold AlignPCLThresholds::getAlignPCLThreshold ( const std::string &  AlignableId) const

Definition at line 25 of file AlignPCLThresholds.cc.

References Exception, and m_thresholds.

Referenced by getCut(), getExtraDOFCutsForAlignable(), getExtraDOFLabelForAlignable(), getMaxErrorCut(), getMaxMoveCut(), getNrecords(), and getSigCut().

25  {
26  threshold_map::const_iterator it = m_thresholds.find(AlignableId);
27 
28  if (it != m_thresholds.end()){
29  return it->second;
30  } else {
31  throw cms::Exception("AlignPCLThresholds")<< "No Thresholds defined for Alignable id " << AlignableId << "\n";
32  }
33 }
threshold_map m_thresholds
AlignPCLThreshold & AlignPCLThresholds::getAlignPCLThreshold ( const std::string &  AlignableId)

Definition at line 36 of file AlignPCLThresholds.cc.

References m_thresholds.

36  {
37  return m_thresholds[AlignableId];
38 }
threshold_map m_thresholds
float AlignPCLThresholds::getCut ( const std::string &  AlignableId,
const coordType type 
) const

Definition at line 68 of file AlignPCLThresholds.cc.

References a, Exception, getAlignPCLThreshold(), AlignPCLThreshold::getThetaXcut(), AlignPCLThreshold::getThetaYcut(), AlignPCLThreshold::getThetaZcut(), AlignPCLThreshold::getXcut(), AlignPCLThreshold::getYcut(), AlignPCLThreshold::getZcut(), theta_X, theta_Y, theta_Z, X, Y, and Z.

Referenced by getNrecords().

68  {
70  switch(type){
71  case X:
72  return a.getXcut();
73  case Y:
74  return a.getYcut();
75  case Z:
76  return a.getZcut();
77  case theta_X:
78  return a.getThetaXcut();
79  case theta_Y:
80  return a.getThetaYcut();
81  case theta_Z:
82  return a.getThetaZcut();
83  default:
84  throw cms::Exception("AlignPCLThresholds")<<"Requested significance threshold for undefined coordinate"<< type << "\n";
85  }
86 }
type
Definition: HCALResponse.h:21
float getXcut() const
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const
float getZcut() const
float getThetaXcut() const
float getThetaZcut() const
float getYcut() const
double a
Definition: hdecay.h:121
float getThetaYcut() const
std::array< float, 6 > AlignPCLThresholds::getCut ( const std::string &  AlignableId) const

Definition at line 91 of file AlignPCLThresholds.cc.

References a, getAlignPCLThreshold(), AlignPCLThreshold::getThetaXcut(), AlignPCLThreshold::getThetaYcut(), AlignPCLThreshold::getThetaZcut(), AlignPCLThreshold::getXcut(), AlignPCLThreshold::getYcut(), and AlignPCLThreshold::getZcut().

91  {
93  return {{a.getXcut(),a.getYcut(), a.getZcut(), a.getThetaXcut(), a.getThetaYcut(),a.getThetaZcut()}};
94 }
float getXcut() const
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const
float getZcut() const
float getThetaXcut() const
float getThetaZcut() const
float getYcut() const
double a
Definition: hdecay.h:121
float getThetaYcut() const
std::array< float, 4 > AlignPCLThresholds::getExtraDOFCutsForAlignable ( const std::string &  AlignableId,
const unsigned int  i 
) const

Definition at line 155 of file AlignPCLThresholds.cc.

References a, getAlignPCLThreshold(), and AlignPCLThreshold::getExtraDOFCuts().

Referenced by edmtest::AlignPCLThresholdsReader::analyze(), getNrecords(), and printAll().

155  {
157  return a.getExtraDOFCuts(i);
158 }
std::array< float, 4 > getExtraDOFCuts(const unsigned int i) const
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const
double a
Definition: hdecay.h:121
std::string AlignPCLThresholds::getExtraDOFLabelForAlignable ( const std::string &  AlignableId,
const unsigned int  i 
) const

Definition at line 161 of file AlignPCLThresholds.cc.

References a, getAlignPCLThreshold(), and AlignPCLThreshold::getExtraDOFLabel().

Referenced by edmtest::AlignPCLThresholdsReader::analyze(), getNrecords(), and printAll().

162 {
164  return a.getExtraDOFLabel(i);
165 }
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const
double a
Definition: hdecay.h:121
std::string getExtraDOFLabel(const unsigned int i) const
float AlignPCLThresholds::getMaxErrorCut ( const std::string &  AlignableId,
const coordType type 
) const

Definition at line 126 of file AlignPCLThresholds.cc.

References a, Exception, getAlignPCLThreshold(), AlignPCLThreshold::getErrorThetaXcut(), AlignPCLThreshold::getErrorThetaYcut(), AlignPCLThreshold::getErrorThetaZcut(), AlignPCLThreshold::getErrorXcut(), AlignPCLThreshold::getErrorYcut(), AlignPCLThreshold::getErrorZcut(), theta_X, theta_Y, theta_Z, X, Y, and Z.

Referenced by getNrecords().

126  {
128  switch(type){
129  case X:
130  return a.getErrorXcut();
131  case Y:
132  return a.getErrorYcut();
133  case Z:
134  return a.getErrorZcut();
135  case theta_X:
136  return a.getErrorThetaXcut();
137  case theta_Y:
138  return a.getErrorThetaYcut();
139  case theta_Z:
140  return a.getErrorThetaZcut();
141  default:
142  throw cms::Exception("AlignPCLThresholds")<<"Requested significance threshold for undefined coordinate"<< type << "\n";
143  }
144 }
float getErrorThetaZcut() const
type
Definition: HCALResponse.h:21
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const
float getErrorYcut() const
float getErrorZcut() const
float getErrorThetaYcut() const
double a
Definition: hdecay.h:121
float getErrorXcut() const
float getErrorThetaXcut() const
std::array< float, 6 > AlignPCLThresholds::getMaxErrorCut ( const std::string &  AlignableId) const
float AlignPCLThresholds::getMaxMoveCut ( const std::string &  AlignableId,
const coordType type 
) const

Definition at line 97 of file AlignPCLThresholds.cc.

References a, Exception, getAlignPCLThreshold(), AlignPCLThreshold::getMaxMoveThetaXcut(), AlignPCLThreshold::getMaxMoveThetaYcut(), AlignPCLThreshold::getMaxMoveThetaZcut(), AlignPCLThreshold::getMaxMoveXcut(), AlignPCLThreshold::getMaxMoveYcut(), AlignPCLThreshold::getMaxMoveZcut(), theta_X, theta_Y, theta_Z, X, Y, and Z.

Referenced by getNrecords().

97  {
99  switch(type){
100  case X:
101  return a.getMaxMoveXcut();
102  case Y:
103  return a.getMaxMoveYcut();
104  case Z:
105  return a.getMaxMoveZcut();
106  case theta_X:
107  return a.getMaxMoveThetaXcut();
108  case theta_Y:
109  return a.getMaxMoveThetaYcut();
110  case theta_Z:
111  return a.getMaxMoveThetaZcut();
112  default:
113  throw cms::Exception("AlignPCLThresholds")<<"Requested significance threshold for undefined coordinate"<< type << "\n";
114  }
115 }
type
Definition: HCALResponse.h:21
float getMaxMoveThetaXcut() const
float getMaxMoveZcut() const
float getMaxMoveThetaZcut() const
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const
float getMaxMoveYcut() const
double a
Definition: hdecay.h:121
float getMaxMoveThetaYcut() const
float getMaxMoveXcut() const
std::array< float, 6 > AlignPCLThresholds::getMaxMoveCut ( const std::string &  AlignableId) const
const int& AlignPCLThresholds::getNrecords ( ) const
inline
float AlignPCLThresholds::getSigCut ( const std::string &  AlignableId,
const coordType type 
) const

Definition at line 40 of file AlignPCLThresholds.cc.

References a, Exception, getAlignPCLThreshold(), AlignPCLThreshold::getSigThetaXcut(), AlignPCLThreshold::getSigThetaYcut(), AlignPCLThreshold::getSigThetaZcut(), AlignPCLThreshold::getSigXcut(), AlignPCLThreshold::getSigYcut(), AlignPCLThreshold::getSigZcut(), theta_X, theta_Y, theta_Z, X, Y, and Z.

Referenced by getNrecords().

40  {
42  switch(type){
43  case X:
44  return a.getSigXcut();
45  case Y:
46  return a.getSigYcut();
47  case Z:
48  return a.getSigZcut();
49  case theta_X:
50  return a.getSigThetaXcut();
51  case theta_Y:
52  return a.getSigThetaYcut();
53  case theta_Z:
54  return a.getSigThetaZcut();
55  default:
56  throw cms::Exception("AlignPCLThresholds")<<"Requested significance threshold for undefined coordinate"<< type << "\n";
57  }
58 }
type
Definition: HCALResponse.h:21
float getSigXcut() const
float getSigThetaXcut() const
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const
float getSigThetaYcut() const
float getSigYcut() const
double a
Definition: hdecay.h:121
float getSigZcut() const
float getSigThetaZcut() const
std::array< float, 6 > AlignPCLThresholds::getSigCut ( const std::string &  AlignableId) const
const threshold_map& AlignPCLThresholds::getThreshold_Map ( ) const
inline

Definition at line 23 of file AlignPCLThresholds.h.

References m_thresholds.

Referenced by edmtest::AlignPCLThresholdsReader::analyze().

23 {return m_thresholds;}
threshold_map m_thresholds
void AlignPCLThresholds::printAll ( ) const

Definition at line 168 of file AlignPCLThresholds.cc.

References getExtraDOFCutsForAlignable(), getExtraDOFLabelForAlignable(), getNrecords(), and m_thresholds.

Referenced by edmtest::AlignPCLThresholdsReader::analyze(), AlignPCLThresholdsWriter::analyze(), and size().

168  {
169 
170  edm::LogVerbatim("AlignPCLThresholds")<<"AlignPCLThresholds::printAll()";
171  edm::LogVerbatim("AlignPCLThresholds")<<" ===================================================================================================================";
172  edm::LogVerbatim("AlignPCLThresholds")<<"N records cut: "<<this->getNrecords();
173  for(auto it = m_thresholds.begin(); it != m_thresholds.end() ; ++it){
174  edm::LogVerbatim("AlignPCLThresholds")<<" ===================================================================================================================";
175  edm::LogVerbatim("AlignPCLThresholds")<<"key : " << it->first <<" \n"
176  <<"- Xcut : " <<std::setw(4)<< (it->second).getXcut() <<std::setw(5)<<" um"
177  <<"| sigXcut : " <<std::setw(4)<< (it->second).getSigXcut() <<std::setw(1)<<" "
178  <<"| maxMoveXcut : " <<std::setw(4)<< (it->second).getMaxMoveXcut() <<std::setw(5)<<" um"
179  <<"| ErrorXcut : " <<std::setw(4)<< (it->second).getErrorXcut() <<std::setw(5)<<" um\n"
180 
181  <<"- thetaXcut : " <<std::setw(4)<< (it->second).getThetaXcut() <<std::setw(5)<<" urad"
182  <<"| sigThetaXcut : " <<std::setw(4)<< (it->second).getSigThetaXcut() <<std::setw(1)<<" "
183  <<"| maxMoveThetaXcut : " <<std::setw(4)<< (it->second).getMaxMoveThetaXcut()<<std::setw(5)<<" urad"
184  <<"| ErrorThetaXcut : " <<std::setw(4)<< (it->second).getErrorThetaXcut() <<std::setw(5)<<" urad\n"
185 
186  <<"- Ycut : " <<std::setw(4)<< (it->second).getYcut() <<std::setw(5)<<" um"
187  <<"| sigYcut : " <<std::setw(4)<< (it->second).getSigXcut() <<std::setw(1)<<" "
188  <<"| maxMoveYcut : " <<std::setw(4)<< (it->second).getMaxMoveYcut() <<std::setw(5)<<" um"
189  <<"| ErrorYcut : " <<std::setw(4)<< (it->second).getErrorYcut() <<std::setw(5)<<" um\n"
190 
191  <<"- thetaYcut : " <<std::setw(4)<< (it->second).getThetaYcut() <<std::setw(5)<<" urad"
192  <<"| sigThetaYcut : " <<std::setw(4)<< (it->second).getSigThetaYcut() <<std::setw(1)<<" "
193  <<"| maxMoveThetaYcut : " <<std::setw(4)<< (it->second).getMaxMoveThetaYcut()<<std::setw(5)<<" urad"
194  <<"| ErrorThetaYcut : " <<std::setw(4)<< (it->second).getErrorThetaYcut() <<std::setw(5)<<" urad\n"
195 
196  <<"- Zcut : " <<std::setw(4)<< (it->second).getZcut() <<std::setw(5)<<" um"
197  <<"| sigZcut : " <<std::setw(4)<< (it->second).getSigZcut() <<std::setw(1)<<" "
198  <<"| maxMoveZcut : " <<std::setw(4)<< (it->second).getMaxMoveZcut() <<std::setw(5)<<" um"
199  <<"| ErrorZcut : " <<std::setw(4)<< (it->second).getErrorZcut() <<std::setw(5)<<" um\n"
200 
201  <<"- thetaZcut : " <<std::setw(4)<< (it->second).getThetaZcut() <<std::setw(5)<<" urad"
202  <<"| sigThetaZcut : " <<std::setw(4)<< (it->second).getSigThetaZcut() <<std::setw(1)<<" "
203  <<"| maxMoveThetaZcut : " <<std::setw(4)<< (it->second).getMaxMoveThetaZcut()<<std::setw(5)<<" urad"
204  <<"| ErrorThetaZcut : " <<std::setw(4)<< (it->second).getErrorThetaZcut() <<std::setw(5)<<" urad";
205 
206  if((it->second).hasExtraDOF()){
207  for (unsigned int j=0; j<(it->second).extraDOFSize(); j++){
208  std::array<float,4> extraDOFCuts = getExtraDOFCutsForAlignable(it->first,j);
209 
210  edm::LogVerbatim("AlignPCLThresholds")<<"Extra DOF " << j << " with label: "<<getExtraDOFLabelForAlignable(it->first,j);
211  edm::LogVerbatim("AlignPCLThresholds") <<"- cut : " << std::setw(4) << extraDOFCuts.at(0) << std::setw(5)<<" "
212  <<"| sigCut : " << std::setw(4) << extraDOFCuts.at(1) << std::setw(1)<<" "
213  <<"| maxMoveCut : " << std::setw(4) << extraDOFCuts.at(2) << std::setw(5)<<" "
214  <<"| maxErrorCut : " << std::setw(4) << extraDOFCuts.at(3) << std::setw(5)<<" ";
215  }
216  }
217  }
218 }
std::string getExtraDOFLabelForAlignable(const std::string &AlignableId, const unsigned int i) const
std::array< float, 4 > getExtraDOFCutsForAlignable(const std::string &AlignableId, const unsigned int i) const
threshold_map m_thresholds
const int & getNrecords() const
template<class Archive >
void AlignPCLThresholds::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void AlignPCLThresholds::setAlignPCLThreshold ( const std::string &  AlignableId,
const AlignPCLThreshold Threshold 
)
void AlignPCLThresholds::setAlignPCLThresholds ( const int &  Nrecords,
const threshold_map Thresholds 
)
void AlignPCLThresholds::setNRecords ( const int &  Nrecords)

Definition at line 20 of file AlignPCLThresholds.cc.

References m_nrecords.

Referenced by AlignPCLThresholdsWriter::analyze(), and ~AlignPCLThresholds().

20  {
21  m_nrecords=Nrecords;
22 }
double AlignPCLThresholds::size ( void  ) const
inline

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 53 of file AlignPCLThresholds.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 53 of file AlignPCLThresholds.h.

Member Data Documentation

int AlignPCLThresholds::m_nrecords
private

Definition at line 51 of file AlignPCLThresholds.h.

Referenced by getNrecords(), setAlignPCLThresholds(), and setNRecords().

threshold_map AlignPCLThresholds::m_thresholds
private