CMS 3D CMS Logo

HGCalSiNoiseMap.h
Go to the documentation of this file.
1 #ifndef simcalorimetry_hgcalsimalgos_hgcalsinoisemap
2 #define simcalorimetry_hgcalsimalgos_hgcalsinoisemap
3 
9 #include <string>
10 #include <array>
11 #include <unordered_map>
12 
17 template <typename T>
19 public:
22 
25  float cce, noise;
26  unsigned short gain, thrADC;
27  };
28 
30  SiCellOpCharacteristics() : lnfluence(0.), fluence(0.), ileak(0.), enc_s(0.), enc_p(0.), mipfC(0), mipADC(0) {}
33  unsigned int mipADC;
34  };
35 
38 
42  void setIleakParam(const std::vector<double> &pars) { ileakParam_ = pars; }
43 
47  void setCceParam(const std::vector<double> &parsFine,
48  const std::vector<double> &parsThin,
49  const std::vector<double> &parsThick) {
50  cceParam_.push_back(parsFine); //120
51  cceParam_.push_back(parsThin); //200
52  cceParam_.push_back(parsThick); //300
53  }
54 
58  void setDoseMap(const std::string &, const unsigned int &);
59 
65  void setGeometry(const CaloSubdetectorGeometry *, GainRange_t gain = GainRange_t::AUTO, int aimMIPtoADC = 10);
66 
71  const SiCellOpCharacteristicsCore getSiCellOpCharacteristicsCore(const T &did, GainRange_t gain, int aimMIPtoADC);
72  const SiCellOpCharacteristicsCore getSiCellOpCharacteristicsCore(const T &did) {
74  }
75 
76  SiCellOpCharacteristics getSiCellOpCharacteristics(const T &did,
77  GainRange_t gain = GainRange_t::AUTO,
78  int aimMIPtoADC = 10);
79  SiCellOpCharacteristics getSiCellOpCharacteristics(double &cellCap,
80  double &cellVol,
81  double &mipEqfC,
82  std::vector<double> &cceParam,
83  int &subdet,
84  int &layer,
85  double &radius,
87  int &aimMIPtoADC);
88 
89  std::array<double, 3> &getMipEqfC() { return mipEqfC_; }
90  std::array<double, 3> &getCellCapacitance() { return cellCapacitance_; }
91  std::array<double, 3> &getCellVolume() { return cellVolume_; }
92  std::vector<std::vector<double> > &getCCEParam() { return cceParam_; }
93  std::vector<double> &getIleakParam() { return ileakParam_; }
94  std::vector<std::vector<double> > &getENCsParam() { return encsParam_; }
95  std::vector<double> &getLSBPerGain() { return lsbPerGain_; }
99  return defaultADCPulse_;
100  return adcPulses_[gain];
101  };
102  std::vector<double> &getMaxADCPerGain() { return chargeAtFullScaleADCPerGain_; }
103  double getENCpad(double ileak);
105  double getTDCOnsetAuto(uint32_t gainIdx);
106 
108 
109 private:
112 
113  //cache of SiCellOpCharacteristics
114  std::map<uint32_t, SiCellOpCharacteristicsCore> siopCache_;
115 
116  //vector of three params, per sensor type: 0:120 [mum], 1:200, 2:300
117  std::array<double, 3> mipEqfC_, cellCapacitance_, cellVolume_;
118  std::vector<std::vector<double> > cceParam_;
119 
120  //leakage current/volume vs fluence
121  std::vector<double> ileakParam_;
122 
123  //common noise subtraction noise (final scaling value)
125 
126  //electron charge in fC
127  const double qe2fc_;
128 
129  //electronics noise (series+parallel) polynomial coeffs and ADC pulses;
130  std::vector<std::vector<double> > encsParam_;
132  std::vector<hgc_digi::FEADCPulseShape> adcPulses_;
133 
134  //lsb
136 
137  //conversions
138  const double unitToMicro_ = 1.e6;
140 
141  //flags used to disable specific components of the Si operation parameters or usage of operation cache
143 };
144 
145 #include "HGCalSiNoiseMap.icc"
146 
147 template class HGCalSiNoiseMap<HGCSiliconDetId>;
148 template class HGCalSiNoiseMap<HFNoseDetId>;
149 
150 #endif
HGCalSiNoiseMap::SiCellOpCharacteristics::mipADC
unsigned int mipADC
Definition: HGCalSiNoiseMap.h:33
HGCalSiNoiseMap::SiCellOpCharacteristics
Definition: HGCalSiNoiseMap.h:29
HGCalSiNoiseMap::SiCellOpCharacteristicsCore::noise
float noise
Definition: HGCalSiNoiseMap.h:25
HGCalSiNoiseMap::setIleakParam
void setIleakParam(const std::vector< double > &pars)
set the ileak parameters to use
Definition: HGCalSiNoiseMap.h:42
HGCalSiNoiseMap::ignoreNoise_
bool ignoreNoise_
Definition: HGCalSiNoiseMap.h:142
HGCalSiNoiseMap::SiCellOpCharacteristics::ileak
double ileak
Definition: HGCalSiNoiseMap.h:32
HGCalSiNoiseMap::getLSBPerGain
std::vector< double > & getLSBPerGain()
Definition: HGCalSiNoiseMap.h:95
HGCalSiNoiseMap::ileakParam_
std::vector< double > ileakParam_
Definition: HGCalSiNoiseMap.h:121
HGCalSiNoiseMap::getSiCellOpCharacteristicsCore
const SiCellOpCharacteristicsCore getSiCellOpCharacteristicsCore(const T &did, GainRange_t gain, int aimMIPtoADC)
returns the charge collection efficiency and noise if gain range is set to auto, it will find the mos...
HGCalRadiationMap
parses a txt file with dose/fluence parameters and provides functions for noise, etc.
Definition: HGCalRadiationMap.h:14
HGCalSiNoiseMap::q160fC
Definition: HGCalSiNoiseMap.h:20
HGCalSiNoiseMap::adcPulses_
std::vector< hgc_digi::FEADCPulseShape > adcPulses_
Definition: HGCalSiNoiseMap.h:132
HGCalSiNoiseMap::setDefaultADCPulseShape
void setDefaultADCPulseShape(const hgc_digi::FEADCPulseShape &adcPulse)
Definition: HGCalSiNoiseMap.h:96
HGCalSiNoiseMap::lsbPerGain_
std::vector< double > lsbPerGain_
Definition: HGCalSiNoiseMap.h:135
HGCalSiNoiseMap::getMipEqfC
std::array< double, 3 > & getMipEqfC()
Definition: HGCalSiNoiseMap.h:89
HGCSiliconDetId.h
HGCalSiNoiseMap::encsParam_
std::vector< std::vector< double > > encsParam_
Definition: HGCalSiNoiseMap.h:130
HGCalSiNoiseMap::SiCellOpCharacteristics::enc_p
double enc_p
Definition: HGCalSiNoiseMap.h:32
HGCalSiNoiseMap::SiCellOpCharacteristics::mipfC
double mipfC
Definition: HGCalSiNoiseMap.h:32
HGCalSiNoiseMap::setDoseMap
void setDoseMap(const std::string &, const unsigned int &)
overrides base class method with specifics for the configuration of the algo
HGCalSiNoiseMap::getTDCOnsetAuto
double getTDCOnsetAuto(uint32_t gainIdx)
HFNoseDetId.h
HGCalSiNoiseMap::mipEqfC_
std::array< double, 3 > mipEqfC_
Definition: HGCalSiNoiseMap.h:117
HGCalSiNoiseMap::cellCapacitance_
std::array< double, 3 > cellCapacitance_
Definition: HGCalSiNoiseMap.h:117
HGCalSiNoiseMap::SiCellOpCharacteristics::enc_s
double enc_s
Definition: HGCalSiNoiseMap.h:32
HGCalSiNoiseMap::getENCpad
double getENCpad(double ileak)
HGCalSiNoiseMap::SiCellOpCharacteristics::core
SiCellOpCharacteristicsCore core
Definition: HGCalSiNoiseMap.h:31
HGCalSiNoiseMap::AUTO
Definition: HGCalSiNoiseMap.h:20
HGCalSiNoiseMap::cceParam_
std::vector< std::vector< double > > cceParam_
Definition: HGCalSiNoiseMap.h:118
hgc_digi::FEADCPulseShape
std::array< float, 6 > FEADCPulseShape
Definition: HGCFEElectronics.h:20
HGCalSiNoiseMap::SiCellOpCharacteristics::lnfluence
double lnfluence
Definition: HGCalSiNoiseMap.h:32
HGCalSiNoiseMap::ignoreCCE_
bool ignoreCCE_
Definition: HGCalSiNoiseMap.h:142
HGCalSiNoiseMap::SiCellOpCharacteristicsCore::SiCellOpCharacteristicsCore
SiCellOpCharacteristicsCore()
Definition: HGCalSiNoiseMap.h:24
HGCalSiNoiseMap::getENCsParam
std::vector< std::vector< double > > & getENCsParam()
Definition: HGCalSiNoiseMap.h:94
HGCalSiNoiseMap::defaultGain_
GainRange_t defaultGain_
Definition: HGCalSiNoiseMap.h:110
HGCalRadiationMap.h
HGCalSiNoiseMap::setGeometry
void setGeometry(const CaloSubdetectorGeometry *, GainRange_t gain=GainRange_t::AUTO, int aimMIPtoADC=10)
specialization of the base class method which sets the geometry so that it can instantiate an operati...
HGCalSiNoiseMap::setCachedOp
void setCachedOp(bool flag)
Definition: HGCalSiNoiseMap.h:104
HGCalSiNoiseMap< HGCSiliconDetId >::NoiseMapAlgoBits_t
NoiseMapAlgoBits_t
Definition: HGCalSiNoiseMap.h:21
HGCalSiNoiseMap::SiCellOpCharacteristicsCore
Definition: HGCalSiNoiseMap.h:23
HGCalSiNoiseMap::q320fC
Definition: HGCalSiNoiseMap.h:20
HGCalSiNoiseMap< HGCSiliconDetId >::GainRange_t
GainRange_t
Definition: HGCalSiNoiseMap.h:20
HGCalSiNoiseMap::PULSEPERGAIN
Definition: HGCalSiNoiseMap.h:21
HGCalSiNoiseMap::unitToMicroLog_
const double unitToMicroLog_
Definition: HGCalSiNoiseMap.h:139
HGCalSiNoiseMap::activateCachedOp_
bool activateCachedOp_
Definition: HGCalSiNoiseMap.h:142
HGCalSiNoiseMap::adcPulseForGain
const hgc_digi::FEADCPulseShape & adcPulseForGain(GainRange_t gain)
Definition: HGCalSiNoiseMap.h:97
HGCalSiNoiseMap::SiCellOpCharacteristics::SiCellOpCharacteristics
SiCellOpCharacteristics()
Definition: HGCalSiNoiseMap.h:30
HGCalSiNoiseMap::getCellVolume
std::array< double, 3 > & getCellVolume()
Definition: HGCalSiNoiseMap.h:91
HGCalSiNoiseMap::SiCellOpCharacteristics::fluence
double fluence
Definition: HGCalSiNoiseMap.h:32
hgcROCParameters_cfi.adcPulse
adcPulse
Definition: hgcROCParameters_cfi.py:10
HGCalSiNoiseMap::cellVolume_
std::array< double, 3 > cellVolume_
Definition: HGCalSiNoiseMap.h:117
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
HGCalSiNoiseMap::~HGCalSiNoiseMap
~HGCalSiNoiseMap()
Definition: HGCalSiNoiseMap.h:37
HGCalSiNoiseMap::qe2fc_
const double qe2fc_
Definition: HGCalSiNoiseMap.h:127
HGCalSiNoiseMap::getCCEParam
std::vector< std::vector< double > > & getCCEParam()
Definition: HGCalSiNoiseMap.h:92
HGCalSiNoiseMap
derives from HGCalRadiation map to parse fluence parameters, provides Si-specific functions; see DN-1...
Definition: HGCalSiNoiseMap.h:18
HGCalGeometry.h
HGCalSiNoiseMap::ignoreGainDependentPulse_
bool ignoreGainDependentPulse_
Definition: HGCalSiNoiseMap.h:142
HGCalSiNoiseMap::NOISE
Definition: HGCalSiNoiseMap.h:21
HGCalSiNoiseMap::unitToMicro_
const double unitToMicro_
Definition: HGCalSiNoiseMap.h:138
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HGCalSiNoiseMap::ignoreFluence_
bool ignoreFluence_
Definition: HGCalSiNoiseMap.h:142
HGCalSiNoiseMap::chargeAtFullScaleADCPerGain_
std::vector< double > chargeAtFullScaleADCPerGain_
Definition: HGCalSiNoiseMap.h:135
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
HGCalSiNoiseMap::getSiCellOpCharacteristics
SiCellOpCharacteristics getSiCellOpCharacteristics(const T &did, GainRange_t gain=GainRange_t::AUTO, int aimMIPtoADC=10)
HGCalSiNoiseMap::getSiCellOpCharacteristicsCore
const SiCellOpCharacteristicsCore getSiCellOpCharacteristicsCore(const T &did)
Definition: HGCalSiNoiseMap.h:72
HGCalSiNoiseMap::siopCache_
std::map< uint32_t, SiCellOpCharacteristicsCore > siopCache_
Definition: HGCalSiNoiseMap.h:114
heppy_batch.val
val
Definition: heppy_batch.py:351
HGCalSiNoiseMap::CCE
Definition: HGCalSiNoiseMap.h:21
T
long double T
Definition: Basic3DVectorLD.h:48
HGCalSiNoiseMap::CACHEDOP
Definition: HGCalSiNoiseMap.h:21
HGCalSiNoiseMap::FLUENCE
Definition: HGCalSiNoiseMap.h:21
HGCalSiNoiseMap::SiCellOpCharacteristicsCore::gain
unsigned short gain
Definition: HGCalSiNoiseMap.h:26
HGCalSiNoiseMap::HGCalSiNoiseMap
HGCalSiNoiseMap()
HGCalSiNoiseMap::SiCellOpCharacteristicsCore::thrADC
unsigned short thrADC
Definition: HGCalSiNoiseMap.h:26
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
HGCFEElectronics.h
HGCalSiNoiseMap::SiCellOpCharacteristicsCore::cce
float cce
Definition: HGCalSiNoiseMap.h:25
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
HGCalSiNoiseMap::defaultADCPulse_
hgc_digi::FEADCPulseShape defaultADCPulse_
Definition: HGCalSiNoiseMap.h:131
HGCalSiNoiseMap::getIleakParam
std::vector< double > & getIleakParam()
Definition: HGCalSiNoiseMap.h:93
HGCalSiNoiseMap::getMaxADCPerGain
std::vector< double > & getMaxADCPerGain()
Definition: HGCalSiNoiseMap.h:102
HGCalSiNoiseMap::q80fC
Definition: HGCalSiNoiseMap.h:20
HGCalSiNoiseMap::setENCCommonNoiseSubScale
void setENCCommonNoiseSubScale(double val)
Definition: HGCalSiNoiseMap.h:107
HGCalSiNoiseMap::getCellCapacitance
std::array< double, 3 > & getCellCapacitance()
Definition: HGCalSiNoiseMap.h:90
HGCalSiNoiseMap::setCceParam
void setCceParam(const std::vector< double > &parsFine, const std::vector< double > &parsThin, const std::vector< double > &parsThick)
set the cce parameters to use
Definition: HGCalSiNoiseMap.h:47
HGCalSiNoiseMap::defaultAimMIPtoADC_
int defaultAimMIPtoADC_
Definition: HGCalSiNoiseMap.h:111
HGCalSiNoiseMap::encCommonNoiseSub_
double encCommonNoiseSub_
Definition: HGCalSiNoiseMap.h:124
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117