CMS 3D CMS Logo

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

#include <AlignPCLThresholds.h>

Inheritance diagram for AlignPCLThresholds:
AlignPCLThresholdsHG

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 ()
 

Protected Attributes

int m_nrecords
 
threshold_map m_thresholds
 

Private Member Functions

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

Friends

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

Detailed Description

Definition at line 12 of file AlignPCLThresholds.h.

Member Typedef Documentation

◆ threshold_map

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

Definition at line 14 of file AlignPCLThresholds.h.

Member Enumeration Documentation

◆ coordType

Constructor & Destructor Documentation

◆ AlignPCLThresholds()

AlignPCLThresholds::AlignPCLThresholds ( )
inline

Definition at line 17 of file AlignPCLThresholds.h.

Referenced by setAlignPCLThresholds().

17 {}

◆ ~AlignPCLThresholds()

virtual AlignPCLThresholds::~AlignPCLThresholds ( )
inlinevirtual

Definition at line 18 of file AlignPCLThresholds.h.

18 {}

Member Function Documentation

◆ getAlignableList()

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

Definition at line 239 of file AlignPCLThresholds.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and m_thresholds.

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 }
threshold_map m_thresholds

◆ getAlignPCLThreshold() [1/2]

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

Definition at line 23 of file AlignPCLThresholds.cc.

References Exception, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and m_thresholds.

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

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 }
threshold_map m_thresholds

◆ getAlignPCLThreshold() [2/2]

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

Definition at line 34 of file AlignPCLThresholds.cc.

References m_thresholds.

34  {
35  return m_thresholds[AlignableId];
36 }
threshold_map m_thresholds

◆ getCut() [1/2]

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

Definition at line 68 of file AlignPCLThresholds.cc.

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

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 }
double a
Definition: hdecay.h:121
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const

◆ getCut() [2/2]

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

Definition at line 92 of file AlignPCLThresholds.cc.

References a, and getAlignPCLThreshold().

92  {
94  return {{a.getXcut(), a.getYcut(), a.getZcut(), a.getThetaXcut(), a.getThetaYcut(), a.getThetaZcut()}};
95 }
double a
Definition: hdecay.h:121
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const

◆ getExtraDOFCutsForAlignable()

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

Definition at line 168 of file AlignPCLThresholds.cc.

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

Referenced by AlignPCLThresholdsHG::printAll(), and printAll().

169  {
171  return a.getExtraDOFCuts(i);
172 }
double a
Definition: hdecay.h:121
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const

◆ getExtraDOFLabelForAlignable()

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

Definition at line 175 of file AlignPCLThresholds.cc.

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

Referenced by AlignPCLThresholdsHG::printAll(), and printAll().

176  {
178  return a.getExtraDOFLabel(i);
179 }
double a
Definition: hdecay.h:121
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const

◆ getMaxErrorCut() [1/2]

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

Definition at line 133 of file AlignPCLThresholds.cc.

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

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 }
double a
Definition: hdecay.h:121
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const

◆ getMaxErrorCut() [2/2]

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

Definition at line 157 of file AlignPCLThresholds.cc.

References a, and getAlignPCLThreshold().

157  {
159  return {{a.getErrorXcut(),
160  a.getErrorYcut(),
161  a.getErrorZcut(),
162  a.getErrorThetaXcut(),
163  a.getErrorThetaYcut(),
164  a.getErrorThetaZcut()}};
165 }
double a
Definition: hdecay.h:121
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const

◆ getMaxMoveCut() [1/2]

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

Definition at line 98 of file AlignPCLThresholds.cc.

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

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 }
double a
Definition: hdecay.h:121
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const

◆ getMaxMoveCut() [2/2]

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

Definition at line 122 of file AlignPCLThresholds.cc.

References a, and getAlignPCLThreshold().

122  {
124  return {{a.getMaxMoveXcut(),
125  a.getMaxMoveYcut(),
126  a.getMaxMoveZcut(),
127  a.getMaxMoveThetaXcut(),
128  a.getMaxMoveThetaYcut(),
129  a.getMaxMoveThetaZcut()}};
130 }
double a
Definition: hdecay.h:121
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const

◆ getNrecords()

const int& AlignPCLThresholds::getNrecords ( ) const
inline

Definition at line 25 of file AlignPCLThresholds.h.

References m_nrecords.

Referenced by AlignPCLThresholdsHG::printAll(), and printAll().

25 { return m_nrecords; }

◆ getSigCut() [1/2]

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

Definition at line 38 of file AlignPCLThresholds.cc.

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

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 }
double a
Definition: hdecay.h:121
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const

◆ getSigCut() [2/2]

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

Definition at line 62 of file AlignPCLThresholds.cc.

References a, and getAlignPCLThreshold().

62  {
64  return {
65  {a.getSigXcut(), a.getSigYcut(), a.getSigZcut(), a.getSigThetaXcut(), a.getSigThetaYcut(), a.getSigThetaZcut()}};
66 }
double a
Definition: hdecay.h:121
AlignPCLThreshold getAlignPCLThreshold(const std::string &AlignableId) const

◆ getThreshold_Map()

const threshold_map& AlignPCLThresholds::getThreshold_Map ( ) const
inline

Definition at line 24 of file AlignPCLThresholds.h.

References m_thresholds.

24 { return m_thresholds; }
threshold_map m_thresholds

◆ printAll()

void AlignPCLThresholds::printAll ( ) const

Definition at line 182 of file AlignPCLThresholds.cc.

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

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 }
Log< level::Info, true > LogVerbatim
std::string getExtraDOFLabelForAlignable(const std::string &AlignableId, const unsigned int i) const
const int & getNrecords() const
std::array< float, 4 > getExtraDOFCutsForAlignable(const std::string &AlignableId, const unsigned int i) const
threshold_map m_thresholds

◆ 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.

References m_thresholds, and HLT_2024v13_cff::Threshold.

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

◆ setAlignPCLThresholds()

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

Definition at line 14 of file AlignPCLThresholds.cc.

References AlignPCLThresholds(), m_nrecords, and m_thresholds.

14  {
15  m_nrecords = Nrecords;
17 }
threshold_map m_thresholds

◆ setNRecords()

void AlignPCLThresholds::setNRecords ( const int &  Nrecords)

Definition at line 20 of file AlignPCLThresholds.cc.

References m_nrecords.

20 { m_nrecords = Nrecords; }

◆ size()

double AlignPCLThresholds::size ( void  ) const
inline

Definition at line 44 of file AlignPCLThresholds.h.

References m_thresholds.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

44 { return m_thresholds.size(); }
threshold_map m_thresholds

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 53 of file AlignPCLThresholds.h.

◆ cond::serialization::access

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

Definition at line 53 of file AlignPCLThresholds.h.

Member Data Documentation

◆ m_nrecords

int AlignPCLThresholds::m_nrecords
protected

Definition at line 51 of file AlignPCLThresholds.h.

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

◆ m_thresholds

threshold_map AlignPCLThresholds::m_thresholds
protected