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);
90 tree.Branch(
"hgcdigi_n", &
hgcdigi_n_,
"hgcdigi_n/I");
112 tree.Branch(
"bhdigi_n", &
bhdigi_n_,
"bhdigi_n/I");
143 std::unordered_map<uint32_t, double> simhits_ee;
144 std::unordered_map<uint32_t, double> simhits_fh;
145 std::unordered_map<uint32_t, double> simhits_bh;
147 simhits(e, simhits_ee, simhits_fh, simhits_bh);
186 const int kIntimeSample = 2;
187 for (
const auto& digi : ee_digis) {
212 if (!(digi[kIntimeSample].
mode()))
216 double hit_energy = 0;
217 auto itr = simhits_ee.find(
id);
218 if (itr != simhits_ee.end())
219 hit_energy = itr->second;
224 for (
const auto& digi : fh_digis) {
249 if (!(digi[kIntimeSample].
mode()))
253 double hit_energy = 0;
254 auto itr = simhits_fh.find(
id);
255 if (itr != simhits_fh.end())
256 hit_energy = itr->second;
261 for (
const auto& digi : bh_digis) {
283 double hit_energy = 0;
284 auto itr = simhits_bh.find(
id);
285 if (itr != simhits_bh.end())
286 hit_energy = itr->second;
293 std::unordered_map<uint32_t, double>& simhits_ee,
294 std::unordered_map<uint32_t, double>& simhits_fh,
295 std::unordered_map<uint32_t, double>& simhits_bh) {
307 for (
const auto& simhit : ee_simhits) {
311 auto itr_insert = simhits_ee.emplace(
id, 0.);
312 itr_insert.first->second += simhit.energy();
315 for (
const auto& simhit : fh_simhits) {
319 auto itr_insert = simhits_fh.emplace(
id, 0.);
320 itr_insert.first->second += simhit.energy();
323 for (
const auto& simhit : bh_simhits) {
329 auto itr_insert = simhits_bh.emplace(
id, 0.);
330 itr_insert.first->second += simhit.energy();
std::vector< int > hgcdigi_subdet_
T getParameter(std::string const &) const
std::vector< PCaloHit > PCaloHitContainer
edm::EDGetToken ee_token_
std::vector< float > bhdigi_eta_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< float > hgcdigi_eta_
std::vector< int > hgcdigi_waferu_
const HGCalGeometry * eeGeometry() const
const HGCalTopology & eeTopology() const
edm::EDGetToken SimHits_inputfh_
Geom::Phi< T > phi() const
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
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)
GlobalPoint getPosition(const DetId &id) const
std::vector< int > bhdigi_id_
std::vector< int > hgcdigi_layer_
HGCalTriggerTools triggerTools_
void fill(const edm::Event &e, const edm::EventSetup &es) final
std::vector< uint32_t > hgcdigi_data_
std::vector< int > hgcdigi_wafer_
std::vector< int > bhdigi_side_
std::vector< float > bhdigi_phi_
std::vector< int > hgcdigi_side_
void initialize(TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&) final
std::vector< int > bhdigi_ieta_
edm::EDGetToken SimHits_inputee_
std::vector< int > hgcdigi_cell_
std::vector< int > hgcdigi_isadc_
const HcalTopology & bhTopology() const
HGCalTriggerNtupleHGCDigis(const edm::ParameterSet &conf)
std::vector< float > hgcdigi_phi_
std::vector< float > hgcdigi_z_
GlobalPoint getPosition(const DetId &id) const
const HcalGeometry * bhGeometry() const
const HGCalGeometry * hsiGeometry() const
std::vector< uint32_t > bhdigi_data_
std::vector< int > hgcdigi_waferv_
const HGCalGeometry * hscGeometry() const
const HGCalTopology & hscTopology() const
std::vector< float > bhdigi_z_
bool isV9Geometry() const
char data[epos_bytes_allocation]
edm::EDGetToken bh_token_
std::vector< int > hgcdigi_cellv_
std::vector< int > hgcdigi_cellu_
std::vector< int > bhdigi_subdet_
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< float > bhdigi_simenergy_
std::vector< int > hgcdigi_id_
std::vector< int > hgcdigi_wafertype_
edm::EDGetToken fh_token_
std::vector< int > bhdigi_layer_
edm::EDGetToken SimHits_inputbh_
std::vector< int > bhdigi_iphi_
const HGCalTopology & fhTopology() const
std::vector< float > hgcdigi_simenergy_
~HGCalTriggerNtupleHGCDigis() override