 |
ATLAS Offline Software
|
Go to the documentation of this file.
37 std::vector<std::vector<float>> barrel_module_z(10);
38 std::vector<std::vector<float>> endcap_module_z(10);
45 ATH_MSG_ERROR(
"Problems with pointer to Detector Element !!!");
46 return StatusCode::FAILURE;
58 if (pixelBarrelEndcap<0 or pixelPhiModule > 0 or (pixelBarrelEndcap == 0 and pixelEtaModule<0))
62 throw std::runtime_error(
"Pointer to PixelModuleDesign object is null");
69 float module_z = element->
center().z();
70 ATH_MSG_DEBUG(
"Modules BarrelEndcap LayerDisk Phi Eta z : " << pixelBarrelEndcap <<
" " << pixelLayerDisk <<
" " << pixelPhiModule <<
" " << pixelEtaModule <<
" " << module_z <<
" | nb chips : " << chips <<
" rows-cols: " << moduleDesign->
rowsPerCircuit() <<
"-" << moduleDesign->
columnsPerCircuit() <<
" thickness:" << moduleDesign->
thickness());
72 element->
isBarrel() ? barrel_module_z.at(pixelLayerDisk).push_back(module_z) : endcap_module_z.at(pixelLayerDisk).push_back(module_z);
80 return StatusCode::SUCCESS;
85 const std::vector<unsigned int>& encodedstream,
90 const float streamLength = encodedstream.size() *
s_bitsPerPack;
95 m_encoded_streamLength->Fill(streamLength);
108 m_p_streamLength[pixelLayerDisk][region][
side]->Fill(
z, streamLength);
109 m_h2_streamLength[pixelLayerDisk][region][
side]->Fill(
z, streamLength);
112 m_p_dataRate[pixelLayerDisk][region][
side]->Fill(
z, data_rate);
113 m_h2_dataRate[pixelLayerDisk][region][
side]->Fill(
z, data_rate);
116 m_p_hits[pixelLayerDisk][region][
side]->Fill(
z, hitMap.
nHits());
117 m_h2_hits[pixelLayerDisk][region][
side]->Fill(
z, hitMap.
nHits());
140 if (hitMap(col,
row) > 0){
141 m_h2_chip_hitmap[pixelLayerDisk][region]->Fill(
row, col, 1);
142 m_h2_chip_totmap[pixelLayerDisk][region]->Fill(
row, col, hitMap(col,
row));
151 const std::vector<std::vector<float >>& endcap_z) {
154 m_encoded_streamLength =
new TH1F(
"m_encoded_streamLength",
"Encoded Stream Length in bits", 2000, 0, 2000);
155 if ((
m_thistSvc->regHist(
m_path + m_encoded_streamLength->GetName(), m_encoded_streamLength)).isFailure())
156 return StatusCode::FAILURE;
158 ATH_MSG_DEBUG(
"Histogram " << m_encoded_streamLength->GetName() <<
" successfully registered.");
162 std::array<std::vector<std::vector<double>>,
N_REGIONS>
bins;
167 if (not barrel_z[
layer].empty()) {
168 for (
unsigned int z_bin = 0; z_bin<(barrel_z[
layer].size()-1); z_bin++) {
170 float interModulePoint = 0.5 * ( barrel_z[
layer].at(z_bin) + barrel_z[
layer].at(z_bin+1) );
176 double last_value = 2.*barrel_z[
layer].back() - barrel_z[
layer].at( barrel_z[
layer].
size() - 2 );
180 if (not endcap_z[
layer].empty()) {
181 for (
unsigned int z_bin = 0; z_bin<(endcap_z[
layer].size()-1); z_bin++) {
183 float interModulePoint = 0.5 * ( endcap_z[
layer].at(z_bin) + endcap_z[
layer].at(z_bin+1) );
185 float initialValue = 2.*endcap_z[
layer].at(z_bin)-interModulePoint;
191 double last_value = 2.*endcap_z[
layer].back() - endcap_z[
layer].at( endcap_z[
layer].
size() - 2);
196 for (
unsigned int region=0; region<
N_REGIONS; region++) {
208 return StatusCode::FAILURE;
209 ATH_MSG_DEBUG(
"Histogram " << m_h2_chip_hitmap[
layer][region]->GetName() <<
" successfully registered.");
215 return StatusCode::FAILURE;
216 ATH_MSG_DEBUG(
"Histogram " << m_h2_chip_totmap[
layer][region]->GetName() <<
" successfully registered.");
225 m_p_streamLength[
layer][region][
side] =
new TProfile((
"m_p_streamLength_" + name_base).c_str(),
226 (title_base +
" Stream Length; z[mm]; <stream length> [bits]").c_str(),
229 return StatusCode::FAILURE;
230 ATH_MSG_DEBUG(
"Histogram " << m_p_streamLength[
layer][region][
side]->GetName() <<
" successfully registered.");
232 m_h2_streamLength[
layer][region][
side] =
new TH2F((
"m_h2_streamLength_" + name_base).c_str(),
233 (title_base +
" Stream Length; z[mm]; <stream length> [bits]").c_str(),
237 return StatusCode::FAILURE;
238 ATH_MSG_DEBUG(
"Histogram " << m_h2_streamLength[
layer][region][
side]->GetName() <<
" successfully registered.");
243 m_p_dataRate[
layer][region][
side] =
new TProfile((
"m_p_dataRate_" + name_base).c_str(),
244 (title_base +
" Data rate per chip; z[mm]; <data rate per chip> [b/s]").c_str(),
247 return StatusCode::FAILURE;
248 ATH_MSG_DEBUG(
"Histogram " << m_p_dataRate[
layer][region][
side]->GetName() <<
" successfully registered.");
250 m_h2_dataRate[
layer][region][
side] =
new TH2F((
"m_h2_dataRate_" + name_base).c_str(),
251 (title_base +
" Data rate per chip; z[mm]; <data rate per chip> [b/s]").c_str(),
255 return StatusCode::FAILURE;
256 ATH_MSG_DEBUG(
"Histogram " << m_h2_dataRate[
layer][region][
side]->GetName() <<
" successfully registered.");
260 (title_base +
" Hits per chip; z[mm]; <hits/chip>").c_str(),
263 return StatusCode::FAILURE;
266 m_h2_hits[
layer][region][
side] =
new TH2F((
"m_h2_hits_" + name_base).c_str(),
267 (title_base +
" Hits per chip; z[mm]; <hits/chip>").c_str(),
271 return StatusCode::FAILURE;
277 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
Const iterator class for DataVector/DataList.
double thickness() const
Method which returns thickness of the silicon wafer.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
virtual const Amg::Vector3D & center() const override final
Center in global coordinates.
std::string to_string(const SectorProjector proj)
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
def TProfile(*args, **kwargs)
::StatusCode StatusCode
StatusCode definition for legacy code.
int numberOfCircuits() const
Total number of circuits:
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const override
int layer_disk(const Identifier &id) const
int eta_module(const Identifier &id) const
int rowsPerCircuit() const
Number of cell rows per circuit:
virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const override
virtual const SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
int phi_module(const Identifier &id) const
int columnsPerCircuit() const
Number of cell columns per circuit:
virtual Identifier identify() const override final
identifier of this detector element (inline)