ATLAS Offline Software
Loading...
Searching...
No Matches
Gep::WTAConeJetMaker Class Reference

#include <WTAConeJetMaker.h>

Inheritance diagram for Gep::WTAConeJetMaker:
Collaboration diagram for Gep::WTAConeJetMaker:

Public Member Functions

 WTAConeJetMaker (unsigned int block_n=4, unsigned int rolloff_buffersize=155)
virtual std::string toString () const override
virtual std::vector< Gep::JetmakeJets (const std::vector< Gep::Cluster > &TopoTowers) const override
std::unique_ptr< WTAConeMakerCreateWTAConeMaker (enum WTAConeMakerEnum seed_cleaning_algo) const
void SetBlockN (unsigned int block_n)
void SetSeedCleaningAlgo (unsigned int algo)
void SetRollOffBufferSize (int rolloff_buffersize)
int GetRollOffBufferSize ()

Public Attributes

WTAParameters m_GEPWTAParameters

Private Attributes

unsigned int m_BlockN {}
unsigned int m_SeedCleaningAlgo {}
unsigned int m_RollOffBufferSize {}

Detailed Description

Definition at line 31 of file WTAConeJetMaker.h.

Constructor & Destructor Documentation

◆ WTAConeJetMaker()

Gep::WTAConeJetMaker::WTAConeJetMaker ( unsigned int block_n = 4,
unsigned int rolloff_buffersize = 155 )
inline

Definition at line 35 of file WTAConeJetMaker.h.

35 :
37 m_BlockN(block_n), m_SeedCleaningAlgo(0), m_RollOffBufferSize(rolloff_buffersize)
38 {};
unsigned int m_SeedCleaningAlgo
WTAParameters m_GEPWTAParameters
unsigned int m_RollOffBufferSize

Member Function Documentation

◆ CreateWTAConeMaker()

std::unique_ptr< WTAConeMaker > Gep::WTAConeJetMaker::CreateWTAConeMaker ( enum WTAConeMakerEnum seed_cleaning_algo) const
inline

Definition at line 44 of file WTAConeJetMaker.h.

45 { // Allow user to choose the seed cleaning algorithm
46 switch(seed_cleaning_algo)
47 {
48 case Baseline:
49 return std::make_unique<WTAConeMaker>();
50 case TwoPass:
51 return std::make_unique<WTACone2PassMaker>();
52 default:
53 return nullptr;
54 }
55 }
@ TwoPass
@ Baseline

◆ GetRollOffBufferSize()

int Gep::WTAConeJetMaker::GetRollOffBufferSize ( )
inline

Definition at line 60 of file WTAConeJetMaker.h.

60{return m_RollOffBufferSize;}

◆ makeJets()

std::vector< Gep::Jet > Gep::WTAConeJetMaker::makeJets ( const std::vector< Gep::Cluster > & TopoTowers) const
overridevirtual

Implements Gep::IJetMaker.

Definition at line 11 of file WTAConeJetMaker.cxx.

12 { // Makesure the WTA parameters are set before calling makeJets()
13
14 std::vector<WTATrigObj> input_towers;
15 const unsigned int inTopoTowersN = inTopoTowers.size();
16 // for(const auto &TopoTower: inTopoTowers)
17 for(unsigned int i = 0; i < inTopoTowersN; i++)
18 {
19 const auto & TopoTower = inTopoTowers[i];
20 WTATrigObj this_tower(TopoTower.vec.Pt(), TopoTower.vec.Eta(), TopoTower.vec.Phi(), TopoTower.vec.M(), i);
21 input_towers.push_back(this_tower);
22 }
23
24 std::unique_ptr<WTAConeMaker> MyWTAConeMaker = CreateWTAConeMaker(static_cast<WTAConeMakerEnum>(m_SeedCleaningAlgo));
25 if(auto* MyWTACone2PassMaker = dynamic_cast<WTACone2PassMaker*>(MyWTAConeMaker.get()))MyWTACone2PassMaker->SetRollOffBufferSize(m_RollOffBufferSize); // Only for two-pass algorithm
26 std::vector<WTAJet> WTAJetList;
27 MyWTAConeMaker->m_WTAConeMakerParameter = m_GEPWTAParameters; // Pass the WTAConeParameters
28 if(m_BlockN != 1)
29 { // Run parallel WTAConeJets
30 WTAConeParallelHelper wta_parallel_helper;
31 wta_parallel_helper.SetBlockN(m_BlockN);
32 wta_parallel_helper.CreateBlocks(input_towers);
33 wta_parallel_helper.RunParallelWTA(MyWTAConeMaker);
34 wta_parallel_helper.CheckJetInCore();
35 WTAJetList = wta_parallel_helper.GetAllJets();
36 }
37 else
38 { // Run over whole calorimeter
39 MyWTAConeMaker->InitiateInputs(input_towers);
40 MyWTAConeMaker->SeedCleaning();
41 MyWTAConeMaker->MergeConstsToSeeds();
42 WTAJetList = MyWTAConeMaker->GetSeedList();
43 }
44
45 std::vector<Gep::Jet> GepJetList;
46 for(const auto& WTAJet: WTAJetList)
47 {
48 Gep::Jet thisjet;
49 thisjet.vec.SetPtEtaPhiM(WTAJet.pt(), WTAJet.eta(), WTAJet.phi(), WTAJet.m());
50 thisjet.nConstituents = WTAJet.GetConstituentCount();
51 thisjet.seedEt = WTAJet.GetSeed().pt();
52 thisjet.seedEta = WTAJet.GetSeed().eta();
53 thisjet.seedPhi = WTAJet.GetSeed().phi();
54 const std::vector<WTATrigObj> ConstituentList = WTAJet.GetConstituentList();
55 thisjet.constituentsIndices.clear();
56 for(const auto& constituent: ConstituentList)
57 {
58 thisjet.constituentsIndices.push_back(constituent.idx());
59 }
60 GepJetList.push_back(std::move(thisjet));
61 }
62
63 return GepJetList;
64 }
WTAConeMakerEnum
std::unique_ptr< WTAConeMaker > CreateWTAConeMaker(enum WTAConeMakerEnum seed_cleaning_algo) const
std::vector< WTAJet > GetAllJets()
void RunParallelWTA(std::unique_ptr< WTAClassType > &AnyWTAClass)
void CreateBlocks(const std::vector< WTATrigObj > &all_towers)
void SetBlockN(unsigned int block_n)
std::vector< int > constituentsIndices

◆ SetBlockN()

void Gep::WTAConeJetMaker::SetBlockN ( unsigned int block_n)
inline

Definition at line 57 of file WTAConeJetMaker.h.

57{m_BlockN = block_n; /* m_WTAParallelHelper.SetBlockN(m_BlockN);*/ };

◆ SetRollOffBufferSize()

void Gep::WTAConeJetMaker::SetRollOffBufferSize ( int rolloff_buffersize)
inline

Definition at line 59 of file WTAConeJetMaker.h.

59{m_RollOffBufferSize = rolloff_buffersize;}

◆ SetSeedCleaningAlgo()

void Gep::WTAConeJetMaker::SetSeedCleaningAlgo ( unsigned int algo)
inline

Definition at line 58 of file WTAConeJetMaker.h.

58{m_SeedCleaningAlgo = algo;};

◆ toString()

virtual std::string Gep::WTAConeJetMaker::toString ( ) const
inlineoverridevirtual

Implements Gep::IJetMaker.

Definition at line 41 of file WTAConeJetMaker.h.

41{ return "WTAConeJet"; }

Member Data Documentation

◆ m_BlockN

unsigned int Gep::WTAConeJetMaker::m_BlockN {}
private

Definition at line 66 of file WTAConeJetMaker.h.

66{};

◆ m_GEPWTAParameters

WTAParameters Gep::WTAConeJetMaker::m_GEPWTAParameters

Definition at line 62 of file WTAConeJetMaker.h.

◆ m_RollOffBufferSize

unsigned int Gep::WTAConeJetMaker::m_RollOffBufferSize {}
private

Definition at line 68 of file WTAConeJetMaker.h.

68{}; // Only for TwoPass

◆ m_SeedCleaningAlgo

unsigned int Gep::WTAConeJetMaker::m_SeedCleaningAlgo {}
private

Definition at line 67 of file WTAConeJetMaker.h.

67{};

The documentation for this class was generated from the following files: