|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef PIXELATHMONITORINGBASE_H
6 #define PIXELATHMONITORINGBASE_H
24 kECA = 0,
kECC,
kBLayer,
kLayer1,
kLayer2,
kIBL2D,
NFEI3LAYERS=
kIBL2D,
kIBL=
kIBL2D,
kIBL3D,
NBASELAYERS=
kIBL3D,
COUNT
34 "ECA",
"ECC",
"BLayer",
"Layer1",
"Layer2",
"IBL2D",
"IBL3D"
37 "ECA",
"ECC",
"BLayer",
"Layer1",
"Layer2",
"IBL"
40 1.f / 144.f, 1.f / 144.f, 1.f / 286.f, 1.f / 494.f, 1.f / 676.f, 1.f / 336.f, 1.f / 112.f
43 15, 15, 15, 15, 15, 4, 4
78 const std::vector<float>
iblFEetaEdges = { 0.5894, 1.0531, 1.3851, 1.6499, 1.8559, 2.0336, 2.1805, 2.3132,
79 2.4268, 2.5324, 2.6249, 2.7116, 2.7906, 2.8638, 2.9321, 2.9953 };
80 const std::vector<float>
iblFEphiLoEdges = { -3.0551, -2.6063, -2.1575, -1.7087, -1.2599, -0.8111, -0.3623,
81 0.0865, 0.5353, 0.9841, 1.4329, 1.8817, 2.3305, 2.7793 };
82 const std::vector<float>
iblFEphiUpEdges = { -3.0215, -2.5727, -2.1239, -1.6751, -1.2263, -0.7775, -0.3287,
83 0.1201, 0.5689, 1.0177, 1.4665, 1.9153, 2.3641, 2.8129 };
102 double& cosalpha)
const;
105 std::unordered_map<int, std::vector<int> >
m_pm;
106 std::unordered_map<int, std::vector<int> >
m_em;
107 std::unordered_map<int, std::vector<float> >
m_val;
118 int iFE,
float value);
132 const std::string& name2DMap =
"")
const;
136 this,
"PixelConditionsSummaryTool",
"PixelConditionsSummaryTool",
"Tool to retrieve Pixel Conditions summary"
140 this,
"PixelReadoutManager",
"PixelReadoutManager",
"Pixel readout manager"
149 {
this,
"PixelDetElStatus",
"",
"Key of SiDetectorElementStatus for Pixel"};
156 {
this,
"PixelDetElStatusActiveOnly",
"",
"Key of SiDetectorElementStatus for Pixel which reflects only whether modules or chips are active rather than delivering good data"};
162 if (!pixelDetElStatus.
isValid()) {
163 std::stringstream
msg;
164 msg <<
"Failed to get " <<
key.key() <<
" from StoreGate in " <<
name();
165 throw std::runtime_error(
msg.str());
168 return pixelDetElStatus;
172 const EventContext& ctx{Gaudi::Hive::currentContext()};
179 const EventContext& ctx{Gaudi::Hive::currentContext()};
185 unsigned int chip_i)
const {
186 bool is_active=
false;
190 const EventContext& ctx{Gaudi::Hive::currentContext()};
196 return std::make_tuple(is_active,is_good);
199 unsigned int chip_i)
const {
200 bool is_active=
false;
203 const EventContext& ctx{Gaudi::Hive::currentContext()};
211 unsigned int chip_i)
const {
212 return std::make_tuple(element_active.
isChipGood(module_hash, chip_i), element_status.
isChipGood(module_hash, chip_i) );
217 unsigned int chip_i)
const {
218 std::tuple<bool,bool> ret( element_active && element_status
219 ?
isChipGood( *element_active, *element_status, module_hash, chip_i)
221 #ifdef DO_VALIDATE_STATUS_ARRAY
223 const EventContext& ctx{Gaudi::Hive::currentContext()};
231 unsigned int chip_i)
const {
232 bool ret( element_active
233 ? element_active->
isChipGood(module_hash, chip_i)
235 #ifdef DO_VALIDATE_STATUS_ARRAY
236 const EventContext& ctx{Gaudi::Hive::currentContext()};
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
const std::vector< float > iblFEphiLoEdges
int getPixLayersID(int ec, int ld) const
helper function to get layers ID
const std::vector< float > iblFEetaEdges
const PixelID * m_pixelid
std::tuple< bool, bool > isChipGood(const InDet::SiDetectorElementStatus &element_active, const InDet::SiDetectorElementStatus &element_status, const IdentifierHash &module_hash, unsigned int chip_i) const
bool isChipGood(IdentifierHash hash, unsigned int chip) const
bool isChipActive(const InDet::SiDetectorElementStatus *element_active, const IdentifierHash &module_hash, unsigned int chip_i) const
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_pixelDetElStatusActiveOnly
Optional read handle to get status data to test whether a pixel detector element is active.
const std::string pixLayersLabel[PixLayers::COUNT]
ToolHandle< IInDetConditionsTool > m_pixelCondSummaryTool
const unsigned int kNumFEsIBL
virtual StatusCode initialize() override
initialize
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_pixelDetElStatus
Optional read handle to get status data to test whether a pixel detector element is good.
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
const unsigned int kNumModulesDisk
std::unordered_map< int, std::vector< int > > m_em
bool isHitOnTrack(Identifier id, std::vector< Identifier > const &RDOIDs) const
checks if hit is on track
bool is_valid() const
Check if id is in a valid state.
SG::ReadHandle< InDet::SiDetectorElementStatus > getPixelDetElStatus(const SG::ReadHandleKey< InDet::SiDetectorElementStatus > &key, const EventContext &ctx) const
Base class for Athena Monitoring Algorithms.
std::unordered_map< int, std::vector< float > > m_val
void fill2DProfLayerAccum(const VecAccumulator2DMap &accumulator) const
take VecAccumulator2DMap and fill the corresponding group
std::tuple< bool, bool > isChipGood(const InDet::SiDetectorElementStatus *element_active, const InDet::SiDetectorElementStatus *element_status, const IdentifierHash &module_hash, unsigned int chip_i) const
std::tuple< bool, bool > isChipGood(const IdentifierHash &module_hash, unsigned int chip_i) const
bool isIBL3D(int hashID) const
helper function to check if module is IBL 3D based on pixel hash ID
#define VALIDATE_STATUS_ARRAY(use_info, info_val, summary_val)
bool isIBL2D(int hashID) const
helper function to check if module is IBL planar based on pixel hash ID
::StatusCode StatusCode
StatusCode definition for legacy code.
bool isActive(const InDet::SiDetectorElementStatus *element_status, const IdentifierHash &module_hash) const
int DC[PixMon::kNumModulesDisk][PixMon::kNumLayersDisk]
const unsigned int kNumStavesL2
const PixelAthMonitoringBase & m_host
void fill2DProfLumiLayers(const std::string &prof2Dname, int lb, float(*weights)[PixLayers::COUNT], const int *nCategories) const
filling 2DProf per-lumi per-layer histograms ["ECA","ECC","BLayer","Layer1","Layer2",...
const unsigned int kNumPP0sEC
Header file to be included by clients of the Monitored infrastructure.
const float inv_nmod_per_layer[PixLayers::COUNT]
virtual bool isValid() override final
Can the handle be successfully dereferenced?
void fill1DProfLumiLayers(const std::string &prof1Dname, int lb, float *weights, int nlayers=PixLayers::COUNT) const
filling 1DProf per-lumi per-layer histograms ["ECA","ECC","BLayer","Layer1","Layer2",...
const int pixPhiSteps[PixLayers::NBASELAYERS]
bool isClusterOnTrack(Identifier id, std::vector< std::pair< Identifier, double > > const &ClusterIDs) const
checks if cluster is on track
int DA[PixMon::kNumModulesDisk][PixMon::kNumLayersDisk]
bool isGood(IdentifierHash hash) const
const unsigned int kNumStavesL0
const unsigned int kNumModulesBarrel
int B1[PixMon::kNumStavesL1][PixMon::kNumModulesBarrel]
const int pixEtaSteps[PixLayers::NBASELAYERS]
bool isChipActive(const IdentifierHash &module_hash, unsigned int chip_i) const
std::unordered_map< int, std::vector< int > > m_pm
void getPhiEtaMod(Identifier &id, int &phiMod, int &etaMod, bool ©FE) const
helper function to get eta phi coordinates of per-layer arrays
helper class to accumulate points to fill a 2D plot with
void add(const int layer, const Identifier &id, float value=1.0)
helper class to accumulate points to fill a 2D per-module plot with
void fillFromArrays(const std::string &namePP0, AccumulatorArrays &pixarrays, const std::string &name2DMap="") const
filling 1DProfile per-pp0(ROD) histograms for ["ECA","ECC","BLayer","Layer1","Layer2",...
const std::string pixBaseLayersLabel[PixLayers::NBASELAYERS]
bool isGood(const InDet::SiDetectorElementStatus *element_status, const IdentifierHash &module_hash) const
const std::vector< float > iblFEphiUpEdges
const unsigned int kNumStavesIBL
void fill1DModProfAccum(const VecAccumulator2DMap &accumulator, int lumiblock) const
take VecAccumulator2DMap and fill 3D arrays [layer, pm, em] with its values and lumiblock
std::vector< int > m_modData[PixLayers::NBASELAYERS]
int getNumberOfFEs(int pixlayer, int etaMod) const
helper function to get number of FEs per module
const unsigned int kNumLayersDisk
VecAccumulator2DMap(const PixelAthMonitoringBase &host, const std::string &prof2Dname, bool copy2DFEval=false)
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
const int clusterToTMinCut[PixLayers::COUNT]
int B0[PixMon::kNumStavesL0][PixMon::kNumModulesBarrel]
int B2[PixMon::kNumStavesL2][PixMon::kNumModulesBarrel]
int IBL[PixMon::kNumStavesIBL][PixMon::kNumFEsIBL]
const unsigned int kNumStavesL1