ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
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  {};

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  }

◆ 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());
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(thisjet);
58  }
59 
60  return GepJetList;
61  }

◆ 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.

◆ 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.

◆ m_SeedCleaningAlgo

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

Definition at line 65 of file WTAConeJetMaker.h.


The documentation for this class was generated from the following files:
Gep::Jet::seedEta
float seedEta
Definition: Trigger/TrigT1/TrigGepPerf/src/Jet.h:18
TwoPass
@ TwoPass
Definition: WTAConeJetMaker.h:22
WTAConeMaker::MergeConstsToSeeds
virtual void MergeConstsToSeeds()
Definition: WTAConeMaker.h:282
WTAConeParallelHelper::GetAllJets
std::vector< WTAJet > GetAllJets()
Definition: WTAConeParallelHelper.h:174
Gep::WTAConeJetMaker::m_BlockN
unsigned int m_BlockN
Definition: WTAConeJetMaker.h:64
Gep::Jet::seedPhi
float seedPhi
Definition: Trigger/TrigT1/TrigGepPerf/src/Jet.h:19
WTAConeParallelHelper
Definition: WTAConeParallelHelper.h:36
WTATrigObj::phi
IntOrFloat phi() const
Definition: WTAObject.h:42
Gep::Jet::nConstituents
int nConstituents
Definition: Trigger/TrigT1/TrigGepPerf/src/Jet.h:16
WTACone2PassMaker
Definition: WTACone2PassMaker.h:9
Gep::Jet::constituentsIndices
std::vector< int > constituentsIndices
Definition: Trigger/TrigT1/TrigGepPerf/src/Jet.h:15
Gep::Jet::vec
TLorentzVector vec
Definition: Trigger/TrigT1/TrigGepPerf/src/Jet.h:14
WTAJet::GetConstituentCount
unsigned int GetConstituentCount() const
Definition: WTAObject.h:123
WTAConeMaker::m_WTAConeMakerParameter
WTAParameters m_WTAConeMakerParameter
Definition: WTAConeMaker.h:87
WTATrigObj::pt
IntOrFloat pt() const
Definition: WTAObject.h:38
WTATrigObj::m
IntOrFloat m() const
Definition: WTAObject.h:44
WTAConeMaker::GetSeedList
const std::vector< WTAJet > & GetSeedList() const
Definition: WTAConeMaker.h:72
Gep::Jet::seedEt
float seedEt
Definition: Trigger/TrigT1/TrigGepPerf/src/Jet.h:20
WTAConeMaker::SeedCleaning
virtual void SeedCleaning()
Definition: WTAConeMaker.h:231
lumiFormat.i
int i
Definition: lumiFormat.py:85
Gep::WTAConeJetMaker::m_SeedCleaningAlgo
unsigned int m_SeedCleaningAlgo
Definition: WTAConeJetMaker.h:65
Baseline
@ Baseline
Definition: WTAConeJetMaker.h:21
WTAConeMakerEnum
WTAConeMakerEnum
Definition: WTAConeJetMaker.h:20
Gep::Jet
Definition: Trigger/TrigT1/TrigGepPerf/src/Jet.h:12
WTATrigObj
Definition: WTAObject.h:33
WTAJet
Definition: WTAObject.h:107
WTAJet::GetConstituentList
const std::vector< WTATrigObj > & GetConstituentList() const
Definition: WTAObject.h:122
WTAConeParallelHelper::CheckJetInCore
void CheckJetInCore()
Definition: WTAConeParallelHelper.h:145
Gep::WTAConeJetMaker::m_GEPWTAParameters
WTAParameters m_GEPWTAParameters
Definition: WTAConeJetMaker.h:60
Gep::WTAConeJetMaker::m_RollOffBufferSize
unsigned int m_RollOffBufferSize
Definition: WTAConeJetMaker.h:66
WTAConeParallelHelper::CreateBlocks
void CreateBlocks(const std::vector< WTATrigObj > &all_towers)
Definition: WTAConeParallelHelper.h:104
WTATrigObj::eta
IntOrFloat eta() const
Definition: WTAObject.h:40
WTAConeParallelHelper::RunParallelWTA
void RunParallelWTA(std::unique_ptr< WTAClassType > &AnyWTAClass)
Definition: WTAConeParallelHelper.h:134
WTAConeParallelHelper::SetBlockN
void SetBlockN(unsigned int block_n)
Definition: WTAConeParallelHelper.h:62
xAOD::JetInput::TopoTower
@ TopoTower
Definition: JetContainerInfo.h:57
Gep::WTAConeJetMaker::CreateWTAConeMaker
std::unique_ptr< WTAConeMaker > CreateWTAConeMaker(enum WTAConeMakerEnum seed_cleaning_algo) const
Definition: WTAConeJetMaker.h:42
WTAConeMaker::InitiateInputs
void InitiateInputs(const std::vector< IntOrFloat > &ptVec, const std::vector< IntOrFloat > &etaVec, const std::vector< IntOrFloat > &phiVec, const std::vector< IntOrFloat > &mVec)
Definition: WTAConeMaker.h:136
WTAJet::GetSeed
const WTATrigObj & GetSeed() const
Definition: WTAObject.h:117