CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SiPixelVCal.h
Go to the documentation of this file.
1 #ifndef SiPixelVCal_h
2 #define SiPixelVCal_h
3 #include <cstdint>
4 #include <iostream>
5 #include <map>
6 #include <vector>
8 
9 class SiPixelVCal {
10 public:
13 
14  using mapToDetId = std::map<uint32_t, float>;
15 
16  struct VCal {
17  float slope = 47.;
18  float offset = -60.;
20  };
21 
22  inline void putSlopeAndOffset(std::map<unsigned int, VCal>& vcal) { m_vcal = vcal; }
23  inline const std::map<unsigned int, VCal>& getSlopeAndOffset() const { return m_vcal; }
24  bool putSlopeAndOffset(const uint32_t&, float&, float&);
25  VCal getSlopeAndOffset(const uint32_t&) const;
26  float getSlope(const uint32_t&) const;
27  float getOffset(const uint32_t&) const;
28  mapToDetId getAllSlopes() const;
29  mapToDetId getAllOffsets() const;
30  // uint32_t is pixid, see CondTools/SiPixel/test/SiPixelVCalDB.h
31 
32 private:
33  // Convert VCal to #electrons, which changes with irradiation and varies
34  // between pixel layers & disks
35  // #electrons = slope * VCal + offset
36  // with
37  // slope ~ 47 (50 for L1)
38  // offset ~ -60 (-670 for L1)
39  std::map<unsigned int, VCal> m_vcal;
40 
42 };
43 
44 #endif
const std::map< unsigned int, VCal > & getSlopeAndOffset() const
Definition: SiPixelVCal.h:23
float getOffset(const uint32_t &) const
Definition: SiPixelVCal.cc:37
float getSlope(const uint32_t &) const
Definition: SiPixelVCal.cc:28
mapToDetId getAllSlopes() const
Definition: SiPixelVCal.cc:46
std::map< uint32_t, float > mapToDetId
Definition: SiPixelVCal.h:14
std::map< unsigned int, VCal > m_vcal
Definition: SiPixelVCal.h:39
mapToDetId getAllOffsets() const
Definition: SiPixelVCal.cc:57
#define COND_SERIALIZABLE
Definition: Serializable.h:39
void putSlopeAndOffset(std::map< unsigned int, VCal > &vcal)
Definition: SiPixelVCal.h:22