ATLAS Offline Software
ALFA_CLinkAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ALFA_CLINKALG_H
6 #define ALFA_CLINKALG_H
7 
12 
22 
23 #define EVCOLLNAME_XAODALFADATACONTAINER "ALFADataContainer"
24 #define EVCOLLNAME_XAODALFADATAAUXCONTAINER "ALFADataContainerAux."
25 
26 #define RPOTSCNT 8
27 #define MDLAYERSCNT 2
28 #define MDPLATESCNT 10
29 #define MDFIBERSCNT 64
30 #define ODLAYERSCNT 2
31 #define ODPLATESCNT 3
32 #define ODFIBERSCNT 15
33 
34 #define TRIGPATCNT 16
35 #define BLMCNT 6
36 #define HVCHANNELCNT 216
37 #define RADMONCNT 4
38 #define FECNFTHRESHLOLDCNT 3
39 #define FECNFGAINCNT 5
40 #define TRIGSETCNT 6
41 #define TRIGSETLATENCYCNT 3
42 
43 #define MAXNUMTRACKS 100
44 #define MAXNUMGLOBTRACKS 100
45 #define MAXNUMGENPARTICLES 100
46 #define MAXPILEUP 500
47 
48 #include <string>
49 
51 
53 {
54 public:
55  ALFA_CLinkAlg (const std::string& name, ISvcLocator* pSvcLocator);
56  virtual ~ALFA_CLinkAlg();
57 
58 private:
59  int m_nDataType; //data type (simulation or real data) using in the local reconstruction
60  int m_nProcessingMode; //1=offline, 2=online
61 
62 public:
63  virtual StatusCode initialize() override;
64  virtual StatusCode execute() override;
65  virtual StatusCode finalize() override;
66 
67 public:
68  StatusCode LoadAllEventData(const EventContext& ctx, ALFA_CLinkEvent& dataEvent) const;
69 private:
70  unsigned long long CalcDCSId (const EventContext& ctx,
72  StatusCode CalcAllDCSIds (const EventContext& ctx,
73  DCSID& pDCSIds) const;
74 
75 private:
76  StatusCode GenerateXAOD(const EventContext& ctx);
77  StatusCode FillXAOD_TrackingData(const EventContext& ctx, xAOD::ALFADataContainer& xAODContainer);
78  StatusCode FillXAOD_HeaderData(const EventContext& ctx, xAOD::ALFADataContainer& xAODContainer);
79  void ClearXAODTrackingData(const int nMaxTrackCnt, eRecType eType);
80  void ClearXAODHeaderData();
81 
82 private:
83  //xAOD variables: LocRecEvCollection & LocRecODEvCollection
85  std::vector<float> m_vecXDetCS;
86  std::vector<float> m_vecYDetCS;
87  std::vector<int> m_vecDetectorPartID;
88  std::vector<float> m_vecOverU;
89  std::vector<float> m_vecOverV;
90  std::vector<float> m_vecOverY;
91  std::vector<int> m_vecNumU;
92  std::vector<int> m_vecNumV;
93  std::vector<int> m_vecNumY;
94  std::vector<int> m_vecMDFibSel;
95  std::vector<int> m_vecODFibSel;
96 
97  //xAOD variables: LocRecCorrEvCollection & LocRecCorrODEvCollection
98  std::vector<float> m_vecXLhcCS;
99  std::vector<float> m_vecYLhcCS;
100  std::vector<float> m_vecZLhcCS;
101  std::vector<float> m_vecXRPotCS;
102  std::vector<float> m_vecYRPotCS;
103  std::vector<float> m_vecXStatCS;
104  std::vector<float> m_vecYStatCS;
105  std::vector<float> m_vecXBeamCS;
106  std::vector<float> m_vecYBeamCS;
107 
108  //RawDataContainer
109  std::vector<int> m_vecScaler;
110  //int m_nBCId;
111  //int m_nTimeStamp;
112  //int m_nTimeStamp_ns;
113  std::vector<int> m_vecTrigPat;
114 
115  //DigitCollection
116  std::vector<int> m_vecMDFiberHits;
117  std::vector<int> m_vecMDMultiplicity;
118 
119  //ODDigitCollection
120  std::vector<int> m_vecODFiberHitsPos;
121  std::vector<int> m_vecODFiberHitsNeg;
122  std::vector<int> m_vecODMultiplicityPos;
123  std::vector<int> m_vecODMultiplicityNeg;
124 
126  { this, "BLMKey", DCSCOLLNAME_BLM, "BLM conditions key" };
128  { this, "HVChannelKey", DCSCOLLNAME_HVCHANNEL, "HV channel conditions key" };
130  { this, "LocalMonitoringKey", DCSCOLLNAME_LOCALMONITORING, "Local monitoring conditions key" };
132  { this, "MovementKey", DCSCOLLNAME_LOCALMONITORING, "Movement conditions key" };
134  { this, "RadmonKey", DCSCOLLNAME_RADMON, "Radmon conditions key" };
136  { this, "TriggerRatesKey", DCSCOLLNAME_TRIGGERRATES, "Trigger rates conditions key" };
138  { this, "FEConfigurationKey", DCSCOLLNAME_FECONFIGURATION, "FE configuration conditions key" };
140  { this, "TriggerSettingsKey", DCSCOLLNAME_TRIGGERSETTINGS, "Trigger settings conditions key" };
141 
143  { this, "RawDataContKey", EVCOLLNAME_RAWDATA, "SG key for raw data container" };
145  { this, "DigitCollKey", EVCOLLNAME_DIGIT, "SG key for digit collection" };
147  { this, "ODDigitCollKey", EVCOLLNAME_ODDIGIT, "SG key for OD digit collection" };
149  { this, "LocRecEvCollectionKey", EVCOLLNAME_LOCREC, "SG key for LocRecEv collection" };
151  { this, "LocRecEvODCollectionKey", EVCOLLNAME_LOCRECOD, "SG key for LocRecEvOD collection" };
153  { this, "LocRecCorrEvCollectionKey", EVCOLLNAME_LOCRECCORR, "SG key for LocRecCorrEv collection" };
155  { this, "LocRecCorrODEvCollectionKey", EVCOLLNAME_LOCRECCORROD, "SG key for LocRecCorrODEv collection" };
156 
158  { this, "CLinkEventKey", "ALFA_CLinkEvent", "SG key for output CLinkEvent" };
160  { this, "xAODDataKey", EVCOLLNAME_XAODALFADATACONTAINER, "SG key for output xAOD::ALFADataContainer" };
161 };
162 
163 #endif // ALFA_CLINKALG_H
ALFA_CLinkAlg::m_localMonitoringKey
SG::ReadCondHandleKey< CondAttrListCollection > m_localMonitoringKey
Definition: ALFA_CLinkAlg.h:130
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
eRecType
eRecType
Definition: ALFA_CLinkAlg.h:50
ALFA_CLinkAlg::execute
virtual StatusCode execute() override
Definition: ALFA_CLinkAlg.cxx:61
ALFA_ODDigitCollection.h
ALFA_CLinkAlg::m_vecOverV
std::vector< float > m_vecOverV
Definition: ALFA_CLinkAlg.h:89
ALFA_CLinkAlg::m_xaodDataKey
SG::WriteHandleKey< xAOD::ALFADataContainer > m_xaodDataKey
Definition: ALFA_CLinkAlg.h:160
ALFA_CLinkAlg::m_vecYBeamCS
std::vector< float > m_vecYBeamCS
Definition: ALFA_CLinkAlg.h:106
ALFA_CLinkAlg::m_vecXStatCS
std::vector< float > m_vecXStatCS
Definition: ALFA_CLinkAlg.h:103
DCSCOLLNAME_LOCALMONITORING
#define DCSCOLLNAME_LOCALMONITORING
Definition: ALFA_CLinkEvent.h:35
ALFA_RawDataContainer.h
ALFA_CLinkAlg::m_vecXRPotCS
std::vector< float > m_vecXRPotCS
Definition: ALFA_CLinkAlg.h:101
ALFA_CLinkAlg::m_vecZLhcCS
std::vector< float > m_vecZLhcCS
Definition: ALFA_CLinkAlg.h:100
ALFA_CLinkAlg::CalcAllDCSIds
StatusCode CalcAllDCSIds(const EventContext &ctx, DCSID &pDCSIds) const
Definition: ALFA_CLinkAlg.cxx:184
ALFA_CLinkAlg::m_nDataType
int m_nDataType
Definition: ALFA_CLinkAlg.h:59
DCSCOLLNAME_TRIGGERSETTINGS
#define DCSCOLLNAME_TRIGGERSETTINGS
Definition: ALFA_CLinkEvent.h:40
EVCOLLNAME_LOCRECCORR
#define EVCOLLNAME_LOCRECCORR
Definition: ALFA_CLinkEvent.h:29
ALFA_CLinkAlg::m_vecNumU
std::vector< int > m_vecNumU
Definition: ALFA_CLinkAlg.h:91
ALFA_CLinkAlg::m_vecNumV
std::vector< int > m_vecNumV
Definition: ALFA_CLinkAlg.h:92
ALFA_CLinkAlg::m_FEConfigurationKey
SG::ReadCondHandleKey< CondAttrListCollection > m_FEConfigurationKey
Definition: ALFA_CLinkAlg.h:138
EVCOLLNAME_ODDIGIT
#define EVCOLLNAME_ODDIGIT
Definition: ALFA_CLinkEvent.h:26
ALFA_CLinkAlg::m_vecMDMultiplicity
std::vector< int > m_vecMDMultiplicity
Definition: ALFA_CLinkAlg.h:117
SG::ReadHandleKey< ALFA_RawDataContainer >
ALFA_CLinkAlg::m_locRecCorrODEvCollKey
SG::ReadHandleKey< ALFA_LocRecCorrODEvCollection > m_locRecCorrODEvCollKey
Definition: ALFA_CLinkAlg.h:155
ALFA_CLinkAlg::m_vecNumY
std::vector< int > m_vecNumY
Definition: ALFA_CLinkAlg.h:93
ALFA_CLinkAlg::m_ODDigitCollKey
SG::ReadHandleKey< ALFA_ODDigitCollection > m_ODDigitCollKey
Definition: ALFA_CLinkAlg.h:147
ALFA_CLinkAlg::m_locRecODEvCollKey
SG::ReadHandleKey< ALFA_LocRecODEvCollection > m_locRecODEvCollKey
Definition: ALFA_CLinkAlg.h:151
ALFA_CLinkAlg::m_locRecEvCollKey
SG::ReadHandleKey< ALFA_LocRecEvCollection > m_locRecEvCollKey
Definition: ALFA_CLinkAlg.h:149
AthAlgorithm.h
EVCOLLNAME_DIGIT
#define EVCOLLNAME_DIGIT
Definition: ALFA_CLinkEvent.h:25
ALFA_CLinkAlg::m_vecXLhcCS
std::vector< float > m_vecXLhcCS
Definition: ALFA_CLinkAlg.h:98
ALFA_CLinkAlg::FillXAOD_TrackingData
StatusCode FillXAOD_TrackingData(const EventContext &ctx, xAOD::ALFADataContainer &xAODContainer)
Definition: ALFA_CLinkAlg.cxx:216
ALFA_CLinkAlg::m_vecXDetCS
std::vector< float > m_vecXDetCS
Definition: ALFA_CLinkAlg.h:85
DCSCOLLNAME_RADMON
#define DCSCOLLNAME_RADMON
Definition: ALFA_CLinkEvent.h:37
ALFA_CLinkAlg::m_vecOverU
std::vector< float > m_vecOverU
Definition: ALFA_CLinkAlg.h:88
ALFA_CLinkAlg::m_vecScaler
std::vector< int > m_vecScaler
Definition: ALFA_CLinkAlg.h:109
DCSCOLLNAME_FECONFIGURATION
#define DCSCOLLNAME_FECONFIGURATION
Definition: ALFA_CLinkEvent.h:39
ALFA_CLinkAlg::m_vecTrigPat
std::vector< int > m_vecTrigPat
Definition: ALFA_CLinkAlg.h:113
SG::WriteHandleKey< ALFA_CLinkEvent >
ALFA_CLinkAlg::CalcDCSId
unsigned long long CalcDCSId(const EventContext &ctx, const SG::ReadCondHandleKey< CondAttrListCollection > &key) const
Definition: ALFA_CLinkAlg.cxx:157
ALFA_CLinkAlg::initialize
virtual StatusCode initialize() override
Definition: ALFA_CLinkAlg.cxx:34
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ALFA_CLinkAlg::m_vecODMultiplicityPos
std::vector< int > m_vecODMultiplicityPos
Definition: ALFA_CLinkAlg.h:122
ALFA_CLinkAlg::m_vecYStatCS
std::vector< float > m_vecYStatCS
Definition: ALFA_CLinkAlg.h:104
ALFA_CLinkAlg::m_clinkEventKey
SG::WriteHandleKey< ALFA_CLinkEvent > m_clinkEventKey
Definition: ALFA_CLinkAlg.h:158
ERC_LOCUNCORRECTED
@ ERC_LOCUNCORRECTED
Definition: ALFA_CLinkAlg.h:50
ALFA_LocRecCorrEvCollection.h
EVCOLLNAME_RAWDATA
#define EVCOLLNAME_RAWDATA
Definition: ALFA_CLinkEvent.h:24
ALFA_CLinkAlg::m_vecYDetCS
std::vector< float > m_vecYDetCS
Definition: ALFA_CLinkAlg.h:86
ALFA_CLinkEvent.h
DCSCOLLNAME_TRIGGERRATES
#define DCSCOLLNAME_TRIGGERRATES
Definition: ALFA_CLinkEvent.h:38
ERC_GLOBAL
@ ERC_GLOBAL
Definition: ALFA_CLinkAlg.h:50
ALFA_DigitCollection.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ALFA_CLinkAlg::m_rawDataContKey
SG::ReadHandleKey< ALFA_RawDataContainer > m_rawDataContKey
Definition: ALFA_CLinkAlg.h:143
AthAlgorithm
Definition: AthAlgorithm.h:47
ALFA_CLinkAlg::ALFA_CLinkAlg
ALFA_CLinkAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ALFA_CLinkAlg.cxx:17
ALFA_CLinkAlg::m_vecYLhcCS
std::vector< float > m_vecYLhcCS
Definition: ALFA_CLinkAlg.h:99
ReadCondHandleKey.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
ALFA_CLinkAlg::m_vecODFiberHitsPos
std::vector< int > m_vecODFiberHitsPos
Definition: ALFA_CLinkAlg.h:120
EVCOLLNAME_LOCRECOD
#define EVCOLLNAME_LOCRECOD
Definition: ALFA_CLinkEvent.h:28
ALFA_CLinkAlg::m_vecMDFiberHits
std::vector< int > m_vecMDFiberHits
Definition: ALFA_CLinkAlg.h:116
ALFA_CLinkAlg::m_vecODFibSel
std::vector< int > m_vecODFibSel
Definition: ALFA_CLinkAlg.h:95
ALFA_CLinkAlg::LoadAllEventData
StatusCode LoadAllEventData(const EventContext &ctx, ALFA_CLinkEvent &dataEvent) const
Definition: ALFA_CLinkAlg.cxx:89
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ALFA_LocRecEvCollection.h
ALFA_CLinkAlg::m_digitCollKey
SG::ReadHandleKey< ALFA_DigitCollection > m_digitCollKey
Definition: ALFA_CLinkAlg.h:145
ALFA_CLinkAlg::m_triggerSettingsKey
SG::ReadCondHandleKey< CondAttrListCollection > m_triggerSettingsKey
Definition: ALFA_CLinkAlg.h:140
ALFA_CLinkAlg::ClearXAODHeaderData
void ClearXAODHeaderData()
Definition: ALFA_CLinkAlg.cxx:577
DCSCOLLNAME_HVCHANNEL
#define DCSCOLLNAME_HVCHANNEL
Definition: ALFA_CLinkEvent.h:34
ALFA_CLinkAlg::m_BLMKey
SG::ReadCondHandleKey< CondAttrListCollection > m_BLMKey
Definition: ALFA_CLinkAlg.h:126
SG::ReadCondHandleKey< CondAttrListCollection >
ALFA_CLinkEvent
Definition: ALFA_CLinkEvent.h:61
ALFA_CLinkAlg::~ALFA_CLinkAlg
virtual ~ALFA_CLinkAlg()
Definition: ALFA_CLinkAlg.cxx:29
EVCOLLNAME_XAODALFADATACONTAINER
#define EVCOLLNAME_XAODALFADATACONTAINER
Definition: ALFA_CLinkAlg.h:23
ALFA_CLinkAlg::m_locRecCorrEvCollKey
SG::ReadHandleKey< ALFA_LocRecCorrEvCollection > m_locRecCorrEvCollKey
Definition: ALFA_CLinkAlg.h:153
ALFA_CLinkAlg::m_vecMDFibSel
std::vector< int > m_vecMDFibSel
Definition: ALFA_CLinkAlg.h:94
ALFA_CLinkAlg::GenerateXAOD
StatusCode GenerateXAOD(const EventContext &ctx)
Definition: ALFA_CLinkAlg.cxx:200
EVCOLLNAME_LOCREC
#define EVCOLLNAME_LOCREC
Definition: ALFA_CLinkEvent.h:27
ALFA_CLinkAlg::ClearXAODTrackingData
void ClearXAODTrackingData(const int nMaxTrackCnt, eRecType eType)
Definition: ALFA_CLinkAlg.cxx:526
ALFA_CLinkAlg::FillXAOD_HeaderData
StatusCode FillXAOD_HeaderData(const EventContext &ctx, xAOD::ALFADataContainer &xAODContainer)
Definition: ALFA_CLinkAlg.cxx:394
ALFA_CLinkAlg
Definition: ALFA_CLinkAlg.h:53
ALFA_CLinkAlg::m_vecODMultiplicityNeg
std::vector< int > m_vecODMultiplicityNeg
Definition: ALFA_CLinkAlg.h:123
ALFA_CLinkAlg::m_HVChannelKey
SG::ReadCondHandleKey< CondAttrListCollection > m_HVChannelKey
Definition: ALFA_CLinkAlg.h:128
_DCSID
Definition: ALFA_CLinkEvent.h:50
ALFA_CLinkAlg::m_vecYRPotCS
std::vector< float > m_vecYRPotCS
Definition: ALFA_CLinkAlg.h:102
ALFA_LocRecCorrODEvCollection.h
ALFA_CLinkAlg::m_vecDetectorPartID
std::vector< int > m_vecDetectorPartID
Definition: ALFA_CLinkAlg.h:87
ALFA_LocRecODEvCollection.h
EVCOLLNAME_LOCRECCORROD
#define EVCOLLNAME_LOCRECCORROD
Definition: ALFA_CLinkEvent.h:30
ALFA_CLinkAlg::m_vecXBeamCS
std::vector< float > m_vecXBeamCS
Definition: ALFA_CLinkAlg.h:105
DCSCOLLNAME_BLM
#define DCSCOLLNAME_BLM
Definition: ALFA_CLinkEvent.h:33
ALFA_CLinkAlg::m_movementKey
SG::ReadCondHandleKey< CondAttrListCollection > m_movementKey
Definition: ALFA_CLinkAlg.h:132
ALFA_CLinkAlg::m_nProcessingMode
int m_nProcessingMode
Definition: ALFA_CLinkAlg.h:60
ALFA_CLinkAlg::finalize
virtual StatusCode finalize() override
Definition: ALFA_CLinkAlg.cxx:82
ALFA_CLinkAlg::m_nMaxTrackCnt
int m_nMaxTrackCnt
Definition: ALFA_CLinkAlg.h:84
ALFA_CLinkAlg::m_triggerRatesKey
SG::ReadCondHandleKey< CondAttrListCollection > m_triggerRatesKey
Definition: ALFA_CLinkAlg.h:136
ALFA_CLinkAlg::m_vecOverY
std::vector< float > m_vecOverY
Definition: ALFA_CLinkAlg.h:90
ERC_LOCCORRECTED
@ ERC_LOCCORRECTED
Definition: ALFA_CLinkAlg.h:50
ALFA_CLinkAlg::m_radmonKey
SG::ReadCondHandleKey< CondAttrListCollection > m_radmonKey
Definition: ALFA_CLinkAlg.h:134
ALFADataContainer.h
ALFA_CLinkAlg::m_vecODFiberHitsNeg
std::vector< int > m_vecODFiberHitsNeg
Definition: ALFA_CLinkAlg.h:121
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37