Belle II Software development
CDCFudgeFactorsForSigma Class Reference

Database object for fudge factors for CDC space resol. More...

#include <CDCFudgeFactorsForSigma.h>

Inheritance diagram for CDCFudgeFactorsForSigma:

Public Member Functions

 CDCFudgeFactorsForSigma ()
 Default constructor.
 
void setGroupID (unsigned short mode)
 Set group id (factors per group) id=0: all-wires; >=1: not ready.
 
void setFactors (unsigned short id, const std::vector< float > &factors)
 Set the factors in the list.
 
unsigned short getGroupID () const
 Get group id.
 
unsigned short getEntries () const
 Get the no.
 
std::map< unsigned short, std::vector< float > > getFactors () const
 Get the whole list.
 
const std::vector< float > & getFactors (unsigned short id) const
 Get the factors for the id.
 
void dump () const
 Print all contents.
 

Private Member Functions

 ClassDef (CDCFudgeFactorsForSigma, 1)
 ClassDef.
 

Private Attributes

unsigned short m_groupID = 0
 Output the contents in text file format.
 
std::map< unsigned short, std::vector< float > > m_ffs
 cv list
 

Detailed Description

Database object for fudge factors for CDC space resol.

Needed both for MC and data production. This object would probably be tentative; may be merged into the CDCSpaceResols object in future...

Definition at line 25 of file CDCFudgeFactorsForSigma.h.

Constructor & Destructor Documentation

◆ CDCFudgeFactorsForSigma()

Default constructor.

Definition at line 31 of file CDCFudgeFactorsForSigma.h.

31{}

Member Function Documentation

◆ dump()

void dump ( ) const
inline

Print all contents.

Definition at line 94 of file CDCFudgeFactorsForSigma.h.

95 {
96 std::cout << " " << std::endl;
97 std::cout << "Fudge factor list" << std::endl;
98 std::cout << "#entries= " << m_ffs.size() << std::endl;
99 std::cout << "in order of id and factors" << std::endl;
100
101 for (auto const& ent : m_ffs) {
102 std::cout << ent.first;
103 unsigned short np = (ent.second).size();
104 for (unsigned short i = 0; i < np; ++i) {
105 std::cout << " " << (ent.second)[i];
106 }
107 std::cout << std::endl;
108 }
109 }
std::map< unsigned short, std::vector< float > > m_ffs
cv list

◆ getEntries()

unsigned short getEntries ( ) const
inline

Get the no.

of entries in the list

Definition at line 63 of file CDCFudgeFactorsForSigma.h.

64 {
65 return m_ffs.size();
66 }

◆ getFactors() [1/2]

std::map< unsigned short, std::vector< float > > getFactors ( ) const
inline

Get the whole list.

Definition at line 71 of file CDCFudgeFactorsForSigma.h.

72 {
73 return m_ffs;
74 }

◆ getFactors() [2/2]

const std::vector< float > & getFactors ( unsigned short  id) const
inline

Get the factors for the id.

Parameters
idlayerID or wireID
Returns
fudge factors for the id

Definition at line 81 of file CDCFudgeFactorsForSigma.h.

82 {
83 std::map<unsigned short, std::vector<float>>::const_iterator it = m_ffs.find(id);
84 if (it != m_ffs.end()) {
85 return it->second;
86 } else {
87 B2FATAL("Specified id not found in getFactors !");
88 }
89 }

◆ getGroupID()

unsigned short getGroupID ( ) const
inline

Get group id.

Definition at line 55 of file CDCFudgeFactorsForSigma.h.

56 {
57 return m_groupID;
58 }
unsigned short m_groupID
Output the contents in text file format.

◆ setFactors()

void setFactors ( unsigned short  id,
const std::vector< float > &  factors 
)
inline

Set the factors in the list.

Parameters
idlaerID(0-55) or wireID
factorsfactors

Definition at line 47 of file CDCFudgeFactorsForSigma.h.

48 {
49 m_ffs.insert(std::pair<unsigned short, std::vector<float>>(id, factors));
50 }

◆ setGroupID()

void setGroupID ( unsigned short  mode)
inline

Set group id (factors per group) id=0: all-wires; >=1: not ready.

Definition at line 37 of file CDCFudgeFactorsForSigma.h.

38 {
39 m_groupID = mode;
40 }

Member Data Documentation

◆ m_ffs

std::map<unsigned short, std::vector<float> > m_ffs
private

cv list

Definition at line 137 of file CDCFudgeFactorsForSigma.h.

◆ m_groupID

unsigned short m_groupID = 0
private

Output the contents in text file format.

Group id (factors per group)

Definition at line 136 of file CDCFudgeFactorsForSigma.h.


The documentation for this class was generated from the following file: