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

HGCalTriggerCellCalibration calibration_
 
HGCalVFELinearizationImpl vfeLinearizationImpl_
 
HGCalVFESummationImpl vfeSummationImpl_
 

Additional Inherited Members

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

Detailed Description

Definition at line 17 of file HGCalVFEProcessorSums.h.

Constructor & Destructor Documentation

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

Definition at line 15 of file HGCalVFEProcessorSums.cc.

15  : HGCalVFEProcessorBase(conf),
17  vfeSummationImpl_(conf),
18  calibration_( conf.getParameterSet("calib_parameters") )
19 {
20 }
HGCalVFESummationImpl vfeSummationImpl_
HGCalProcessorBaseT< HGCalDigiCollection, l1t::HGCalTriggerCellBxCollection > HGCalVFEProcessorBase
HGCalVFELinearizationImpl vfeLinearizationImpl_
ParameterSet const & getParameterSet(std::string const &) const
HGCalTriggerCellCalibration calibration_

Member Function Documentation

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

Definition at line 23 of file HGCalVFEProcessorSums.cc.

References HGCalTriggerCellCalibration::calibrateInGeV(), calibration_, HGCalTriggerGeometryBase::disconnectedModule(), HGCalTriggerCellCalibration::eventSetup(), HGCalProcessorBaseT< InputCollection, OutputCollection >::geometry_, HGCalTriggerGeometryBase::getModuleFromCell(), HGCalTriggerGeometryBase::getTriggerCellPosition(), DetId::Hcal, HcalEndcap, mps_fire::i, HGCalVFELinearizationImpl::linearize(), p4, jets_cff::payload, point, BXVector< T >::push_back(), HGCalVFESummationImpl::triggerCellSums(), vfeLinearizationImpl_, and vfeSummationImpl_.

26 {
28 
29  std::vector<HGCalDataFrame> dataframes;
30  std::vector<std::pair<DetId, uint32_t >> linearized_dataframes;
31  std::map<HGCalDetId, uint32_t> payload;
32 
33  // convert ee and fh hit collections into the same object
34  for(const auto& digiData : digiColl)
35  {
36  if(DetId(digiData.id()).det()==DetId::Hcal && HcalDetId(digiData.id()).subdetId()!=HcalEndcap) continue;
37  uint32_t module = geometry_->getModuleFromCell(digiData.id());
38  if(geometry_->disconnectedModule(module)) continue;
39  dataframes.emplace_back(digiData.id());
40  for(int i=0; i<digiData.size(); i++)
41  {
42  dataframes.back().setSample(i, digiData.sample(i));
43  }
44  }
45 
46  vfeLinearizationImpl_.linearize(dataframes, linearized_dataframes);
47  vfeSummationImpl_.triggerCellSums(*geometry_, linearized_dataframes, payload);
48 
49  // Transform map to trigger cell vector vector<HGCalTriggerCell>
50  for(const auto& id_value : payload)
51  {
52  if (id_value.second>0){
53  l1t::HGCalTriggerCell triggerCell(reco::LeafCandidate::LorentzVector(), id_value.second, 0, 0, 0, id_value.first.rawId());
54  GlobalPoint point = geometry_->getTriggerCellPosition(id_value.first.rawId());
55 
56  // 'value' is hardware, so p4 is meaningless, except for eta and phi
57  math::PtEtaPhiMLorentzVector p4((double)id_value.second/cosh(point.eta()), point.eta(), point.phi(), 0.);
58  triggerCell.setP4(p4);
59  triggerCell.setPosition(point);
60 
61  // calibration part ---------------------------
62  if( triggerCell.hwPt() > 0 )
63  {
64  l1t::HGCalTriggerCell calibratedtriggercell( triggerCell );
65  calibration_.calibrateInGeV( calibratedtriggercell);
66  triggerCellColl.push_back(0, calibratedtriggercell);
67  }
68  }
69  }
70 }
HGCalVFESummationImpl vfeSummationImpl_
const HGCalTriggerGeometryBase * geometry_
void eventSetup(const edm::EventSetup &es)
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:25
double p4[4]
Definition: TauolaWrapper.h:92
HGCalVFELinearizationImpl vfeLinearizationImpl_
void linearize(const std::vector< HGCDataFrame< DetId, HGCSample >> &, std::vector< std::pair< DetId, uint32_t > > &)
virtual bool disconnectedModule(const unsigned module_id) const =0
virtual unsigned getModuleFromCell(const unsigned cell_det_id) const =0
Definition: DetId.h:18
HGCalTriggerCellCalibration calibration_
void triggerCellSums(const HGCalTriggerGeometryBase &, const std::vector< std::pair< DetId, uint32_t > > &, std::map< HGCalDetId, uint32_t > &payload)
void calibrateInGeV(l1t::HGCalTriggerCell &)
Definition: vlib.h:208
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: LeafCandidate.h:23
*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
virtual GlobalPoint getTriggerCellPosition(const unsigned trigger_cell_det_id) const =0
void push_back(int bx, T object)

Member Data Documentation

HGCalTriggerCellCalibration HGCalVFEProcessorSums::calibration_
private

Definition at line 32 of file HGCalVFEProcessorSums.h.

Referenced by run().

HGCalVFELinearizationImpl HGCalVFEProcessorSums::vfeLinearizationImpl_
private

Definition at line 30 of file HGCalVFEProcessorSums.h.

Referenced by run().

HGCalVFESummationImpl HGCalVFEProcessorSums::vfeSummationImpl_
private

Definition at line 31 of file HGCalVFEProcessorSums.h.

Referenced by run().