ATLAS Offline Software
Loading...
Searching...
No Matches
ALFA_LocRec.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ALFA_LOCREC_h
6#define ALFA_LOCREC_h
7
9#include "ALFA_LocRec/ALFA_UserObjects.h" //for MDHIT etc
10#include "ALFA_Geometry/ALFA_GeometryReader.h" //for GEOMETRYCONFIGURATION
13#include "CLHEP/Vector/ThreeVector.h"
14#include "RtypesCore.h"
15#include "Gaudi/Property.h"
16
17#include <string>
18#include <list>
19#include <vector>
20
25
26typedef struct _USERTRANSFORM
27{
28 Int_t iRPot;
29 Float_t fAngle;
30 CLHEP::Hep3Vector vecRotation;
31 CLHEP::Hep3Vector vecTranslation;
32
34
35
36#define NSIDE 3
37#define NTRACK 10
38#define NTRIG 4
39#define NBPM 4
40//#define MAXNUMTRACKS 100
41
42class StoreGateSvc;
43
45{
46 public:
47 ALFA_LocRec(const std::string& name, ISvcLocator* pSvcLocator);
49
50 private:
53
56
57 // Geometry properties, copied into m_Config in initialize()
58 Gaudi::Property<int> m_metrologyType{this, "MetrologyType", EMT_NOMINAL};//EGST_FILE
59 Gaudi::Property<std::string> m_metrologySource{this, "MetrologySource", ""};//"rpmetrology.dat"
60 Gaudi::Property<bool> m_shiftToX97Pos{this, "ShiftToX97Pos", false};
61
62 // Per Roman Pot properties, indexed as CfgRPosParams
63 Gaudi::Property<int> m_rpPosType[RPOTSCNT]{
64 {this, "B7L1U_PosType", ERPPT_ACTIVE},
65 {this, "B7L1L_PosType", ERPPT_ACTIVE},
66 {this, "A7L1U_PosType", ERPPT_ACTIVE},
67 {this, "A7L1L_PosType", ERPPT_ACTIVE},
68 {this, "A7R1U_PosType", ERPPT_ACTIVE},
69 {this, "A7R1L_PosType", ERPPT_ACTIVE},
70 {this, "B7R1U_PosType", ERPPT_ACTIVE},
71 {this, "B7R1L_PosType", ERPPT_ACTIVE}
72 };
73 Gaudi::Property<int> m_mdGeoType[RPOTSCNT]{
74 {this, "B7L1U_MDGeometryType", EGST_IDEALGEOMETRY},
75 {this, "B7L1L_MDGeometryType", EGST_IDEALGEOMETRY},
76 {this, "A7L1U_MDGeometryType", EGST_IDEALGEOMETRY},
77 {this, "A7L1L_MDGeometryType", EGST_IDEALGEOMETRY},
78 {this, "A7R1U_MDGeometryType", EGST_IDEALGEOMETRY},
79 {this, "A7R1L_MDGeometryType", EGST_IDEALGEOMETRY},
80 {this, "B7R1U_MDGeometryType", EGST_IDEALGEOMETRY},
81 {this, "B7R1L_MDGeometryType", EGST_IDEALGEOMETRY}
82 };
83 Gaudi::Property<int> m_odGeoType[RPOTSCNT]{
84 {this, "B7L1U_ODGeometryType", EGST_IDEALGEOMETRY},
85 {this, "B7L1L_ODGeometryType", EGST_IDEALGEOMETRY},
86 {this, "A7L1U_ODGeometryType", EGST_IDEALGEOMETRY},
87 {this, "A7L1L_ODGeometryType", EGST_IDEALGEOMETRY},
88 {this, "A7R1U_ODGeometryType", EGST_IDEALGEOMETRY},
89 {this, "A7R1L_ODGeometryType", EGST_IDEALGEOMETRY},
90 {this, "B7R1U_ODGeometryType", EGST_IDEALGEOMETRY},
91 {this, "B7R1L_ODGeometryType", EGST_IDEALGEOMETRY}
92 };
93 Gaudi::Property<std::string> m_mdConnString[RPOTSCNT]{
94 {this, "B7L1U_MDSource", ""},
95 {this, "B7L1L_MDSource", ""},
96 {this, "A7L1U_MDSource", ""},
97 {this, "A7L1L_MDSource", ""},
98 {this, "A7R1U_MDSource", ""},
99 {this, "A7R1L_MDSource", ""},
100 {this, "B7R1U_MDSource", ""},
101 {this, "B7R1L_MDSource", ""}
102 };
103 Gaudi::Property<std::string> m_odConnString[RPOTSCNT]{
104 {this, "B7L1U_ODSource", ""},
105 {this, "B7L1L_ODSource", ""},
106 {this, "A7L1U_ODSource", ""},
107 {this, "A7L1L_ODSource", ""},
108 {this, "A7R1U_ODSource", ""},
109 {this, "A7R1L_ODSource", ""},
110 {this, "B7R1U_ODSource", ""},
111 {this, "B7R1L_ODSource", ""}
112 };
113
114 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "EvtInfo", "EventInfo", "EventInfo name"};
115
116 private:
117 std::list<eRPotName> m_ListExistingRPots;
118
119 UInt_t m_eventNum{0}; // real event number
120 Gaudi::Property<Int_t> m_iDataType{this, "DataType", 1, "data type using in the local reconstruction"}; // data type (simulation or real data) using in the local reconstruction
121 Int_t m_iEvent{0}; // event number from zero value
122 Gaudi::Property<Int_t> m_iMultiplicityCutMD{this, "MultiplicityCutMD", 5}; // for Main Detector
123 Gaudi::Property<Int_t> m_iNumLayerCutMD{this, "NumLayerCutMD", 3}; // for Main Detector
124 Gaudi::Property<Int_t> m_iUVCutMD{this, "UVCutMD", 3}; // for Main Detector
125 Gaudi::Property<Int_t> m_iUVCutMDHalfReco{this, "UVCutMDHalfReco", 3}; // for Main Detector HalfReco algorithm
126 Gaudi::Property<Int_t> m_iMultiplicityCutOD{this, "MultiplicityCutOD", 30}; // for Overlap Detector
127 Gaudi::Property<Float_t> m_fOverlapCutMD{this, "OverlapCutMD", 0.5}; // for Main Detector
128 Gaudi::Property<Float_t> m_fDistanceCutOD{this, "DistanceCutOD", 0.5}; // for Overlap Detector
129 Gaudi::Property<Float_t> m_iLayerCutOD{this, "LayerCutOD", 3}; // for Overlap Detector
130 Gaudi::Property<Bool_t> m_bEdgeMethod_Opt_Sisters{this, "EdgeMethod_Opt_Sisters", false}; // for EdgeMethod
131 Gaudi::Property<Bool_t> m_bEdgeMethod_Opt_UseGaps{this, "EdgeMethod_Opt_UseGaps", false}; // for EdgeMethod
132
133 //slope, offset and Z-pos for MD fibers [8][2*10][64]
137
138 //slope, offset and Z-pos for OD fibers [8][3][2][2*15], side 0 = right; side 1 = left (in +z direction)
142
143 std::string m_strKeyGeometryForReco{"ALFA_GeometryForReco"};
144 Gaudi::Property<std::vector<std::string>> m_vecListAlgoMD{this, "ListAlgoMD", {}};
145 Gaudi::Property<std::vector<std::string>> m_vecListAlgoOD{this, "ListAlgoOD", {}};
146 Gaudi::Property<std::string> m_strAlgoOD{this, "AlgoOD", "ODTracking"};
147 Gaudi::Property<std::string> m_strAlgoMD{this, "AlgoMD", "MDTracking"};
148 std::string m_strKeyLocRecEvCollection{"ALFA_LocRecEvCollection"};
149 std::string m_strKeyLocRecODEvCollection{"ALFA_LocRecODEvCollection"};
150 std::string m_strCollectionName{"ALFA_DigitCollection"};
151 std::string m_strODCollectionName{"ALFA_ODDigitCollection"};
152
153 public:
154 StatusCode initialize();
155 StatusCode execute(const EventContext& ctx);
156 StatusCode finalize();
157
158 private:
159 bool ReadGeometryDetCS();
160 bool StoreReconstructionGeometry(const eRPotName eRPName, const eFiberType eFType, const char* szDataDestination);
161 void SaveGeometry();
162 void ClearGeometry();
163
164 StatusCode ALFACollectionReading(std::list<MDHIT> &ListMDHits, std::list<ODHIT> &ListODHits);
165
166 StatusCode RecordCollection();
167 StatusCode RecordODCollection();
168 StatusCode ExecuteRecoMethod(const std::string& strAlgo, const eRPotName eRPName, const std::list<MDHIT> &ListMDHits, const std::list<ODHIT> &ListODHits);
169};
170
171#endif //ALFA_LOCREC_h
#define ODLAYERSCNT
#define RPOTSCNT
#define ODPLATESCNT
#define ODFIBERSCNT
struct _USERTRANSFORM USERTRANSFORM
struct _USERTRANSFORM * PUSERTRANSFORM
@ ERPPT_ACTIVE
@ EGST_IDEALGEOMETRY
@ EMT_NOMINAL
#define ALFALAYERSCNT
#define ALFAPLATESCNT
#define ALFAFIBERSCNT
#define ODSIDESCNT
Property holding a SG store/key/clid from which a ReadHandle is made.
std::string m_strODCollectionName
Gaudi::Property< std::vector< std::string > > m_vecListAlgoMD
Float_t m_fbOD[RPOTSCNT][ODPLATESCNT][ODSIDESCNT][ODLAYERSCNT *ODFIBERSCNT]
Gaudi::Property< std::string > m_odConnString[RPOTSCNT]
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
StatusCode execute(const EventContext &ctx)
Execute method.
Gaudi::Property< Int_t > m_iUVCutMDHalfReco
StatusCode ExecuteRecoMethod(const std::string &strAlgo, const eRPotName eRPName, const std::list< MDHIT > &ListMDHits, const std::list< ODHIT > &ListODHits)
StatusCode ALFACollectionReading(std::list< MDHIT > &ListMDHits, std::list< ODHIT > &ListODHits)
Float_t m_faOD[RPOTSCNT][ODPLATESCNT][ODSIDESCNT][ODLAYERSCNT *ODFIBERSCNT]
Gaudi::Property< std::string > m_strAlgoOD
Gaudi::Property< std::string > m_metrologySource
Definition ALFA_LocRec.h:59
Gaudi::Property< std::string > m_strAlgoMD
Gaudi::Property< Float_t > m_fOverlapCutMD
ALFA_LocRecODEvCollection * m_pLocRecODEvCollection
Definition ALFA_LocRec.h:55
Float_t m_faMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Gaudi::Property< Int_t > m_iNumLayerCutMD
ALFA_LocRec(const std::string &name, ISvcLocator *pSvcLocator)
Float_t m_fbMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
std::string m_strCollectionName
Gaudi::Property< std::vector< std::string > > m_vecListAlgoOD
Gaudi::Property< std::string > m_mdConnString[RPOTSCNT]
Definition ALFA_LocRec.h:93
std::string m_strKeyGeometryForReco
Float_t m_fzMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
std::string m_strKeyLocRecODEvCollection
StatusCode RecordODCollection()
Gaudi::Property< int > m_odGeoType[RPOTSCNT]
Definition ALFA_LocRec.h:83
Gaudi::Property< int > m_mdGeoType[RPOTSCNT]
Definition ALFA_LocRec.h:73
Gaudi::Property< Float_t > m_iLayerCutOD
Float_t m_fzOD[RPOTSCNT][ODPLATESCNT][ODSIDESCNT][ODLAYERSCNT *ODFIBERSCNT]
StatusCode RecordCollection()
void SaveGeometry()
bool StoreReconstructionGeometry(const eRPotName eRPName, const eFiberType eFType, const char *szDataDestination)
GEOMETRYCONFIGURATION m_Config
Definition ALFA_LocRec.h:51
void ClearGeometry()
StatusCode initialize()
ALFA_LocRecEvCollection * m_pLocRecEvCollection
Definition ALFA_LocRec.h:54
ALFA_GeometryReader * m_pGeometryReader
Definition ALFA_LocRec.h:52
Gaudi::Property< Int_t > m_iMultiplicityCutMD
Gaudi::Property< int > m_rpPosType[RPOTSCNT]
Definition ALFA_LocRec.h:63
Gaudi::Property< Float_t > m_fDistanceCutOD
Gaudi::Property< Int_t > m_iDataType
bool ReadGeometryDetCS()
std::list< eRPotName > m_ListExistingRPots
Gaudi::Property< Bool_t > m_bEdgeMethod_Opt_Sisters
Gaudi::Property< Int_t > m_iUVCutMD
Gaudi::Property< Int_t > m_iMultiplicityCutOD
Gaudi::Property< bool > m_shiftToX97Pos
Definition ALFA_LocRec.h:60
Gaudi::Property< Bool_t > m_bEdgeMethod_Opt_UseGaps
StatusCode finalize()
UInt_t m_eventNum
Gaudi::Property< int > m_metrologyType
Definition ALFA_LocRec.h:58
std::string m_strKeyLocRecEvCollection
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Property holding a SG store/key/clid from which a ReadHandle is made.
The Athena Transient Store API.
CLHEP::Hep3Vector vecTranslation
CLHEP::Hep3Vector vecRotation