![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <SCT_CalibLbTool.h>
|
typedef std::vector< int > | VecInt |
|
Definition at line 38 of file SCT_CalibLbTool.h.
◆ VecInt
◆ SCT_CalibLbTool()
SCT_CalibLbTool::SCT_CalibLbTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~SCT_CalibLbTool()
virtual SCT_CalibLbTool::~SCT_CalibLbTool |
( |
| ) |
|
|
virtualdefault |
◆ book()
bool SCT_CalibLbTool::book |
( |
| ) |
|
|
virtual |
Definition at line 85 of file SCT_CalibLbTool.cxx.
89 m_phistoVector.clear();
90 m_phistoVector2D.clear();
91 std::string histoName{pathRoot+
"GENERAL/"};
98 if (m_thistSvc->regHist( histoName.c_str(), m_numberOfEventsHisto ).isFailure()) {
104 std::string hitmapPaths[3];
105 for (
int i{0};
i<3; ++
i) {
106 hitmapPaths[
i] = pathRoot+detectorPaths[
i];
110 const Identifier& waferId{*waferItr};
114 std::string histotitle{std::string{
"SCT "} + detectorNames[
bec2Index(
bec)] + std::string{
" Hitmap: plane "} + formattedPosition};
115 std::string formattedPosition2D{formattedPosition +
"_2D"};
118 if (m_thistSvc->regHist(name2D.c_str(), hitmapHistoLB_tmp2D).isFailure()) {
121 m_phistoVector2D.push_back(hitmapHistoLB_tmp2D);
124 for (
int iChip(0); iChip!=n_chipsPerSide; ++iChip) {
126 const std::string formattedChipPosition{formattedPosition +
std::to_string(chipId)};
127 const std::string
hname{pathRoot + detectorPaths[
bec2Index(
bec)] +
"/" + formattedChipPosition};
128 const std::string histTitle{std::string{
"SCT"} + detectorNames[
bec2Index(
bec)] + std::string{
" LB: chip "} + formattedChipPosition};
130 if (m_thistSvc->regHist(
hname.c_str(), hist_tmp).isFailure())
ATH_MSG_ERROR(
"Error in booking LB histogram");
131 m_phistoVector.push_back(hist_tmp);
◆ fill()
bool SCT_CalibLbTool::fill |
( |
const bool |
fromData = false | ) |
|
|
virtual |
Definition at line 189 of file SCT_CalibLbTool.cxx.
193 m_numberOfEventsHisto->Fill(m_lumiBlock);
196 for (
int i{0};
i != maxEntry; ++
i) {
197 int theFirstStrip{(*m_sct_firstStrip)[
i]};
199 int endStrip{(*m_sct_rdoGroupSize)[
i] + theFirstStrip};
200 int index{(*m_sct_waferHash)[
i]};
201 TH2F* pThisHisto2D{m_phistoVector2D[
index]};
204 pThisHisto2D->Fill(
strip, m_lumiBlock);
207 int rdoGroupSize{(*m_sct_rdoGroupSize)[
i]};
208 IdentifierHash waferHash{
static_cast<unsigned int>((*m_sct_waferHash)[
i])};
◆ fillFromData()
bool SCT_CalibLbTool::fillFromData |
( |
| ) |
|
|
virtual |
Definition at line 216 of file SCT_CalibLbTool.cxx.
221 m_numberOfEventsHisto->Fill(m_lumiBlock);
226 if (not p_rdoContainer.isValid()) {
232 for (; itr != itrE; ++itr) {
234 if (SCT_Collection==
nullptr)
continue;
235 Identifier waferId{SCT_Collection->
identify()};
238 TH2F* pThisHisto2D{m_phistoVector2D[
static_cast<int>(waferHash)]};
242 for (; rdoItr != rdoItrE; ++rdoItr ) {
246 const int endStrip{(*rdoItr)->getGroupSize() +
strip};
248 pThisHisto2D->Fill(
strip, m_lumiBlock );
251 int rdoGroupSize{(*rdoItr)->getGroupSize()};
◆ fillLbForWafer()
Definition at line 260 of file SCT_CalibLbTool.cxx.
262 int index{
static_cast<int>(waferHash)*n_chipsPerSide + stripNumber/n_stripsPerChip};
264 for (
int j{0}; j != groupSize; ++j) {
265 m_phistoVector[
index]->Fill(m_lumiBlock);
◆ initialize()
StatusCode SCT_CalibLbTool::initialize |
( |
| ) |
|
|
virtual |
Definition at line 50 of file SCT_CalibLbTool.cxx.
53 ATH_CHECK(service(
"THistSvc", m_thistSvc));
62 if (element->swapPhiReadoutDirection()) {
67 std::pair<std::string, bool> msgCode{retrievedTool(
m_evtInfo)};
68 if (not msgCode.second) {
70 return StatusCode::FAILURE;
81 return StatusCode::SUCCESS;
◆ read()
bool SCT_CalibLbTool::read |
( |
const std::string & |
fileName | ) |
|
|
virtual |
Definition at line 138 of file SCT_CalibLbTool.cxx.
143 m_phistoVector.clear();
144 m_phistoVector2D.clear();
145 TFile* fileLB{TFile::Open(
fileName.c_str())};
149 m_numberOfEventsHisto =
static_cast<TH1I*
>(fileLB->Get(
"GENERAL/events"));
155 if (m_numberOfEventsHisto==
nullptr) {
161 const Identifier& waferId{*waferItr};
166 TH2F* hitmapHistoLB_tmp2D = (
TH2F*) fileLB->Get(name2D.c_str());
168 if (hitmapHistoLB_tmp2D==
nullptr) {
171 m_phistoVector2D.push_back(hitmapHistoLB_tmp2D);
174 for (
int iChip{0}; iChip!=n_chipsPerSide; ++iChip) {
177 TH1F* hist_tmp{
static_cast<TH1F*
>(fileLB->Get(
hname.c_str()))};
178 if (hist_tmp==
nullptr) {
181 m_phistoVector.push_back(hist_tmp);
◆ m_evtInfo
◆ m_LbRange
int SCT_CalibLbTool::m_LbRange {0} |
|
private |
◆ m_LbsToMerge
int SCT_CalibLbTool::m_LbsToMerge {0} |
|
private |
◆ m_pSCTHelper
◆ m_rdoContainerKey
◆ m_sct_firstStrip
VecInt* SCT_CalibLbTool::m_sct_firstStrip {nullptr} |
|
private |
◆ m_sct_rdoGroupSize
VecInt* SCT_CalibLbTool::m_sct_rdoGroupSize {nullptr} |
|
private |
◆ m_sct_waferHash
VecInt* SCT_CalibLbTool::m_sct_waferHash {nullptr} |
|
private |
◆ m_swapPhiReadoutDirection
std::vector<bool> SCT_CalibLbTool::m_swapPhiReadoutDirection {} |
|
private |
◆ m_waferItrBegin
◆ m_waferItrEnd
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
unsigned int bec2Index(const int bec)
Const iterator class for DataVector/DataList.
virtual Identifier identify() const override final
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)
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
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
std::string to_string(const DetectorType &type)
int strip(const Identifier &id) const
int side(const Identifier &id) const
const_id_iterator wafer_end(void) const
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)