CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HGCalVFEProcessorSums Class Reference

#include <HGCalVFEProcessorSums.h>

Inheritance diagram for HGCalVFEProcessorSums:
HGCalProcessorBaseT< InputCollection, OutputCollection >

Public Member Functions

 HGCalVFEProcessorSums (const edm::ParameterSet &conf)
 
void run (const HGCalDigiCollection &digiColl, l1t::HGCalTriggerCellBxCollection &triggerCellColl, const edm::EventSetup &es) override
 
- Public Member Functions inherited from HGCalProcessorBaseT< InputCollection, OutputCollection >
 HGCalProcessorBaseT (const edm::ParameterSet &conf)
 
const std::string & name () const
 
virtual void run (const InputCollection &inputColl, OutputCollection &outColl, const edm::EventSetup &es)=0
 
void setGeometry (const HGCalTriggerGeometryBase *const geom)
 
virtual ~HGCalProcessorBaseT ()
 

Private Attributes

std::unique_ptr< HGCalTriggerCellCalibrationcalibration_
 
std::unique_ptr< HGCalVFECompressionImplvfeCompressionImpl_
 
std::unique_ptr< HGCalVFELinearizationImplvfeLinearizationImpl_
 
std::unique_ptr< HGCalVFESummationImplvfeSummationImpl_
 

Additional Inherited Members

- Protected Attributes inherited from HGCalProcessorBaseT< InputCollection, OutputCollection >
const HGCalTriggerGeometryBasegeometry_
 

Detailed Description

Definition at line 16 of file HGCalVFEProcessorSums.h.

Constructor & Destructor Documentation

◆ HGCalVFEProcessorSums()

HGCalVFEProcessorSums::HGCalVFEProcessorSums ( const edm::ParameterSet conf)

Definition at line 9 of file HGCalVFEProcessorSums.cc.

9  : HGCalVFEProcessorBase(conf) {
10  vfeLinearizationImpl_ = std::make_unique<HGCalVFELinearizationImpl>(conf);
11  vfeSummationImpl_ = std::make_unique<HGCalVFESummationImpl>(conf);
12  vfeCompressionImpl_ = std::make_unique<HGCalVFECompressionImpl>(conf);
13  calibration_ = std::make_unique<HGCalTriggerCellCalibration>(conf);
14 }

References calibration_, vfeCompressionImpl_, vfeLinearizationImpl_, and vfeSummationImpl_.

Member Function Documentation

◆ run()

void HGCalVFEProcessorSums::run ( const HGCalDigiCollection digiColl,
l1t::HGCalTriggerCellBxCollection triggerCellColl,
const edm::EventSetup es 
)
override

Definition at line 16 of file HGCalVFEProcessorSums.cc.

18  {
19  vfeSummationImpl_->eventSetup(es);
20  calibration_->eventSetup(es);
21 
22  std::vector<HGCalDataFrame> dataframes;
23  std::vector<std::pair<DetId, uint32_t>> linearized_dataframes;
24  std::unordered_map<uint32_t, uint32_t> payload;
25  std::unordered_map<uint32_t, std::array<uint32_t, 2>> compressed_payload;
26 
27  // convert ee and fh hit collections into the same object
28  for (const auto& digiData : digiColl) {
29  if (DetId(digiData.id()).det() == DetId::Hcal && HcalDetId(digiData.id()).subdetId() != HcalEndcap)
30  continue;
31  if (!geometry_->validCell(digiData.id()))
32  continue;
33  uint32_t module = geometry_->getModuleFromCell(digiData.id());
34 
35  // no disconnected layer for HFNose
36  if (DetId(digiData.id()).subdetId() != ForwardSubdetector::HFNose) {
38  continue;
39  }
40 
41  dataframes.emplace_back(digiData.id());
42  for (int i = 0; i < digiData.size(); i++) {
43  dataframes.back().setSample(i, digiData.sample(i));
44  }
45  }
46 
47  vfeLinearizationImpl_->linearize(dataframes, linearized_dataframes);
48  vfeSummationImpl_->triggerCellSums(*geometry_, linearized_dataframes, payload);
49  vfeCompressionImpl_->compress(payload, compressed_payload);
50 
51  // Transform map to trigger cell vector vector<HGCalTriggerCell>
52  for (const auto& id_value : payload) {
53  if (id_value.second > 0) {
54  l1t::HGCalTriggerCell triggerCell(
55  reco::LeafCandidate::LorentzVector(), compressed_payload[id_value.first][1], 0, 0, 0, id_value.first);
56  triggerCell.setCompressedCharge(compressed_payload[id_value.first][0]);
57  triggerCell.setUncompressedCharge(id_value.second);
59 
60  // 'value' is hardware, so p4 is meaningless, except for eta and phi
61  math::PtEtaPhiMLorentzVector p4((double)id_value.second / cosh(point.eta()), point.eta(), point.phi(), 0.);
62  triggerCell.setP4(p4);
63  triggerCell.setPosition(point);
64 
65  // calibration part ---------------------------
66  if (triggerCell.hwPt() > 0) {
67  l1t::HGCalTriggerCell calibratedtriggercell(triggerCell);
68  calibration_->calibrateInGeV(calibratedtriggercell);
69  triggerCellColl.push_back(0, calibratedtriggercell);
70  }
71  }
72  }
73 }

References calibration_, DigiToRawDM_cff::digiColl, HGCalTriggerGeometryBase::disconnectedModule(), HGCalProcessorBaseT< InputCollection, OutputCollection >::geometry_, HGCalTriggerGeometryBase::getModuleFromCell(), HGCalTriggerGeometryBase::getTriggerCellPosition(), DetId::Hcal, HcalEndcap, HFNose, l1t::L1Candidate::hwPt(), mps_fire::i, p4, jets_cff::payload, point, BXVector< T >::push_back(), l1t::HGCalTriggerCell::setCompressedCharge(), reco::LeafCandidate::setP4(), l1t::HGCalTriggerCell::setPosition(), l1t::HGCalTriggerCell::setUncompressedCharge(), HGCalTriggerGeometryBase::validCell(), vfeCompressionImpl_, vfeLinearizationImpl_, and vfeSummationImpl_.

Member Data Documentation

◆ calibration_

std::unique_ptr<HGCalTriggerCellCalibration> HGCalVFEProcessorSums::calibration_
private

Definition at line 28 of file HGCalVFEProcessorSums.h.

Referenced by HGCalVFEProcessorSums(), and run().

◆ vfeCompressionImpl_

std::unique_ptr<HGCalVFECompressionImpl> HGCalVFEProcessorSums::vfeCompressionImpl_
private

Definition at line 27 of file HGCalVFEProcessorSums.h.

Referenced by HGCalVFEProcessorSums(), and run().

◆ vfeLinearizationImpl_

std::unique_ptr<HGCalVFELinearizationImpl> HGCalVFEProcessorSums::vfeLinearizationImpl_
private

Definition at line 25 of file HGCalVFEProcessorSums.h.

Referenced by HGCalVFEProcessorSums(), and run().

◆ vfeSummationImpl_

std::unique_ptr<HGCalVFESummationImpl> HGCalVFEProcessorSums::vfeSummationImpl_
private

Definition at line 26 of file HGCalVFEProcessorSums.h.

Referenced by HGCalVFEProcessorSums(), and run().

DigiToRawDM_cff.digiColl
digiColl
Definition: DigiToRawDM_cff.py:32
HGCalVFEProcessorSums::vfeSummationImpl_
std::unique_ptr< HGCalVFESummationImpl > vfeSummationImpl_
Definition: HGCalVFEProcessorSums.h:26
mps_fire.i
i
Definition: mps_fire.py:355
HGCalTriggerGeometryBase::disconnectedModule
virtual bool disconnectedModule(const unsigned module_id) const =0
HGCalTriggerGeometryBase::validCell
virtual bool validCell(const unsigned cell_id) const =0
DetId::Hcal
Definition: DetId.h:28
HGCalTriggerGeometryBase::getModuleFromCell
virtual unsigned getModuleFromCell(const unsigned cell_det_id) const =0
DetId
Definition: DetId.h:17
HGCalVFEProcessorSums::vfeLinearizationImpl_
std::unique_ptr< HGCalVFELinearizationImpl > vfeLinearizationImpl_
Definition: HGCalVFEProcessorSums.h:25
HFNose
Definition: ForwardSubdetector.h:11
HGCalVFEProcessorBase
HGCalProcessorBaseT< HGCalDigiCollection, l1t::HGCalTriggerCellBxCollection > HGCalVFEProcessorBase
Definition: HGCalProcessorBase.h:16
l1t::HGCalTriggerCell
Definition: HGCalTriggerCell.h:14
jets_cff.payload
payload
Definition: jets_cff.py:34
Point3DBase< float, GlobalTag >
HGCalProcessorBaseT::geometry_
const HGCalTriggerGeometryBase * geometry_
Definition: HGCalProcessorBaseT.h:24
HcalDetId
Definition: HcalDetId.h:12
p4
double p4[4]
Definition: TauolaWrapper.h:92
HGCalVFEProcessorSums::calibration_
std::unique_ptr< HGCalTriggerCellCalibration > calibration_
Definition: HGCalVFEProcessorSums.h:28
module
Definition: vlib.h:198
HcalEndcap
Definition: HcalAssistant.h:34
HGCalTriggerGeometryBase::getTriggerCellPosition
virtual GlobalPoint getTriggerCellPosition(const unsigned trigger_cell_det_id) const =0
math::PtEtaPhiMLorentzVector
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:25
HGCalVFEProcessorSums::vfeCompressionImpl_
std::unique_ptr< HGCalVFECompressionImpl > vfeCompressionImpl_
Definition: HGCalVFEProcessorSums.h:27
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
BXVector::push_back
void push_back(int bx, T object)
reco::LeafCandidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: LeafCandidate.h:23