ATLAS Offline Software
TRT_FillCablingData_DC2.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //
6 // TRT_FillCablingData_DC2 class - class used for filling
7 // of TRT Mapping in case of DC2
8 // A.Zalite
9 //
10 #ifndef TRT_FILLCABLINGDATA_DC2_H
11 #define TRT_FILLCABLINGDATA_DC2_H
12 
13 /*
14  * Base class
15  */
17 
18 #include "Identifier/Identifier.h"
20 #include "Identifier/IdContext.h"
21 #include "InDetIdentifier/TRT_ID.h"
22 #include "TRT_CablingData.h"
24 
25 #include "eformat/SourceIdentifier.h" // change to new eformat v3
26 #include <cstdint>
27 #include <vector>
28 
29 
31 {
32 public:
33  // Constructor
34  TRT_FillCablingData_DC2(const std::string& type, const std::string& name,
35  const IInterface* parent);
36 
37  // Destructor
38  virtual ~TRT_FillCablingData_DC2();
39 
40  // AlgTool InterfaceID
41  static const InterfaceID& interfaceID();
42 
43  virtual StatusCode initialize();
44 
45  virtual StatusCode finalize();
46 
47  // Fill the data
49 
50  // Get ROBIDs for each Detector Element (straw layer)
51  std::vector<uint32_t> getRobID(Identifier& id) const;
52 
53  // Get ROD for each straw
54  uint32_t getRodID(Identifier& id) const;
55 
56  // Get Straw and ROD ID
57  void getStrawRodID(Identifier& id, uint32_t& rod_id, uint32_t& straw_number)
58  const;
59 
60  // Define Identifier for each straw from BS
61  Identifier defineIdentifier(const eformat::SubDetector& subdetector,
62  const int& rod, const int& straw) const;
63 
64  // Get Identifiers of Collections for the given ROBID
65  void fillCollID(uint32_t robid, std::vector<IdentifierHash> & ids);
66 
67  // Get parameters
68  void get_parameters(int& numberOfStrawsInROD,
69  int& numberOfStrawsInBarrelROD,
70  int& shiftForLeftEndCapStraws,
71  int& shiftForLeftBarrelStraws,
72  int& shiftForRightBarrelStraws,
73  int& shiftForRightEndCapStraws,
74  int& numberOfEndCapPhiSectors,
75  int& numberOfIdentifierSectors);
76 
77 private:
78 
79  void defineParameters();
80  void printParameters() const;
81  void defineTables();
82 
83  // Define Identifiers of Collections for the given ROBID
84  void defineCollID();
85 
94 
101 
109 
112 
115 
118 
123 
128 
131 
132  int* m_layerID{};
135 
136  const TRT_ID* m_id_trt{};
138 
140 };
141 
142 #endif // TRT_FILLCABLINGDATA_DC2_H
143 
TRT_FillCablingData_DC2::m_numberOfLayersC
int m_numberOfLayersC
Definition: TRT_FillCablingData_DC2.h:107
TRT_FillCablingData_DC2::m_shiftForRightBarrel
int m_shiftForRightBarrel
Definition: TRT_FillCablingData_DC2.h:121
TRT_FillCablingData_DC2::m_numberOfLayersB
int m_numberOfLayersB
Definition: TRT_FillCablingData_DC2.h:106
TRT_FillCablingData_DC2::~TRT_FillCablingData_DC2
virtual ~TRT_FillCablingData_DC2()
Definition: TRT_FillCablingData_DC2.cxx:28
TRT_FillCablingData_DC2::m_numberOfLayersA
int m_numberOfLayersA
Definition: TRT_FillCablingData_DC2.h:105
TRT::Hit::straw
@ straw
Definition: HitInfo.h:82
TRT_FillCablingData_DC2::TRT_FillCablingData_DC2
TRT_FillCablingData_DC2(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TRT_FillCablingData_DC2.cxx:20
TRT_DetectorManager.h
TRT_FillCablingData_DC2::m_numberOfStrawPlanesB
int m_numberOfStrawPlanesB
Definition: TRT_FillCablingData_DC2.h:130
TRT_FillCablingData_DC2::m_numberOfRings
int m_numberOfRings
Definition: TRT_FillCablingData_DC2.h:102
TRT_FillCablingData_DC2::defineIdentifier
Identifier defineIdentifier(const eformat::SubDetector &subdetector, const int &rod, const int &straw) const
Definition: TRT_FillCablingData_DC2.cxx:707
TRT_CablingData.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TRT_FillCablingData_DC2::m_totalNumberOfPlanes
int m_totalNumberOfPlanes
Definition: TRT_FillCablingData_DC2.h:96
TRT_FillCablingData_DC2::m_shiftForRightBarrelStraws
int m_shiftForRightBarrelStraws
Definition: TRT_FillCablingData_DC2.h:126
TRT_FillCablingData_DC2::m_id_trt
const TRT_ID * m_id_trt
Definition: TRT_FillCablingData_DC2.h:136
TRT_ID.h
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
TRT_FillCablingData_DC2::getStrawRodID
void getStrawRodID(Identifier &id, uint32_t &rod_id, uint32_t &straw_number) const
Definition: TRT_FillCablingData_DC2.cxx:904
TRT_FillCablingData_DC2::m_strawIDInLayer
int * m_strawIDInLayer
Definition: TRT_FillCablingData_DC2.h:133
TRT_FillCablingData_DC2::m_numberOfWheelsA
int m_numberOfWheelsA
Definition: TRT_FillCablingData_DC2.h:86
TRT_FillCablingData_DC2::interfaceID
static const InterfaceID & interfaceID()
Definition: TRT_FillCablingData_DC2.cxx:32
TRT_FillCablingData_DC2::m_shiftForLeftEndCap
int m_shiftForLeftEndCap
Definition: TRT_FillCablingData_DC2.h:119
TRT_FillCablingData_DC2::fillCollID
void fillCollID(uint32_t robid, std::vector< IdentifierHash > &ids)
Definition: TRT_FillCablingData_DC2.cxx:513
TRT_FillCablingData_DC2::printParameters
void printParameters() const
Definition: TRT_FillCablingData_DC2.cxx:238
TRT_FillCablingData_DC2::m_cntx
IdContext m_cntx
Definition: TRT_FillCablingData_DC2.h:137
TRT_FillCablingData_DC2::get_parameters
void get_parameters(int &numberOfStrawsInROD, int &numberOfStrawsInBarrelROD, int &shiftForLeftEndCapStraws, int &shiftForLeftBarrelStraws, int &shiftForRightBarrelStraws, int &shiftForRightEndCapStraws, int &numberOfEndCapPhiSectors, int &numberOfIdentifierSectors)
Definition: TRT_FillCablingData_DC2.cxx:993
TRT_FillCablingData_DC2::m_numberOfStrawsInPhiSector
int m_numberOfStrawsInPhiSector
Definition: TRT_FillCablingData_DC2.h:111
TRT_FillCablingData_DC2::defineCollID
void defineCollID()
Definition: TRT_FillCablingData_DC2.cxx:448
TRT_FillCablingData_DC2::m_numberOfStrawsInWheelCForRod
int m_numberOfStrawsInWheelCForRod
Definition: TRT_FillCablingData_DC2.h:93
TRT_FillCablingData_DC2
Definition: TRT_FillCablingData_DC2.h:31
IdContext.h
TRT_FillCablingData_DC2::m_numberOfStrawsABInRod
int m_numberOfStrawsABInRod
Definition: TRT_FillCablingData_DC2.h:90
TRT_FillCablingData_DC2::m_shiftForLeftEndCapStraws
int m_shiftForLeftEndCapStraws
Definition: TRT_FillCablingData_DC2.h:124
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TRT_FillCablingData_DC2::m_shiftForLeftBarrel
int m_shiftForLeftBarrel
Definition: TRT_FillCablingData_DC2.h:120
TRT_FillCablingData_DC2::defineTables
void defineTables()
Definition: TRT_FillCablingData_DC2.cxx:327
AthAlgTool.h
TRT_FillCablingData_DC2::m_cabling
TRT_CablingData * m_cabling
Definition: TRT_FillCablingData_DC2.h:139
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TRT_FillCablingData_DC2::m_numberOfLayersAB
int m_numberOfLayersAB
Definition: TRT_FillCablingData_DC2.h:108
TRT_FillCablingData_DC2::m_numberOfStrawsA
int m_numberOfStrawsA
Definition: TRT_FillCablingData_DC2.h:103
TRT_FillCablingData_DC2::fillData
TRT_CablingData * fillData()
Definition: TRT_FillCablingData_DC2.cxx:77
TRT_FillCablingData_DC2::m_numberOfLayersInPhiSector
int m_numberOfLayersInPhiSector
Definition: TRT_FillCablingData_DC2.h:110
TRT_FillCablingData_DC2::m_numberOfStrawsInBarrelROD
int m_numberOfStrawsInBarrelROD
Definition: TRT_FillCablingData_DC2.h:114
TRT_FillCablingData_DC2::m_layerID
int * m_layerID
Definition: TRT_FillCablingData_DC2.h:132
RunTileMonitoring.rod
rod
Definition: RunTileMonitoring.py:134
TRT_FillCablingData_DC2::getRodID
uint32_t getRodID(Identifier &id) const
Definition: TRT_FillCablingData_DC2.cxx:844
TRT_FillCablingData_DC2::m_totalNumberOfStrawsInPhiSectorsAB
int m_totalNumberOfStrawsInPhiSectorsAB
Definition: TRT_FillCablingData_DC2.h:100
TRT_FillCablingData_DC2::m_numberOfPhiSectorsInIDSector
int m_numberOfPhiSectorsInIDSector
Definition: TRT_FillCablingData_DC2.h:97
TRT_FillCablingData_DC2::m_numberOfStrawPlanesAC
int m_numberOfStrawPlanesAC
Definition: TRT_FillCablingData_DC2.h:129
TRT_FillCablingData_DC2::m_numberOfStrawsInPhiSectorAB
int m_numberOfStrawsInPhiSectorAB
Definition: TRT_FillCablingData_DC2.h:98
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
IdentifierHash.h
TRT_FillCablingData_DC2::m_numberOfStrawsInPreviousLayers
int * m_numberOfStrawsInPreviousLayers
Definition: TRT_FillCablingData_DC2.h:134
TRT_FillCablingData_DC2::m_numberOfEndCapPhiSectors
int m_numberOfEndCapPhiSectors
Definition: TRT_FillCablingData_DC2.h:117
TRT_FillCablingData_DC2::m_shiftForRightEndCapStraws
int m_shiftForRightEndCapStraws
Definition: TRT_FillCablingData_DC2.h:127
TRT_FillCablingData_DC2::m_numberOfStrawsInROD
int m_numberOfStrawsInROD
Definition: TRT_FillCablingData_DC2.h:113
TRT_FillCablingData_DC2::defineParameters
void defineParameters()
Definition: TRT_FillCablingData_DC2.cxx:83
TRT_FillCablingData_DC2::m_numberOfIdentifierSectors
int m_numberOfIdentifierSectors
Definition: TRT_FillCablingData_DC2.h:116
TRT_ID
Definition: TRT_ID.h:84
TRT_FillCablingData_DC2::m_numberOfStrawsInWheelBForRod
int m_numberOfStrawsInWheelBForRod
Definition: TRT_FillCablingData_DC2.h:92
TRT_FillCablingData_DC2::getRobID
std::vector< uint32_t > getRobID(Identifier &id) const
Definition: TRT_FillCablingData_DC2.cxx:788
TRT_CablingData
Definition: TRT_CablingData.h:18
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TRT_FillCablingData_DC2::m_numberOfStrawsInWheelAForRod
int m_numberOfStrawsInWheelAForRod
Definition: TRT_FillCablingData_DC2.h:91
TRT_FillCablingData_DC2::m_numberOfStrawsAInRod
int m_numberOfStrawsAInRod
Definition: TRT_FillCablingData_DC2.h:89
TRT_FillCablingData_DC2::m_numberOfStrawsAB
int m_numberOfStrawsAB
Definition: TRT_FillCablingData_DC2.h:104
TRT_FillCablingData_DC2::m_shiftForLeftBarrelStraws
int m_shiftForLeftBarrelStraws
Definition: TRT_FillCablingData_DC2.h:125
TRT_FillCablingData_DC2::initialize
virtual StatusCode initialize()
Definition: TRT_FillCablingData_DC2.cxx:39
AthAlgTool
Definition: AthAlgTool.h:26
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
TRT_FillCablingData_DC2::m_numberOfWheelsAB
int m_numberOfWheelsAB
Definition: TRT_FillCablingData_DC2.h:87
TRT_FillCablingData_DC2::m_numberOfPlanesAB
int m_numberOfPlanesAB
Definition: TRT_FillCablingData_DC2.h:95
TRT_FillCablingData_DC2::m_shiftForRightEndCap
int m_shiftForRightEndCap
Definition: TRT_FillCablingData_DC2.h:122
TRT_FillCablingData_DC2::m_numberOfStrawsInPhiSectorC
int m_numberOfStrawsInPhiSectorC
Definition: TRT_FillCablingData_DC2.h:99
TRT_FillCablingData_DC2::finalize
virtual StatusCode finalize()
Definition: TRT_FillCablingData_DC2.cxx:64
Identifier
Definition: IdentifierFieldParser.cxx:14
TRT_FillCablingData_DC2::m_numberOfWheelsABC
int m_numberOfWheelsABC
Definition: TRT_FillCablingData_DC2.h:88