diff --git a/L1Trigger/Configuration/python/SimL1Emulator_cff.py b/L1Trigger/Configuration/python/SimL1Emulator_cff.py index 0939f7292bd75..19b37622c0e6e 100644 --- a/L1Trigger/Configuration/python/SimL1Emulator_cff.py +++ b/L1Trigger/Configuration/python/SimL1Emulator_cff.py @@ -64,6 +64,4 @@ _phase2_siml1emulator.add(hgcalTriggerPrimitivesTask) from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal -from Configuration.Eras.Modifier_phase2_hgcalV11_cff import phase2_hgcalV11 -(phase2_hgcal & ~phase2_hgcalV11).toReplaceWith( SimL1EmulatorTask , _phase2_siml1emulator ) -#phase2_hgcal.toReplaceWith( SimL1EmulatorTask , _phase2_siml1emulator ) +phase2_hgcal.toReplaceWith( SimL1EmulatorTask , _phase2_siml1emulator ) diff --git a/L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h b/L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h index 779f5accd77c0..533c6a26f7e8a 100644 --- a/L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h +++ b/L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h @@ -96,6 +96,7 @@ class HGCalTriggerGeometryBase { virtual GlobalPoint getTriggerCellPosition(const unsigned trigger_cell_det_id) const = 0; virtual GlobalPoint getModulePosition(const unsigned module_det_id) const = 0; + virtual bool validCell(const unsigned cell_id) const = 0; virtual bool validTriggerCell(const unsigned trigger_cell_id) const = 0; virtual bool disconnectedModule(const unsigned module_id) const = 0; virtual unsigned lastTriggerLayer() const = 0; diff --git a/L1Trigger/L1THGCal/interface/HGCalTriggerGeometryGenericMapping.h b/L1Trigger/L1THGCal/interface/HGCalTriggerGeometryGenericMapping.h index 4f695a01f1f0f..b924a8147c342 100644 --- a/L1Trigger/L1THGCal/interface/HGCalTriggerGeometryGenericMapping.h +++ b/L1Trigger/L1THGCal/interface/HGCalTriggerGeometryGenericMapping.h @@ -129,6 +129,7 @@ class HGCalTriggerGeometryGenericMapping : public HGCalTriggerGeometryBase { GlobalPoint getTriggerCellPosition(const unsigned trigger_cell_det_id) const final; GlobalPoint getModulePosition(const unsigned module_det_id) const final; + bool validCell(const unsigned cell_det_id) const final { return true; } bool validTriggerCell(const unsigned trigger_cell_det_id) const final; bool disconnectedModule(const unsigned module_id) const final; unsigned lastTriggerLayer() const final; diff --git a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexImp2.cc b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexImp2.cc index 1cab5ae4e244a..dcd4189e62a15 100644 --- a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexImp2.cc +++ b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexImp2.cc @@ -37,6 +37,7 @@ class HGCalTriggerGeometryHexImp2 : public HGCalTriggerGeometryBase { GlobalPoint getTriggerCellPosition(const unsigned) const final; GlobalPoint getModulePosition(const unsigned) const final; + bool validCell(const unsigned) const final; bool validTriggerCell(const unsigned) const final; bool disconnectedModule(const unsigned) const final; unsigned lastTriggerLayer() const final; @@ -752,6 +753,32 @@ int HGCalTriggerGeometryHexImp2::detIdWaferType(unsigned subdet, short wafer) co return wafer_type; } +bool HGCalTriggerGeometryHexImp2::validCell(unsigned cell_id) const { + bool is_valid = false; + if (DetId(cell_id).det() == DetId::Hcal) { + HcalDetId cell_det_id(cell_id); + if (cell_det_id.subdetId() != HcalEndcap) + is_valid = false; + else + is_valid = bhTopology().valid(cell_id); + } else if (DetId(cell_id).det() == DetId::Forward) { + HGCalDetId cell_det_id(cell_id); + unsigned subdet = cell_det_id.subdetId(); + switch (subdet) { + case ForwardSubdetector::HGCEE: + is_valid = eeTopology().valid(cell_id); + break; + case ForwardSubdetector::HGCHEF: + is_valid = fhTopology().valid(cell_id); + break; + default: + is_valid = false; + break; + } + } + return is_valid; +} + bool HGCalTriggerGeometryHexImp2::validTriggerCell(const unsigned trigger_cell_id) const { return invalid_triggercells_.find(trigger_cell_id) == invalid_triggercells_.end(); } diff --git a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexLayerBasedImp1.cc b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexLayerBasedImp1.cc index 724f71e5d5061..1c4cba6969393 100644 --- a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexLayerBasedImp1.cc +++ b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexLayerBasedImp1.cc @@ -38,6 +38,7 @@ class HGCalTriggerGeometryHexLayerBasedImp1 : public HGCalTriggerGeometryBase { GlobalPoint getTriggerCellPosition(const unsigned) const final; GlobalPoint getModulePosition(const unsigned) const final; + bool validCell(const unsigned) const final; bool validTriggerCell(const unsigned) const final; bool disconnectedModule(const unsigned) const final; unsigned lastTriggerLayer() const final { return last_trigger_layer_; } @@ -660,6 +661,32 @@ void HGCalTriggerGeometryHexLayerBasedImp1::unpackIetaIphi(unsigned ieta_iphi, u ieta = (ieta_iphi >> HcalDetId::kHcalEtaOffset2) & HcalDetId::kHcalEtaMask2; } +bool HGCalTriggerGeometryHexLayerBasedImp1::validCell(unsigned cell_id) const { + bool is_valid = false; + if (DetId(cell_id).det() == DetId::Hcal) { + HcalDetId cell_det_id(cell_id); + if (cell_det_id.subdetId() != HcalEndcap) + is_valid = false; + else + is_valid = bhTopology().valid(cell_id); + } else if (DetId(cell_id).det() == DetId::Forward) { + HGCalDetId cell_det_id(cell_id); + unsigned subdet = cell_det_id.subdetId(); + switch (subdet) { + case ForwardSubdetector::HGCEE: + is_valid = eeTopology().valid(cell_id); + break; + case ForwardSubdetector::HGCHEF: + is_valid = fhTopology().valid(cell_id); + break; + default: + is_valid = false; + break; + } + } + return is_valid; +} + bool HGCalTriggerGeometryHexLayerBasedImp1::validTriggerCell(const unsigned trigger_cell_id) const { return invalid_triggercells_.find(trigger_cell_id) == invalid_triggercells_.end(); } diff --git a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryV9Imp1.cc b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryV9Imp1.cc index 2e8183822a18c..0f4e0552ce9ef 100644 --- a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryV9Imp1.cc +++ b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryV9Imp1.cc @@ -39,6 +39,7 @@ class HGCalTriggerGeometryV9Imp1 : public HGCalTriggerGeometryBase { GlobalPoint getTriggerCellPosition(const unsigned) const final; GlobalPoint getModulePosition(const unsigned) const final; + bool validCell(const unsigned) const final; bool validTriggerCell(const unsigned) const final; bool disconnectedModule(const unsigned) const final; unsigned lastTriggerLayer() const final { return last_trigger_layer_; } @@ -899,6 +900,29 @@ void HGCalTriggerGeometryV9Imp1::unpackIetaIphi(unsigned ieta_iphi, unsigned& ie ieta = (ieta_iphi >> HGCScintillatorDetId::kHGCalRadiusOffset) & HGCScintillatorDetId::kHGCalRadiusMask; } +bool HGCalTriggerGeometryV9Imp1::validCell(unsigned cell_id) const { + bool is_valid = false; + unsigned det = DetId(cell_id).det(); + switch (det) { + case DetId::HGCalEE: + is_valid = eeTopology().valid(cell_id); + break; + case DetId::HGCalHSi: + is_valid = hsiTopology().valid(cell_id); + break; + case DetId::HGCalHSc: + is_valid = hscTopology().valid(cell_id); + break; + case DetId::Forward: + is_valid = noseTopology().valid(cell_id); + break; + default: + is_valid = false; + break; + } + return is_valid; +} + bool HGCalTriggerGeometryV9Imp1::validTriggerCell(const unsigned trigger_cell_id) const { return invalid_triggercells_.find(trigger_cell_id) == invalid_triggercells_.end(); } diff --git a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryV9Imp2.cc b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryV9Imp2.cc index 2720db9cc25f9..45776be1824a0 100644 --- a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryV9Imp2.cc +++ b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryV9Imp2.cc @@ -42,6 +42,7 @@ class HGCalTriggerGeometryV9Imp2 : public HGCalTriggerGeometryBase { GlobalPoint getTriggerCellPosition(const unsigned) const final; GlobalPoint getModulePosition(const unsigned) const final; + bool validCell(const unsigned) const final; bool validTriggerCell(const unsigned) const final; bool disconnectedModule(const unsigned) const final; unsigned lastTriggerLayer() const final { return last_trigger_layer_; } @@ -54,6 +55,8 @@ class HGCalTriggerGeometryV9Imp2 : public HGCalTriggerGeometryBase { unsigned hSc_links_per_module_ = 1; unsigned hSc_wafers_per_module_ = 3; + unsigned sector0_mask_ = 0x7f; // 7 bits to encode module number in 60deg sector + edm::FileInPath l1tModulesMapping_; edm::FileInPath l1tLinksMapping_; @@ -505,8 +508,7 @@ unsigned HGCalTriggerGeometryV9Imp2::getLinksInModule(const unsigned module_id) HGCalDetId module_det_id_si(module_id); unsigned module = module_det_id_si.wafer(); unsigned layer = layerWithOffset(module_id); - const unsigned sector0_mask = 0x7F; - module = (module & sector0_mask); + module = (module & sector0_mask_); links = links_per_module_.at(packLayerModuleId(layer, module)); } return links; @@ -617,10 +619,13 @@ void HGCalTriggerGeometryV9Imp2::fillMaps() { throw cms::Exception("MissingDataFile") << "Cannot open HGCalTriggerGeometry L1TLinksMapping file\n"; } short links = 0; + const short max_modules_60deg_sector = 127; for (; l1tLinksMappingStream >> layer >> module >> links;) { if (module_to_wafers_.find(packLayerModuleId(layer, module)) == module_to_wafers_.end()) { links = 0; } + if (module > max_modules_60deg_sector) + sector0_mask_ = 0xff; // Use 8 bits to encode module number in 120deg sector links_per_module_.emplace(packLayerModuleId(layer, module), links); } if (!l1tLinksMappingStream.eof()) { @@ -708,6 +713,29 @@ unsigned HGCalTriggerGeometryV9Imp2::triggerLayer(const unsigned id) const { return trigger_layers_[layer]; } +bool HGCalTriggerGeometryV9Imp2::validCell(unsigned cell_id) const { + bool is_valid = false; + unsigned det = DetId(cell_id).det(); + switch (det) { + case DetId::HGCalEE: + is_valid = eeTopology().valid(cell_id); + break; + case DetId::HGCalHSi: + is_valid = hsiTopology().valid(cell_id); + break; + case DetId::HGCalHSc: + is_valid = hscTopology().valid(cell_id); + break; + case DetId::Forward: + is_valid = noseTopology().valid(cell_id); + break; + default: + is_valid = false; + break; + } + return is_valid; +} + bool HGCalTriggerGeometryV9Imp2::validTriggerCellFromCells(const unsigned trigger_cell_id) const { // Check the validity of a trigger cell with the // validity of the cells. One valid cell in the diff --git a/L1Trigger/L1THGCal/plugins/veryfrontend/HGCalVFEProcessorSums.cc b/L1Trigger/L1THGCal/plugins/veryfrontend/HGCalVFEProcessorSums.cc index 3420aa5c1c676..1bc3bb660227f 100644 --- a/L1Trigger/L1THGCal/plugins/veryfrontend/HGCalVFEProcessorSums.cc +++ b/L1Trigger/L1THGCal/plugins/veryfrontend/HGCalVFEProcessorSums.cc @@ -28,6 +28,8 @@ void HGCalVFEProcessorSums::run(const HGCalDigiCollection& digiColl, for (const auto& digiData : digiColl) { if (DetId(digiData.id()).det() == DetId::Hcal && HcalDetId(digiData.id()).subdetId() != HcalEndcap) continue; + if (!geometry_->validCell(digiData.id())) + continue; uint32_t module = geometry_->getModuleFromCell(digiData.id()); // no disconnected layer for HFNose diff --git a/L1Trigger/L1THGCal/python/customTriggerGeometry.py b/L1Trigger/L1THGCal/python/customTriggerGeometry.py index 0127aa22c7ff2..8d0d6b024afe6 100644 --- a/L1Trigger/L1THGCal/python/customTriggerGeometry.py +++ b/L1Trigger/L1THGCal/python/customTriggerGeometry.py @@ -1,6 +1,23 @@ import FWCore.ParameterSet.Config as cms +def custom_geometry_decentralized_V11(process, links='signaldriven'): + if links=='signaldriven': + links_mapping = 'L1Trigger/L1THGCal/data/links_mapping_V11_decentralized_signaldriven_0.txt' + elif links=='pudriven': + links_mapping = 'L1Trigger/L1THGCal/data/links_mapping_V11_decentralized_march20_0.txt' + else: + raise RuntimeError('Unknown links mapping "{}". Options are "signaldriven" or "pudriven".'.format(links)) + process.hgcalTriggerGeometryESProducer.TriggerGeometry.TriggerGeometryName = cms.string('HGCalTriggerGeometryV9Imp2') + process.hgcalTriggerGeometryESProducer.TriggerGeometry.ScintillatorTriggerCellSize = cms.uint32(2) + process.hgcalTriggerGeometryESProducer.TriggerGeometry.ScintillatorModuleSize = cms.uint32(6) + process.hgcalTriggerGeometryESProducer.TriggerGeometry.L1TModulesMapping = cms.FileInPath("L1Trigger/L1THGCal/data/panel_mapping_V11_decentralized_march20_0.txt") + process.hgcalTriggerGeometryESProducer.TriggerGeometry.L1TLinksMapping = cms.FileInPath(links_mapping) + process.hgcalTriggerGeometryESProducer.TriggerGeometry.DisconnectedModules = cms.vuint32(0) + process.hgcalTriggerGeometryESProducer.TriggerGeometry.ScintillatorLinksPerModule = cms.uint32(2) + return process + + def custom_geometry_decentralized_V9(process, links='signaldriven', implementation=2): if links=='signaldriven': links_mapping = 'L1Trigger/L1THGCal/data/links_mapping_decentralized_signaldriven_0.txt' diff --git a/L1Trigger/L1THGCal/python/hgcalTriggerPrimitives_cff.py b/L1Trigger/L1THGCal/python/hgcalTriggerPrimitives_cff.py index e4214ed1569c6..32f3e3b3e25de 100644 --- a/L1Trigger/L1THGCal/python/hgcalTriggerPrimitives_cff.py +++ b/L1Trigger/L1THGCal/python/hgcalTriggerPrimitives_cff.py @@ -13,9 +13,11 @@ hgcalTriggerPrimitives = cms.Sequence(hgcalTriggerPrimitivesTask) from Configuration.Eras.Modifier_phase2_hgcalV9_cff import phase2_hgcalV9 -from L1Trigger.L1THGCal.customTriggerGeometry import custom_geometry_V9 +from Configuration.Eras.Modifier_phase2_hgcalV11_cff import phase2_hgcalV11 +from L1Trigger.L1THGCal.customTriggerGeometry import custom_geometry_decentralized_V9, custom_geometry_decentralized_V11 from L1Trigger.L1THGCal.customCalibration import custom_cluster_calibration_global -modifyHgcalTriggerPrimitivesWithV9Geometry_ = phase2_hgcalV9.makeProcessModifier(custom_geometry_V9) +modifyHgcalTriggerPrimitivesWithV9Geometry_ = phase2_hgcalV9.makeProcessModifier(custom_geometry_decentralized_V9) +modifyHgcalTriggerPrimitivesWithV11Geometry_ = phase2_hgcalV11.makeProcessModifier(custom_geometry_decentralized_V11) from Configuration.ProcessModifiers.convertHGCalDigisSim_cff import convertHGCalDigisSim # can't declare a producer version of simHGCalUnsuppressedDigis in the normal flow of things, diff --git a/L1Trigger/L1THGCal/src/concentrator/HGCalConcentratorSuperTriggerCellImpl.cc b/L1Trigger/L1THGCal/src/concentrator/HGCalConcentratorSuperTriggerCellImpl.cc index d5a30d2d29832..b358bf2849feb 100644 --- a/L1Trigger/L1THGCal/src/concentrator/HGCalConcentratorSuperTriggerCellImpl.cc +++ b/L1Trigger/L1THGCal/src/concentrator/HGCalConcentratorSuperTriggerCellImpl.cc @@ -37,6 +37,8 @@ void HGCalConcentratorSuperTriggerCellImpl::createAllTriggerCells( std::unordered_map& STCs, std::vector& trigCellVecOutput) const { for (auto& s : STCs) { std::vector output_ids = superTCmapping_.getConstituentTriggerCells(s.second.getSTCId()); + if (output_ids.empty()) + continue; int thickness = (!output_ids.empty() ? triggerTools_.thicknessIndex(output_ids.at(0), true) : 0); diff --git a/L1Trigger/L1THGCal/test/HGCalTriggerGeomTesterV9Imp2.cc b/L1Trigger/L1THGCal/test/HGCalTriggerGeomTesterV9Imp2.cc index a37498863e41b..3aa1f2cf4c5d7 100644 --- a/L1Trigger/L1THGCal/test/HGCalTriggerGeomTesterV9Imp2.cc +++ b/L1Trigger/L1THGCal/test/HGCalTriggerGeomTesterV9Imp2.cc @@ -67,19 +67,20 @@ class HGCalTriggerGeomTesterV9Imp2 : public edm::stream::EDAnalyzer<> { TTree* treeCells_; TTree* treeCellsBH_; TTree* treeCellsNose_; + TTree* treeModuleErrors_; // tree variables - int moduleId_; - int moduleSide_; - int moduleSubdet_; - int moduleLayer_; - int moduleIEta_; - int moduleIPhi_; - int module_; - float moduleX_; - float moduleY_; - float moduleZ_; - int moduleTC_N_; - int moduleLinks_; + int moduleId_ = 0; + int moduleSide_ = 0; + int moduleSubdet_ = 0; + int moduleLayer_ = 0; + int moduleIEta_ = 0; + int moduleIPhi_ = 0; + int module_ = 0; + float moduleX_ = 0; + float moduleY_ = 0; + float moduleZ_ = 0; + int moduleTC_N_ = 0; + int moduleLinks_ = 0; std::shared_ptr moduleTC_id_; std::shared_ptr moduleTC_zside_; std::shared_ptr moduleTC_subdet_; @@ -93,7 +94,7 @@ class HGCalTriggerGeomTesterV9Imp2 : public edm::stream::EDAnalyzer<> { std::shared_ptr moduleTC_x_; std::shared_ptr moduleTC_y_; std::shared_ptr moduleTC_z_; - int moduleCell_N_; + int moduleCell_N_ = 0; std::shared_ptr moduleCell_id_; std::shared_ptr moduleCell_zside_; std::shared_ptr moduleCell_subdet_; @@ -105,20 +106,20 @@ class HGCalTriggerGeomTesterV9Imp2 : public edm::stream::EDAnalyzer<> { std::shared_ptr moduleCell_x_; std::shared_ptr moduleCell_y_; std::shared_ptr moduleCell_z_; - int triggerCellId_; - int triggerCellSide_; - int triggerCellSubdet_; - int triggerCellLayer_; - int triggerCellWaferU_; - int triggerCellWaferV_; - int triggerCellU_; - int triggerCellV_; - int triggerCellIEta_; - int triggerCellIPhi_; - float triggerCellX_; - float triggerCellY_; - float triggerCellZ_; - int triggerCellNeighbor_N_; + int triggerCellId_ = 0; + int triggerCellSide_ = 0; + int triggerCellSubdet_ = 0; + int triggerCellLayer_ = 0; + int triggerCellWaferU_ = 0; + int triggerCellWaferV_ = 0; + int triggerCellU_ = 0; + int triggerCellV_ = 0; + int triggerCellIEta_ = 0; + int triggerCellIPhi_ = 0; + float triggerCellX_ = 0; + float triggerCellY_ = 0; + float triggerCellZ_ = 0; + int triggerCellNeighbor_N_ = 0; std::shared_ptr triggerCellNeighbor_id_; std::shared_ptr triggerCellNeighbor_zside_; std::shared_ptr triggerCellNeighbor_subdet_; @@ -130,7 +131,7 @@ class HGCalTriggerGeomTesterV9Imp2 : public edm::stream::EDAnalyzer<> { std::shared_ptr triggerCellNeighbor_cellIEta_; std::shared_ptr triggerCellNeighbor_cellIPhi_; std::shared_ptr triggerCellNeighbor_distance_; - int triggerCellCell_N_; + int triggerCellCell_N_ = 0; std::shared_ptr triggerCellCell_id_; std::shared_ptr triggerCellCell_zside_; std::shared_ptr triggerCellCell_subdet_; @@ -144,44 +145,49 @@ class HGCalTriggerGeomTesterV9Imp2 : public edm::stream::EDAnalyzer<> { std::shared_ptr triggerCellCell_x_; std::shared_ptr triggerCellCell_y_; std::shared_ptr triggerCellCell_z_; - int cellId_; - int cellSide_; - int cellSubdet_; - int cellLayer_; - int cellWaferU_; - int cellWaferV_; - int cellWaferType_; - int cellWaferRow_; - int cellWaferColumn_; - int cellU_; - int cellV_; - float cellX_; - float cellY_; - float cellZ_; - int cellCornersN_; + int cellId_ = 0; + int cellSide_ = 0; + int cellSubdet_ = 0; + int cellLayer_ = 0; + int cellWaferU_ = 0; + int cellWaferV_ = 0; + int cellWaferType_ = 0; + int cellWaferRow_ = 0; + int cellWaferColumn_ = 0; + int cellU_ = 0; + int cellV_ = 0; + float cellX_ = 0; + float cellY_ = 0; + float cellZ_ = 0; + int cellCornersN_ = 0; std::shared_ptr cellCornersX_; std::shared_ptr cellCornersY_; std::shared_ptr cellCornersZ_; - int cellBHId_; - int cellBHType_; - int cellBHSide_; - int cellBHSubdet_; - int cellBHLayer_; - int cellBHIEta_; - int cellBHIPhi_; - float cellBHEta_; - float cellBHPhi_; - float cellBHX_; - float cellBHY_; - float cellBHZ_; - float cellBHX1_; - float cellBHY1_; - float cellBHX2_; - float cellBHY2_; - float cellBHX3_; - float cellBHY3_; - float cellBHX4_; - float cellBHY4_; + int cellBHId_ = 0; + int cellBHType_ = 0; + int cellBHSide_ = 0; + int cellBHSubdet_ = 0; + int cellBHLayer_ = 0; + int cellBHIEta_ = 0; + int cellBHIPhi_ = 0; + float cellBHEta_ = 0; + float cellBHPhi_ = 0; + float cellBHX_ = 0; + float cellBHY_ = 0; + float cellBHZ_ = 0; + float cellBHX1_ = 0; + float cellBHY1_ = 0; + float cellBHX2_ = 0; + float cellBHY2_ = 0; + float cellBHX3_ = 0; + float cellBHY3_ = 0; + float cellBHX4_ = 0; + float cellBHY4_ = 0; + // + int moduleErrorSubdet_ = 0; + int moduleErrorLayer_ = 0; + int moduleErrorWaferU_ = 0; + int moduleErrorWaferV_ = 0; private: typedef std::unordered_map> trigger_map_set; @@ -378,6 +384,12 @@ HGCalTriggerGeomTesterV9Imp2::HGCalTriggerGeomTesterV9Imp2(const edm::ParameterS treeCellsNose_->Branch("corner_x", cellCornersX_.get(), "corner_x[corner_n]/F"); treeCellsNose_->Branch("corner_y", cellCornersY_.get(), "corner_y[corner_n]/F"); treeCellsNose_->Branch("corner_z", cellCornersZ_.get(), "corner_z[corner_n]/F"); + // + treeModuleErrors_ = fs_->make("TreeModuleErrors", "Tree of module mapping errors"); + treeModuleErrors_->Branch("subdet", &moduleErrorSubdet_, "subdet/I"); + treeModuleErrors_->Branch("layer", &moduleErrorLayer_, "layer/I"); + treeModuleErrors_->Branch("waferu", &moduleErrorWaferU_, "waferu/I"); + treeModuleErrors_->Branch("waferv", &moduleErrorWaferV_, "waferv/I"); } /*****************************************************************/ @@ -399,6 +411,8 @@ void HGCalTriggerGeomTesterV9Imp2::beginRun(const edm::Run& /*run*/, const edm:: bool HGCalTriggerGeomTesterV9Imp2::checkMappingConsistency() { try { + // Set of (subdet,layer,waferU,waferV) with module mapping errors + std::set> module_errors; trigger_map_set modules_to_triggercells; trigger_map_set modules_to_cells; trigger_map_set triggercells_to_cells; @@ -412,11 +426,18 @@ bool HGCalTriggerGeomTesterV9Imp2::checkMappingConsistency() { auto itr_insert = triggercells_to_cells.emplace(trigger_cell, std::unordered_set()); itr_insert.first->second.emplace(id); // fill modules - uint32_t module = triggerGeometry_->getModuleFromCell(id); - if (module != 0) { - itr_insert = modules_to_cells.emplace(module, std::unordered_set()); - itr_insert.first->second.emplace(id); + uint32_t module = 0; + try { + module = triggerGeometry_->getModuleFromCell(id); + } catch (const cms::Exception& e) { + module_errors.emplace(std::make_tuple(HGCalTriggerDetId(trigger_cell).subdet(), + HGCalTriggerDetId(trigger_cell).layer(), + HGCalTriggerDetId(trigger_cell).waferU(), + HGCalTriggerDetId(trigger_cell).waferV())); + continue; } + itr_insert = modules_to_cells.emplace(module, std::unordered_set()); + itr_insert.first->second.emplace(id); } // HSi for (const auto& id : triggerGeometry_->hsiGeometry()->getValidDetIds()) { @@ -427,11 +448,18 @@ bool HGCalTriggerGeomTesterV9Imp2::checkMappingConsistency() { auto itr_insert = triggercells_to_cells.emplace(trigger_cell, std::unordered_set()); itr_insert.first->second.emplace(id); // fill modules - uint32_t module = triggerGeometry_->getModuleFromCell(id); - if (module != 0) { - itr_insert = modules_to_cells.emplace(module, std::unordered_set()); - itr_insert.first->second.emplace(id); + uint32_t module = 0; + try { + module = triggerGeometry_->getModuleFromCell(id); + } catch (const cms::Exception& e) { + module_errors.emplace(std::make_tuple(HGCalTriggerDetId(trigger_cell).subdet(), + HGCalTriggerDetId(trigger_cell).layer(), + HGCalTriggerDetId(trigger_cell).waferU(), + HGCalTriggerDetId(trigger_cell).waferV())); + continue; } + itr_insert = modules_to_cells.emplace(module, std::unordered_set()); + itr_insert.first->second.emplace(id); } // HSc for (const auto& id : triggerGeometry_->hscGeometry()->getValidDetIds()) { @@ -468,6 +496,19 @@ bool HGCalTriggerGeomTesterV9Imp2::checkMappingConsistency() { } } } + + if (module_errors.size() > 0) { + for (const auto& module : module_errors) { + moduleErrorSubdet_ = std::get<0>(module); + moduleErrorLayer_ = std::get<1>(module); + moduleErrorWaferU_ = std::get<2>(module); + moduleErrorWaferV_ = std::get<3>(module); + treeModuleErrors_->Fill(); + } + throw cms::Exception("BadGeometry") << "HGCalTriggerGeometry: Found module mapping problems. Check the produced " + "tree to see the list of problematic wafers"; + } + edm::LogPrint("TriggerCellCheck") << "Checking cell -> trigger cell -> cell consistency"; // Loop over trigger cells for (const auto& triggercell_cells : triggercells_to_cells) { @@ -713,6 +754,8 @@ void HGCalTriggerGeomTesterV9Imp2::fillTriggerGeometry() std::cout << "Filling EE geometry\n"; for (const auto& id : triggerGeometry_->eeGeometry()->getValidDetIds()) { HGCSiliconDetId detid(id); + if (!triggerGeometry_->eeTopology().valid(id)) + continue; cellId_ = detid.rawId(); cellSide_ = detid.zside(); cellSubdet_ = detid.subdet(); @@ -754,6 +797,8 @@ void HGCalTriggerGeomTesterV9Imp2::fillTriggerGeometry() std::cout << "Filling HSi geometry\n"; for (const auto& id : triggerGeometry_->hsiGeometry()->getValidDetIds()) { HGCSiliconDetId detid(id); + if (!triggerGeometry_->hsiTopology().valid(id)) + continue; cellId_ = detid.rawId(); cellSide_ = detid.zside(); cellSubdet_ = detid.subdet(); diff --git a/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV10Imp1_cfg.py b/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV10Imp1_cfg.py index 0ad0a7a999c68..b322c98b3b342 100644 --- a/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV10Imp1_cfg.py +++ b/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV10Imp1_cfg.py @@ -10,8 +10,8 @@ process.load('FWCore.MessageService.MessageLogger_cfi') process.load('Configuration.EventContent.EventContent_cff') process.load('SimGeneral.MixingModule.mixNoPU_cfi') -process.load('Configuration.Geometry.GeometryExtended2023D41Reco_cff') -process.load('Configuration.Geometry.GeometryExtended2023D41_cff') +process.load('Configuration.Geometry.GeometryExtended2026D41Reco_cff') +process.load('Configuration.Geometry.GeometryExtended2026D41_cff') process.load('Configuration.StandardSequences.MagneticField_cff') process.load('Configuration.StandardSequences.Generator_cff') process.load('IOMC.EventVertexGenerators.VtxSmearedHLLHC14TeV_cfi') diff --git a/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV10Imp2_cfg.py b/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV10Imp2_cfg.py index cc6a2dff9f3c2..8bdafbe73ce6c 100644 --- a/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV10Imp2_cfg.py +++ b/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV10Imp2_cfg.py @@ -10,8 +10,8 @@ process.load('FWCore.MessageService.MessageLogger_cfi') process.load('Configuration.EventContent.EventContent_cff') process.load('SimGeneral.MixingModule.mixNoPU_cfi') -process.load('Configuration.Geometry.GeometryExtended2023D41Reco_cff') -process.load('Configuration.Geometry.GeometryExtended2023D41_cff') +process.load('Configuration.Geometry.GeometryExtended2026D41Reco_cff') +process.load('Configuration.Geometry.GeometryExtended2026D41_cff') process.load('Configuration.StandardSequences.MagneticField_cff') process.load('Configuration.StandardSequences.Generator_cff') process.load('IOMC.EventVertexGenerators.VtxSmearedHLLHC14TeV_cfi') diff --git a/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV11Imp2_cfg.py b/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV11Imp2_cfg.py new file mode 100644 index 0000000000000..8b45007ff6cff --- /dev/null +++ b/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV11Imp2_cfg.py @@ -0,0 +1,121 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.Eras.Era_Phase2C9_cff import Phase2C9 +process = cms.Process('SIM',Phase2C9) + +# import of standard configurations +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('SimGeneral.MixingModule.mixNoPU_cfi') +process.load('Configuration.Geometry.GeometryExtended2026D46Reco_cff') +process.load('Configuration.Geometry.GeometryExtended2026D46_cff') +process.load('Configuration.StandardSequences.MagneticField_cff') +process.load('Configuration.StandardSequences.Generator_cff') +process.load('IOMC.EventVertexGenerators.VtxSmearedHLLHC14TeV_cfi') +process.load('GeneratorInterface.Core.genFilterSummary_cff') +process.load('Configuration.StandardSequences.SimIdeal_cff') +process.load('Configuration.StandardSequences.Digi_cff') +process.load('Configuration.StandardSequences.SimL1Emulator_cff') +process.load('Configuration.StandardSequences.DigiToRaw_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(1) +) + +# Input source +process.source = cms.Source("EmptySource") + +process.options = cms.untracked.PSet( + +) + +# Production Info +process.configurationMetadata = cms.untracked.PSet( + version = cms.untracked.string('$Revision: 1.20 $'), + annotation = cms.untracked.string('SingleElectronPt10_cfi nevts:10'), + name = cms.untracked.string('Applications') +) + +# Output definition + +process.FEVTDEBUGoutput = cms.OutputModule("PoolOutputModule", + splitLevel = cms.untracked.int32(0), + eventAutoFlushCompressedSize = cms.untracked.int32(5242880), + outputCommands = process.FEVTDEBUGHLTEventContent.outputCommands, + fileName = cms.untracked.string('file:junk.root'), + dataset = cms.untracked.PSet( + filterName = cms.untracked.string(''), + dataTier = cms.untracked.string('GEN-SIM-DIGI-RAW') + ), + SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('generation_step') + ) +) + +# Additional output definition +process.TFileService = cms.Service( + "TFileService", + fileName = cms.string("test_triggergeom.root") + ) + + + +# Other statements +process.genstepfilter.triggerConditions=cms.vstring("generation_step") +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '') + +process.generator = cms.EDProducer("FlatRandomPtGunProducer", + PGunParameters = cms.PSet( + MaxPt = cms.double(10.01), + MinPt = cms.double(9.99), + PartID = cms.vint32(13), + MaxEta = cms.double(2.5), + MaxPhi = cms.double(3.14159265359), + MinEta = cms.double(-2.5), + MinPhi = cms.double(-3.14159265359) + ), + Verbosity = cms.untracked.int32(0), + psethack = cms.string('single electron pt 10'), + AddAntiParticle = cms.bool(True), + firstRun = cms.untracked.uint32(1) +) + +process.mix.digitizers = cms.PSet(process.theDigitizersValid) + + +# Path and EndPath definitions +process.generation_step = cms.Path(process.pgen) +process.simulation_step = cms.Path(process.psim) +process.genfiltersummary_step = cms.EndPath(process.genFilterSummary) +process.digitisation_step = cms.Path(process.pdigi_valid) +process.L1simulation_step = cms.Path(process.SimL1Emulator) +process.digi2raw_step = cms.Path(process.DigiToRaw) +process.endjob_step = cms.EndPath(process.endOfProcess) +process.FEVTDEBUGoutput_step = cms.EndPath(process.FEVTDEBUGoutput) + +process.load('L1Trigger.L1THGCal.hgcalTriggerPrimitives_cff') +# Eventually modify default geometry parameters +from L1Trigger.L1THGCal.customTriggerGeometry import custom_geometry_decentralized_V11 +process = custom_geometry_decentralized_V11(process) + +process.hgcaltriggergeomtester = cms.EDAnalyzer( + "HGCalTriggerGeomTesterV9Imp2" + ) +process.test_step = cms.Path(process.hgcaltriggergeomtester) + +# Schedule definition +process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.digitisation_step,process.L1simulation_step,process.digi2raw_step,process.test_step,process.endjob_step,process.FEVTDEBUGoutput_step) +#process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.digitisation_step,process.L1simulation_step,process.digi2raw_step,process.endjob_step,process.FEVTDEBUGoutput_step) +# filter all path with the production filter sequence +for path in process.paths: + getattr(process,path)._seq = process.generator * getattr(process,path)._seq + +# Add early deletion of temporary data products to reduce peak memory need +from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete +process = customiseEarlyDelete(process) diff --git a/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV9Imp1_cfg.py b/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV9Imp1_cfg.py index 9c4ee7b233c79..e52dc40e17fa9 100644 --- a/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV9Imp1_cfg.py +++ b/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV9Imp1_cfg.py @@ -10,8 +10,8 @@ process.load('FWCore.MessageService.MessageLogger_cfi') process.load('Configuration.EventContent.EventContent_cff') process.load('SimGeneral.MixingModule.mixNoPU_cfi') -process.load('Configuration.Geometry.GeometryExtended2023D28Reco_cff') -process.load('Configuration.Geometry.GeometryExtended2023D28_cff') +process.load('Configuration.Geometry.GeometryExtended2026D35Reco_cff') +process.load('Configuration.Geometry.GeometryExtended2026D35_cff') process.load('Configuration.StandardSequences.MagneticField_cff') process.load('Configuration.StandardSequences.Generator_cff') process.load('IOMC.EventVertexGenerators.VtxSmearedHLLHC14TeV_cfi') diff --git a/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV9Imp2_cfg.py b/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV9Imp2_cfg.py index ac197f8d34f27..66c4013f64a4c 100644 --- a/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV9Imp2_cfg.py +++ b/L1Trigger/L1THGCal/test/testHGCalL1TGeometryV9Imp2_cfg.py @@ -10,8 +10,8 @@ process.load('FWCore.MessageService.MessageLogger_cfi') process.load('Configuration.EventContent.EventContent_cff') process.load('SimGeneral.MixingModule.mixNoPU_cfi') -process.load('Configuration.Geometry.GeometryExtended2023D28Reco_cff') -process.load('Configuration.Geometry.GeometryExtended2023D28_cff') +process.load('Configuration.Geometry.GeometryExtended2026D35Reco_cff') +process.load('Configuration.Geometry.GeometryExtended2026D35_cff') process.load('Configuration.StandardSequences.MagneticField_cff') process.load('Configuration.StandardSequences.Generator_cff') process.load('IOMC.EventVertexGenerators.VtxSmearedHLLHC14TeV_cfi') diff --git a/L1Trigger/L1THGCalUtilities/test/testHGCalL1T_RelValV10_cfg.py b/L1Trigger/L1THGCalUtilities/test/testHGCalL1T_RelValV10_cfg.py new file mode 100644 index 0000000000000..1255782b2cb15 --- /dev/null +++ b/L1Trigger/L1THGCalUtilities/test/testHGCalL1T_RelValV10_cfg.py @@ -0,0 +1,91 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.Eras.Era_Phase2C8_cff import Phase2C8 +process = cms.Process('DIGI',Phase2C8) + +# import of standard configurations +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('SimGeneral.MixingModule.mixNoPU_cfi') +process.load('Configuration.Geometry.GeometryExtended2026D41Reco_cff') +process.load('Configuration.Geometry.GeometryExtended2026D41_cff') +process.load('Configuration.StandardSequences.MagneticField_cff') +process.load('Configuration.StandardSequences.Generator_cff') +process.load('IOMC.EventVertexGenerators.VtxSmearedHLLHC14TeV_cfi') +process.load('GeneratorInterface.Core.genFilterSummary_cff') +process.load('Configuration.StandardSequences.SimIdeal_cff') +process.load('Configuration.StandardSequences.Digi_cff') +process.load('Configuration.StandardSequences.SimL1Emulator_cff') +process.load('Configuration.StandardSequences.DigiToRaw_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(50) +) + +# Input source +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring('/store/mc/PhaseIITDRSpring19DR/TTbar_14TeV_TuneCP5_Pythia8/GEN-SIM-DIGI-RAW/PU200_106X_upgrade2023_realistic_v3_ext1-v3/60000/FFB5D0CA-208F-6040-A9BF-3F5354D0AA59.root'), + inputCommands=cms.untracked.vstring( + 'keep *', + 'drop l1tEMTFHit2016Extras_simEmtfDigis_CSC_HLT', + 'drop l1tEMTFHit2016Extras_simEmtfDigis_RPC_HLT', + 'drop l1tEMTFHit2016s_simEmtfDigis__HLT', + 'drop l1tEMTFTrack2016Extras_simEmtfDigis__HLT', + 'drop l1tEMTFTrack2016s_simEmtfDigis__HLT', + 'drop FTLClusteredmNewDetSetVector_mtdClusters_FTLBarrel_RECO', + 'drop FTLClusteredmNewDetSetVector_mtdClusters_FTLEndcap_RECO', + 'drop MTDTrackingRecHitedmNewDetSetVector_mtdTrackingRecHits__RECO', + 'drop BTLDetIdBTLSampleFTLDataFrameTsSorted_mix_FTLBarrel_HLT', + 'drop ETLDetIdETLSampleFTLDataFrameTsSorted_mix_FTLEndcap_HLT', + ) + ) + +process.options = cms.untracked.PSet( + +) + +# Production Info +process.configurationMetadata = cms.untracked.PSet( + version = cms.untracked.string('$Revision: 1.20 $'), + annotation = cms.untracked.string('SingleElectronPt10_cfi nevts:10'), + name = cms.untracked.string('Applications') +) + +# Output definition +process.TFileService = cms.Service( + "TFileService", + fileName = cms.string("ntuple.root") + ) + +# Other statements +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '') + +# load HGCAL TPG simulation +process.load('L1Trigger.L1THGCal.hgcalTriggerPrimitives_cff') + +# To add truth-matched calo cells and downstream objects +#process.load('L1Trigger.L1THGCalUtilities.caloTruthCells_cff') +#process.hgcalTriggerPrimitives += process.caloTruthCells +#process.load('L1Trigger.L1THGCalUtilities.caloTruthCellsNtuples_cff') + +process.hgcl1tpg_step = cms.Path(process.hgcalTriggerPrimitives) + + +# load ntuplizer +process.load('L1Trigger.L1THGCalUtilities.hgcalTriggerNtuples_cff') +process.ntuple_step = cms.Path(process.hgcalTriggerNtuples) + +# Schedule definition +process.schedule = cms.Schedule(process.hgcl1tpg_step, process.ntuple_step) + +# Add early deletion of temporary data products to reduce peak memory need +from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete +process = customiseEarlyDelete(process) +# End adding early deletion + diff --git a/L1Trigger/L1THGCalUtilities/test/testHGCalL1T_RelValV11_cfg.py b/L1Trigger/L1THGCalUtilities/test/testHGCalL1T_RelValV11_cfg.py new file mode 100644 index 0000000000000..f9bdbbd0442f9 --- /dev/null +++ b/L1Trigger/L1THGCalUtilities/test/testHGCalL1T_RelValV11_cfg.py @@ -0,0 +1,86 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.Eras.Era_Phase2C9_cff import Phase2C9 +process = cms.Process('DIGI',Phase2C9) + +# import of standard configurations +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('SimGeneral.MixingModule.mixNoPU_cfi') +process.load('Configuration.Geometry.GeometryExtended2026D46Reco_cff') +process.load('Configuration.Geometry.GeometryExtended2026D46_cff') +process.load('Configuration.StandardSequences.MagneticField_cff') +process.load('Configuration.StandardSequences.Generator_cff') +process.load('IOMC.EventVertexGenerators.VtxSmearedHLLHC14TeV_cfi') +process.load('GeneratorInterface.Core.genFilterSummary_cff') +process.load('Configuration.StandardSequences.SimIdeal_cff') +process.load('Configuration.StandardSequences.Digi_cff') +process.load('Configuration.StandardSequences.SimL1Emulator_cff') +process.load('Configuration.StandardSequences.DigiToRaw_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(10) +) + +# Input source +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring('file:/eos/cms/store/cmst3/group/hgcal/CMG_studies/Production/ttbar_ttbar_v11_aged_unbiased_20191101/GSD/physprocttbar_x100_ttbar-1.0To-1.0_GSD_2.root'), + inputCommands=cms.untracked.vstring( + 'keep *', + 'drop l1tEMTFHit2016Extras_simEmtfDigis_CSC_HLT', + 'drop l1tEMTFHit2016Extras_simEmtfDigis_RPC_HLT', + 'drop l1tEMTFHit2016s_simEmtfDigis__HLT', + 'drop l1tEMTFTrack2016Extras_simEmtfDigis__HLT', + 'drop l1tEMTFTrack2016s_simEmtfDigis__HLT', + 'drop FTLClusteredmNewDetSetVector_mtdClusters_FTLBarrel_RECO', + 'drop FTLClusteredmNewDetSetVector_mtdClusters_FTLEndcap_RECO', + 'drop MTDTrackingRecHitedmNewDetSetVector_mtdTrackingRecHits__RECO', + 'drop BTLDetIdBTLSampleFTLDataFrameTsSorted_mix_FTLBarrel_HLT', + 'drop ETLDetIdETLSampleFTLDataFrameTsSorted_mix_FTLEndcap_HLT', + ) + ) + +process.options = cms.untracked.PSet( + +) + +# Production Info +process.configurationMetadata = cms.untracked.PSet( + version = cms.untracked.string('$Revision: 1.20 $'), + annotation = cms.untracked.string('SingleElectronPt10_cfi nevts:10'), + name = cms.untracked.string('Applications') +) + +# Output definition +process.TFileService = cms.Service( + "TFileService", + fileName = cms.string("ntuple.root") + ) + +# Other statements +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '') + +# load HGCAL TPG simulation +process.load('L1Trigger.L1THGCal.hgcalTriggerPrimitives_cff') + +process.hgcl1tpg_step = cms.Path(process.hgcalTriggerPrimitives) + + +# load ntuplizer +process.load('L1Trigger.L1THGCalUtilities.hgcalTriggerNtuples_cff') +process.ntuple_step = cms.Path(process.hgcalTriggerNtuples) + +# Schedule definition +process.schedule = cms.Schedule(process.hgcl1tpg_step, process.ntuple_step) + +# Add early deletion of temporary data products to reduce peak memory need +from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete +process = customiseEarlyDelete(process) +# End adding early deletion +