CMS 3D CMS Logo

SiPixelCPEGenericErrorParm.cc
Go to the documentation of this file.
2 #include <fstream>
3 
5  //--- Open the file
6  std::ifstream in(file.c_str(), std::ios::in);
7 
8  //--- Currently do not need to store part of detector, but is in input file
9  int part;
11 
12  DbEntry Entry;
13  in >> part >> Entry.bias >> Entry.pix_height >> Entry.ave_Qclus >> Entry.sigma >> Entry.rms;
14 
15  while (!in.eof()) {
16  errors_.push_back(Entry);
17 
18  in >> part >> Entry.bias >> Entry.pix_height >> Entry.ave_Qclus >> Entry.sigma >> Entry.rms;
19  }
20  //--- Finished parsing the file, we're done.
21  in.close();
22 
23  //--- Specify the current binning sizes to use
24  DbEntryBinSize ErrorsBinSize;
25  //--- Part = 1 By
26  ErrorsBinSize.partBin_size = 0;
27  ErrorsBinSize.sizeBin_size = 40;
28  ErrorsBinSize.alphaBin_size = 10;
29  ErrorsBinSize.betaBin_size = 1;
30  errorsBinSize_.push_back(ErrorsBinSize);
31  //--- Part = 2 Bx
32  ErrorsBinSize.partBin_size = 240;
33  ErrorsBinSize.alphaBin_size = 1;
34  ErrorsBinSize.betaBin_size = 10;
35  errorsBinSize_.push_back(ErrorsBinSize);
36  //--- Part = 3 Fy
37  ErrorsBinSize.partBin_size = 360;
38  ErrorsBinSize.alphaBin_size = 10;
39  ErrorsBinSize.betaBin_size = 1;
40  errorsBinSize_.push_back(ErrorsBinSize);
41  //--- Part = 4 Fx
42  ErrorsBinSize.partBin_size = 380;
43  ErrorsBinSize.alphaBin_size = 1;
44  ErrorsBinSize.betaBin_size = 10;
45  errorsBinSize_.push_back(ErrorsBinSize);
46 }
47 
48 std::ostream& operator<<(std::ostream& s, const SiPixelCPEGenericErrorParm& genericErrors) {
49  for (unsigned int count = 0; count < genericErrors.errors_.size(); ++count) {
50  s.precision(6);
51 
52  s << genericErrors.errors_[count].bias << " " << genericErrors.errors_[count].pix_height << " "
53  << genericErrors.errors_[count].ave_Qclus << " " << std::fixed << genericErrors.errors_[count].sigma << " "
54  << genericErrors.errors_[count].rms << std::endl;
55 
56  s.unsetf(std::ios_base::fixed);
57  }
58  return s;
59 }
SiPixelCPEGenericErrorParm
Definition: SiPixelCPEGenericErrorParm.h:15
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
SiPixelCPEGenericErrorParm::DbEntryBinSize::alphaBin_size
int alphaBin_size
Definition: SiPixelCPEGenericErrorParm.h:35
SiPixelCPEGenericErrorParm::DbEntryBinSize::partBin_size
int partBin_size
Definition: SiPixelCPEGenericErrorParm.h:33
SiPixelCPEGenericErrorParm::set_version
void set_version(double v)
Definition: SiPixelCPEGenericErrorParm.h:75
SiPixelCPEGenericErrorParm::errorsBinSize_
DbBinSizeVector errorsBinSize_
Definition: SiPixelCPEGenericErrorParm.h:81
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
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
SiPixelCPEGenericErrorParm::DbEntryBinSize::sizeBin_size
int sizeBin_size
Definition: SiPixelCPEGenericErrorParm.h:34
SiPixelCPEGenericErrorParm::DbEntryBinSize
A struct to hold the binning information for (part, size, alpha, beta)
Definition: SiPixelCPEGenericErrorParm.h:32
geometryDiff.file
file
Definition: geometryDiff.py:13
recoMuon::in
Definition: RecoMuonEnumerators.h:6
SiPixelCPEGenericErrorParm::DbEntry
A struct to hold information for a given (alpha,beta,size)
Definition: SiPixelCPEGenericErrorParm.h:18
Entry
Definition: Entry.h:18
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiPixelCPEGenericErrorParm::errors_
DbVector errors_
Definition: SiPixelCPEGenericErrorParm.h:80
SiPixelCPEGenericErrorParm::fillCPEGenericErrorParm
void fillCPEGenericErrorParm(double version, std::string file)
Function to fill the db object given a filename.
Definition: SiPixelCPEGenericErrorParm.cc:4
SiPixelCPEGenericErrorParm::DbEntryBinSize::betaBin_size
int betaBin_size
Definition: SiPixelCPEGenericErrorParm.h:36
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
SiPixelCPEGenericErrorParm.h
operator<<
std::ostream & operator<<(std::ostream &s, const SiPixelCPEGenericErrorParm &genericErrors)
Definition: SiPixelCPEGenericErrorParm.cc:48