|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include "Identifier/Identifier.h"
22 #include "GaudiKernel/ITHistSvc.h"
31 static const std::string pathRoot{
"/BSErrors/"};
32 static const std::string detectorPaths[] {
"SCTEC/",
"SCTB/",
"SCTEA/"};
33 static const std::string detectorNames[] {
"negativeEndcap",
"barrel",
"positiveEndcap"};
34 static const int n_BSErrorType{15};
35 static const int firstBSErrorType{0};
36 static const int lastBSErrorType{14};
53 return StatusCode::SUCCESS;
60 return StatusCode::SUCCESS;
66 m_phistoVector.clear();
67 std::string histoName{pathRoot+
"GENERAL/"};
69 m_numberOfEventsHisto =
new TH1I{
"events",
"Events", 1, 0.5, 1.5};
70 if (m_thistSvc->regHist(histoName.c_str(), m_numberOfEventsHisto ).isFailure()) {
76 for (; waferItr not_eq waferItrE; ++waferItr) {
80 std::string histotitle{std::string{
"SCT "} + detectorNames[
bec2Index(
bec)] + std::string{
" BSErrors : plane "} + formattedPosition};
82 TH1F* hitmapHisto_tmp{
new TH1F{TString{formattedPosition}, TString{histotitle}, n_BSErrorType, firstBSErrorType-0.5, lastBSErrorType+0.5}};
83 if (m_thistSvc->regHist(
name.c_str(), hitmapHisto_tmp).isFailure()) {
86 m_phistoVector.push_back(hitmapHisto_tmp);
95 m_phistoVector.clear();
96 TFile* fileHitmap{TFile::Open(
fileName.c_str())};
99 if (fileHitmap==
nullptr) {
104 m_numberOfEventsHisto =
static_cast<TH1I*
>(fileHitmap->Get(
"GENERAL/events"));
105 if (m_numberOfEventsHisto==
nullptr) {
114 TH1F* hitmapHisto_tmp{
static_cast<TH1F*
>(fileHitmap->Get(
name.c_str()))};
115 if (hitmapHisto_tmp==
nullptr) {
118 m_phistoVector.push_back(hitmapHisto_tmp);
139 m_numberOfEventsHisto->Fill( 1 );
142 for (
int i{0};
i != maxEntry; ++
i ) {
143 int bec{(*m_scterr_bec)[
i]};
144 int layer{(*m_scterr_layer)[
i]};
145 int phi{(*m_scterr_phi)[
i]};
146 int eta{(*m_scterr_eta)[
i]};
147 int side{(*m_scterr_side)[
i]};
148 int type{(*m_scterr_type)[
i]};
159 m_numberOfEventsHisto->Fill( 1 );
161 const EventContext& ctx{Gaudi::Hive::currentContext()};
164 for(
const auto& idHash : errorSet) {
177 if ( iWaferHash < 0 || iWaferHash >=
m_maxHash ) {
178 ATH_MSG_WARNING(
"WaferHash " << iWaferHash <<
" is out of range : [ bec.layer.eta.phi.side, BSErrorType ] = [ " << osWafer <<
", " <<
type <<
" ]");
180 ATH_MSG_DEBUG(
"BSError : [ bec.layer.eta.phi.side, Type ] = [ " << osWafer<<
", " <<
type <<
" ]");
181 m_phistoVector[ iWaferHash ]->Fill(
type );
def retrieve(aClass, aKey=None)
unsigned int bec2Index(const int bec)
Scalar phi() const
phi method
Scalar eta() const
pseudorapidity method
const_id_iterator wafer_begin(void) const
Iterators over full set of ids. Wafer iterator is sorted.
std::vector< Identifier >::const_iterator const_id_iterator
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string formatPosition(const Identifier &waferId, const SCT_ID *helper, const std::string &delimiter, const bool includeSide)
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
size_type wafer_hash_max(void) const
#define ATH_MSG_WARNING(x)
const_id_iterator wafer_end(void) const
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.