File indexing completed on 2025-08-06 08:14:20
0001 #include "RandomCone.h"
0002 #include "RandomConev1.h"
0003
0004
0005 #include <iostream>
0006 #include <string>
0007 #include <vector>
0008 #include <utility>
0009 #include <cmath>
0010
0011 #include <jetbase/Jet.h>
0012
0013 #include <ostream>
0014 #include <cstdlib> // for exit
0015
0016
0017 void RandomConev1::identify(std::ostream& os) const
0018 {
0019 os << "=========RandomCone===========" << std::endl;
0020 os << "\t cone type: " << m_cone_type << std::endl;
0021 os << "\t pt: " << m_pt << std::endl;
0022 os << "\t eta: " << m_eta << std::endl;
0023 os << "\t phi: " << m_phi << std::endl;
0024 os << "\t R: " << m_R << std::endl;
0025 os << "\t n_clustered: " << n_clustered() << std::endl;
0026 os << "===============================";
0027 return ;
0028 }
0029
0030 void RandomConev1::Reset()
0031 {
0032 m_pt = 0.0;
0033 m_eta = NAN;
0034 m_phi = NAN;
0035 m_R = NAN;
0036 m_cone_type = RandomCone::ConeType::VOID;
0037 _comp_ids.clear();
0038 return ;
0039
0040 }
0041
0042 void RandomConev1::add_constituent(Jet* particle)
0043 {
0044 float e = particle->get_e();
0045 float pt = e/cosh(particle->get_eta());
0046
0047 m_pt += pt;
0048 auto compvec = particle->get_comp_vec();
0049 for (auto comp : compvec)
0050 {
0051 _comp_ids.push_back(std::make_pair(comp.first, comp.second));
0052 }
0053
0054 return ;
0055 }
0056
0057
0058