Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-07 23:58:25

0001 #ifndef simcalorimetry_hgcalsimalgos_hgcalradiationmap
0002 #define simcalorimetry_hgcalsimalgos_hgcalradiationmap
0003 
0004 #include "DataFormats/ForwardDetId/interface/HGCScintillatorDetId.h"
0005 #include "Geometry/HGCalGeometry/interface/HGCalGeometry.h"
0006 #include "Geometry/HcalTowerAlgo/interface/HcalGeometry.h"
0007 #include "vdt/vdtMath.h"
0008 #include <string>
0009 
0010 /**
0011    @class HGCalRadiationMap
0012    @short parses a txt file with dose/fluence parameters and provides functions for noise, etc.
0013  */
0014 class HGCalRadiationMap {
0015 public:
0016   struct DoseParameters {
0017     DoseParameters()
0018         : a_(0.), b_(0.), c_(0.), d_(0.), e_(0.), doff_(0.), f_(0.), g_(0.), h_(0.), i_(0.), j_(0.), foff_(0.) {}
0019     double a_, b_, c_, d_, e_, doff_, f_, g_, h_, i_, j_, foff_;
0020   };
0021 
0022   HGCalRadiationMap();
0023   ~HGCalRadiationMap(){};
0024 
0025   typedef std::map<std::pair<int, int>, DoseParameters> doseParametersMap;
0026 
0027   void setGeometry(const CaloSubdetectorGeometry *);
0028   void setDoseMap(const std::string &, const unsigned int);
0029 
0030   double computeRadius(const HGCScintillatorDetId &);
0031 
0032   double getDoseValue(const int, const int, const double, bool logVal = false);
0033   double getFluenceValue(const int, const int, const double, bool logVal = false);
0034 
0035   const unsigned int &algo() { return algo_; }
0036   const HGCalGeometry *geom() { return hgcalGeom_; }
0037   const HGCalTopology *topo() { return hgcalTopology_; }
0038   const HGCalDDDConstants *ddd() { return hgcalDDD_; }
0039 
0040   inline const doseParametersMap &getDoseMap() { return doseMap_; }
0041   inline void setFluenceScaleFactor(double val) { fluenceSFlog10_ = log10(val); }
0042 
0043 private:
0044   doseParametersMap readDosePars(const std::string &);
0045 
0046   unsigned int algo_;
0047   const HGCalGeometry *hgcalGeom_;
0048   const HGCalTopology *hgcalTopology_;
0049   const HGCalDDDConstants *hgcalDDD_;
0050   doseParametersMap doseMap_;
0051   //conversion from gray to krad (1Gy=100rad=0.1krad)
0052   const double grayToKrad_ = 0.1;
0053   double fluenceSFlog10_;
0054 };
0055 
0056 #endif