50 "HGCalTriggerNtupleHGCClusters" );
66 tree.Branch(
"cl_n", &
cl_n_,
"cl_n/I");
67 tree.Branch(
"cl_id", &
cl_id_);
69 tree.Branch(
"cl_pt", &
cl_pt_);
71 tree.Branch(
"cl_eta", &
cl_eta_);
72 tree.Branch(
"cl_phi", &
cl_phi_);
101 std::unordered_map<uint32_t, l1t::HGCalMulticlusterBxCollection::const_iterator> cluster2multicluster;
102 for(
auto mcl_itr=multiclusters.
begin(0); mcl_itr!=multiclusters.
end(0); mcl_itr++)
105 for(
const auto& cl_ptr : mcl_itr->constituents())
107 cluster2multicluster.emplace(cl_ptr.second->detId(), mcl_itr);
114 for(
auto cl_itr=clusters.
begin(0); cl_itr!=clusters.
end(0); cl_itr++)
116 auto mcl_itr = cluster2multicluster.find(cl_itr->detId());
117 uint32_t mcl_id = (mcl_itr!=cluster2multicluster.end() ? mcl_itr->second->detId() : 0);
118 float mcl_pt = (mcl_itr!=cluster2multicluster.end() ? mcl_itr->second->pt() : 0.);
123 cl_pt_.emplace_back(cl_itr->pt());
125 cl_eta_.emplace_back(cl_itr->eta());
126 cl_phi_.emplace_back(cl_itr->phi());
128 cl_id_.emplace_back(cl_itr->detId());
131 cl_cells_n_.emplace_back(cl_itr->constituents().size());
133 cl_cells_id_.emplace_back(cl_itr->constituents().size());
134 std::transform(cl_itr->constituents_begin(), cl_itr->constituents_end(),
135 cl_cells_id_.back().begin(), [](
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