52 tree.Branch(
"cl_n", &
cl_n_,
"cl_n/I");
53 tree.Branch(
"cl_id", &
cl_id_);
55 tree.Branch(
"cl_pt", &
cl_pt_);
57 tree.Branch(
"cl_eta", &
cl_eta_);
58 tree.Branch(
"cl_phi", &
cl_phi_);
83 std::unordered_map<uint32_t, l1t::HGCalMulticlusterBxCollection::const_iterator> cluster2multicluster;
84 for (
auto mcl_itr = multiclusters.
begin(0); mcl_itr != multiclusters.
end(0); mcl_itr++) {
86 for (
const auto& cl_ptr : mcl_itr->constituents()) {
87 cluster2multicluster.emplace(cl_ptr.second->detId(), mcl_itr);
92 for (
auto cl_itr = clusters.
begin(0); cl_itr != clusters.
end(0); cl_itr++) {
93 auto mcl_itr = cluster2multicluster.find(cl_itr->detId());
94 uint32_t mcl_id = (mcl_itr != cluster2multicluster.end() ? mcl_itr->second->detId() : 0);
95 float mcl_pt = (mcl_itr != cluster2multicluster.end() ? mcl_itr->second->pt() : 0.);
101 cl_pt_.emplace_back(cl_itr->pt());
103 cl_eta_.emplace_back(cl_itr->eta());
104 cl_phi_.emplace_back(cl_itr->phi());
106 cl_id_.emplace_back(cl_itr->detId());
109 cl_cells_n_.emplace_back(cl_itr->constituents().size());
111 cl_cells_id_.emplace_back(cl_itr->constituents().size());
113 cl_itr->constituents_begin(),
114 cl_itr->constituents_end(),
116 [](
const std::pair<uint32_t, edm::Ptr<l1t::HGCalTriggerCell>>& id_tc) {
return id_tc.second->detId(); });
std::vector< float > cl_phi_
const_iterator end(int bx) const
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
~HGCalTriggerNtupleHGCClusters() override
std::vector< float > cl_pt_
std::vector< int > cl_subdet_
std::vector< int > cl_cells_n_
std::vector< std::vector< uint32_t > > cl_cells_id_
std::vector< int > cl_layer_
edm::EDGetToken multiclusters_token_
std::vector< uint32_t > cl_multicluster_id_
std::vector< float > cl_mipPt_
std::vector< uint32_t > cl_id_
void initialize(TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&) final
HGCalTriggerTools triggerTools_
ESHandle< TrackerGeometry > geometry
HGCalTriggerNtupleHGCClusters(const edm::ParameterSet &conf)
#define DEFINE_EDM_PLUGIN(factory, type, name)
edm::EDGetToken clusters_token_
std::vector< float > cl_eta_
const_iterator begin(int bx) const
std::vector< float > cl_multicluster_pt_
bool filter_clusters_in_multiclusters_
std::vector< float > cl_energy_
void fill(const edm::Event &e, const edm::EventSetup &es) final