Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-23 03:25:35

0001 #include "DataFormats/DetId/interface/DetId.h"
0002 #include "DataFormats/HcalDetId/interface/HcalCastorDetId.h"
0003 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0004 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
0005 #include "SimCalorimetry/CastorSim/interface/CastorSimParameterMap.h"
0006 #include <iostream>
0007 
0008 // some arbitrary numbers for now
0009 CastorSimParameterMap::CastorSimParameterMap() : theCastorParameters(1., 4.3333, 2.09, -4., false) {}
0010 /*
0011   CaloSimParameters(double photomultiplierGain, double amplifierGain,
0012                  double samplingFactor, double timePhase,
0013                  int readoutFrameSize, int binOfMaximum,
0014                  bool doPhotostatistics);
0015 */
0016 
0017 CastorSimParameterMap::CastorSimParameterMap(const edm::ParameterSet &p)
0018     : theCastorParameters(p.getParameter<edm::ParameterSet>("castor")) {}
0019 
0020 const CaloSimParameters &CastorSimParameterMap::simParameters(const DetId &detId) const {
0021   HcalGenericDetId genericId(detId);
0022 
0023   //  if(detId.det()==DetId::Calo &&
0024   //  detId.subdetId()==HcalCastorDetId::SubdetectorId)
0025 
0026   if (genericId.isHcalCastorDetId())
0027     return theCastorParameters;
0028 
0029   else
0030     throw cms::Exception("not HcalCastorDetId");
0031 }
0032 
0033 void CastorSimParameterMap::setDbService(const CastorDbService *dbService) {
0034   theCastorParameters.setDbService(dbService);
0035 }