CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes
HGCalSiNoiseMap Class Reference

derives from HGCalRadiation map to parse fluence parameters, provides Si-specific functions; see DN-19-045 More...

#include <HGCalSiNoiseMap.h>

Inheritance diagram for HGCalSiNoiseMap:
HGCalRadiationMap

Classes

struct  SiCellOpCharacteristics
 

Public Types

enum  GainRange_t { q80fC, q160fC, q320fC, AUTO }
 
enum  NoiseMapAlgoBits_t { FLUENCE, CCE, NOISE }
 
- Public Types inherited from HGCalRadiationMap
typedef std::map< std::pair< int, int >, DoseParametersdoseParametersMap
 

Public Member Functions

std::vector< std::vector< double > > & getCCEParam ()
 
std::array< double, 3 > & getCellCapacitance ()
 
std::array< double, 3 > & getCellVolume ()
 
std::vector< std::vector< double > > & getENCsParam ()
 
std::vector< double > & getIleakParam ()
 
std::vector< double > & getLSBPerGain ()
 
std::vector< double > & getMaxADCPerGain ()
 
std::array< double, 3 > & getMipEqfC ()
 
SiCellOpCharacteristics getSiCellOpCharacteristics (const HGCSiliconDetId &did, GainRange_t gain=GainRange_t::AUTO, int aimMIPtoADC=10)
 returns the charge collection efficiency and noise if gain range is set to auto, it will find the most appropriate gain to put the mip peak close to 10 ADC counts More...
 
 HGCalSiNoiseMap ()
 
void setCceParam (const std::vector< double > &parsFine, const std::vector< double > &parsThin, const std::vector< double > &parsThick)
 set the cce parameters to use More...
 
void setDoseMap (const std::string &, const unsigned int &)
 overrides base class method with specifics for the configuration of the algo More...
 
void setIleakParam (const std::vector< double > &pars)
 set the ileak parameters to use More...
 
 ~HGCalSiNoiseMap ()
 
- Public Member Functions inherited from HGCalRadiationMap
const unsigned int & algo ()
 
const HGCalDDDConstantsddd ()
 
const HGCalGeometrygeom ()
 
const doseParametersMapgetDoseMap ()
 
double getDoseValue (const int, const int, const radiiVec &, bool logVal=false)
 
double getFluenceValue (const int, const int, const radiiVec &, bool logVal=false)
 
 HGCalRadiationMap ()
 
void setDoseMap (const std::string &, const unsigned int)
 
void setGeometry (const CaloSubdetectorGeometry *)
 
const HGCalTopologytopo ()
 
 ~HGCalRadiationMap ()
 

Private Attributes

std::vector< std::vector< double > > cceParam_
 
std::array< double, 3 > cellCapacitance_
 
std::array< double, 3 > cellVolume_
 
std::vector< double > chargeAtFullScaleADCPerGain_
 
const double encCommonNoiseSub_
 
const double encpScale_
 
std::vector< std::vector< double > > encsParam_
 
bool ignoreCCE_
 
bool ignoreFluence_
 
bool ignoreNoise_
 
std::vector< double > ileakParam_
 
std::vector< double > lsbPerGain_
 
std::array< double, 3 > mipEqfC_
 
const double qe2fc_
 
const double unitToMicro_ = 1.e6
 

Detailed Description

derives from HGCalRadiation map to parse fluence parameters, provides Si-specific functions; see DN-19-045

Definition at line 14 of file HGCalSiNoiseMap.h.

Member Enumeration Documentation

◆ GainRange_t

Enumerator
q80fC 
q160fC 
q320fC 
AUTO 

Definition at line 16 of file HGCalSiNoiseMap.h.

16 { q80fC, q160fC, q320fC, AUTO };

◆ NoiseMapAlgoBits_t

Enumerator
FLUENCE 
CCE 
NOISE 

Definition at line 17 of file HGCalSiNoiseMap.h.

17 { FLUENCE, CCE, NOISE };

Constructor & Destructor Documentation

◆ HGCalSiNoiseMap()

HGCalSiNoiseMap::HGCalSiNoiseMap ( )

Definition at line 4 of file HGCalSiNoiseMap.cc.

5  : encpScale_(840.),
7  qe2fc_(1.60217646E-4),
8  ignoreFluence_(false),
9  ignoreCCE_(false),
10  ignoreNoise_(false) {
11  encsParam_.push_back({636., 15.6, 0.0328}); // q80fC: II order polynomial coefficients
12  chargeAtFullScaleADCPerGain_.push_back(80.); // the num of fC (charge) which corresponds to the max ADC value
13  encsParam_.push_back({1045., 8.74, 0.0685}); // q160fC
14  chargeAtFullScaleADCPerGain_.push_back(160.);
15  encsParam_.push_back({1915., 2.79, 0.0878}); // q320fC
16  chargeAtFullScaleADCPerGain_.push_back(320.);
17 
18  // adc has 10 bits -> 1024 counts at max ( >0 baseline to be handled)
19  for (auto i : chargeAtFullScaleADCPerGain_)
20  lsbPerGain_.push_back(i / 1024.);
21 
22  //fine sensors: 120 mum - 67: MPV of charge[number of e-]/mum for a mip in silicon; srouce PDG
23  const double mipEqfC_120 = 120. * 67. * qe2fc_;
24  mipEqfC_[0] = mipEqfC_120;
25  const double cellCapacitance_120 = 50;
26  cellCapacitance_[0] = cellCapacitance_120;
27  const double cellVolume_120 = 0.52 * (120.e-4);
28  cellVolume_[0] = cellVolume_120;
29 
30  //thin sensors: 200 mum
31  const double mipEqfC_200 = 200. * 70. * qe2fc_;
32  mipEqfC_[1] = mipEqfC_200;
33  const double cellCapacitance_200 = 65;
34  cellCapacitance_[1] = cellCapacitance_200;
35  const double cellVolume_200 = 1.18 * (200.e-4);
36  cellVolume_[1] = cellVolume_200;
37 
38  //thick sensors: 300 mum
39  const double mipEqfC_300 = 300. * 73. * qe2fc_;
40  mipEqfC_[2] = mipEqfC_300;
41  const double cellCapacitance_300 = 45;
42  cellCapacitance_[2] = cellCapacitance_300;
43  const double cellVolume_300 = 1.18 * (300.e-4);
44  cellVolume_[2] = cellVolume_300;
45 }

References cellCapacitance_, cellVolume_, chargeAtFullScaleADCPerGain_, encsParam_, mps_fire::i, lsbPerGain_, mipEqfC_, and qe2fc_.

◆ ~HGCalSiNoiseMap()

HGCalSiNoiseMap::~HGCalSiNoiseMap ( )
inline

Definition at line 27 of file HGCalSiNoiseMap.h.

27 {};

Member Function Documentation

◆ getCCEParam()

std::vector<std::vector<double> >& HGCalSiNoiseMap::getCCEParam ( )
inline

Definition at line 61 of file HGCalSiNoiseMap.h.

61 { return cceParam_; }

References cceParam_.

◆ getCellCapacitance()

std::array<double, 3>& HGCalSiNoiseMap::getCellCapacitance ( )
inline

Definition at line 59 of file HGCalSiNoiseMap.h.

59 { return cellCapacitance_; }

References cellCapacitance_.

◆ getCellVolume()

std::array<double, 3>& HGCalSiNoiseMap::getCellVolume ( )
inline

Definition at line 60 of file HGCalSiNoiseMap.h.

60 { return cellVolume_; }

References cellVolume_.

◆ getENCsParam()

std::vector<std::vector<double> >& HGCalSiNoiseMap::getENCsParam ( )
inline

Definition at line 63 of file HGCalSiNoiseMap.h.

63 { return encsParam_; }

References encsParam_.

◆ getIleakParam()

std::vector<double>& HGCalSiNoiseMap::getIleakParam ( )
inline

Definition at line 62 of file HGCalSiNoiseMap.h.

62 { return ileakParam_; }

References ileakParam_.

◆ getLSBPerGain()

std::vector<double>& HGCalSiNoiseMap::getLSBPerGain ( )
inline

Definition at line 64 of file HGCalSiNoiseMap.h.

64 { return lsbPerGain_; }

References lsbPerGain_.

◆ getMaxADCPerGain()

std::vector<double>& HGCalSiNoiseMap::getMaxADCPerGain ( )
inline

Definition at line 65 of file HGCalSiNoiseMap.h.

References chargeAtFullScaleADCPerGain_.

◆ getMipEqfC()

std::array<double, 3>& HGCalSiNoiseMap::getMipEqfC ( )
inline

Definition at line 58 of file HGCalSiNoiseMap.h.

58 { return mipEqfC_; }

References mipEqfC_.

◆ getSiCellOpCharacteristics()

HGCalSiNoiseMap::SiCellOpCharacteristics HGCalSiNoiseMap::getSiCellOpCharacteristics ( const HGCSiliconDetId did,
GainRange_t  gain = GainRange_t::AUTO,
int  aimMIPtoADC = 10 
)

returns the charge collection efficiency and noise if gain range is set to auto, it will find the most appropriate gain to put the mip peak close to 10 ADC counts

Definition at line 59 of file HGCalSiNoiseMap.cc.

61  {
62  SiCellOpCharacteristics siop;
63 
64  //decode cell properties
65  int layer(cellId.layer());
66  unsigned int cellThick = cellId.type();
67  double cellCap(cellCapacitance_[cellThick]);
68  double cellVol(cellVolume_[cellThick]);
69 
70  //leakage current and CCE [muA]
71  if (ignoreFluence_) {
72  siop.fluence = 0;
73  siop.lnfluence = -1;
74  siop.ileak = exp(ileakParam_[1]) * cellVol * unitToMicro_;
75  siop.cce = 1;
76  } else {
77  if (getDoseMap().empty()) {
78  throw cms::Exception("BadConfiguration")
79  << " Fluence is required but no DoseMap has been passed to HGCalSiNoiseMap";
80  return siop;
81  }
82 
83  //compute the radius here
84  auto xy(ddd()->locateCell(
85  cellId.layer(), cellId.waferU(), cellId.waferV(), cellId.cellU(), cellId.cellV(), true, true));
86  double radius2 = std::pow(xy.first, 2) + std::pow(xy.second, 2); //in cm
87 
88  double radius = sqrt(radius2);
89  double radius3 = radius * radius2;
90  double radius4 = pow(radius2, 2);
91  radiiVec radii{{radius, radius2, radius3, radius4, 0., 0., 0., 0.}};
92  siop.fluence = getFluenceValue(cellId.subdet(), layer, radii);
93  siop.lnfluence = log(siop.fluence);
94  siop.ileak = exp(ileakParam_[0] * siop.lnfluence + ileakParam_[1]) * cellVol * unitToMicro_;
95 
96  if (ignoreCCE_) {
97  siop.cce = 1.0;
98  } else {
99  //lin+log parametrization
100  //cceParam_ are parameters as defined in equation (2) of DN-19-045
101  siop.cce = siop.fluence <= cceParam_[cellThick][0] ? 1. + cceParam_[cellThick][1] * siop.fluence
102  : (1. - cceParam_[cellThick][2] * siop.lnfluence) +
103  (cceParam_[cellThick][1] * cceParam_[cellThick][0] +
104  cceParam_[cellThick][2] * log(cceParam_[cellThick][0]));
105  siop.cce = std::max(0., siop.cce);
106  }
107  }
108 
109  //determine the gain to apply accounting for cce
110  //move computation to ROC level (one day)
111  double S(siop.cce * mipEqfC_[cellThick]);
112  if (gain == GainRange_t::AUTO) {
113  double desiredLSB(S / aimMIPtoADC);
114  std::vector<double> diffToPhysLSB = {fabs(desiredLSB - lsbPerGain_[GainRange_t::q80fC]),
115  fabs(desiredLSB - lsbPerGain_[GainRange_t::q160fC]),
116  fabs(desiredLSB - lsbPerGain_[GainRange_t::q320fC])};
117  size_t gainIdx = std::min_element(diffToPhysLSB.begin(), diffToPhysLSB.end()) - diffToPhysLSB.begin();
119  if (gainIdx == 1)
121  if (gainIdx == 2)
123  }
124 
125  //fill in the parameters of the struct
126  siop.gain = gain;
127  siop.mipfC = S;
128  siop.mipADC = std::floor(S / lsbPerGain_[gain]);
129  siop.thrADC = std::floor(S / 2. / lsbPerGain_[gain]);
130 
131  //build noise estimate
132  if (ignoreNoise_) {
133  siop.noise = 0.0;
134  } else {
135  double enc_s(encsParam_[gain][0] + encsParam_[gain][1] * cellCap + encsParam_[gain][2] * pow(cellCap, 2));
136  double enc_p(encpScale_ * sqrt(siop.ileak));
137  siop.noise = hypot(enc_p, enc_s * encCommonNoiseSub_) * qe2fc_;
138  }
139 
140  return siop;
141 }

References HGCalSiNoiseMap::SiCellOpCharacteristics::cce, cceParam_, cellCapacitance_, HGCSiliconDetId::cellU(), HGCSiliconDetId::cellV(), cellVolume_, HGCalRadiationMap::ddd(), relativeConstraints::empty, encCommonNoiseSub_, encpScale_, encsParam_, Exception, JetChargeProducer_cfi::exp, HGCalSiNoiseMap::SiCellOpCharacteristics::fluence, HGCalSiNoiseMap::SiCellOpCharacteristics::gain, PedestalClient_cfi::gain, HGCalRadiationMap::getDoseMap(), HGCalRadiationMap::getFluenceValue(), ignoreCCE_, ignoreFluence_, ignoreNoise_, HGCalSiNoiseMap::SiCellOpCharacteristics::ileak, ileakParam_, HGCSiliconDetId::layer(), HGCalSiNoiseMap::SiCellOpCharacteristics::lnfluence, dqm-mbProfile::log, lsbPerGain_, SiStripPI::max, HGCalSiNoiseMap::SiCellOpCharacteristics::mipADC, mipEqfC_, HGCalSiNoiseMap::SiCellOpCharacteristics::mipfC, HGCalSiNoiseMap::SiCellOpCharacteristics::noise, funct::pow(), q160fC, q320fC, q80fC, qe2fc_, CosmicsPD_Skims::radius, S(), mathSSE::sqrt(), HGCSiliconDetId::subdet(), HGCalSiNoiseMap::SiCellOpCharacteristics::thrADC, HGCSiliconDetId::type(), unitToMicro_, HGCSiliconDetId::waferU(), HGCSiliconDetId::waferV(), and geometryCSVtoXML::xy.

◆ setCceParam()

void HGCalSiNoiseMap::setCceParam ( const std::vector< double > &  parsFine,
const std::vector< double > &  parsThin,
const std::vector< double > &  parsThick 
)
inline

set the cce parameters to use

Definition at line 37 of file HGCalSiNoiseMap.h.

39  {
40  cceParam_.push_back(parsFine); //120
41  cceParam_.push_back(parsThin); //200
42  cceParam_.push_back(parsThick); //300
43  }

References cceParam_.

Referenced by HGCDigitizerBase< HGCalDataFrame >::HGCDigitizerBase().

◆ setDoseMap()

void HGCalSiNoiseMap::setDoseMap ( const std::string &  fullpath,
const unsigned int &  algo 
)

overrides base class method with specifics for the configuration of the algo

Definition at line 48 of file HGCalSiNoiseMap.cc.

48  {
49  //decode bits in the algo word
50  ignoreFluence_ = ((algo >> FLUENCE) & 0x1);
51  ignoreCCE_ = ((algo >> CCE) & 0x1);
52  ignoreNoise_ = ((algo >> NOISE) & 0x1);
53 
54  //call base class method
56 }

References HGCalRadiationMap::algo(), CCE, FLUENCE, reco_skim_cfg_mod::fullpath, ignoreCCE_, ignoreFluence_, ignoreNoise_, NOISE, HGCalRadiationMap::setDoseMap(), and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by HGCDigitizerBase< HGCalDataFrame >::HGCDigitizerBase().

◆ setIleakParam()

void HGCalSiNoiseMap::setIleakParam ( const std::vector< double > &  pars)
inline

set the ileak parameters to use

Definition at line 32 of file HGCalSiNoiseMap.h.

32 { ileakParam_ = pars; }

References ileakParam_.

Referenced by HGCDigitizerBase< HGCalDataFrame >::HGCDigitizerBase().

Member Data Documentation

◆ cceParam_

std::vector<std::vector<double> > HGCalSiNoiseMap::cceParam_
private

Definition at line 70 of file HGCalSiNoiseMap.h.

Referenced by getCCEParam(), getSiCellOpCharacteristics(), and setCceParam().

◆ cellCapacitance_

std::array<double, 3> HGCalSiNoiseMap::cellCapacitance_
private

◆ cellVolume_

std::array<double, 3> HGCalSiNoiseMap::cellVolume_
private

Definition at line 69 of file HGCalSiNoiseMap.h.

Referenced by getCellVolume(), getSiCellOpCharacteristics(), and HGCalSiNoiseMap().

◆ chargeAtFullScaleADCPerGain_

std::vector<double> HGCalSiNoiseMap::chargeAtFullScaleADCPerGain_
private

Definition at line 88 of file HGCalSiNoiseMap.h.

Referenced by getMaxADCPerGain(), and HGCalSiNoiseMap().

◆ encCommonNoiseSub_

const double HGCalSiNoiseMap::encCommonNoiseSub_
private

Definition at line 79 of file HGCalSiNoiseMap.h.

Referenced by getSiCellOpCharacteristics().

◆ encpScale_

const double HGCalSiNoiseMap::encpScale_
private

Definition at line 76 of file HGCalSiNoiseMap.h.

Referenced by getSiCellOpCharacteristics().

◆ encsParam_

std::vector<std::vector<double> > HGCalSiNoiseMap::encsParam_
private

Definition at line 85 of file HGCalSiNoiseMap.h.

Referenced by getENCsParam(), getSiCellOpCharacteristics(), and HGCalSiNoiseMap().

◆ ignoreCCE_

bool HGCalSiNoiseMap::ignoreCCE_
private

Definition at line 94 of file HGCalSiNoiseMap.h.

Referenced by getSiCellOpCharacteristics(), and setDoseMap().

◆ ignoreFluence_

bool HGCalSiNoiseMap::ignoreFluence_
private

Definition at line 94 of file HGCalSiNoiseMap.h.

Referenced by getSiCellOpCharacteristics(), and setDoseMap().

◆ ignoreNoise_

bool HGCalSiNoiseMap::ignoreNoise_
private

Definition at line 94 of file HGCalSiNoiseMap.h.

Referenced by getSiCellOpCharacteristics(), and setDoseMap().

◆ ileakParam_

std::vector<double> HGCalSiNoiseMap::ileakParam_
private

Definition at line 73 of file HGCalSiNoiseMap.h.

Referenced by getIleakParam(), getSiCellOpCharacteristics(), and setIleakParam().

◆ lsbPerGain_

std::vector<double> HGCalSiNoiseMap::lsbPerGain_
private

Definition at line 88 of file HGCalSiNoiseMap.h.

Referenced by getLSBPerGain(), getSiCellOpCharacteristics(), and HGCalSiNoiseMap().

◆ mipEqfC_

std::array<double, 3> HGCalSiNoiseMap::mipEqfC_
private

Definition at line 69 of file HGCalSiNoiseMap.h.

Referenced by getMipEqfC(), getSiCellOpCharacteristics(), and HGCalSiNoiseMap().

◆ qe2fc_

const double HGCalSiNoiseMap::qe2fc_
private

Definition at line 82 of file HGCalSiNoiseMap.h.

Referenced by getSiCellOpCharacteristics(), and HGCalSiNoiseMap().

◆ unitToMicro_

const double HGCalSiNoiseMap::unitToMicro_ = 1.e6
private

Definition at line 91 of file HGCalSiNoiseMap.h.

Referenced by getSiCellOpCharacteristics().

HGCalSiNoiseMap::CCE
Definition: HGCalSiNoiseMap.h:17
HGCalSiNoiseMap::cceParam_
std::vector< std::vector< double > > cceParam_
Definition: HGCalSiNoiseMap.h:70
radiiVec
std::array< double, 8 > radiiVec
Definition: HGCalRadiationMap.h:10
mps_fire.i
i
Definition: mps_fire.py:355
HGCalSiNoiseMap::q160fC
Definition: HGCalSiNoiseMap.h:16
HGCalSiNoiseMap::encsParam_
std::vector< std::vector< double > > encsParam_
Definition: HGCalSiNoiseMap.h:85
HGCalRadiationMap::getFluenceValue
double getFluenceValue(const int, const int, const radiiVec &, bool logVal=false)
Definition: HGCalRadiationMap.cc:27
reco_skim_cfg_mod.fullpath
fullpath
Definition: reco_skim_cfg_mod.py:202
HGCalRadiationMap::algo
const unsigned int & algo()
Definition: HGCalRadiationMap.h:34
HGCalSiNoiseMap::NOISE
Definition: HGCalSiNoiseMap.h:17
HGCalSiNoiseMap::q320fC
Definition: HGCalSiNoiseMap.h:16
HGCalSiNoiseMap::mipEqfC_
std::array< double, 3 > mipEqfC_
Definition: HGCalSiNoiseMap.h:69
HGCalSiNoiseMap::AUTO
Definition: HGCalSiNoiseMap.h:16
HGCalSiNoiseMap::ileakParam_
std::vector< double > ileakParam_
Definition: HGCalSiNoiseMap.h:73
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
HGCalSiNoiseMap::q80fC
Definition: HGCalSiNoiseMap.h:16
HGCalSiNoiseMap::chargeAtFullScaleADCPerGain_
std::vector< double > chargeAtFullScaleADCPerGain_
Definition: HGCalSiNoiseMap.h:88
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
HGCalSiNoiseMap::qe2fc_
const double qe2fc_
Definition: HGCalSiNoiseMap.h:82
HGCalSiNoiseMap::encpScale_
const double encpScale_
Definition: HGCalSiNoiseMap.h:76
geometryCSVtoXML.xy
xy
Definition: geometryCSVtoXML.py:19
HGCalSiNoiseMap::lsbPerGain_
std::vector< double > lsbPerGain_
Definition: HGCalSiNoiseMap.h:88
S
double S(const TLorentzVector &, const TLorentzVector &)
Definition: Particle.cc:97
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HGCalSiNoiseMap::ignoreNoise_
bool ignoreNoise_
Definition: HGCalSiNoiseMap.h:94
HGCalRadiationMap::setDoseMap
void setDoseMap(const std::string &, const unsigned int)
Definition: HGCalRadiationMap.cc:6
HGCalSiNoiseMap::encCommonNoiseSub_
const double encCommonNoiseSub_
Definition: HGCalSiNoiseMap.h:79
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
HGCalSiNoiseMap::FLUENCE
Definition: HGCalSiNoiseMap.h:17
HGCalSiNoiseMap::ignoreFluence_
bool ignoreFluence_
Definition: HGCalSiNoiseMap.h:94
HGCalSiNoiseMap::cellCapacitance_
std::array< double, 3 > cellCapacitance_
Definition: HGCalSiNoiseMap.h:69
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
HGCalSiNoiseMap::cellVolume_
std::array< double, 3 > cellVolume_
Definition: HGCalSiNoiseMap.h:69
Exception
Definition: hltDiff.cc:246
HGCalRadiationMap::getDoseMap
const doseParametersMap & getDoseMap()
Definition: HGCalRadiationMap.h:39
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
HGCalRadiationMap::ddd
const HGCalDDDConstants * ddd()
Definition: HGCalRadiationMap.h:37
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
S
Definition: CSCDBL1TPParametersExtended.h:16
HGCalSiNoiseMap::ignoreCCE_
bool ignoreCCE_
Definition: HGCalSiNoiseMap.h:94
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
HGCalSiNoiseMap::unitToMicro_
const double unitToMicro_
Definition: HGCalSiNoiseMap.h:91