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
ecalLiteDTU::gainId
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
Definition: EcalLiteDTUSample.h:14
TSinglePedEntry.h
Transient container for a single entry in pedestal offset studies.
TPedValues::terminate
TPedResult terminate(const int &DACstart=0, const int &DACend=256) const
calculate the offset values for all the containers
Definition: TPedValues.cc:63
TPedResult
Definition: TPedResult.h:15
TSinglePedEntry
Definition: TSinglePedEntry.h:13
TPedResult.h
Transient container right DAC values for each crystal and each gain $Date: $Revision:
TPedValues::insert
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::m_bestPedestal
int m_bestPedestal
Definition: TPedValues.h:52
TPedValues::TPedValues
TPedValues(double RMSmax=2, int bestPedestal=200)
ctor
Definition: TPedValues.cc:16
TPedValues
Definition: TPedValues.h:19
TPedValues::endcapCrystalNumbers
int endcapCrystalNumbers[1700]
Definition: TPedValues.h:56
TPedValues::makePlots
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
EcalCondDBWriter_cfi.pedestal
pedestal
Definition: EcalCondDBWriter_cfi.py:49
TPedValues::m_entries
TSinglePedEntry m_entries[3][1700][256]
Definition: TPedValues.h:50
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TPedValues::getCrystalNumber
int getCrystalNumber(int xtal) const
return the index from the table
Definition: TPedValues.cc:247
TPedValues::checkEntries
int checkEntries(const int &DACstart=0, const int &DACend=256) const
check whether the scan was complete in the range
Definition: TPedValues.cc:112
TPedValues::~TPedValues
~TPedValues()
dtor
Definition: TPedValues.cc:36
TrackerOfflineValidation_Dqm_cff.dirName
dirName
Definition: TrackerOfflineValidation_Dqm_cff.py:55
TPedValues::m_RMSmax
double m_RMSmax
Definition: TPedValues.h:53