Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:24:16

0001 //////////////////////////////////////////////////////////////////////
0002 //File: HFDarkening.cc
0003 //Description:  simple helper class containing parameterized function
0004 //              to be used for the SLHC darkening calculation in HF
0005 //////////////////////////////////////////////////////////////////////
0006 
0007 #include "SimG4CMS/Calo/interface/HFDarkening.h"
0008 #include <algorithm>
0009 #include <cmath>
0010 
0011 // CMSSW Headers
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   //HF area of consideration is 1115 cm from interaction point to 1280cm in z-axis
0019   //Radius (cm) - 13 cm from Beam pipe to 130cm (the top of HF active area)
0020   //Dose in MRad
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   // Radii are 13-17, 17-20, 20-24, 24-29, 29-34, 34-41, 41-48, 48-58, 58-69, 69-82, 82-98, 98-116, 116-130
0036   // These radii are specific to the geometry of the dose map, which closely matches HF Tower Geometry,
0037   // but not exactly.
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.); }