CMS 3D CMS Logo

TPedValues.h
Go to the documentation of this file.
1 #ifndef TPedValues_h
2 #define TPedValues_h
3 
13 #include <vector>
14 
15 #include "TFile.h"
16 #include "TPedResult.h"
17 #include "TSinglePedEntry.h"
18 
19 class TPedValues {
20 public:
22  TPedValues(double RMSmax = 2, int bestPedestal = 200);
23 
25  TPedValues(const TPedValues &orig);
26 
28  ~TPedValues();
29 
31  void insert(const int gainId, const int crystal, const int DAC, const int pedestal, const int endcapIndex);
32 
34  TPedResult terminate(const int &DACstart = 0, const int &DACend = 256) const;
35 
37  int checkEntries(const int &DACstart = 0, const int &DACend = 256) const;
38 
40  int makePlots(TFile *rootFile,
41  const std::string &dirName,
42  const double maxSlopeAllowed,
43  const double minSlopeAllowed,
44  const double maxChi2OverNDF) const;
45 
47  int getCrystalNumber(int xtal) const;
48 
49 private:
50  TSinglePedEntry m_entries[3][1700][256];
51  // 1,305,600 elements
53  double m_RMSmax;
54  // store the EE index as
55  // 100*elecId.towerId()+5*(elecId.stripId()-1)+elecId.xtalId()
57 };
58 
59 #endif
TSinglePedEntry m_entries[3][1700][256]
Definition: TPedValues.h:50
TPedResult terminate(const int &DACstart=0, const int &DACend=256) const
calculate the offset values for all the containers
Definition: TPedValues.cc:63
TPedValues(double RMSmax=2, int bestPedestal=200)
ctor
Definition: TPedValues.cc:16
int m_bestPedestal
Definition: TPedValues.h:52
Transient container for a single entry in pedestal offset studies.
int getCrystalNumber(int xtal) const
return the index from the table
Definition: TPedValues.cc:247
int checkEntries(const int &DACstart=0, const int &DACend=256) const
check whether the scan was complete in the range
Definition: TPedValues.cc:112
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
double m_RMSmax
Definition: TPedValues.h:53
int makePlots(TFile *rootFile, const std::string &dirName, const double maxSlopeAllowed, const double minSlopeAllowed, const double maxChi2OverNDF) const
create a plot of the DAC pedestal trend
Definition: TPedValues.cc:151
int endcapCrystalNumbers[1700]
Definition: TPedValues.h:56
void insert(const int gainId, const int crystal, const int DAC, const int pedestal, const int endcapIndex)
add a single value
Definition: TPedValues.cc:38
~TPedValues()
dtor
Definition: TPedValues.cc:36
Transient container right DAC values for each crystal and each gain $Date: $Revision: ...