Skip to content

Commit

Permalink
Add a new dedicated PSet
Browse files Browse the repository at this point in the history
  • Loading branch information
mhassans committed Jun 4, 2021
1 parent 69dbba6 commit b72659d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
5 changes: 5 additions & 0 deletions L1Trigger/L1THGCal/python/customTowers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
from L1Trigger.L1THGCal.hgcalTowerMapProducer_cfi import L1TTriggerTowerConfig_energySplit
import math

def custom_towers_unclustered_tc(process):
Expand Down Expand Up @@ -35,6 +36,10 @@ def custom_towers_etaphi(process,
parameters_towers_2d.L1TTriggerTowerConfig.binsPhi = cms.vdouble(binsPhi)
return process

def custom_towers_energySplit(process):
parameters_towers_2d = L1TTriggerTowerConfig_energySplit.clone()
process.hgcalTowerMapProducer.ProcessorParameters.towermap_parameters.L1TTriggerTowerConfig = parameters_towers_2d
return process

def custom_towers_map(process,
towermapping='L1Trigger/L1THGCal/data/tower_mapping_hgcroc_eta-phi_v3.txt',
Expand Down
11 changes: 11 additions & 0 deletions L1Trigger/L1THGCal/python/hgcalTowerMapProducer_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@
binsEta=cms.vdouble(),
binsPhi=cms.vdouble())

L1TTriggerTowerConfig_energySplit = cms.PSet(readMappingFile=cms.bool(False),
doNose=cms.bool(False),
minEta=cms.double(1.305),
maxEta=cms.double(3.045),
minPhi=cms.double(-1*math.pi),
maxPhi=cms.double(math.pi),
nBinsEta=cms.int32(20),
nBinsPhi=cms.int32(72),
binsEta=cms.vdouble(),
binsPhi=cms.vdouble())

towerMap2D_parValues = cms.PSet( useLayerWeights = cms.bool(False),
layerWeights = cms.vdouble(),
AlgoName = cms.string('HGCalTowerMapsWrapper'),
Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/L1THGCal/src/HGCalTriggerTowerGeometryHelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ std::unordered_map<unsigned short, float> HGCalTriggerTowerGeometryHelper::getTr
binIDandShares.insert( {l1t::HGCalTowerID(doNose_, zside, towerEta, towerPhi).rawId(), std::stod(result[3*i+4])/splitDevisor } );
}

return binIDandShares; //FIXME return choice with a boolean from the config
return binIDandShares; //FIXME add option (boolean) to the config to choose to return in the new and old ways
// return getTriggerTowerFromEtaPhi(thesum.position().eta(), thesum.position().phi());

}
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
from L1Trigger.L1THGCal.customTriggerGeometry import custom_geometry_decentralized_V11
process = custom_geometry_decentralized_V11(process, implementation=2)

from L1Trigger.L1THGCal.customTowers import custom_towers_energySplit
process = custom_towers_energySplit(process)

process.hgcl1tpg_step = cms.Path(process.hgcalTriggerPrimitives)


Expand Down

0 comments on commit b72659d

Please sign in to comment.