Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:53

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 HFDarkening::HFDarkening(const edm::ParameterSet& pset) {
0016   //HF area of consideration is 1115 cm from interaction point to 1280cm in z-axis
0017   //Radius (cm) - 13 cm from Beam pipe to 130cm (the top of HF active area)
0018   //Dose in MRad
0019 
0020   vecOfDoubles HFDosePars = pset.getParameter<vecOfDoubles>("doseLayerDepth");
0021   int i = 0;
0022   for (int Z = 0; Z != _numberOfZLayers; ++Z) {
0023     for (int R = 0; R != _numberOfRLayers; ++R) {
0024       HFDoseLayerDarkeningPars[Z][R] = HFDosePars[i];
0025       ++i;
0026     }
0027   }
0028 }
0029 
0030 HFDarkening::~HFDarkening() {}
0031 
0032 double HFDarkening::dose(unsigned int layer, double radius) {
0033   // 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
0034   // These radii are specific to the geometry of the dose map, which closely matches HF Tower Geometry,
0035   // but not exactly.
0036   if (layer > (_numberOfZLayers - 1)) {
0037     return 0.;
0038   }
0039 
0040   int radiusIndex = 0;
0041   if (radius <= 17.0)
0042     radiusIndex = 0;
0043   else if (radius <= 20.0)
0044     radiusIndex = 1;
0045   else if (radius <= 24.0)
0046     radiusIndex = 2;
0047   else if (radius <= 29.0)
0048     radiusIndex = 3;
0049   else if (radius <= 34.0)
0050     radiusIndex = 4;
0051   else if (radius <= 41.0)
0052     radiusIndex = 5;
0053   else if (radius <= 48.0)
0054     radiusIndex = 6;
0055   else if (radius <= 58.0)
0056     radiusIndex = 7;
0057   else if (radius <= 69.0)
0058     radiusIndex = 8;
0059   else if (radius <= 82.0)
0060     radiusIndex = 9;
0061   else if (radius <= 98.0)
0062     radiusIndex = 10;
0063   else if (radius <= 116.0)
0064     radiusIndex = 11;
0065   else if (radius <= 130.0)
0066     radiusIndex = 12;
0067   else
0068     return 0.;
0069 
0070   return HFDoseLayerDarkeningPars[layer][radiusIndex];
0071 }
0072 
0073 double HFDarkening::degradation(double mrad) { return (exp(-1.44 * pow(mrad / 100, 0.44) * 0.2 / 4.343)); }
0074 
0075 double HFDarkening::int_lumi(double intlumi) { return (intlumi / 500.); }