ATLAS Offline Software
SCEmulation.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGT1CALOFEXPERF_SCEMULATION_H
6 #define TRIGT1CALOFEXPERF_SCEMULATION_H
7 
14 #include "GaudiKernel/ToolHandle.h"
18 #include "CaloGeoHelpers/CaloSampling.h"
21 
22 #include <map>
23 #include <tuple>
24 #include <TH1F.h>
25 
26 namespace LVL1
27 {
29  {
30  public:
31  SCEmulation(const std::string &name, ISvcLocator *pSvcLocator);
32  virtual ~SCEmulation() override;
33 
34  virtual StatusCode initialize() override;
35  virtual StatusCode execute(const EventContext &ctx) const override;
36 
37  private:
41  this, "CaloBCIDAverage", "CaloBCIDAverage"};
43  this, "CaloNoiseSigmaDiff", "CaloNoiseSigmaDiff"};
46  this,"CaloSuperCellDetDescrManager","CaloSuperCellDetDescrManager","SG key of the resulting CaloSuperCellDetDescrManager"};
48 
50  ToolHandle<ICaloSuperCellIDTool> m_scidTool{"CaloSuperCellIDTool"};
52  bool m_useNoise;
54  bool m_useBCID;
56  std::string m_cellTimingFile;
57 
58  // Internals
60  std::map<CaloSampling::CaloSample, std::vector<float>> m_etaBins;
62  std::map<CaloSampling::CaloSample, std::vector<float>> m_etBins;
64  // Map keys are sampling, eta bin, phi bin
65  std::map<std::tuple<CaloSampling::CaloSample, std::size_t, std::size_t>, std::map<float, float>> m_timingSamples;
66 
68  const CaloIdManager *m_caloIdMgr{nullptr};
69 
70  std::size_t getEtaIndex(CaloSampling::CaloSample sample, float eta) const;
71  std::size_t getEtIndex(CaloSampling::CaloSample sample, float et) const;
72 
73  }; //> end class SCEmulation
74 } // namespace LVL1
75 
76 #endif //> !TRIGT1CALOFEXPERF_SCEMULATION_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
et
Extra patterns decribing particle interation process.
LVL1::SCEmulation::m_etBins
std::map< CaloSampling::CaloSample, std::vector< float > > m_etBins
Et binning read from timing file.
Definition: SCEmulation.h:62
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
LVL1::SCEmulation::m_scidTool
ToolHandle< ICaloSuperCellIDTool > m_scidTool
Offline<->supercell mapping tool.
Definition: SCEmulation.h:50
LVL1::SCEmulation::m_timingSamples
std::map< std::tuple< CaloSampling::CaloSample, std::size_t, std::size_t >, std::map< float, float > > m_timingSamples
Timing distributions.
Definition: SCEmulation.h:65
SG::ReadHandleKey< CaloCellContainer >
LVL1::SCEmulation::m_caloNoiseSigmaDiffKey
SG::ReadCondHandleKey< CaloNoiseSigmaDiff > m_caloNoiseSigmaDiffKey
Definition: SCEmulation.h:42
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::SCEmulation::getEtIndex
std::size_t getEtIndex(CaloSampling::CaloSample sample, float et) const
Definition: SCEmulation.cxx:417
LVL1::SCEmulation::getEtaIndex
std::size_t getEtaIndex(CaloSampling::CaloSample sample, float eta) const
Definition: SCEmulation.cxx:412
ICaloSuperCellIDTool.h
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
LVL1::SCEmulation::m_cellTimingFile
std::string m_cellTimingFile
The cell timing file.
Definition: SCEmulation.h:56
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
LVL1::SCEmulation::initialize
virtual StatusCode initialize() override
Definition: SCEmulation.cxx:88
SG::WriteHandleKey< CaloCellContainer >
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:100
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1::SCEmulation::m_useNoise
bool m_useNoise
Use noise values.
Definition: SCEmulation.h:52
CaloNoiseSigmaDiff.h
TrigConf::name
Definition: HLTChainList.h:35
ReadCondHandleKey.h
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
LVL1::SCEmulation::m_outputSuperCellsKey
SG::WriteHandleKey< CaloCellContainer > m_outputSuperCellsKey
Definition: SCEmulation.h:47
LVL1::SCEmulation
Definition: SCEmulation.h:29
LVL1::SCEmulation::~SCEmulation
virtual ~SCEmulation() override
Definition: SCEmulation.cxx:86
LVL1::SCEmulation::m_caloBCIDAverageKey
SG::ReadHandleKey< CaloBCIDAverage > m_caloBCIDAverageKey
Definition: SCEmulation.h:40
CaloCellContainer.h
LVL1::SCEmulation::m_etaBins
std::map< CaloSampling::CaloSample, std::vector< float > > m_etaBins
eta binning read from timing file
Definition: SCEmulation.h:60
LVL1::SCEmulation::m_inputCellsKey
SG::ReadHandleKey< CaloCellContainer > m_inputCellsKey
Definition: SCEmulation.h:38
EventInfo.h
CaloBCIDAverage.h
SG::ReadCondHandleKey< CaloNoiseSigmaDiff >
LVL1::SCEmulation::SCEmulation
SCEmulation(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCEmulation.cxx:74
LVL1::SCEmulation::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: SCEmulation.cxx:207
LVL1::SCEmulation::m_evtInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_evtInfoKey
Definition: SCEmulation.h:39
CaloIdManager.h
LVL1::SCEmulation::m_useBCID
bool m_useBCID
Compensate for BCIDs.
Definition: SCEmulation.h:54
LVL1::SCEmulation::m_caloIdMgr
const CaloIdManager * m_caloIdMgr
Calo ID helpers.
Definition: SCEmulation.h:68
LVL1::SCEmulation::m_caloSuperCellMgrKey
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSuperCellMgrKey
Super cell manager key.
Definition: SCEmulation.h:45