CMS 3D CMS Logo

HcalTBSimParameterMap.cc

Go to the documentation of this file.
00001 #include "SimCalorimetry/HcalTestBeam/interface/HcalTBSimParameterMap.h"
00002 #include "DataFormats/DetId/interface/DetId.h"
00003 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
00004 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00005   
00006 
00007 HcalTBSimParameterMap::HcalTBSimParameterMap() :
00008   theHBParameters(2000., 0.3305, 117, 5, 10, 5, 
00009                   true, false, 1, std::vector<double>(16, 117.)),
00010   theHEParameters(2000., 0.3305, 178, 5, 10, 5, 
00011                   true, false, 16, std::vector<double>(16, 178.)),
00012   theHOParameters(4000., 0.3065, 217, 5, 10, 5, 
00013                   true, false, 1, std::vector<double>(16, 217.)) {}
00014 
00015 /*
00016   CaloSimParameters(double photomultiplierGain, double amplifierGain,
00017                  double samplingFactor, double timePhase,
00018                  int readoutFrameSize, int binOfMaximum,
00019                  bool doPhotostatistics)
00020 */
00021 
00022 HcalTBSimParameterMap::HcalTBSimParameterMap(const edm::ParameterSet & p) :
00023   theHBParameters(p.getUntrackedParameter<double>("photomultiplierGainTBHB",2000.),
00024                   p.getUntrackedParameter<double>("amplifierGainTBHB",0.3305),
00025                   p.getUntrackedParameter<double>("samplingFactorTBHB",117),
00026                   p.getUntrackedParameter<double>("timePhaseTBHB",5),
00027                   p.getUntrackedParameter<int>("readoutFrameSizeTB",10),
00028                   p.getUntrackedParameter<int>("binOfMaximumTBHB",5),
00029                   p.getUntrackedParameter<bool>("doPhotostatisticsTB",true),
00030                   p.getUntrackedParameter<bool>("syncPhaseTB",true),
00031                   1, std::vector<double>(16, 117.)),
00032   theHEParameters(p.getUntrackedParameter<double>("photomultiplierGainTBHE",2000.),
00033                   p.getUntrackedParameter<double>("amplifierGainTBHE",0.3305),
00034                   p.getUntrackedParameter<double>("samplingFactorTBHE",178),
00035                   p.getUntrackedParameter<double>("timePhaseTBHE",5),
00036                   p.getUntrackedParameter<int>("readoutFrameSizeTB",10),
00037                   p.getUntrackedParameter<int>("binOfMaximumTBHE",5),
00038                   p.getUntrackedParameter<bool>("doPhotostatisticsTB",true),
00039                   p.getUntrackedParameter<bool>("syncPhaseTB",true),
00040                   16, std::vector<double>(16, 178.)),
00041   theHOParameters(p.getUntrackedParameter<double>("photomultiplierGainTBHE",4000.),
00042                   p.getUntrackedParameter<double>("amplifierGainTBHO",.3065),
00043                   p.getUntrackedParameter<double>("samplingFactorTBHO",217),
00044                   p.getUntrackedParameter<double>("timePhaseTBHO",5),
00045                   p.getUntrackedParameter<int>("readoutFrameSizeTB",10),
00046                   p.getUntrackedParameter<int>("binOfMaximumTBHO",5),
00047                   p.getUntrackedParameter<bool>("doPhotostatisticsTB",true),
00048                   p.getUntrackedParameter<bool>("syncPhaseTB",true),
00049                   1, std::vector<double>(16, 217.)) {}
00050 
00051 
00052 const CaloSimParameters & HcalTBSimParameterMap::simParameters(const DetId & detId) const {
00053   HcalDetId hcalDetId(detId);
00054   if(hcalDetId.subdet() == HcalBarrel) {
00055     return theHBParameters;
00056   } else if(hcalDetId.subdet() == HcalEndcap) {
00057     return theHEParameters;
00058   } else {
00059     return theHOParameters;
00060   }
00061 }
00062 

Generated on Tue Jun 9 17:46:23 2009 for CMSSW by  doxygen 1.5.4