Skip to content

Commit 3315d23

Browse files
pfswaredjeb
authored andcommitted
adding extra Si sensor type at DIGI step
1 parent 40e3b92 commit 3315d23

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

SimCalorimetry/HGCalSimProducers/interface/HGCDigitizerBase.h

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
#include "Geometry/HGCalGeometry/interface/HGCalGeometry.h"
2222
#include "Geometry/HcalTowerAlgo/interface/HcalGeometry.h"
2323

24+
#include "DataFormats/ForwardDetId/interface/HGCSiliconDetId.h"
25+
#include "DataFormats/ForwardDetId/interface/HGCScintillatorDetId.h"
26+
2427
#include "SimCalorimetry/HGCalSimAlgos/interface/HGCalSiNoiseMap.h"
2528

2629
namespace hgc = hgc_digi;
@@ -29,14 +32,16 @@ namespace hgc_digi_utils {
2932
using hgc::HGCCellInfo;
3033

3134
inline void addCellMetadata(HGCCellInfo& info, const HGCalGeometry* geom, const DetId& detid) {
32-
const auto& dddConst = geom->topology().dddConstants();
33-
bool isHalf = (((dddConst.geomMode() == HGCalGeometryMode::Hexagon) ||
34-
(dddConst.geomMode() == HGCalGeometryMode::HexagonFull))
35-
? dddConst.isHalfCell(HGCalDetId(detid).wafer(), HGCalDetId(detid).cell())
36-
: false);
37-
//base time samples for each DetId, initialized to 0
38-
info.size = (isHalf ? 0.5 : 1.0);
39-
info.thickness = 1 + dddConst.waferType(detid, false);
35+
36+
if(detid.det()==DetId::HGCalHSc) {
37+
HGCScintillatorDetId sipmdetid(detid);
38+
info.size = sipmdetid.sipm();
39+
info.thickness = sipmdetid.granularity();
40+
} else {
41+
HGCSiliconDetId sidetid(detid);
42+
info.size = sidetid.highDensity() ? 0.5 : 1.0;
43+
info.thickness = sidetid.type();
44+
}
4045
}
4146

4247
inline void addCellMetadata(HGCCellInfo& info, const CaloSubdetectorGeometry* geom, const DetId& detid) {

SimCalorimetry/HGCalSimProducers/plugins/HGCDigitizerBase.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ HGCDigitizerBase::HGCDigitizerBase(const edm::ParameterSet& ps)
2828
}
2929

3030
if (myCfg_.existsAs<double>("noise_fC")) {
31-
noise_fC_.reserve(1);
32-
noise_fC_.push_back(myCfg_.getParameter<double>("noise_fC"));
31+
noise_fC_.resize(4, myCfg_.getParameter<double>("noise_fC"));
3332
} else if (myCfg_.existsAs<std::vector<double>>("noise_fC")) {
3433
const auto& noises = myCfg_.getParameter<std::vector<double>>("noise_fC");
3534
noise_fC_ = std::vector<float>(noises.begin(), noises.end());
@@ -47,7 +46,7 @@ HGCDigitizerBase::HGCDigitizerBase(const edm::ParameterSet& ps)
4746
scalHFNose_.setDoseMap(doseMapFile_, scaleByDoseAlgo);
4847
scalHFNose_.setFluenceScaleFactor(scaleByDoseFactor_);
4948
} else {
50-
noise_fC_.resize(1, 1.f);
49+
noise_fC_.resize(4, 1.f);
5150
}
5251
if (myCfg_.existsAs<edm::ParameterSet>("ileakParam")) {
5352
scal_.setIleakParam(
@@ -144,7 +143,6 @@ void HGCDigitizerBase::runSimple(std::unique_ptr<HGCDigitizerBase::DColl>& coll,
144143
uint32_t thrADC(std::floor(myFEelectronics_->getTargetMipValue() / 2));
145144
uint32_t gainIdx = 0;
146145
std::array<float, 6>& adcPulse = myFEelectronics_->getDefaultADCPulse();
147-
148146
double tdcOnsetAuto = -1;
149147
if (scaleByDose_) {
150148
if (id.det() == DetId::Forward && id.subdetId() == ForwardSubdetector::HFNose) {

SimCalorimetry/HGCalSimProducers/python/hgcalDigitizer_cfi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def HGCal_disableNoise(process):
376376
scaleByDoseAlgo = cms.uint32(0),
377377
scaleByDoseFactor = cms.double(1),
378378
doseMap = cms.string(""),
379-
values = cms.vdouble(0,0,0), #100,200,300 um
379+
values = cms.vdouble(0,0,0,0), #100,200,300 um
380380
)
381381
process.HGCAL_noise_heback = cms.PSet(
382382
scaleByDose = cms.bool(False),
@@ -388,7 +388,7 @@ def HGCal_disableNoise(process):
388388
noise_MIP = cms.double(0.), #zero noise (this is to be deprecated)
389389
)
390390
process.HGCAL_noises = cms.PSet(
391-
values = cms.vdouble(0,0,0)
391+
values = cms.vdouble(0,0,0,0)
392392
)
393393

394394
phase2_hgcalV19.toModify(HGCAL_noise_fC, values = cms.vdouble(0.,0.,0.,0.))

0 commit comments

Comments
 (0)