-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29762 from PFCal-dev/hgc-tpg-integration-200507
[HGC trigger] FE customization, OOT subtraction, separate HFNose sequence
- Loading branch information
Showing
29 changed files
with
369 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "FWCore/Framework/interface/stream/EDProducer.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
|
||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/Framework/interface/MakerMacros.h" | ||
|
||
#include "DataFormats/HGCDigi/interface/HGCDigiCollections.h" | ||
#include "DataFormats/L1THGCal/interface/HGCalTriggerCell.h" | ||
#include "DataFormats/L1THGCal/interface/HGCalTriggerSums.h" | ||
|
||
#include "Geometry/Records/interface/CaloGeometryRecord.h" | ||
#include "L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h" | ||
|
||
#include "L1Trigger/L1THGCal/interface/HGCalProcessorBase.h" | ||
|
||
#include <memory> | ||
|
||
class HFNoseVFEProducer : public edm::stream::EDProducer<> { | ||
public: | ||
HFNoseVFEProducer(const edm::ParameterSet&); | ||
~HFNoseVFEProducer() override {} | ||
|
||
void beginRun(const edm::Run&, const edm::EventSetup&) override; | ||
void produce(edm::Event&, const edm::EventSetup&) override; | ||
|
||
private: | ||
// inputs | ||
edm::EDGetToken inputnose_; | ||
edm::ESHandle<HGCalTriggerGeometryBase> triggerGeometry_; | ||
|
||
std::unique_ptr<HGCalVFEProcessorBase> vfeProcess_; | ||
}; | ||
|
||
DEFINE_FWK_MODULE(HFNoseVFEProducer); | ||
|
||
HFNoseVFEProducer::HFNoseVFEProducer(const edm::ParameterSet& conf) | ||
: inputnose_(consumes<HGCalDigiCollection>(conf.getParameter<edm::InputTag>("noseDigis"))) { | ||
// setup VFE parameters | ||
const edm::ParameterSet& vfeParamConfig = conf.getParameterSet("ProcessorParameters"); | ||
const std::string& vfeProcessorName = vfeParamConfig.getParameter<std::string>("ProcessorName"); | ||
vfeProcess_ = std::unique_ptr<HGCalVFEProcessorBase>{ | ||
HGCalVFEProcessorBaseFactory::get()->create(vfeProcessorName, vfeParamConfig)}; | ||
|
||
produces<l1t::HGCalTriggerCellBxCollection>(vfeProcess_->name()); | ||
produces<l1t::HGCalTriggerSumsBxCollection>(vfeProcess_->name()); | ||
} | ||
|
||
void HFNoseVFEProducer::beginRun(const edm::Run& /*run*/, const edm::EventSetup& es) { | ||
es.get<CaloGeometryRecord>().get(triggerGeometry_); | ||
vfeProcess_->setGeometry(triggerGeometry_.product()); | ||
} | ||
|
||
void HFNoseVFEProducer::produce(edm::Event& e, const edm::EventSetup& es) { | ||
// Output collections | ||
auto vfe_trigcell_output = std::make_unique<l1t::HGCalTriggerCellBxCollection>(); | ||
auto vfe_trigsums_output = std::make_unique<l1t::HGCalTriggerSumsBxCollection>(); | ||
|
||
edm::Handle<HGCalDigiCollection> nose_digis_h; | ||
e.getByToken(inputnose_, nose_digis_h); | ||
|
||
if (nose_digis_h.isValid()) { | ||
const HGCalDigiCollection& nose_digis = *nose_digis_h; | ||
vfeProcess_->run(nose_digis, *vfe_trigcell_output, es); | ||
} | ||
|
||
// Put in the event | ||
e.put(std::move(vfe_trigcell_output), vfeProcess_->name()); | ||
// At the moment the HGCalTriggerSumsBxCollection is empty | ||
e.put(std::move(vfe_trigsums_output), vfeProcess_->name()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
import SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi as digiparam | ||
from L1Trigger.L1THGCal.hgcalVFEProducer_cfi import vfe_proc | ||
|
||
def custom_hgcroc_oot(process, | ||
oot_coefficients=vfe_proc.oot_coefficients | ||
): | ||
parameters = vfe_proc.clone(oot_coefficients = oot_coefficients) | ||
process.hgcalVFEProducer.ProcessorParameters = parameters | ||
return process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.