|
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 83 of file SCT_CalibLbTool.cxx.
87 m_phistoVector.clear();
88 m_phistoVector2D.clear();
89 std::string histoName{pathRoot+
"GENERAL/"};
96 if (m_thistSvc->regHist( histoName.c_str(), m_numberOfEventsHisto ).isFailure()) {
102 std::string hitmapPaths[3];
103 for (
int i{0};
i<3; ++
i) {
104 hitmapPaths[
i] = pathRoot+detectorPaths[
i];
112 std::string histotitle{std::string{
"SCT "} + detectorNames[
bec2Index(
bec)] + std::string{
" Hitmap: plane "} + formattedPosition};
113 std::string formattedPosition2D{formattedPosition +
"_2D"};
116 if (m_thistSvc->regHist(name2D.c_str(), hitmapHistoLB_tmp2D).isFailure()) {
119 m_phistoVector2D.push_back(hitmapHistoLB_tmp2D);
122 for (
int iChip(0); iChip!=n_chipsPerSide; ++iChip) {
124 const std::string formattedChipPosition{formattedPosition +
std::to_string(chipId)};
125 const std::string
hname{pathRoot + detectorPaths[
bec2Index(
bec)] +
"/" + formattedChipPosition};
126 const std::string histTitle{std::string{
"SCT"} + detectorNames[
bec2Index(
bec)] + std::string{
" LB: chip "} + formattedChipPosition};
128 if (m_thistSvc->regHist(
hname.c_str(), hist_tmp).isFailure())
ATH_MSG_ERROR(
"Error in booking LB histogram");
129 m_phistoVector.push_back(hist_tmp);
◆ fill()
bool SCT_CalibLbTool::fill |
( |
const bool |
fromData = false | ) |
|
|
virtual |
Definition at line 187 of file SCT_CalibLbTool.cxx.
191 m_numberOfEventsHisto->Fill(m_lumiBlock);
194 for (
int i{0};
i != maxEntry; ++
i) {
195 int theFirstStrip{(*m_sct_firstStrip)[
i]};
197 int endStrip{(*m_sct_rdoGroupSize)[
i] + theFirstStrip};
198 int index{(*m_sct_waferHash)[
i]};
199 TH2F* pThisHisto2D{m_phistoVector2D[
index]};
202 pThisHisto2D->Fill(
strip, m_lumiBlock);
205 int rdoGroupSize{(*m_sct_rdoGroupSize)[
i]};
206 IdentifierHash waferHash{
static_cast<unsigned int>((*m_sct_waferHash)[
i])};
◆ fillFromData()
bool SCT_CalibLbTool::fillFromData |
( |
| ) |
|
|
virtual |
Definition at line 214 of file SCT_CalibLbTool.cxx.
219 m_numberOfEventsHisto->Fill(m_lumiBlock);
224 if (not p_rdoContainer.isValid()) {
230 for (; itr != itrE; ++itr) {
232 if (SCT_Collection==
nullptr)
continue;
233 Identifier waferId{SCT_Collection->identify()};
236 TH2F* pThisHisto2D{m_phistoVector2D[
static_cast<int>(waferHash)]};
240 for (; rdoItr != rdoItrE; ++rdoItr ) {
244 const int endStrip{(*rdoItr)->getGroupSize() +
strip};
246 pThisHisto2D->Fill(
strip, m_lumiBlock );
249 int rdoGroupSize{(*rdoItr)->getGroupSize()};
◆ fillLbForWafer()
Definition at line 258 of file SCT_CalibLbTool.cxx.
260 int index{
static_cast<int>(waferHash)*n_chipsPerSide + stripNumber/n_stripsPerChip};
262 for (
int j{0}; j != groupSize; ++j) {
263 m_phistoVector[
index]->Fill(m_lumiBlock);
◆ initialize()
StatusCode SCT_CalibLbTool::initialize |
( |
| ) |
|
|
virtual |
Definition at line 48 of file SCT_CalibLbTool.cxx.
60 if (element->swapPhiReadoutDirection()) {
65 std::pair<std::string, bool> msgCode{retrievedTool(
m_evtInfo)};
66 if (not msgCode.second) {
68 return StatusCode::FAILURE;
79 return StatusCode::SUCCESS;
◆ read()
bool SCT_CalibLbTool::read |
( |
const std::string & |
fileName | ) |
|
|
virtual |
Definition at line 136 of file SCT_CalibLbTool.cxx.
141 m_phistoVector.clear();
142 m_phistoVector2D.clear();
143 TFile* fileLB{TFile::Open(
fileName.c_str())};
147 m_numberOfEventsHisto =
static_cast<TH1I*
>(fileLB->Get(
"GENERAL/events"));
153 if (m_numberOfEventsHisto==
nullptr) {
164 TH2F* hitmapHistoLB_tmp2D = (
TH2F*) fileLB->Get(name2D.c_str());
166 if (hitmapHistoLB_tmp2D==
nullptr) {
169 m_phistoVector2D.push_back(hitmapHistoLB_tmp2D);
172 for (
int iChip{0}; iChip!=n_chipsPerSide; ++iChip) {
175 TH1F* hist_tmp{
static_cast<TH1F*
>(fileLB->Get(
hname.c_str()))};
176 if (hist_tmp==
nullptr) {
179 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.
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.
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)