11 WTAParameters(IntOrFloat const_et_cut = 2000, IntOrFloat seed_et_cut = 5000, IntOrFloat jet_dr2 = R2PAR,
12 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,
13 bool add_const_first =
true) :
75 std::vector<WTATrigObj>
LoadInputs(
const std::vector<IntOrFloat>& ptVec,
const std::vector<IntOrFloat>& etaVec,
const std::vector<IntOrFloat>& phiVec,
const std::vector<IntOrFloat>& mVec);
76 virtual void FillLists(
const std::vector<WTATrigObj>& InputTowers);
77 void InitiateInputs(
const std::vector<IntOrFloat>& ptVec,
const std::vector<IntOrFloat>& etaVec,
const std::vector<IntOrFloat>& phiVec,
const std::vector<IntOrFloat>& mVec);
101inline std::vector<WTATrigObj>
WTAConeMaker::LoadInputs(
const std::vector<IntOrFloat>& ptVec,
const std::vector<IntOrFloat>& etaVec,
const std::vector<IntOrFloat>& phiVec,
const std::vector<IntOrFloat>& mVec)
103 std::vector<WTATrigObj> input_towers;
104 unsigned int tower_n = ptVec.size();
105 for(
unsigned int t = 0; t < tower_n; t++)
107 WTATrigObj this_tower(ptVec.at(t), etaVec.at(t), phiVec.at(t), mVec.at(t));
108 input_towers.push_back(this_tower);
120 if(
m_DEBUG) std::cout <<
"MaxTowersToReadPerEvent = " << MaxTowersToReadPerEvent <<
", Size of event = " << InputTowers.size() << std::endl;
122 for(
const auto& tower: InputTowers)
130 if(nTowers>MaxTowersToReadPerEvent)
break;
136inline void WTAConeMaker::InitiateInputs(
const std::vector<IntOrFloat>& ptVec,
const std::vector<IntOrFloat>& etaVec,
const std::vector<IntOrFloat>& phiVec,
const std::vector<IntOrFloat>& mVec)
138 std::vector<WTATrigObj> InputTowers =
LoadInputs(ptVec, etaVec, phiVec, mVec);
151 int AllJetConstN = 0;
154 AllJetConstN +=
jet.GetConstituentCount();
155 std::cout <<
"Jet pT, eta, phi, constN = " <<
jet.pt() <<
" , " <<
jet.eta() <<
" , " <<
jet.phi() <<
" , " <<
jet.GetConstituentCount() << std::endl;
157 std::cout <<
"PrintSeedList..." <<
" , SeedN, AllJetConstN, ConstN = " <<
m_SeedList.size() <<
" , " << AllJetConstN <<
" , " <<
m_ConstituentList.size() << std::endl;
158 std::cout <<
"+++++++++++++++++++++++++" << std::endl;
182 while(
jet.GetConstituentCount() > MaxConstPerJetN)
184 jet.PopOutLastConstituent();
200 WTAJet thisjet(obj.pt(), obj.eta(), obj.phi(), obj.m(), obj.idx());
213 std::vector<int> associate_bit(jet_N, 0);
214 IntOrFloat MaxPt = tower.
pt(); MaxPtIndex = -1;
215 for(
int j = 0; j < jet_N; j++)
220 associate_bit.at(j) = 1;
228 return associate_bit;
234 if(
m_DEBUG)std::cout <<
"Baseline Seed Cleaning......" << std::endl;
246 if(std::find(associate_bit.begin(), associate_bit.end(), 1) != associate_bit.end())
251 for(
int j = jet_N - 1; j >= 0; j--)
253 if(associate_bit.at(j) == 1)
259 m_SeedList.push_back(std::move(IncomingSeedAsJet));
269 m_SeedList.push_back(std::move(IncomingSeedAsJet));
278 std::cout <<
"Baseline Seed Cleaning Done......" << std::endl;
286 for(
unsigned int j = 0; j <
m_SeedList.size(); j++)
288 IntOrFloat dR2 = constituent.dR2(
m_SeedList.at(j));
291 m_SeedList.at(j).MergeConstituent(constituent);
static void SortByPt(std::vector< T > &list)
const std::vector< WTATrigObj > & GetConstituentList() const
virtual void SeedCleaning()
void ResizeSeedNConstLists()
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 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
std::vector< WTATrigObj > LoadInputs(const std::vector< IntOrFloat > &ptVec, const std::vector< IntOrFloat > &etaVec, const std::vector< IntOrFloat > &phiVec, const std::vector< IntOrFloat > &mVec)
virtual void MergeConstsToSeeds()
const std::vector< WTAJet > & GetSeedList() const
void InitiateInputs(const std::vector< IntOrFloat > &ptVec, const std::vector< IntOrFloat > &etaVec, const std::vector< IntOrFloat > &phiVec, const std::vector< IntOrFloat > &mVec)
IntOrFloat GetSeedEtCut()
IntOrFloat GetConstEtCut()
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()
WTAParameters(IntOrFloat const_et_cut=2000, IntOrFloat seed_et_cut=5000, IntOrFloat jet_dr2=R2PAR, 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 GetMaxConstPerJetN()
void SetMaxConstN(int MaxConstN)
void SetIso_dR2(IntOrFloat Iso_dR2)
void SetMaxInputTowers(int max_input_towers)
void SetSeedEtCut(IntOrFloat SeedEtCut)
unsigned int GetMaxConstN()
void SetJet_dR2(IntOrFloat Jet_dR2)
unsigned int m_max_input_towers
void SetMaxSeedSortingN(int MaxSeedSortingN)
void SetMaxSeedN(int MaxSeedN)
void SetConstEtCut(IntOrFloat ConstEtCut)
IntOrFloat dR2(const WTATrigObj &o2)
bool IsAssocdR(WTATrigObj &tower, IntOrFloat dr2)
IntOrFloat d_eta(const WTATrigObj &o2)
IntOrFloat d_phi_MPI_PI(const WTATrigObj &o2)