Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions DataFormats/ForwardDetId/interface/HGCalTriggerDetId.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

class HGCalTriggerDetId : public DetId {
public:
enum waferType { HGCalHD120 = 0, HGCalLD200 = 1, HGCalLD300 = 2, HGCalHD200 = 3 };
static const int HGCalTriggerCell = 4;

/** Create a null cellid*/
Expand All @@ -46,6 +47,8 @@ class HGCalTriggerDetId : public DetId {

/// get the type
int type() const { return (id_ >> kHGCalTypeOffset) & kHGCalTypeMask; }
bool lowDensity() const { return ((type() == HGCalLD200) || (type() == HGCalLD300)); }
bool highDensity() const { return ((type() == HGCalHD120) || (type() == HGCalHD200)); }

/// get the z-side of the cell (1/-1)
int zside() const { return (((id_ >> kHGCalZsideOffset) & kHGCalZsideMask) ? -1 : 1); }
Expand Down
12 changes: 12 additions & 0 deletions DataFormats/ForwardDetId/interface/HGCalTriggerModuleDetId.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
[19:20] Type (0 fine divisions of wafer with 120 mum thick silicon
1 coarse divisions of wafer with 200 mum thick silicon
2 coarse divisions of wafer with 300 mum thick silicon
3 fine divisions of wafer with 200 mum thick silicon
0 fine divisions of scintillators
1 coarse divisions of scintillators)

Expand All @@ -30,6 +31,8 @@

class HGCalTriggerModuleDetId : public DetId {
public:
enum siliconType { HGCalHD120 = 0, HGCalLD200 = 1, HGCalLD300 = 2, HGCalHD200 = 3 };
enum tileGranularity { HGCalTileNormal = 0, HGCalTileFine = 1 };
/** Create a null module id*/
HGCalTriggerModuleDetId();
/** Create module id from raw id (0=invalid id) */
Expand Down Expand Up @@ -72,6 +75,15 @@ class HGCalTriggerModuleDetId : public DetId {
/// get the scintillator panel phi
int phi() const { return moduleV(); }

bool isSiliconLowDensity() const {
return (!isHScintillator() && ((type() == HGCalLD200) || (type() == HGCalLD300)));
}
bool isSiliconHighDensity() const {
return (!isHScintillator() && ((type() == HGCalHD120) || (type() == HGCalHD200)));
}
bool isScintillatorFine() const { return (isHScintillator() && (type() == HGCalTileFine)); }
bool isScintillatorCoarse() const { return (isHScintillator() && (type() == HGCalTileNormal)); }

/// consistency check : no bits left => no overhead
bool isHFNose() const { return (triggerSubdetId() == HFNoseTrigger); }
bool isEE() const { return (triggerSubdetId() == HGCalEETrigger); }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import FWCore.ParameterSet.Config as cms
from ..psets.hgcal_reco_constants_cfi import HGCAL_reco_constants as HGCAL_reco_constants
from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19


hltHGCalRecHitL1Seeded = cms.EDProducer("HGCalRecHitProducer",
Expand Down Expand Up @@ -60,3 +61,10 @@
thicknessCorrection = HGCAL_reco_constants.thicknessCorrection,
thicknessNoseCorrection = cms.vdouble(1.132, 1.092, 1.084)
)

phase2_hgcalV19.toModify(hltHGCalRecHitL1Seeded,
HGCEE_fCPerMIP = HGCAL_reco_constants.fcPerMip[0:4],
HGCHEF_fCPerMIP = HGCAL_reco_constants.fcPerMip[4:8],
HGCHFNose_fCPerMIP = [1.25, 2.57, 3.88, 2.57],

)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import FWCore.ParameterSet.Config as cms
from ..psets.hgcal_reco_constants_cfi import HGCAL_reco_constants as HGCAL_reco_constants
from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19

hltHGCalRecHit = cms.EDProducer("HGCalRecHitProducer",
HGCEE_cce = cms.PSet(
Expand Down Expand Up @@ -59,3 +60,9 @@
thicknessCorrection = HGCAL_reco_constants.thicknessCorrection,
thicknessNoseCorrection = cms.vdouble(1.132, 1.092, 1.084)
)

phase2_hgcalV19.toModify(hltHGCalRecHit,
HGCEE_fCPerMIP = HGCAL_reco_constants.fcPerMip[0:4],
HGCHEF_fCPerMIP = HGCAL_reco_constants.fcPerMip[4:8],
HGCHFNose_fCPerMIP = [1.25, 2.57, 3.88, 2.57],
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import FWCore.ParameterSet.Config as cms
from ..psets.hgcal_reco_constants_cfi import HGCAL_reco_constants as HGCAL_reco_constants
from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19

hltHGCalUncalibRecHitL1Seeded = cms.EDProducer("HGCalUncalibRecHitProducer",
HGCEEConfig = cms.PSet(
Expand Down Expand Up @@ -60,3 +61,20 @@

from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5
ticl_v5.toModify(hltHGCalUncalibRecHitL1Seeded, computeLocalTime = cms.bool(True))

_modifiedHGCEEConfig_v19 = hltHGCalUncalibRecHitL1Seeded.HGCEEConfig.clone(
fCPerMIP = HGCAL_reco_constants.fcPerMip[0:4]
)
_modifiedHGCHEFConfig_v19 = hltHGCalUncalibRecHitL1Seeded.HGCHEFConfig.clone(
fCPerMIP = HGCAL_reco_constants.fcPerMip[4:8]
)
_modifiedHGCHFNoseConfig_v19 = hltHGCalUncalibRecHitL1Seeded.HGCHFNoseConfig.clone(
fCPerMIP = [1.25, 2.57, 3.88, 2.57]
)

phase2_hgcalV19.toModify(
hltHGCalUncalibRecHitL1Seeded,
HGCEEConfig = _modifiedHGCEEConfig_v19,
HGCHEFConfig = _modifiedHGCHEFConfig_v19,
HGCHFNoseConfig = _modifiedHGCHFNoseConfig_v19
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import FWCore.ParameterSet.Config as cms
from ..psets.hgcal_reco_constants_cfi import HGCAL_reco_constants as HGCAL_reco_constants
from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19


hltHGCalUncalibRecHit = cms.EDProducer("HGCalUncalibRecHitProducer",
Expand Down Expand Up @@ -61,3 +62,21 @@

from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5
ticl_v5.toModify(hltHGCalUncalibRecHit, computeLocalTime = cms.bool(True))


_modifiedHGCEEConfig_v19 = hltHGCalUncalibRecHit.HGCEEConfig.clone(
fCPerMIP = HGCAL_reco_constants.fcPerMip[0:4]
)
_modifiedHGCHEFConfig_v19 = hltHGCalUncalibRecHit.HGCHEFConfig.clone(
fCPerMIP = HGCAL_reco_constants.fcPerMip[4:8]
)
_modifiedHGCHFNoseConfig_v19 = hltHGCalUncalibRecHit.HGCHFNoseConfig.clone(
fCPerMIP = [1.25, 2.57, 3.88, 2.57]
)

phase2_hgcalV19.toModify(
hltHGCalUncalibRecHit,
HGCEEConfig = _modifiedHGCEEConfig_v19,
HGCHEFConfig = _modifiedHGCHEFConfig_v19,
HGCHFNoseConfig = _modifiedHGCHFNoseConfig_v19
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19

HGCAL_chargeCollectionEfficiencies = cms.PSet(
values = cms.vdouble(1.0, 1.0, 1.0)
)
)

phase2_hgcalV19.toModify(HGCAL_chargeCollectionEfficiencies, values = [1.0, 1.0,1.0,1.0])
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19

HGCAL_noise_fC = cms.PSet(
doseMap = cms.string(''),
scaleByDose = cms.bool(False),
scaleByDoseAlgo = cms.uint32(0),
scaleByDoseFactor = cms.double(1),
values = cms.vdouble(0.32041011999999996, 0.384492144, 0.32041011999999996)
)
)

phase2_hgcalV19.toModify(HGCAL_noise_fC , values = [0.32041011999999996, 0.384492144, 0.32041011999999996, 0.384492144])
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19

HGCAL_reco_constants = cms.PSet(
dEdXweights = cms.vdouble(
Expand Down Expand Up @@ -38,6 +39,23 @@
referenceXtalk = cms.double(-1),
noise_MIP = cms.double(0.01)
),
numberOfThicknesses = cms.uint32(3)

)



phase2_hgcalV19.toModify(HGCAL_reco_constants,
thicknessCorrection = [0.75, 0.76, 0.75, 0.76, 0.85, 0.85, 0.84, 0.85] , #CEE_12_HD, CEE_200_LD, CEE_300_LD, CEE_200_HD,CEH_12_HD, CEH_200_LD, CEH_300_LD, CEH_200_HD,
fcPerMip =
[2.06, 3.43, 5.15, 3.43, 2.06, 3.43,
5.15, 3.43]
,
noises =
[2000.0, 2400.0, 2000.0, 2400.0, 2000.0, 2400.0,
2000.0, 2400.]
,
numberOfThicknesses = 4,
maxNumberOfThickIndices = 8,
thresholdW0 = [2.9, 2.9, 2.9, 2.9],
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19

hgceeDigitizer = cms.PSet(
NoiseGeneration_Method = cms.bool(True),
Expand Down Expand Up @@ -63,4 +64,6 @@
tofDelay = cms.double(5),
useAllChannels = cms.bool(True),
verbosity = cms.untracked.uint32(0)
)
)

phase2_hgcalV19.toModify(hgceeDigitizer.digiCfg.feCfg, tdcForToAOnset_fC= [12.,12.,12.,12.])
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19

hgchebackDigitizer = cms.PSet(
NoiseGeneration_Method = cms.bool(True),
Expand Down Expand Up @@ -61,4 +62,6 @@
tofDelay = cms.double(1),
useAllChannels = cms.bool(True),
verbosity = cms.untracked.uint32(0)
)
)

phase2_hgcalV19.toModify(hgchebackDigitizer.digiCfg.feCfg, tdcForToAOnset_fC = [12.,12.,12.,12.])
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19

hgchefrontDigitizer = cms.PSet(
NoiseGeneration_Method = cms.bool(True),
Expand Down Expand Up @@ -62,4 +63,6 @@
tofDelay = cms.double(5),
useAllChannels = cms.bool(True),
verbosity = cms.untracked.uint32(0)
)
)

phase2_hgcalV19.toModify(hgchefrontDigitizer.digiCfg.feCfg, tdcForToAOnset_fC = [12.,12.,12.,12.])
8 changes: 5 additions & 3 deletions L1Trigger/L1THGCal/interface/HGCalCoarseTriggerCellMapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ class HGCalCoarseTriggerCellMapping {
std::vector<uint32_t> getConstituentTriggerCells(uint32_t ctcId) const;
GlobalPoint getCoarseTriggerCellPosition(uint32_t ctcId) const;
uint32_t getCoarseTriggerCellId(uint32_t detid) const;
void checkSizeValidity(int ctcSize) const;
void setGeometry(const HGCalTriggerGeometryBase* const geom) { triggerTools_.setGeometry(geom); }
void checkSizeValidity() const;
void setGeometry(const HGCalTriggerGeometryBase* const geom) {
triggerTools_.setGeometry(geom);
checkSizeValidity();
}

static constexpr int kCTCsizeCoarse_ = 16;
static constexpr int kCTCsizeMid_ = 8;
Expand All @@ -26,7 +29,6 @@ class HGCalCoarseTriggerCellMapping {
static const std::map<int, int> kSplit_;
static const std::map<int, int> kSplit_Scin_;
static constexpr int kSTCidMaskInv_ = ~0xf;
static constexpr int kNThicknesses_ = 4;
static constexpr int kNHGCalLayersMax_ = 52;

static constexpr int kSplit_Coarse_ = 0;
Expand Down
6 changes: 4 additions & 2 deletions L1Trigger/L1THGCal/interface/HGCalTriggerTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,16 @@ class HGCalTriggerTools {
GlobalPoint getTCPosition(const DetId& id) const;
unsigned layers(ForwardSubdetector type) const;
unsigned layers(DetId::Detector type) const;
unsigned nSiWaferTypes() const;
unsigned layer(const DetId&) const;
unsigned layerWithOffset(const DetId&) const;
bool isEm(const DetId&) const;
bool isHad(const DetId& id) const { return !isEm(id); }
bool isSilicon(const DetId&) const;
bool isScintillator(const DetId& id) const { return !isSilicon(id); }
bool isNose(const DetId&) const;
bool isSiliconHighDensity(const DetId&) const;
bool isSiliconLowDensity(const DetId&) const;
int zside(const DetId&) const;
int thicknessIndex(const DetId&) const;

Expand Down Expand Up @@ -84,8 +87,6 @@ class HGCalTriggerTools {
DetId simToReco(const DetId&, const HGCalTopology&) const;
unsigned triggerLayer(const unsigned id) const { return geom_->triggerLayer(id); }

static constexpr unsigned kScintillatorPseudoThicknessIndex_ = 3;

enum SubDetectorType {
hgcal_silicon_CEE,
hgcal_silicon_CEH,
Expand All @@ -100,6 +101,7 @@ class HGCalTriggerTools {
unsigned bhLayers_;
unsigned noseLayers_;
unsigned totalLayers_;
unsigned scintillatorPseudoThicknessIndex_;
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class HGCalConcentratorCoarsenerImpl {
HGCalTriggerTools triggerTools_;
bool fixedDataSizePerHGCROC_;
HGCalCoarseTriggerCellMapping coarseTCmapping_;
static constexpr int kHighDensityThickness_ = 0;

HGCalTriggerCellCalibration calibration_;
HGCalVFECompressionImpl vfeCompression_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class HGCalConcentratorProcessorSelection : public HGCalConcentratorProcessorBas
bool fixedDataSizePerHGCROC_;
bool allTrigCellsInTrigSums_;
std::vector<unsigned> coarsenTriggerCells_;
static constexpr int kHighDensityThickness_ = 0;
static constexpr int kNSubDetectors_ = 3;

std::vector<SelectionType> selectionType_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class HGCalConcentratorSuperTriggerCellImpl {
};

EnergyDivisionType energyDivisionType_;
static constexpr int kHighDensityThickness_ = 0;
static constexpr int kOddNumberMask_ = 1;

HGCalTriggerTools triggerTools_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "DataFormats/DetId/interface/DetId.h"
#include "L1Trigger/L1THGCal/interface/HGCalTriggerTools.h"

#include <cstdint>
#include <vector>
#include <utility>
#include <unordered_map>
Expand All @@ -13,7 +14,11 @@ class HGCalVFESummationImpl {
public:
HGCalVFESummationImpl(const edm::ParameterSet& conf);

void setGeometry(const HGCalTriggerGeometryBase* const geom) { triggerTools_.setGeometry(geom); }
void setGeometry(const HGCalTriggerGeometryBase* const geom) {
triggerTools_.setGeometry(geom);
checkSizeValidity();
}
void checkSizeValidity() const;
void triggerCellSums(const std::vector<std::pair<DetId, uint32_t> >&, std::unordered_map<uint32_t, uint32_t>&);

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ void HGCalConcentratorProcessorSelection::run(const edm::Handle<l1t::HGCalTrigge
std::vector<l1t::HGCalTriggerSums> trigSumsVecOutput;
std::vector<l1t::HGCalConcentratorData> ae_EncodedLayerOutput;

int thickness = triggerTools_.thicknessIndex(module_trigcell.second.at(0).detId());
bool isHighDensity = triggerTools_.isSiliconHighDensity(module_trigcell.second.at(0).detId());

HGCalTriggerTools::SubDetectorType subdet = triggerTools_.getSubDetectorType(module_trigcell.second.at(0).detId());

if (coarsenTriggerCells_[subdet] || (fixedDataSizePerHGCROC_ && thickness > kHighDensityThickness_)) {
if (coarsenTriggerCells_[subdet] || (fixedDataSizePerHGCROC_ && !isHighDensity)) {
coarsenerImpl_->coarsen(module_trigcell.second, trigCellVecCoarsened);

switch (selectionType_[subdet]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@ void HGCalVFEProcessorSums::run(const HGCalDigiCollection& digiColl,
if (dataframes.empty())
return;

constexpr int kHighDensityThickness = 0;
bool isSilicon = triggerTools_.isSilicon(dataframes[0].id());
bool isEM = triggerTools_.isEm(dataframes[0].id());
bool isNose = triggerTools_.isNose(dataframes[0].id());
int thickness = triggerTools_.thicknessIndex(dataframes[0].id());
bool isHighDensity = triggerTools_.isSiliconHighDensity(dataframes[0].id());
// Linearization of ADC and TOT values to the same LSB
if (isSilicon) {
vfeLinearizationSiImpl_->linearize(dataframes, linearized_dataframes);
Expand All @@ -73,7 +72,7 @@ void HGCalVFEProcessorSums::run(const HGCalDigiCollection& digiColl,
// Sum of sensor cells into trigger cells
vfeSummationImpl_->triggerCellSums(linearized_dataframes, tc_payload);
// Compression of trigger cell charges to a floating point format
if (thickness == kHighDensityThickness) {
if (isHighDensity) {
vfeCompressionHDMImpl_->compress(tc_payload, tc_compressed_payload);
} else {
vfeCompressionLDMImpl_->compress(tc_payload, tc_compressed_payload);
Expand Down
Loading