11#include "./WTAFixedInt.hpp"
16 WTAParameters(pt_t const_et_cut = 2000, pt_t seed_et_cut = 5000, tech_t jet_dR = R_PAR,
17 unsigned int max_const_n = 250,
unsigned int max_seed_sorting_n = 50,
unsigned int max_seed_n = 10,
unsigned int max_const_per_jet_n = 99,
18 bool add_const_first =
true) :
80 std::vector<WTATrigObj>
LoadInputs(
const std::vector<pt_t>& ptVec,
const std::vector<eta_t>& etaVec,
const std::vector<phi_t>& phiVec,
const std::vector<m_t>& mVec);
81 virtual void FillLists(
const std::vector<WTATrigObj>& InputTowers);
82 void InitiateInputs(
const std::vector<pt_t>& ptVec,
const std::vector<eta_t>& etaVec,
const std::vector<phi_t>& phiVec,
const std::vector<m_t>& mVec);
107inline std::vector<WTATrigObj>
WTAConeMaker::LoadInputs(
const std::vector<pt_t>& ptVec,
const std::vector<eta_t>& etaVec,
const std::vector<phi_t>& phiVec,
const std::vector<m_t>& mVec)
109 std::vector<WTATrigObj> input_towers;
110 unsigned int tower_n = ptVec.size();
111 for(
unsigned int t = 0; t < tower_n; t++)
113 WTATrigObj this_tower(ptVec.at(t), etaVec.at(t), phiVec.at(t), mVec.at(t));
114 input_towers.push_back(this_tower);
126 if(
m_DEBUG) std::cout <<
"MaxTowersToReadPerEvent = " << MaxTowersToReadPerEvent <<
", Size of event = " << InputTowers.size() << std::endl;
128 for(
const auto& tower: InputTowers)
136 if(nTowers>MaxTowersToReadPerEvent)
break;
142inline void WTAConeMaker::InitiateInputs(
const std::vector<pt_t>& ptVec,
const std::vector<eta_t>& etaVec,
const std::vector<phi_t>& phiVec,
const std::vector<m_t>& mVec)
144 std::vector<WTATrigObj> InputTowers =
LoadInputs(ptVec, etaVec, phiVec, mVec);
157 int AllJetConstN = 0;
160 AllJetConstN +=
jet.GetConstituentCount();
161 std::cout <<
"Jet pT, eta, phi, constN = " <<
jet.pt() <<
" , " <<
jet.eta() <<
" , " <<
jet.phi() <<
" , " <<
jet.GetConstituentCount() << std::endl;
163 std::cout <<
"PrintSeedList..." <<
" , SeedN, AllJetConstN, ConstN = " <<
m_SeedList.size() <<
" , " << AllJetConstN <<
" , " <<
m_ConstituentList.size() << std::endl;
164 std::cout <<
"+++++++++++++++++++++++++" << std::endl;
188 while(
jet.GetConstituentCount() > MaxConstPerJetN)
190 jet.PopOutLastConstituent();
206 WTAJet thisjet(obj.pt(), obj.eta(), obj.phi(), obj.m(), obj.idx());
219 std::vector<int> associate_bit(jet_N, 0);
220 pt_t MaxPt = tower.
pt(); MaxPtIndex = -1;
221 for(
int j = 0; j < jet_N; j++)
224#ifdef FLOATING_POINT_SIMULATION
231 associate_bit.at(j) = 1;
239 return associate_bit;
245 if(
m_DEBUG)std::cout <<
"Baseline Seed Cleaning......" << std::endl;
257 if(std::find(associate_bit.begin(), associate_bit.end(), 1) != associate_bit.end())
262 for(
int j = jet_N - 1; j >= 0; j--)
264 if(associate_bit.at(j) == 1)
289 std::cout <<
"Baseline Seed Cleaning Done......" << std::endl;
297 for(
unsigned int j = 0; j <
m_SeedList.size(); j++)
301 m_SeedList.at(j).MergeConstituent(constituent);
313 jet.CreateERingInfo();
static void SortByPt(std::vector< T > &list)
const std::vector< WTATrigObj > & GetConstituentList() const
virtual void SeedCleaning()
void ResizeSeedNConstLists()
std::vector< WTATrigObj > LoadInputs(const std::vector< pt_t > &ptVec, const std::vector< eta_t > &etaVec, const std::vector< phi_t > &phiVec, const std::vector< m_t > &mVec)
void ResizeThisJetConstituents(WTAJet &jet)
std::vector< WTAJet > m_SeedList
WTAConeMaker(bool debug=false, bool verbose=false)
virtual void FillLists(const std::vector< WTATrigObj > &InputTowers)
WTAParameters m_WTAConeMakerParameter
void ResizeSeedSortingList()
void InsertToConstList(const WTATrigObj &obj)
std::vector< int > GetAssociateBits(WTATrigObj incoming_seed, int &max_pt_index)
void InitiateInputs(const std::vector< pt_t > &ptVec, const std::vector< eta_t > &etaVec, const std::vector< phi_t > &phiVec, const std::vector< m_t > &mVec)
void ResizeConstituentList()
std::vector< WTATrigObj > m_SeedSortingList
std::vector< WTATrigObj > m_ConstituentList
WTATrigObj WTAJetToWTATrigObj(const WTAJet &jet)
WTAJet WTATrigObjToWTAJet(const WTATrigObj &obj)
virtual ~WTAConeMaker()=default
const std::vector< WTATrigObj > & GetSeedSortingList() const
virtual void MergeConstsToSeeds()
const std::vector< WTAJet > & GetSeedList() const
WTAParameters(pt_t const_et_cut=2000, pt_t seed_et_cut=5000, tech_t jet_dR=R_PAR, unsigned int max_const_n=250, unsigned int max_seed_sorting_n=50, unsigned int max_seed_n=10, unsigned int max_const_per_jet_n=99, bool add_const_first=true)
unsigned int m_MaxSeedSortingN
unsigned int GetMaxSeedN()
unsigned int m_MaxConstPerJetN
unsigned int GetMaxSeedSortingN()
void SetMaxConstPerJetN(int MaxConstPerJetN)
void SetAddConstFirst(bool add_const_first)
unsigned int GetMaxInputTowers()
void SetIso_dR(tech_t Iso_dR)
unsigned int GetMaxConstPerJetN()
void SetMaxConstN(int MaxConstN)
void SetConstEtCut(pt_t ConstEtCut)
void SetMaxInputTowers(int max_input_towers)
void SetJet_dR(tech_t Jet_dR)
unsigned int GetMaxConstN()
unsigned int m_max_input_towers
void SetMaxSeedSortingN(int MaxSeedSortingN)
void SetMaxSeedN(int MaxSeedN)
void SetSeedEtCut(pt_t SeedEtCut)
phi_t d_phi_MPI_PI(const WTATrigObj &o2) const
bool IsAssocdR(WTATrigObj &tower, tech_t dr)
eta_t d_eta(const WTATrigObj &o2) const