ATLAS Offline Software
CBNT_Timing.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 TBREC_CBNT_TIMING_H
6 #define TBREC_CBNT_TIMING_H
7 
8 #include "GaudiKernel/ToolHandle.h"
9 #include "CBNT_TBRecBase.h"
10 #include "CaloGeoHelpers/CaloSampling.h"
15 
16 class LArOnlineID;
17 
18 #include <fstream>
19 #include <string>
20 
21 
23 {
24  public:
25  CBNT_Timing(const std::string & name, ISvcLocator * pSvcLocator);
26 
27  virtual ~CBNT_Timing();
28 
29  //standard algorithm methods
30  virtual StatusCode CBNT_initialize() override;
31  virtual StatusCode CBNT_execute() override;
32  virtual StatusCode CBNT_finalize() override;
33  virtual StatusCode CBNT_clear() override;
34 
35  private:
36  static const int NOTIME = -999;
37  static const int NOENERGY = -999;
38 
39  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
41 
42  double m_energy_cut;
44 
45  std::string m_tbphase;
46  std::vector<std::string> m_sampling_names;
47  std::string m_caloCellName;
48 
50  // const CaloCell_ID* m_caloCellHelper;
51  std::vector<CaloSampling::CaloSample> m_samplingIndices;
52  std::map< CaloCell_ID::SUBCALO, std::vector<CaloSampling::CaloSample> > m_calosAndSamplings;
53  std::vector<HWIdentifier> m_febIDs;
54 
57  std::map<int, std::string> m_slotToFebNameLookup;
58  std::map<CaloCell_ID::SUBCALO, std::string> m_caloToNameLookup;
59  std::map<std::string, CaloCell_ID::SUBCALO> m_caloFromNameLookup;
60  std::map<CaloSampling::CaloSample, std::string> m_samplingToNameLookup;
61  std::map<std::string, CaloSampling::CaloSample> m_samplingFromNameLookup;
62  std::map<CaloSampling::CaloSample, CaloCell_ID::SUBCALO> m_caloLookup;
63 
64 
65  // per cell:
66  std::vector<long> *m_layer_cell, *m_eta_cell, *m_phi_cell, *m_febId_cell;
67  std::vector<float> *m_energy_cell, *m_time_cell;
68  // per layer:
69  std::vector<float> *m_time_layer;
70  std::vector<long> *m_layer_layer;
71 
72  // per feb
73  std::vector<long> *m_febId_feb;
74  std::vector<float> *m_time_feb;
75  std::vector<long> *m_slot_feb;
76  std::vector<long> *m_feedthrough_feb;
77 
78  // per event:
79  float m_energy, m_time, m_tdc_phase; // time = calculated cell time (cubic), clock = phase (TBRec)
80 };
81 
82 #endif
CBNT_Timing::CBNT_Timing
CBNT_Timing(const std::string &name, ISvcLocator *pSvcLocator)
Definition: CBNT_Timing.cxx:26
CBNT_Timing::m_slotToFebNameLookup
std::map< int, std::string > m_slotToFebNameLookup
Definition: CBNT_Timing.h:57
CBNT_Timing::setupLookupTables
StatusCode setupLookupTables()
internal helpers
Definition: CBNT_Timing.cxx:356
CBNT_Timing::m_feedthrough_feb
std::vector< long > * m_feedthrough_feb
Definition: CBNT_Timing.h:76
LArEM_ID.h
CBNT_Timing::m_first_event
bool m_first_event
Definition: CBNT_Timing.h:43
CBNT_TBRecBase.h
CBNT_Timing::m_eta_cell
std::vector< long > * m_eta_cell
Definition: CBNT_Timing.h:66
CBNT_Timing::m_slot_feb
std::vector< long > * m_slot_feb
Definition: CBNT_Timing.h:75
CBNT_Timing
Definition: CBNT_Timing.h:23
CaloCell_ID.h
CBNT_Timing::NOTIME
static const int NOTIME
Definition: CBNT_Timing.h:36
CBNT_Timing::m_sampling_names
std::vector< std::string > m_sampling_names
Definition: CBNT_Timing.h:46
CBNT_Timing::m_energy
float m_energy
Definition: CBNT_Timing.h:79
CBNT_Timing::m_tdc_phase
float m_tdc_phase
Definition: CBNT_Timing.h:79
CBNT_Timing::m_layer_cell
std::vector< long > * m_layer_cell
Definition: CBNT_Timing.h:66
CBNT_Timing::m_energy_cell
std::vector< float > * m_energy_cell
Definition: CBNT_Timing.h:67
LArOnOffIdMapping.h
CBNT_TBRecBase
Definition: CBNT_TBRecBase.h:21
CBNT_Timing::m_febId_cell
std::vector< long > * m_febId_cell
Definition: CBNT_Timing.h:66
CBNT_Timing::~CBNT_Timing
virtual ~CBNT_Timing()
Definition: CBNT_Timing.cxx:58
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CBNT_Timing::m_samplingToNameLookup
std::map< CaloSampling::CaloSample, std::string > m_samplingToNameLookup
Definition: CBNT_Timing.h:60
CBNT_Timing::m_febIDs
std::vector< HWIdentifier > m_febIDs
Definition: CBNT_Timing.h:53
CBNT_Timing::m_febId_feb
std::vector< long > * m_febId_feb
Definition: CBNT_Timing.h:73
CBNT_Timing::m_caloToNameLookup
std::map< CaloCell_ID::SUBCALO, std::string > m_caloToNameLookup
Definition: CBNT_Timing.h:58
CBNT_Timing::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: CBNT_Timing.h:40
HWIdentifier.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
CBNT_Timing::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: CBNT_Timing.h:39
CBNT_Timing::NOENERGY
static const int NOENERGY
Definition: CBNT_Timing.h:37
CBNT_Timing::CBNT_finalize
virtual StatusCode CBNT_finalize() override
Definition: CBNT_Timing.cxx:349
LArOnlineID
Definition: LArOnlineID.h:20
CBNT_Timing::CBNT_initialize
virtual StatusCode CBNT_initialize() override
Definition: CBNT_Timing.cxx:62
CBNT_Timing::m_time_layer
std::vector< float > * m_time_layer
Definition: CBNT_Timing.h:69
CBNT_Timing::m_layer_layer
std::vector< long > * m_layer_layer
Definition: CBNT_Timing.h:70
SG::ReadCondHandleKey< LArOnOffIdMapping >
CBNT_Timing::m_caloCellName
std::string m_caloCellName
Definition: CBNT_Timing.h:47
CBNT_Timing::CBNT_execute
virtual StatusCode CBNT_execute() override
Definition: CBNT_Timing.cxx:134
CBNT_Timing::m_samplingFromNameLookup
std::map< std::string, CaloSampling::CaloSample > m_samplingFromNameLookup
Definition: CBNT_Timing.h:61
CBNT_Timing::m_energy_cut
double m_energy_cut
Definition: CBNT_Timing.h:42
CBNT_Timing::m_time_feb
std::vector< float > * m_time_feb
Definition: CBNT_Timing.h:74
CBNT_Timing::m_phi_cell
std::vector< long > * m_phi_cell
Definition: CBNT_Timing.h:66
CBNT_Timing::m_time_cell
std::vector< float > * m_time_cell
Definition: CBNT_Timing.h:67
CBNT_Timing::m_samplingIndices
std::vector< CaloSampling::CaloSample > m_samplingIndices
stores
Definition: CBNT_Timing.h:51
CBNT_Timing::m_caloFromNameLookup
std::map< std::string, CaloCell_ID::SUBCALO > m_caloFromNameLookup
Definition: CBNT_Timing.h:59
CBNT_Timing::m_calosAndSamplings
std::map< CaloCell_ID::SUBCALO, std::vector< CaloSampling::CaloSample > > m_calosAndSamplings
Definition: CBNT_Timing.h:52
CBNT_Timing::CBNT_clear
virtual StatusCode CBNT_clear() override
Definition: CBNT_Timing.cxx:467
CBNT_Timing::m_tbphase
std::string m_tbphase
Definition: CBNT_Timing.h:45
CBNT_Timing::m_time
float m_time
Definition: CBNT_Timing.h:79
CBNT_Timing::m_caloLookup
std::map< CaloSampling::CaloSample, CaloCell_ID::SUBCALO > m_caloLookup
Definition: CBNT_Timing.h:62