Tool providing local alignment of silicon detectors from the conditions database.
More...
#include <SiGlobAlignDBTool.h>
Tool providing local alignment of silicon detectors from the conditions database.
Definition at line 33 of file SiGlobAlignDBTool.h.
◆ SiGlobAlignDBTool()
AFP::SiGlobAlignDBTool::SiGlobAlignDBTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~SiGlobAlignDBTool()
virtual AFP::SiGlobAlignDBTool::~SiGlobAlignDBTool |
( |
| ) |
|
|
inlineoverridevirtual |
◆ alignment()
Definition at line 59 of file SiGlobAlignDBTool.cxx.
61 ATH_MSG_DEBUG(
"will get global alignment for station "<<stationID);
65 SiGlobAlignData GA_guess(stationID);
67 int guess_ch_correct=0;
68 for(
auto guess_ch : guess_ch_vec)
71 int st=aligndata[
"stationID"];
72 std::string alignType=aligndata[
"alignType"];
75 if(alignType==
"tracker" && !(guess_ch_correct&1))
77 ATH_MSG_DEBUG(
"channel guessed correctly, stationID "<<st<<
", alignType "<<alignType<<
", channel guess "<<guess_ch);
78 GA_guess.setTracker(aligndata[
"shiftX"], aligndata[
"shiftY"], aligndata[
"shiftZ"], aligndata[
"alpha"], aligndata[
"beta"], aligndata[
"gamma"]);
81 else if(alignType==
"beam" && !(guess_ch_correct&2))
83 ATH_MSG_DEBUG(
"channel guessed correctly, stationID "<<st<<
", alignType "<<alignType<<
", channel guess "<<guess_ch);
84 GA_guess.setBeam(aligndata[
"shiftX"], aligndata[
"shiftY"], aligndata[
"shiftZ"], aligndata[
"alpha"], aligndata[
"beta"], aligndata[
"gamma"]);
87 else if(alignType==
"RP" && !(guess_ch_correct&4))
89 ATH_MSG_DEBUG(
"channel guessed correctly, stationID "<<st<<
", alignType "<<alignType<<
", channel guess "<<guess_ch);
90 GA_guess.setRP(aligndata[
"shiftX"], aligndata[
"shiftY"], aligndata[
"shiftZ"], aligndata[
"alpha"], aligndata[
"beta"], aligndata[
"gamma"]);
93 else if(alignType==
"correction" && !(guess_ch_correct&8))
95 ATH_MSG_DEBUG(
"channel guessed correctly, stationID "<<st<<
", alignType "<<alignType<<
", channel guess "<<guess_ch);
96 GA_guess.setCorr(aligndata[
"shiftX"], aligndata[
"shiftY"], aligndata[
"shiftZ"], aligndata[
"alpha"], aligndata[
"beta"], aligndata[
"gamma"]);
99 else ATH_MSG_DEBUG(
"alignType or channel is probably incorrect, stationID "<<stationID<<
", alignType "<<alignType<<
", channel guess "<<guess_ch<<
", guess_ch_correct "<<guess_ch_correct);
103 if(guess_ch_correct==15)
105 ATH_MSG_DEBUG(
"channels guessed correctly, stationID "<<stationID);
110 ATH_MSG_DEBUG(
"channels were not guessed correctly, stationID "<<stationID);
114 SiGlobAlignData GA_loop(stationID);
115 int loop_ch_correct=0;
116 for(
auto&
chan : channeldata.items())
121 int st=aligndata[
"stationID"];
122 std::string alignType=aligndata[
"alignType"];
126 if(alignType==
"tracker" && !(loop_ch_correct&1))
128 ATH_MSG_DEBUG(
"channel found for stationID "<<st<<
", alignType "<<alignType<<
", channel nr. "<<
chan.key());
129 GA_loop.setTracker(aligndata[
"shiftX"], aligndata[
"shiftY"], aligndata[
"shiftZ"], aligndata[
"alpha"], aligndata[
"beta"], aligndata[
"gamma"]);
132 else if(alignType==
"beam" && !(loop_ch_correct&2))
134 ATH_MSG_DEBUG(
"channel found for stationID "<<st<<
", alignType "<<alignType<<
", channel nr. "<<
chan.key());
135 GA_loop.setBeam(aligndata[
"shiftX"], aligndata[
"shiftY"], aligndata[
"shiftZ"], aligndata[
"alpha"], aligndata[
"beta"], aligndata[
"gamma"]);
138 else if(alignType==
"RP" && !(loop_ch_correct&4))
140 ATH_MSG_DEBUG(
"channel found for stationID "<<st<<
", alignType "<<alignType<<
", channel nr. "<<
chan.key());
141 GA_loop.setRP(aligndata[
"shiftX"], aligndata[
"shiftY"], aligndata[
"shiftZ"], aligndata[
"alpha"], aligndata[
"beta"], aligndata[
"gamma"]);
144 else if(alignType==
"correction" && !(loop_ch_correct&8))
146 ATH_MSG_DEBUG(
"channel found for stationID "<<st<<
", alignType "<<alignType<<
", channel nr. "<<
chan.key());
147 GA_loop.setCorr(aligndata[
"shiftX"], aligndata[
"shiftY"], aligndata[
"shiftZ"], aligndata[
"alpha"], aligndata[
"beta"], aligndata[
"gamma"]);
150 else ATH_MSG_DEBUG(
"alignType is probably incorrect, stationID "<<stationID<<
", alignType "<<alignType<<
", channel nr. "<<
chan.key()<<
", loop_ch_correct "<<loop_ch_correct);
153 if(loop_ch_correct==15)
155 ATH_MSG_DEBUG(
"channels found correctly, stationID "<<stationID);
160 ATH_MSG_DEBUG(
"channels were not found correctly, stationID "<<stationID);
164 ATH_MSG_WARNING(
"global alignment data stationID "<<stationID<<
" not found in any channels, returning zeros");
165 return SiGlobAlignData(stationID);
◆ alignmentData()
Provide alignment parameters for a given station. Returns nullptr if no data available.
Definition at line 37 of file SiGlobAlignDBTool.cxx.
39 ATH_MSG_DEBUG(
"will get global alignment for run "<<ctx.eventID().run_number()<<
", lb "<<ctx.eventID().lumi_block()<<
", event "<<ctx.eventID().event_number());
43 if ( attrGlobList ==
nullptr )
49 if(attrGlobList->size()>1)
ATH_MSG_INFO(
"there should be only one real channel in "<<
m_rch_glob.fullKey() <<
", there are "<<attrGlobList->size()<<
" real channels, only the first one will be used ");
53 std::string
data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
◆ finalize()
StatusCode AFP::SiGlobAlignDBTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode AFP::SiGlobAlignDBTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ m_rch_glob
The documentation for this class was generated from the following files: