File indexing completed on 2023-03-17 11:24:16
0001
0002
0003
0004
0005
0006
0007 #include "SimG4CMS/Calo/interface/HFDarkening.h"
0008 #include <algorithm>
0009 #include <cmath>
0010
0011
0012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0013 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0014
0015 using namespace edm;
0016
0017 HFDarkening::HFDarkening(const edm::ParameterSet& pset) {
0018
0019
0020
0021
0022 vecOfDoubles HFDosePars = pset.getParameter<vecOfDoubles>("doseLayerDepth");
0023 int i = 0;
0024 for (int Z = 0; Z != _numberOfZLayers; ++Z) {
0025 for (int R = 0; R != _numberOfRLayers; ++R) {
0026 HFDoseLayerDarkeningPars[Z][R] = HFDosePars[i];
0027 ++i;
0028 }
0029 }
0030 }
0031
0032 HFDarkening::~HFDarkening() {}
0033
0034 double HFDarkening::dose(unsigned int layer, double Radius) {
0035
0036
0037
0038 if (layer > (_numberOfZLayers - 1)) {
0039 return 0.;
0040 }
0041
0042 int radius = 0;
0043 if (Radius <= 17.0)
0044 radius = 0;
0045 else if (Radius <= 20.0)
0046 radius = 1;
0047 else if (Radius <= 24.0)
0048 radius = 2;
0049 else if (Radius <= 29.0)
0050 radius = 3;
0051 else if (Radius <= 34.0)
0052 radius = 4;
0053 else if (Radius <= 41.0)
0054 radius = 5;
0055 else if (Radius <= 48.0)
0056 radius = 6;
0057 else if (Radius <= 58.0)
0058 radius = 7;
0059 else if (Radius <= 69.0)
0060 radius = 8;
0061 else if (Radius <= 82.0)
0062 radius = 9;
0063 else if (Radius <= 98.0)
0064 radius = 10;
0065 else if (Radius <= 116.0)
0066 radius = 11;
0067 else if (Radius <= 130.0)
0068 radius = 12;
0069 else
0070 return 0.;
0071
0072 return HFDoseLayerDarkeningPars[layer][radius];
0073 }
0074
0075 double HFDarkening::degradation(double mrad) { return (exp(-1.44 * pow(mrad / 100, 0.44) * 0.2 / 4.343)); }
0076
0077 double HFDarkening::int_lumi(double intlumi) { return (intlumi / 500.); }