ATLAS Offline Software
Loading...
Searching...
No Matches
PixelChargeCalibCondAlg.cxx File Reference
#include "PixelChargeCalibCondAlg.h"
#include "Identifier/IdentifierHash.h"
#include "InDetReadoutGeometry/SiDetectorElement.h"
#include "PixelReadoutGeometry/PixelModuleDesign.h"
#include "PixelReadoutDefinitions/PixelReadoutDefinitions.h"
#include "PixelConditionsData/ChargeCalibParameters.h"
#include "PixelConditionsData/ChargeCalibrationBundle.h"
#include "PixelConditionsData/PixelChargeCalibUtils.h"
#include "IChargeCalibrationParser.h"
#include "Run3ChargeCalibParser.h"
#include "Run2ChargeCalibParser.h"
#include "GaudiKernel/EventIDRange.h"
#include <memory>
#include <sstream>
#include <nlohmann/json.hpp>
#include <iostream>
#include <fstream>
#include <iomanip>

Go to the source code of this file.

Functions

std::pair< int, int > getBecAndLayer (const PixelID *pPixelId, IdentifierHash hash)
std::pair< size_t, InDetDD::PixelReadoutTechnologynumChipsAndTechnology (const InDetDD::SiDetectorElement *element)
template<typename T>
constexpr std::size_t enum2uint (T n, std::string_view callingFunctionName="")
 Convert an enum class to size_t for use as an array index.

Function Documentation

◆ enum2uint()

template<typename T>
std::size_t InDetDD::enum2uint ( T n,
std::string_view callingFunctionName = "" )
constexpr

Convert an enum class to size_t for use as an array index.

Definition at line 51 of file PixelReadoutDefinitions.h.

51 {
52 if (n==T::NONE){
53 throw std::out_of_range(std::format("{} InDetDD::enum2uint: 'NONE' type is out of range for {}", callingFunctionName, typeid(T).name()));
54 }
55 return static_cast<size_t>(n);
56 }

◆ getBecAndLayer()

std::pair< int, int > PixelChargeCalib::getBecAndLayer ( const PixelID * pPixelId,
IdentifierHash hash )

Definition at line 13 of file PixelChargeCalibUtils.cxx.

13 {
14 const Identifier waferId = pPixelId->wafer_id(hash);
15 return {pPixelId->barrel_ec(waferId), pPixelId->layer_disk(waferId)};
16 }
int layer_disk(const Identifier &id) const
Definition PixelID.h:607
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition PixelID.h:360
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition PixelID.h:600

◆ numChipsAndTechnology()

std::pair< size_t, InDetDD::PixelReadoutTechnology > PixelChargeCalib::numChipsAndTechnology ( const InDetDD::SiDetectorElement * element)

Definition at line 19 of file PixelChargeCalibUtils.cxx.

19 {
20 static constexpr int halfModuleThreshold{8};
21 const InDetDD::PixelModuleDesign *pDesign = static_cast<const InDetDD::PixelModuleDesign*>(&element->design());
22 const unsigned int n = (pDesign->numberOfCircuits() < halfModuleThreshold) ? pDesign->numberOfCircuits() : 2 * pDesign->numberOfCircuits();
23 return {n, pDesign->getReadoutTechnology()};
24 }
Class used to describe the design of a module (diode segmentation and readout scheme)
PixelReadoutTechnology getReadoutTechnology() const
int numberOfCircuits() const
Total number of circuits:
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):