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 28 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 32 of file WTAConeJetMaker.h.

32 :
34 // m_WTAParallelHelper(block_n),
35 m_BlockN(block_n), m_SeedCleaningAlgo(0), m_RollOffBufferSize(rolloff_buffersize)
36 {};
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 42 of file WTAConeJetMaker.h.

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

◆ GetRollOffBufferSize()

int Gep::WTAConeJetMaker::GetRollOffBufferSize ( )
inline

Definition at line 58 of file WTAConeJetMaker.h.

58{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 8 of file WTAConeJetMaker.cxx.

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

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

◆ SetRollOffBufferSize()

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

Definition at line 57 of file WTAConeJetMaker.h.

57{m_RollOffBufferSize = rolloff_buffersize;}

◆ SetSeedCleaningAlgo()

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

Definition at line 56 of file WTAConeJetMaker.h.

56{m_SeedCleaningAlgo = algo;};

◆ toString()

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

Implements Gep::IJetMaker.

Definition at line 39 of file WTAConeJetMaker.h.

39{ return "WTAConeJet"; }

Member Data Documentation

◆ m_BlockN

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

Definition at line 64 of file WTAConeJetMaker.h.

64{};

◆ m_GEPWTAParameters

WTAParameters Gep::WTAConeJetMaker::m_GEPWTAParameters

Definition at line 60 of file WTAConeJetMaker.h.

◆ m_RollOffBufferSize

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

Definition at line 66 of file WTAConeJetMaker.h.

66{}; // Only for TwoPass

◆ m_SeedCleaningAlgo

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

Definition at line 65 of file WTAConeJetMaker.h.

65{};

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