43 setWhatProduced(
this);
45 ptLUTVersion = iConfig.
getParameter<
int>(
"PtAssignVersion");
65 local_root.ileft = (!left_subtree.empty()?1:0);
68 cond_tree.begin() + 1,
71 if( cond_node.ileft ) cond_node.ileft += 1;
72 if( cond_node.iright) cond_node.iright += 1;
76 unsigned int offset = left_subtree.size();
77 local_root.iright = (offset+right_subtree.size() ? 1 + offset : 0);
80 cond_tree.begin() + 1 +
offset,
83 if( cond_node.ileft ) cond_node.ileft += 1 +
offset;
84 if( cond_node.iright) cond_node.iright += 1 +
offset;
96 std::unique_ptr<PtAssignmentEngine> pt_assign_engine_2016_;
97 std::unique_ptr<PtAssignmentEngine> pt_assign_engine_2017_;
102 if (ptLUTVersion <= 5) pt_assign_engine_ = pt_assign_engine_2016_.get();
103 else pt_assign_engine_ = pt_assign_engine_2017_.get();
105 pt_assign_engine_->
read(ptLUTVersion, bdtXMLDir);
108 std::array<emtf::Forest, 16> forests = pt_assign_engine_->
getForests();
113 pEMTFForest->forest_coll_.resize(0);
114 for (
unsigned int i = 0;
i < allowedModes.size();
i++) {
115 int mode = allowedModes[
i];
116 pEMTFForest->forest_map_[
mode] =
i;
122 for (
unsigned int j = 0; j < forest.
size(); j++)
125 pEMTFForest->forest_coll_.push_back(
std::move( cond_forest ) );
Node * getRightDaughter()
T getParameter(std::string const &) const
const std::array< emtf::Forest, 16 > & getForests(void) const
ReturnType produce(const L1TMuonEndCapForestRcd &)
L1TMuonEndCapForestESProducer(const edm::ParameterSet &)
const std::vector< int > & getAllowedModes(void) const
~L1TMuonEndCapForestESProducer() override
L1TMuonEndCapForest::DTree traverse(emtf::Node *tree)
std::shared_ptr< L1TMuonEndCapForest > ReturnType
std::vector< DTree > DForest
std::vector< DTreeNode > DTree
double getBoostWeight(void) const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Tree * getTree(unsigned int i)
void read(int pt_lut_version, const std::string &xml_dir)