CMS 3D CMS Logo

HGCalSciNoiseMap.h
Go to the documentation of this file.
1 #ifndef simcalorimetry_hgcalsimalgos_hgcalscinoisemap
2 #define simcalorimetry_hgcalsimalgos_hgcalscinoisemap
3 
7 #include <string>
8 #include <array>
9 
25 public:
27  enum GainRange_t { GAIN_2, GAIN_4, AUTO, GAINRANGE_N }; //roc gain for 2mm2 and 4mm2
37  };
38 
40  SiPMonTileCharacteristics() : s(0.), lySF(0.), n(0.), xtalk(0), gain(0), thrADC(0), ntotalPE(0) {}
41  float s, lySF, n, xtalk;
42  unsigned short gain, thrADC, ntotalPE;
43  };
44 
47 
51  double scaleByTileArea(const HGCScintillatorDetId &, const double);
52  std::pair<double, GainRange_t> scaleBySipmArea(const HGCScintillatorDetId &, const double, const GainRange_t &);
53  SiPMonTileCharacteristics scaleByDose(const HGCScintillatorDetId &,
54  const double,
55  const int aimMIPtoADC = 15,
56  const GainRange_t gainPreChoice = GainRange_t::AUTO);
57 
58  void setDoseMap(const std::string &, const unsigned int);
59  void setSipmMap(const std::string &);
60  void setReferenceDarkCurrent(double idark);
61  void setReferenceCrossTalk(double xtalk) { refXtalk_ = xtalk; }
62  void setNpePerMIP(float npePerMIP);
63  std::array<double, GAINRANGE_N> getLSBPerGain() { return lsbPerGain_; }
64  std::array<double, GAINRANGE_N> getMaxADCPerGain() { return fscADCPerGain_; }
65  std::array<double, TILETYPE_N> getNpePerMIP() { return nPEperMIP_; }
66  float getNPeInSiPM() { return maxSiPMPE_; }
68 
69 private:
73  std::unordered_map<int, float> readSipmPars(const std::string &);
74 
75  //reference signal yields
76  std::array<double, TILETYPE_N> nPEperMIP_;
77 
78  //lsb and fsc per gain
79  std::array<double, GAINRANGE_N> lsbPerGain_, fscADCPerGain_;
80 
81  //size of the reference scintillator tile
82  const double refEdge_;
83 
84  //flags used to disable/override specific SiPM-on-tile operation parameters
87 
88  //reference dark current for the noise (mA)
90 
91  //reference cross talk parameter (0,1) - if -1 it will be used to ignore effect in the digitization step
92  double refXtalk_;
93 
94  //reference ADC counts for the MIP peak
96 
97  //reference number of pixels (2mm2 SiPM)
98  float maxSiPMPE_;
99 
100  //sipm size boundaries
101  std::unordered_map<int, float> sipmMap_;
102 };
103 
104 #endif
std::unordered_map< int, float > readSipmPars(const std::string &)
parses the radius boundaries for the SiPM area assignment from a custom file
double scaleByTileArea(const HGCScintillatorDetId &, const double)
returns the signal scaling and the noise
void setSipmMap(const std::string &)
std::array< double, GAINRANGE_N > fscADCPerGain_
void setReferenceCrossTalk(double xtalk)
std::array< double, TILETYPE_N > getNpePerMIP()
std::unordered_map< int, float > sipmMap_
std::array< double, GAINRANGE_N > getLSBPerGain()
std::array< double, GAINRANGE_N > lsbPerGain_
void setReferenceDarkCurrent(double idark)
parses a txt file with dose/fluence parameters and provides functions for noise, etc.
std::pair< double, GainRange_t > scaleBySipmArea(const HGCScintillatorDetId &, const double, const GainRange_t &)
derives from HGCalRadiation map to parse fluence/dose parameters, provides Sci-specific functions the...
void setDoseMap(const std::string &, const unsigned int)
std::array< double, TILETYPE_N > nPEperMIP_
const double refEdge_
void setNpePerMIP(float npePerMIP)
bool ignoreAutoPedestalSubtraction()
SiPMonTileCharacteristics scaleByDose(const HGCScintillatorDetId &, const double, const int aimMIPtoADC=15, const GainRange_t gainPreChoice=GainRange_t::AUTO)
std::array< double, GAINRANGE_N > getMaxADCPerGain()