62 HGCalTriggerNtupleHGCMulticlusters::HGCalTriggerNtupleHGCMulticlusters(
const edm::
ParameterSet& conf)
64 fill_layer_info_(conf.getParameter<
bool>("FillLayerInfo")),
65 fill_interpretation_info_(conf.getParameter<
bool>("FillInterpretationInfo")) {
74 id_ = std::unique_ptr<HGCalTriggerClusterIdentificationBase>{
81 auto withPrefix([&prefix, &bname](
char const* vname) ->
char const* {
82 bname = prefix +
"_" + vname;
86 tree.Branch(withPrefix(
"n"), &
cl3d_n_, (prefix +
"_n/I").c_str());
87 tree.Branch(withPrefix(
"id"), &
cl3d_id_);
88 tree.Branch(withPrefix(
"pt"), &
cl3d_pt_);
90 tree.Branch(withPrefix(
"eta"), &
cl3d_eta_);
91 tree.Branch(withPrefix(
"phi"), &
cl3d_phi_);
104 tree.Branch(withPrefix(
"szz"), &
cl3d_szz_);
109 tree.Branch(withPrefix(
"hoe"), &
cl3d_hoe_);
119 tree.Branch(withPrefix(
"ipt"), &
cl3d_ipt_);
131 for (
auto cl3d_itr = multiclusters.
begin(0); cl3d_itr != multiclusters.
end(0); cl3d_itr++) {
133 cl3d_id_.emplace_back(cl3d_itr->detId());
135 cl3d_pt_.emplace_back(cl3d_itr->pt());
148 cl3d_szz_.emplace_back(cl3d_itr->sigmaZZ());
152 cl3d_emaxe_.emplace_back(cl3d_itr->eMax() / cl3d_itr->energy());
153 cl3d_hoe_.emplace_back(cl3d_itr->hOverE());
158 cl3d_ntc67_.emplace_back(cl3d_itr->triggerCells67percent());
159 cl3d_ntc90_.emplace_back(cl3d_itr->triggerCells90percent());
163 std::vector<float> iPts(cl3d_itr->interpretations_size());
164 std::vector<float> iEnergies(cl3d_itr->interpretations_size());
165 for (
auto interp = cl3d_itr->interpretations_begin(); interp != cl3d_itr->interpretations_end(); ++interp) {
166 iPts.emplace_back(cl3d_itr->iPt(*interp));
167 iEnergies.emplace_back(cl3d_itr->iEnergy(*interp));
176 std::vector<float> layer_pt(nlayers, 0.0);
177 for (
const auto& cl_ptr : cl3d_itr->constituents()) {
178 unsigned layer = es.
geometry->triggerLayer(cl_ptr.second->detId());
179 layer_pt[
layer] += cl_ptr.second->pt();
187 cl3d_itr->constituents_end(),
189 [](
const std::pair<uint32_t, edm::Ptr<l1t::HGCalCluster>>& id_cl) {
return id_cl.second->detId(); });
std::vector< float > cl3d_srrtot_
const_iterator end(int bx) const
std::vector< int > cl3d_coreshowerlength_
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > cl3d_maxlayer_
std::vector< int > cl3d_clusters_n_
std::vector< float > cl3d_layer90_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< float > cl3d_sppmax_
edm::ESHandle< HGCalTriggerGeometryBase > geometry
std::vector< float > cl3d_meanz_
~HGCalTriggerNtupleHGCMulticlusters() override
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
std::vector< int > cl3d_showerlength_
constexpr std::array< uint8_t, layerIndexSize > layer
std::vector< float > cl3d_srrmean_
std::vector< int > cl3d_quality_
std::vector< uint32_t > cl3d_id_
std::vector< std::vector< float > > cl3d_ipt_
HGCalTriggerNtupleHGCMulticlusters(const edm::ParameterSet &conf)
std::vector< std::vector< float > > cl3d_layer_pt_
std::vector< float > cl3d_ntc90_
std::vector< float > cl3d_ntc67_
std::vector< float > cl3d_eta_
Abs< T >::type abs(const T &t)
std::vector< float > cl3d_emaxe_
std::vector< std::vector< uint32_t > > cl3d_clusters_id_
std::vector< std::vector< float > > cl3d_ienergy_
std::vector< float > cl3d_szz_
std::vector< int > cl3d_firstlayer_
std::vector< float > cl3d_bdteg_
std::vector< float > cl3d_layer50_
std::vector< float > cl3d_seetot_
std::unique_ptr< HGCalTriggerClusterIdentificationBase > id_
std::vector< float > cl3d_pt_
T getParameter(std::string const &) const
edm::EDGetToken multiclusters_token_
std::vector< float > cl3d_hoe_
std::vector< float > cl3d_srrmax_
void initialize(TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&) final
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< float > cl3d_phi_
void fill(const edm::Event &e, const HGCalTriggerNtupleEventSetup &es) final
std::vector< float > cl3d_layer10_
std::vector< float > cl3d_energy_
const_iterator begin(int bx) const
std::vector< float > cl3d_seemax_
bool fill_interpretation_info_
std::vector< float > cl3d_spptot_