Belle II Software development
ARICHGeoMerger.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9//basf2
10#include <arich/dbobjects/ARICHGeoMerger.h>
11#include <framework/logging/Logger.h>
12#include <iostream>
13#include <iomanip>
14
15using namespace std;
16using namespace Belle2;
17
18void ARICHGeoMerger::print(const std::string& title) const
19{
20
22
23 cout << "Outer radius of merger PCB assembly envelope : " << getEnvelopeOuterRadius() << endl
24 << "Inner radius of merger PCB assembly envelope : " << getEnvelopeInnerRadius() << endl
25 << "Thickness of merger PCB assembly envelope : " << getEnvelopeThickness() << endl;
26 cout << "X0 merger PCB assembly envelope : " << getEnvelopeCenterPosition().X() << endl
27 << "Y0 merger PCB assembly envelope : " << getEnvelopeCenterPosition().Y() << endl
28 << "Z0 merger PCB assembly envelope : " << getEnvelopeCenterPosition().Z() << endl;
29 cout << "merger PCB material name : " << getMergerPCBMaterialName() << endl
30 << "merger PCB lenght : " << getSizeL() << endl
31 << "merger PCB width : " << getSizeW() << endl
32 << "merger PCB thickness : " << getThickness() << endl;
33 cout << "merger PCB screw whole radius : " << getMergerPCBscrewholeR() << endl
34 << "merger PCB screw whole position from the left and right sides : " << getMergerPCBscrewholePosdY() << endl
35 << "merger PCB screw whole position from the bottom edge : " << getMergerPCBscrewholePosdX1() << endl
36 << "merger PCB screw whole position from the top edge : " << getMergerPCBscrewholePosdX2() << endl;
37 cout << "single merger PCB and merger cooling envelope length : " << getSingleMergerEnvelopeSizeL() << endl
38 << "single merger PCB and merger cooling envelope width : " << getSingleMergerEnvelopeSizeW() << endl
39 << "single merger PCB and merger cooling envelope thickness : " << getSingleMergerEnvelopeThickness() << endl;
40 cout << "X0 of merger PCB inside the single merger envelope : " << getSingleMergeEnvelopePosition().X() << endl
41 << "Y0 of merger PCB inside the single merger envelope : " << getSingleMergeEnvelopePosition().Y() << endl
42 << "Z0 of merger PCB inside the single merger envelope : " << getSingleMergeEnvelopePosition().Z() << endl;
43
44 //checkMergerPositionsDataConsistency();
45
46 cout << setw(20) << "#"
47 << setw(20) << "mergerSlotID"
48 << setw(20) << "mergerPosR"
49 << setw(20) << "mergerAngle"
50 << setw(20) << "mergerOrientation"
51 << setw(20) << "mergerDeltaZ" << endl;
52 for (unsigned i = 0; i < getMergerSlotID().size(); i++) {
53 cout << setw(20) << i
54 << setw(20) << getMergerSlotID().at(i)
55 << setw(20) << getMergerPosR().at(i)
56 << setw(20) << getMergerAngle().at(i)
57 << setw(20) << getMergerOrientation().at(i)
58 << setw(20) << getSingleMergerenvelopeDeltaZ().at(i)
59 << endl;
60 }
61}
62
64{
65
66 //if(m_mergerSlotID.size() != m_mergerPosR.size()){
67 //string outMessage = " Data of the merger board positions is inconsisten : m_mergerSlotID.size() != m_mergerPosR.size() ";
68 //B2ERROR( outMessage << endl );
69 //B2FATAL(outMessage);
70 //}
71 //if(m_mergerSlotID.size() != m_mergerAngle.size()){
72 //string outMessage = " Data of the merger board positions is inconsisten : m_mergerSlotID.size() != m_mergerAngle.size() ";
73 //B2ERROR( outMessage << endl );
74 //B2FATAL(outMessage);
75 //}
76
77 B2ASSERT("Data of the merger board positions is inconsisten : getEnvelopeThickness() <= getThickness() ",
79 B2ASSERT("Data of the merger board positions is inconsisten : m_mergerSlotID.size() != m_mergerPosR.size()",
80 m_mergerSlotID.size() == m_mergerPosR.size());
81 B2ASSERT("Data of the merger board positions is inconsisten : m_mergerSlotID.size() != m_mergerAngle.size()",
82 m_mergerSlotID.size() == m_mergerAngle.size());
83 B2ASSERT("Data of the merger board positions is inconsisten : m_mergerSlotID.size() != m_singlemergerenvelopeDeltaZ.size()",
85
86}
virtual void print(const std::string &title) const
Print the content of the class.
Definition: ARICHGeoBase.cc:20
const std::vector< double > & getSingleMergerenvelopeDeltaZ() const
Returns vector of Z position of the single merger and merger cooling body envelope inside global merg...
std::vector< double > m_mergerSlotID
Merger slot number.
double getMergerPCBscrewholeR() const
Returns merger PCB screw hole radius.
std::vector< double > m_mergerPosR
Distance from the center in mm.
double getSingleMergerEnvelopeThickness() const
Returns single merger PCB and merger cooling envelop thickness.
double getSizeW() const
Returns merger PCB width.
void checkMergerPositionsDataConsistency() const
Check data consistency of the merger positions In case of failure print the basf2 ERROR message using...
double getMergerPCBscrewholePosdX1() const
Returns merger PCB screw hole position from the bottom edge.
double getEnvelopeOuterRadius() const
Returns Outer radius of merger PCB assembly envelope.
const std::vector< double > & getMergerSlotID() const
Returns vector of merger boards slot numbers.
double getMergerPCBscrewholePosdX2() const
Returns merger PCB screw hole position from the top edge.
void print(const std::string &title="Merger PCB geometry parameters") const
Print the content of the class.
const std::vector< double > & getMergerAngle() const
Returns vector of merger boarts azimuthal angles in polar coordinate system in deg.
double getThickness() const
Returns merger PCB thickness.
ROOT::Math::XYZVector getSingleMergeEnvelopePosition() const
Returns position vector (ROOT::Math::XYZVector) of merger PCB inside the single merger envelope.
std::vector< double > m_mergerAngle
Azimuthal angle of the merger PCB center in polar coordinate system in deg.
ROOT::Math::XYZVector getEnvelopeCenterPosition() const
Returns position vector (ROOT::Math::XYZVector) of merger PCB assembly envelope.
const std::vector< double > & getMergerOrientation() const
Returns vector of merger boarts orientations in deg.
const std::vector< double > & getMergerPosR() const
Returns vector of merger boards distances from the center in mm.
const std::string & getMergerPCBMaterialName() const
Returns merger PCB material name.
double getSingleMergerEnvelopeSizeW() const
Returns single merger PCB and merger cooling envelop width.
double getEnvelopeInnerRadius() const
Returns Inner radius of merger PCB assembly envelope.
std::vector< double > m_singlemergerenvelopeDeltaZ
Z position of the single merger and merger cooling body envelope inside global merger envelope in mm.
double getSingleMergerEnvelopeSizeL() const
Returns single merger PCB and merger cooling envelop length.
double getSizeL() const
Returns merger PCB lenght.
double getEnvelopeThickness() const
Returns Thickness of merger PCB assembly envelope.
double getMergerPCBscrewholePosdY() const
Returns merger PCB screw hole position from the left and right sides.
Abstract base class for different kinds of events.
STL namespace.