CMS 3D CMS Logo

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

#include <SiPixelCPEGenericErrorParm.h>

Classes

struct  DbEntry
 A struct to hold information for a given (alpha,beta,size) More...
 
struct  DbEntryBinSize
 A struct to hold the binning information for (part, size, alpha, beta) More...
 

Public Types

typedef std::vector< DbEntryBinSizeDbBinSizeVector
 
typedef std::vector< DbEntryDbVector
 

Public Member Functions

DbVectorerrors ()
 Accessors for the vectors – non-const version. More...
 
const DbVectorerrors () const
 Accessors for the vectors – const version. More...
 
DbBinSizeVectorerrorsBin ()
 
const DbBinSizeVectorerrorsBinSize () const
 
void fillCPEGenericErrorParm (double version, std::string file)
 Function to fill the db object given a filename. More...
 
void reserve ()
 Reserve some reasonable sizes for the vectors. More...
 
void set_version (double v)
 
 SiPixelCPEGenericErrorParm ()
 
double & version ()
 
const double & version () const
 
virtual ~SiPixelCPEGenericErrorParm ()
 

Private Member Functions

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

Private Attributes

DbVector errors_
 
DbBinSizeVector errorsBinSize_
 
double version_
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 
std::ostream & operator<< (std::ostream &s, const SiPixelCPEGenericErrorParm &genericErrors)
 Function to output the contents of the db object. More...
 

Detailed Description

Definition at line 15 of file SiPixelCPEGenericErrorParm.h.

Member Typedef Documentation

◆ DbBinSizeVector

Definition at line 43 of file SiPixelCPEGenericErrorParm.h.

◆ DbVector

Definition at line 29 of file SiPixelCPEGenericErrorParm.h.

Constructor & Destructor Documentation

◆ SiPixelCPEGenericErrorParm()

SiPixelCPEGenericErrorParm::SiPixelCPEGenericErrorParm ( )
inline

Definition at line 45 of file SiPixelCPEGenericErrorParm.h.

45 : errors_(), errorsBinSize_() {}

◆ ~SiPixelCPEGenericErrorParm()

virtual SiPixelCPEGenericErrorParm::~SiPixelCPEGenericErrorParm ( )
inlinevirtual

Definition at line 46 of file SiPixelCPEGenericErrorParm.h.

46 {}

Member Function Documentation

◆ errors() [1/2]

DbVector& SiPixelCPEGenericErrorParm::errors ( )
inline

Accessors for the vectors – non-const version.

Definition at line 55 of file SiPixelCPEGenericErrorParm.h.

55 { return errors_; }

References errors_.

Referenced by SiPixelCPEGenericDBErrorParametrization::getError().

◆ errors() [2/2]

const DbVector& SiPixelCPEGenericErrorParm::errors ( ) const
inline

Accessors for the vectors – const version.

Definition at line 60 of file SiPixelCPEGenericErrorParm.h.

60 { return errors_; }

References errors_.

◆ errorsBin()

DbBinSizeVector& SiPixelCPEGenericErrorParm::errorsBin ( )
inline

Definition at line 56 of file SiPixelCPEGenericErrorParm.h.

56 { return errorsBinSize_; }

References errorsBinSize_.

◆ errorsBinSize()

const DbBinSizeVector& SiPixelCPEGenericErrorParm::errorsBinSize ( ) const
inline

Definition at line 61 of file SiPixelCPEGenericErrorParm.h.

61 { return errorsBinSize_; }

References errorsBinSize_.

◆ fillCPEGenericErrorParm()

void SiPixelCPEGenericErrorParm::fillCPEGenericErrorParm ( double  version,
std::string  file 
)

Function to fill the db object given a filename.

Definition at line 5 of file SiPixelCPEGenericErrorParm.cc.

5  {
6  //--- Open the file
7  std::ifstream in(file.c_str(), std::ios::in);
8 
9  //--- Currently do not need to store part of detector, but is in input file
10  int part;
12 
13  DbEntry Entry;
14  in >> part >> Entry.bias >> Entry.pix_height >> Entry.ave_Qclus >> Entry.sigma >> Entry.rms;
15 
16  while (!in.eof()) {
17  errors_.push_back(Entry);
18 
19  in >> part >> Entry.bias >> Entry.pix_height >> Entry.ave_Qclus >> Entry.sigma >> Entry.rms;
20  }
21  //--- Finished parsing the file, we're done.
22  in.close();
23 
24  //--- Specify the current binning sizes to use
25  DbEntryBinSize ErrorsBinSize;
26  //--- Part = 1 By
27  ErrorsBinSize.partBin_size = 0;
28  ErrorsBinSize.sizeBin_size = 40;
29  ErrorsBinSize.alphaBin_size = 10;
30  ErrorsBinSize.betaBin_size = 1;
31  errorsBinSize_.push_back(ErrorsBinSize);
32  //--- Part = 2 Bx
33  ErrorsBinSize.partBin_size = 240;
34  ErrorsBinSize.alphaBin_size = 1;
35  ErrorsBinSize.betaBin_size = 10;
36  errorsBinSize_.push_back(ErrorsBinSize);
37  //--- Part = 3 Fy
38  ErrorsBinSize.partBin_size = 360;
39  ErrorsBinSize.alphaBin_size = 10;
40  ErrorsBinSize.betaBin_size = 1;
41  errorsBinSize_.push_back(ErrorsBinSize);
42  //--- Part = 4 Fx
43  ErrorsBinSize.partBin_size = 380;
44  ErrorsBinSize.alphaBin_size = 1;
45  ErrorsBinSize.betaBin_size = 10;
46  errorsBinSize_.push_back(ErrorsBinSize);
47 }

References SiPixelCPEGenericErrorParm::DbEntryBinSize::alphaBin_size, SiPixelCPEGenericErrorParm::DbEntryBinSize::betaBin_size, errors_, errorsBinSize_, FrontierConditions_GlobalTag_cff::file, recoMuon::in, SiPixelCPEGenericErrorParm::DbEntryBinSize::partBin_size, set_version(), Entry::sigma(), SiPixelCPEGenericErrorParm::DbEntryBinSize::sizeBin_size, and version().

◆ reserve()

void SiPixelCPEGenericErrorParm::reserve ( )
inline

Reserve some reasonable sizes for the vectors.

Definition at line 65 of file SiPixelCPEGenericErrorParm.h.

65  {
66  errors_.reserve(1000);
67  errorsBinSize_.reserve(4);
68  }

References errors_, and errorsBinSize_.

◆ serialize()

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

◆ set_version()

void SiPixelCPEGenericErrorParm::set_version ( double  v)
inline

Definition at line 75 of file SiPixelCPEGenericErrorParm.h.

75 { version_ = v; }

References findQualityFiles::v, and version_.

Referenced by fillCPEGenericErrorParm().

◆ version() [1/2]

double& SiPixelCPEGenericErrorParm::version ( )
inline

◆ version() [2/2]

const double& SiPixelCPEGenericErrorParm::version ( ) const
inline

Definition at line 62 of file SiPixelCPEGenericErrorParm.h.

62 { return version_; }

References version_.

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 84 of file SiPixelCPEGenericErrorParm.h.

◆ cond::serialization::access

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

Definition at line 84 of file SiPixelCPEGenericErrorParm.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  s,
const SiPixelCPEGenericErrorParm genericErrors 
)
friend

Function to output the contents of the db object.

Definition at line 49 of file SiPixelCPEGenericErrorParm.cc.

49  {
50  for (unsigned int count = 0; count < genericErrors.errors_.size(); ++count) {
51  s.precision(6);
52 
53  s << genericErrors.errors_[count].bias << " " << genericErrors.errors_[count].pix_height << " "
54  << genericErrors.errors_[count].ave_Qclus << " " << std::fixed << genericErrors.errors_[count].sigma << " "
55  << genericErrors.errors_[count].rms << std::endl;
56 
57  s.unsetf(std::ios_base::fixed);
58  }
59  return s;
60 }

Member Data Documentation

◆ errors_

DbVector SiPixelCPEGenericErrorParm::errors_
private

Definition at line 80 of file SiPixelCPEGenericErrorParm.h.

Referenced by errors(), fillCPEGenericErrorParm(), operator<<(), and reserve().

◆ errorsBinSize_

DbBinSizeVector SiPixelCPEGenericErrorParm::errorsBinSize_
private

◆ version_

double SiPixelCPEGenericErrorParm::version_
private

Definition at line 82 of file SiPixelCPEGenericErrorParm.h.

Referenced by set_version(), and version().

alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
SiPixelCPEGenericErrorParm::version_
double version_
Definition: SiPixelCPEGenericErrorParm.h:82
SiPixelCPEGenericErrorParm::set_version
void set_version(double v)
Definition: SiPixelCPEGenericErrorParm.h:75
SiPixelCPEGenericErrorParm::errorsBinSize_
DbBinSizeVector errorsBinSize_
Definition: SiPixelCPEGenericErrorParm.h:81
findQualityFiles.v
v
Definition: findQualityFiles.py:179
SiPixelCPEGenericErrorParm::version
double & version()
Definition: SiPixelCPEGenericErrorParm.h:57
Entry::sigma
ALIdouble sigma() const
Definition: Entry.h:55
alignCSCRings.s
s
Definition: alignCSCRings.py:92
part
part
Definition: HCALResponse.h:20
KineDebug3::count
void count()
Definition: KinematicConstrainedVertexUpdatorT.h:21
recoMuon::in
Definition: RecoMuonEnumerators.h:6
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
Entry
Definition: Entry.h:18
SiPixelCPEGenericErrorParm::errors_
DbVector errors_
Definition: SiPixelCPEGenericErrorParm.h:80