|
|
Go to the documentation of this file.
25 std::unordered_map<uint32_t,
double>& simhits_ee,
26 std::unordered_map<uint32_t,
double>& simhits_fh,
27 std::unordered_map<uint32_t,
double>& simhits_bh);
81 digiBXselect_ = conf.getParameter<std::vector<unsigned int>>(
"digiBXselect");
84 throw cms::Exception(
"BadInitialization") <<
"digiBXselect vector is empty";
88 <<
"digiBXselect vector requests a BX outside of maximum size of digis (" <<
kDigiSize_ <<
" BX)";
93 throw cms::Exception(
"BadInitialization") <<
"digiBXselect vector contains duplicate BX values";
124 auto withBX([&bname](
char const* vname,
unsigned int bx) ->
char const* {
126 return bname.c_str();
179 std::unordered_map<uint32_t, double> simhits_ee;
180 std::unordered_map<uint32_t, double> simhits_fh;
181 std::unordered_map<uint32_t, double> simhits_bh;
183 simhits(
e, simhits_ee, simhits_fh, simhits_bh);
228 for (
const auto& digi : ee_digis) {
256 double hit_energy = 0;
257 auto itr = simhits_ee.find(
id);
258 if (itr != simhits_ee.end())
259 hit_energy = itr->second;
264 for (
const auto& digi : fh_digis) {
292 double hit_energy = 0;
293 auto itr = simhits_fh.find(
id);
294 if (itr != simhits_fh.end())
295 hit_energy = itr->second;
300 for (
const auto& digi : bh_digis) {
325 double hit_energy = 0;
326 auto itr = simhits_bh.find(
id);
327 if (itr != simhits_bh.end())
328 hit_energy = itr->second;
335 std::unordered_map<uint32_t, double>& simhits_ee,
336 std::unordered_map<uint32_t, double>& simhits_fh,
337 std::unordered_map<uint32_t, double>& simhits_bh) {
349 for (
const auto& simhit : ee_simhits) {
353 auto itr_insert = simhits_ee.emplace(
id, 0.);
354 itr_insert.first->second += simhit.energy();
357 for (
const auto& simhit : fh_simhits) {
361 auto itr_insert = simhits_fh.emplace(
id, 0.);
362 itr_insert.first->second += simhit.energy();
365 for (
const auto& simhit : bh_simhits) {
371 auto itr_insert = simhits_bh.emplace(
id, 0.);
372 itr_insert.first->second += simhit.energy();
std::vector< int > hgcdigi_subdet_
const HGCalTopology & eeTopology() const
HGCalTriggerTools triggerTools_
std::vector< int > hgcdigi_side_
const HGCalGeometry * hsiGeometry() const
std::vector< int > bhdigi_id_
void simhits(const edm::Event &e, std::unordered_map< uint32_t, double > &simhits_ee, std::unordered_map< uint32_t, double > &simhits_fh, std::unordered_map< uint32_t, double > &simhits_bh)
std::vector< int > hgcdigi_cellu_
edm::EDGetToken ee_token_
std::vector< unsigned int > digiBXselect_
std::vector< int > bhdigi_layer_
std::vector< float > bhdigi_z_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
std::vector< int > hgcdigi_id_
std::vector< int > bhdigi_iphi_
edm::EDGetToken SimHits_inputbh_
std::vector< float > bhdigi_phi_
std::vector< float > hgcdigi_phi_
std::vector< int > hgcdigi_waferv_
std::vector< float > hgcdigi_z_
std::vector< float > hgcdigi_simenergy_
std::vector< int > bhdigi_subdet_
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< int > hgcdigi_wafer_
std::vector< int > hgcdigi_wafertype_
~HGCalTriggerNtupleHGCDigis() override
GlobalPoint getPosition(const DetId &id) const
std::vector< float > hgcdigi_eta_
std::vector< std::vector< uint32_t > > bhdigi_data_
edm::EDGetToken SimHits_inputfh_
std::vector< int > hgcdigi_cell_
std::vector< int > hgcdigi_waferu_
const HcalTopology & bhTopology() const
std::vector< std::vector< int > > hgcdigi_isadc_
bool isV9Geometry() const
GlobalPoint getPosition(const DetId &id) const
void initialize(TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&) final
std::vector< float > bhdigi_eta_
std::vector< std::vector< int > > bhdigi_isadc_
edm::EDGetToken bh_token_
const HGCalGeometry * eeGeometry() const
std::vector< int > bhdigi_side_
def unique(seq, keepstr=True)
std::vector< int > hgcdigi_cellv_
std::vector< PCaloHit > PCaloHitContainer
T getParameter(std::string const &) const
std::vector< int > bhdigi_ieta_
char data[epos_bytes_allocation]
HGCalTriggerNtupleHGCDigis(const edm::ParameterSet &conf)
const HGCalGeometry * hscGeometry() const
void fill(const edm::Event &e, const edm::EventSetup &es) final
std::vector< std::vector< uint32_t > > hgcdigi_data_
std::vector< int > hgcdigi_layer_
Geom::Phi< T > phi() const
const HcalGeometry * bhGeometry() const
static constexpr unsigned kDigiSize_
edm::EDGetToken SimHits_inputee_
const HGCalTopology & fhTopology() const
std::vector< float > bhdigi_simenergy_
edm::EDGetToken fh_token_
const HGCalTopology & hscTopology() const