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
 
AlignPCLThresholdgetAlignPCLThreshold (const std::string &AlignableId)
 
AlignPCLThreshold getAlignPCLThreshold (const std::string &AlignableId) const
 
std::array< float, 6 > getCut (const std::string &AlignableId) const
 
float getCut (const std::string &AlignableId, const coordType &type) 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
 
std::array< float, 6 > getMaxErrorCut (const std::string &AlignableId) const
 
float getMaxErrorCut (const std::string &AlignableId, const coordType &type) const
 
std::array< float, 6 > getMaxMoveCut (const std::string &AlignableId) const
 
float getMaxMoveCut (const std::string &AlignableId, const coordType &type) const
 
const int & getNrecords () const
 
std::array< float, 6 > getSigCut (const std::string &AlignableId) const
 
float getSigCut (const std::string &AlignableId, const coordType &type) 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

◆ threshold_map

typedef std::map<std::string, AlignPCLThreshold> AlignPCLThresholds::threshold_map

Definition at line 13 of file AlignPCLThresholds.h.

Member Enumeration Documentation

◆ coordType

Enumerator
theta_X 
theta_Y 
theta_Z 
extra_DOF 
endOfTypes 

Definition at line 14 of file AlignPCLThresholds.h.

Constructor & Destructor Documentation

◆ AlignPCLThresholds()

AlignPCLThresholds::AlignPCLThresholds ( )
inline

Definition at line 16 of file AlignPCLThresholds.h.

16 {}

Referenced by setAlignPCLThresholds().

◆ ~AlignPCLThresholds()

virtual AlignPCLThresholds::~AlignPCLThresholds ( )
inlinevirtual

Definition at line 17 of file AlignPCLThresholds.h.

17 {}

Member Function Documentation

◆ getAlignableList()

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

Definition at line 239 of file AlignPCLThresholds.cc.

239  {
240  std::vector<std::string> alignables_;
241  alignables_.reserve(m_thresholds.size());
242 
243  for (auto it = m_thresholds.begin(); it != m_thresholds.end(); ++it) {
244  alignables_.push_back(it->first);
245  }
246  return alignables_;
247 }

References m_thresholds.

◆ getAlignPCLThreshold() [1/2]

AlignPCLThreshold & AlignPCLThresholds::getAlignPCLThreshold ( const std::string &  AlignableId)

Definition at line 34 of file AlignPCLThresholds.cc.

34  {
35  return m_thresholds[AlignableId];
36 }

References m_thresholds.

◆ getAlignPCLThreshold() [2/2]

AlignPCLThreshold AlignPCLThresholds::getAlignPCLThreshold ( const std::string &  AlignableId) const

Definition at line 23 of file AlignPCLThresholds.cc.

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

References Exception, and m_thresholds.

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

◆ getCut() [1/2]

std::array< float, 6 > AlignPCLThresholds::getCut ( const std::string &  AlignableId) const

Definition at line 92 of file AlignPCLThresholds.cc.

92  {
94  return {{a.getXcut(), a.getYcut(), a.getZcut(), a.getThetaXcut(), a.getThetaYcut(), a.getThetaZcut()}};
95 }

References a, and getAlignPCLThreshold().

◆ getCut() [2/2]

float AlignPCLThresholds::getCut ( const std::string &  AlignableId,
const coordType type 
) const

Definition at line 68 of file AlignPCLThresholds.cc.

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")
85  << "Requested significance threshold for undefined coordinate" << type << "\n";
86  }
87 }

References a, Exception, getAlignPCLThreshold(), theta_X, theta_Y, theta_Z, X, Y, and Z.

◆ getExtraDOFCutsForAlignable()

std::array< float, 4 > AlignPCLThresholds::getExtraDOFCutsForAlignable ( const std::string &  AlignableId,
const unsigned int  i 
) const

Definition at line 168 of file AlignPCLThresholds.cc.

169  {
171  return a.getExtraDOFCuts(i);
172 }

References a, getAlignPCLThreshold(), and mps_fire::i.

Referenced by printAll().

◆ getExtraDOFLabelForAlignable()

std::string AlignPCLThresholds::getExtraDOFLabelForAlignable ( const std::string &  AlignableId,
const unsigned int  i 
) const

Definition at line 175 of file AlignPCLThresholds.cc.

176  {
178  return a.getExtraDOFLabel(i);
179 }

References a, getAlignPCLThreshold(), and mps_fire::i.

Referenced by printAll().

◆ getMaxErrorCut() [1/2]

std::array< float, 6 > AlignPCLThresholds::getMaxErrorCut ( const std::string &  AlignableId) const

Definition at line 157 of file AlignPCLThresholds.cc.

157  {
159  return {{a.getErrorXcut(),
160  a.getErrorYcut(),
161  a.getErrorZcut(),
162  a.getErrorThetaXcut(),
163  a.getErrorThetaYcut(),
164  a.getErrorThetaZcut()}};
165 }

References a, and getAlignPCLThreshold().

◆ getMaxErrorCut() [2/2]

float AlignPCLThresholds::getMaxErrorCut ( const std::string &  AlignableId,
const coordType type 
) const

Definition at line 133 of file AlignPCLThresholds.cc.

133  {
135  switch (type) {
136  case X:
137  return a.getErrorXcut();
138  case Y:
139  return a.getErrorYcut();
140  case Z:
141  return a.getErrorZcut();
142  case theta_X:
143  return a.getErrorThetaXcut();
144  case theta_Y:
145  return a.getErrorThetaYcut();
146  case theta_Z:
147  return a.getErrorThetaZcut();
148  default:
149  throw cms::Exception("AlignPCLThresholds")
150  << "Requested significance threshold for undefined coordinate" << type << "\n";
151  }
152 }

References a, Exception, getAlignPCLThreshold(), theta_X, theta_Y, theta_Z, X, Y, and Z.

◆ getMaxMoveCut() [1/2]

std::array< float, 6 > AlignPCLThresholds::getMaxMoveCut ( const std::string &  AlignableId) const

Definition at line 122 of file AlignPCLThresholds.cc.

122  {
124  return {{a.getMaxMoveXcut(),
125  a.getMaxMoveYcut(),
126  a.getMaxMoveZcut(),
127  a.getMaxMoveThetaXcut(),
128  a.getMaxMoveThetaYcut(),
129  a.getMaxMoveThetaZcut()}};
130 }

References a, and getAlignPCLThreshold().

◆ getMaxMoveCut() [2/2]

float AlignPCLThresholds::getMaxMoveCut ( const std::string &  AlignableId,
const coordType type 
) const

Definition at line 98 of file AlignPCLThresholds.cc.

98  {
100  switch (type) {
101  case X:
102  return a.getMaxMoveXcut();
103  case Y:
104  return a.getMaxMoveYcut();
105  case Z:
106  return a.getMaxMoveZcut();
107  case theta_X:
108  return a.getMaxMoveThetaXcut();
109  case theta_Y:
110  return a.getMaxMoveThetaYcut();
111  case theta_Z:
112  return a.getMaxMoveThetaZcut();
113  default:
114  throw cms::Exception("AlignPCLThresholds")
115  << "Requested significance threshold for undefined coordinate" << type << "\n";
116  }
117 }

References a, Exception, getAlignPCLThreshold(), theta_X, theta_Y, theta_Z, X, Y, and Z.

◆ getNrecords()

const int& AlignPCLThresholds::getNrecords ( ) const
inline

Definition at line 24 of file AlignPCLThresholds.h.

24 { return m_nrecords; }

References m_nrecords.

Referenced by printAll().

◆ getSigCut() [1/2]

std::array< float, 6 > AlignPCLThresholds::getSigCut ( const std::string &  AlignableId) const

Definition at line 62 of file AlignPCLThresholds.cc.

62  {
64  return {
65  {a.getSigXcut(), a.getSigYcut(), a.getSigZcut(), a.getSigThetaXcut(), a.getSigThetaYcut(), a.getSigThetaZcut()}};
66 }

References a, and getAlignPCLThreshold().

◆ getSigCut() [2/2]

float AlignPCLThresholds::getSigCut ( const std::string &  AlignableId,
const coordType type 
) const

Definition at line 38 of file AlignPCLThresholds.cc.

38  {
40  switch (type) {
41  case X:
42  return a.getSigXcut();
43  case Y:
44  return a.getSigYcut();
45  case Z:
46  return a.getSigZcut();
47  case theta_X:
48  return a.getSigThetaXcut();
49  case theta_Y:
50  return a.getSigThetaYcut();
51  case theta_Z:
52  return a.getSigThetaZcut();
53  default:
54  throw cms::Exception("AlignPCLThresholds")
55  << "Requested significance threshold for undefined coordinate" << type << "\n";
56  }
57 }

References a, Exception, getAlignPCLThreshold(), theta_X, theta_Y, theta_Z, X, Y, and Z.

◆ getThreshold_Map()

const threshold_map& AlignPCLThresholds::getThreshold_Map ( ) const
inline

Definition at line 23 of file AlignPCLThresholds.h.

23 { return m_thresholds; }

References m_thresholds.

◆ printAll()

void AlignPCLThresholds::printAll ( ) const

Definition at line 182 of file AlignPCLThresholds.cc.

182  {
183  edm::LogVerbatim("AlignPCLThresholds") << "AlignPCLThresholds::printAll()";
184  edm::LogVerbatim("AlignPCLThresholds") << " ========================================================================="
185  "==========================================";
186  edm::LogVerbatim("AlignPCLThresholds") << "N records cut: " << this->getNrecords();
187  for (auto it = m_thresholds.begin(); it != m_thresholds.end(); ++it) {
188  edm::LogVerbatim("AlignPCLThresholds") << " ======================================================================="
189  "============================================";
190  edm::LogVerbatim("AlignPCLThresholds")
191  << "key : " << it->first << " \n"
192  << "- Xcut : " << std::setw(4) << (it->second).getXcut() << std::setw(5) << " um"
193  << "| sigXcut : " << std::setw(4) << (it->second).getSigXcut() << std::setw(1) << " "
194  << "| maxMoveXcut : " << std::setw(4) << (it->second).getMaxMoveXcut() << std::setw(5) << " um"
195  << "| ErrorXcut : " << std::setw(4) << (it->second).getErrorXcut() << std::setw(5) << " um\n"
196 
197  << "- thetaXcut : " << std::setw(4) << (it->second).getThetaXcut() << std::setw(5) << " urad"
198  << "| sigThetaXcut : " << std::setw(4) << (it->second).getSigThetaXcut() << std::setw(1) << " "
199  << "| maxMoveThetaXcut : " << std::setw(4) << (it->second).getMaxMoveThetaXcut() << std::setw(5) << " urad"
200  << "| ErrorThetaXcut : " << std::setw(4) << (it->second).getErrorThetaXcut() << std::setw(5) << " urad\n"
201 
202  << "- Ycut : " << std::setw(4) << (it->second).getYcut() << std::setw(5) << " um"
203  << "| sigYcut : " << std::setw(4) << (it->second).getSigXcut() << std::setw(1) << " "
204  << "| maxMoveYcut : " << std::setw(4) << (it->second).getMaxMoveYcut() << std::setw(5) << " um"
205  << "| ErrorYcut : " << std::setw(4) << (it->second).getErrorYcut() << std::setw(5) << " um\n"
206 
207  << "- thetaYcut : " << std::setw(4) << (it->second).getThetaYcut() << std::setw(5) << " urad"
208  << "| sigThetaYcut : " << std::setw(4) << (it->second).getSigThetaYcut() << std::setw(1) << " "
209  << "| maxMoveThetaYcut : " << std::setw(4) << (it->second).getMaxMoveThetaYcut() << std::setw(5) << " urad"
210  << "| ErrorThetaYcut : " << std::setw(4) << (it->second).getErrorThetaYcut() << std::setw(5) << " urad\n"
211 
212  << "- Zcut : " << std::setw(4) << (it->second).getZcut() << std::setw(5) << " um"
213  << "| sigZcut : " << std::setw(4) << (it->second).getSigZcut() << std::setw(1) << " "
214  << "| maxMoveZcut : " << std::setw(4) << (it->second).getMaxMoveZcut() << std::setw(5) << " um"
215  << "| ErrorZcut : " << std::setw(4) << (it->second).getErrorZcut() << std::setw(5) << " um\n"
216 
217  << "- thetaZcut : " << std::setw(4) << (it->second).getThetaZcut() << std::setw(5) << " urad"
218  << "| sigThetaZcut : " << std::setw(4) << (it->second).getSigThetaZcut() << std::setw(1) << " "
219  << "| maxMoveThetaZcut : " << std::setw(4) << (it->second).getMaxMoveThetaZcut() << std::setw(5) << " urad"
220  << "| ErrorThetaZcut : " << std::setw(4) << (it->second).getErrorThetaZcut() << std::setw(5) << " urad";
221 
222  if ((it->second).hasExtraDOF()) {
223  for (unsigned int j = 0; j < (it->second).extraDOFSize(); j++) {
224  std::array<float, 4> extraDOFCuts = getExtraDOFCutsForAlignable(it->first, j);
225 
226  edm::LogVerbatim("AlignPCLThresholds")
227  << "Extra DOF " << j << " with label: " << getExtraDOFLabelForAlignable(it->first, j);
228  edm::LogVerbatim("AlignPCLThresholds")
229  << "- cut : " << std::setw(4) << extraDOFCuts.at(0) << std::setw(5) << " "
230  << "| sigCut : " << std::setw(4) << extraDOFCuts.at(1) << std::setw(1) << " "
231  << "| maxMoveCut : " << std::setw(4) << extraDOFCuts.at(2) << std::setw(5) << " "
232  << "| maxErrorCut : " << std::setw(4) << extraDOFCuts.at(3) << std::setw(5) << " ";
233  }
234  }
235  }
236 }

References getExtraDOFCutsForAlignable(), getExtraDOFLabelForAlignable(), getNrecords(), dqmiolumiharvest::j, and m_thresholds.

Referenced by AlignPCLThresholdsWriter::analyze().

◆ serialize()

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

◆ setAlignPCLThreshold()

void AlignPCLThresholds::setAlignPCLThreshold ( const std::string &  AlignableId,
const AlignPCLThreshold Threshold 
)

Definition at line 9 of file AlignPCLThresholds.cc.

9  {
10  m_thresholds[AlignableId] = Threshold;
11 }

References m_thresholds, and HLT_2018_cff::Threshold.

Referenced by AlignPCLThresholdsWriter::analyze().

◆ setAlignPCLThresholds()

void AlignPCLThresholds::setAlignPCLThresholds ( const int &  Nrecords,
const threshold_map Thresholds 
)

Definition at line 14 of file AlignPCLThresholds.cc.

14  {
15  m_nrecords = Nrecords;
17 }

References AlignPCLThresholds(), m_nrecords, and m_thresholds.

◆ setNRecords()

void AlignPCLThresholds::setNRecords ( const int &  Nrecords)

Definition at line 20 of file AlignPCLThresholds.cc.

20 { m_nrecords = Nrecords; }

References m_nrecords.

Referenced by AlignPCLThresholdsWriter::analyze().

◆ size()

double AlignPCLThresholds::size ( void  ) const
inline

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 52 of file AlignPCLThresholds.h.

◆ cond::serialization::access

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

Definition at line 52 of file AlignPCLThresholds.h.

Member Data Documentation

◆ m_nrecords

int AlignPCLThresholds::m_nrecords
private

Definition at line 50 of file AlignPCLThresholds.h.

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

◆ m_thresholds

threshold_map AlignPCLThresholds::m_thresholds
private
AlignPCLThresholds::theta_Y
Definition: AlignPCLThresholds.h:14
mps_fire.i
i
Definition: mps_fire.py:355
AlignPCLThresholds::AlignPCLThresholds
AlignPCLThresholds()
Definition: AlignPCLThresholds.h:16
AlignPCLThreshold
Definition: AlignPCLThreshold.h:6
AlignPCLThresholds::X
Definition: AlignPCLThresholds.h:14
AlignPCLThresholds::theta_Z
Definition: AlignPCLThresholds.h:14
AlignPCLThresholds::getNrecords
const int & getNrecords() const
Definition: AlignPCLThresholds.h:24
HLT_2018_cff.Threshold
Threshold
Definition: HLT_2018_cff.py:10302
AlignPCLThresholds::endOfTypes
Definition: AlignPCLThresholds.h:14
a
double a
Definition: hdecay.h:119
AlignPCLThresholds::Z
Definition: AlignPCLThresholds.h:14
edm::LogVerbatim
Definition: MessageLogger.h:297
AlignPCLThresholds::Y
Definition: AlignPCLThresholds.h:14
AlignPCLThresholds::getExtraDOFLabelForAlignable
std::string getExtraDOFLabelForAlignable(const std::string &AlignableId, const unsigned int i) const
Definition: AlignPCLThresholds.cc:175
type
type
Definition: HCALResponse.h:21
AlignPCLThresholds::m_thresholds
threshold_map m_thresholds
Definition: AlignPCLThresholds.h:49
AlignPCLThresholds::m_nrecords
int m_nrecords
Definition: AlignPCLThresholds.h:50
AlignPCLThresholds::getAlignPCLThreshold
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const
Definition: AlignPCLThresholds.cc:23
Exception
Definition: hltDiff.cc:246
AlignPCLThresholds::theta_X
Definition: AlignPCLThresholds.h:14
AlignPCLThresholds::extra_DOF
Definition: AlignPCLThresholds.h:14
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
AlignPCLThresholds::getExtraDOFCutsForAlignable
std::array< float, 4 > getExtraDOFCutsForAlignable(const std::string &AlignableId, const unsigned int i) const
Definition: AlignPCLThresholds.cc:168