CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
l1t::Stage1Layer2MainProcessorFirmwareImp1 Class Reference

#include <Stage1Layer2MainProcessorFirmware.h>

Inheritance diagram for l1t::Stage1Layer2MainProcessorFirmwareImp1:
l1t::Stage1Layer2MainProcessor

Public Member Functions

void processEvent (const std::vector< CaloEmCand > &, const std::vector< CaloRegion > &, std::vector< EGamma > *egammas, std::vector< Tau > *taus, std::vector< Tau > *isoTaus, std::vector< Jet > *jets, std::vector< Jet > *preGtJets, std::vector< EtSum > *etsums, CaloSpare *hfSums, CaloSpare *hfCounts) override
 
 Stage1Layer2MainProcessorFirmwareImp1 (const int fwv, CaloParamsHelper const *dbPars)
 
 ~Stage1Layer2MainProcessorFirmwareImp1 () override=default
 
- Public Member Functions inherited from l1t::Stage1Layer2MainProcessor
virtual ~Stage1Layer2MainProcessor ()
 

Private Attributes

std::unique_ptr< Stage1Layer2EGammaAlgorithmm_egAlgo
 
int m_fwv
 
std::unique_ptr< Stage1Layer2HFBitCountAlgorithmm_hfBitAlgo
 
std::unique_ptr< Stage1Layer2HFRingSumAlgorithmm_hfRingAlgo
 
std::unique_ptr< Stage1Layer2JetAlgorithmm_jetAlgo
 
std::unique_ptr< Stage1Layer2EtSumAlgorithmm_sumAlgo
 
std::unique_ptr< Stage1Layer2TauAlgorithmm_tauAlgo
 

Detailed Description

Author
: R. Alex Barbieri MIT

Definition at line 31 of file Stage1Layer2MainProcessorFirmware.h.

Constructor & Destructor Documentation

Stage1Layer2MainProcessorFirmwareImp1::Stage1Layer2MainProcessorFirmwareImp1 ( const int  fwv,
CaloParamsHelper const *  dbPars 
)

Definition at line 21 of file Stage1Layer2MainProcessorFirmwareImp1.cc.

References m_egAlgo, m_fwv, m_hfBitAlgo, m_hfRingAlgo, m_jetAlgo, m_sumAlgo, and m_tauAlgo.

21  : m_fwv(fwv){
22  if (m_fwv == 1)
23  { //HI algo
24  m_egAlgo = std::make_unique<Stage1Layer2EGammaAlgorithmImpHI>(dbPars);
25  m_sumAlgo = std::make_unique<Stage1Layer2EtSumAlgorithmImpHI>(dbPars);
26  m_jetAlgo = std::make_unique<Stage1Layer2JetAlgorithmImpHI>(dbPars); //fwv =1 => HI algo
27  m_tauAlgo = std::make_unique<Stage1Layer2SingleTrackHI>(dbPars); //fwv=1 => single track seed
28  m_hfRingAlgo = std::make_unique<Stage1Layer2CentralityAlgorithm>(dbPars);
29  m_hfBitAlgo = std::make_unique<Stage1Layer2HFMinimumBias>(dbPars);
30  // m_hfRingAlgo = std::make_unique<Stage1Layer2FlowAlgorithm>(dbPars);
31  // m_hfBitAlgo = std::make_unique<Stage1Layer2CentralityAlgorithm>(dbPars);
32  }
33  else if( m_fwv == 2 )
34  { //PP algorithm
35  m_egAlgo = std::make_unique<Stage1Layer2EGammaAlgorithmImpPP>(dbPars);
36  m_sumAlgo = std::make_unique<Stage1Layer2EtSumAlgorithmImpPP>(dbPars);
37  m_jetAlgo = std::make_unique<Stage1Layer2JetAlgorithmImpPP>(dbPars); //fwv =2 => PP algo
38  m_tauAlgo = std::make_unique<Stage1Layer2TauAlgorithmImpPP>(dbPars);
39  m_hfRingAlgo = std::make_unique<Stage1Layer2DiTauAlgorithm>(dbPars);
40  m_hfBitAlgo = nullptr;
41  }
42  else if ( m_fwv == 3 )
43  { // hw testing algorithms
44  m_jetAlgo = std::make_unique<Stage1Layer2JetAlgorithmImpSimpleHW>(dbPars);
45  m_egAlgo = std::make_unique<Stage1Layer2EGammaAlgorithmImpHW>(dbPars);
46  m_sumAlgo = std::make_unique<Stage1Layer2EtSumAlgorithmImpHW>(dbPars);
47  m_tauAlgo = std::make_unique<Stage1Layer2TauAlgorithmImpHW>(dbPars);
48  m_hfRingAlgo = std::make_unique<Stage1Layer2DiTauAlgorithm>(dbPars);
49  m_hfBitAlgo = std::make_unique<Stage1Layer2HFMinimumBias>(dbPars);
50  }
51  else{ // undefined fwv version
52  edm::LogError("FWVersionError")
53  << "Undefined firmware version passed to Stage1Layer2MainProcessorFirmwareImp1" << std::endl;
54  return;
55  }
56 }
std::unique_ptr< Stage1Layer2EtSumAlgorithm > m_sumAlgo
std::unique_ptr< Stage1Layer2HFBitCountAlgorithm > m_hfBitAlgo
std::unique_ptr< Stage1Layer2HFRingSumAlgorithm > m_hfRingAlgo
std::unique_ptr< Stage1Layer2TauAlgorithm > m_tauAlgo
std::unique_ptr< Stage1Layer2EGammaAlgorithm > m_egAlgo
std::unique_ptr< Stage1Layer2JetAlgorithm > m_jetAlgo
l1t::Stage1Layer2MainProcessorFirmwareImp1::~Stage1Layer2MainProcessorFirmwareImp1 ( )
overridedefault

Member Function Documentation

void Stage1Layer2MainProcessorFirmwareImp1::processEvent ( const std::vector< CaloEmCand > &  emcands,
const std::vector< CaloRegion > &  regions,
std::vector< EGamma > *  egammas,
std::vector< Tau > *  taus,
std::vector< Tau > *  isoTaus,
std::vector< Jet > *  jets,
std::vector< Jet > *  preGtJets,
std::vector< EtSum > *  etsums,
CaloSpare hfSums,
CaloSpare hfCounts 
)
overridevirtual

Implements l1t::Stage1Layer2MainProcessor.

Definition at line 58 of file Stage1Layer2MainProcessorFirmwareImp1.cc.

References m_egAlgo, m_hfBitAlgo, m_hfRingAlgo, m_jetAlgo, m_sumAlgo, and m_tauAlgo.

67  {
68  if(m_jetAlgo)
69  m_jetAlgo->processEvent(regions, emcands, jets, preGtJets); // need to run jets before MHT
70  if(m_egAlgo)
71  m_egAlgo->processEvent(emcands, regions, jets, egammas);
72  if(m_tauAlgo)
73  m_tauAlgo->processEvent(emcands, regions, isoTaus, taus);
74  if(m_sumAlgo)
75  m_sumAlgo->processEvent(regions, emcands, jets, etsums); //MHT uses jets for phi calculation
76  if(m_hfRingAlgo)
77  m_hfRingAlgo->processEvent(regions, emcands, isoTaus, HFringsums);
78  if(m_hfBitAlgo)
79  m_hfBitAlgo->processEvent(regions, emcands, HFbitcounts);
80 
81 }
std::unique_ptr< Stage1Layer2EtSumAlgorithm > m_sumAlgo
std::unique_ptr< Stage1Layer2HFBitCountAlgorithm > m_hfBitAlgo
std::unique_ptr< Stage1Layer2HFRingSumAlgorithm > m_hfRingAlgo
vector< PseudoJet > jets
std::unique_ptr< Stage1Layer2TauAlgorithm > m_tauAlgo
std::unique_ptr< Stage1Layer2EGammaAlgorithm > m_egAlgo
std::unique_ptr< Stage1Layer2JetAlgorithm > m_jetAlgo

Member Data Documentation

std::unique_ptr<Stage1Layer2EGammaAlgorithm> l1t::Stage1Layer2MainProcessorFirmwareImp1::m_egAlgo
private
int l1t::Stage1Layer2MainProcessorFirmwareImp1::m_fwv
private
std::unique_ptr<Stage1Layer2HFBitCountAlgorithm> l1t::Stage1Layer2MainProcessorFirmwareImp1::m_hfBitAlgo
private
std::unique_ptr<Stage1Layer2HFRingSumAlgorithm> l1t::Stage1Layer2MainProcessorFirmwareImp1::m_hfRingAlgo
private
std::unique_ptr<Stage1Layer2JetAlgorithm> l1t::Stage1Layer2MainProcessorFirmwareImp1::m_jetAlgo
private
std::unique_ptr<Stage1Layer2EtSumAlgorithm> l1t::Stage1Layer2MainProcessorFirmwareImp1::m_sumAlgo
private
std::unique_ptr<Stage1Layer2TauAlgorithm> l1t::Stage1Layer2MainProcessorFirmwareImp1::m_tauAlgo
private