Belle II Software  release-08-01-10
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 
15 //root
16 #include <TVector3.h>
17 
18 using namespace std;
19 using namespace Belle2;
20 
21 void ARICHGeoMerger::print(const std::string& title) const
22 {
23 
24  ARICHGeoBase::print(title);
25 
26  cout << "Outer radius of merger PCB assembly envelope : " << getEnvelopeOuterRadius() << endl
27  << "Inner radius of merger PCB assembly envelope : " << getEnvelopeInnerRadius() << endl
28  << "Thickness of merger PCB assembly envelope : " << getEnvelopeThickness() << endl;
29  cout << "X0 merger PCB assembly envelope : " << getEnvelopeCenterPosition().X() << endl
30  << "Y0 merger PCB assembly envelope : " << getEnvelopeCenterPosition().Y() << endl
31  << "Z0 merger PCB assembly envelope : " << getEnvelopeCenterPosition().Z() << endl;
32  cout << "merger PCB material name : " << getMergerPCBMaterialName() << endl
33  << "merger PCB lenght : " << getSizeL() << endl
34  << "merger PCB width : " << getSizeW() << endl
35  << "merger PCB thickness : " << getThickness() << endl;
36  cout << "merger PCB screw whole radius : " << getMergerPCBscrewholeR() << endl
37  << "merger PCB screw whole position from the left and right sides : " << getMergerPCBscrewholePosdY() << endl
38  << "merger PCB screw whole position from the bottom edge : " << getMergerPCBscrewholePosdX1() << endl
39  << "merger PCB screw whole position from the top edge : " << getMergerPCBscrewholePosdX2() << endl;
40  cout << "single merger PCB and merger cooling envelope length : " << getSingleMergerEnvelopeSizeL() << endl
41  << "single merger PCB and merger cooling envelope width : " << getSingleMergerEnvelopeSizeW() << endl
42  << "single merger PCB and merger cooling envelope thickness : " << getSingleMergerEnvelopeThickness() << endl;
43  cout << "X0 of merger PCB inside the single merger envelope : " << getSingleMergeEnvelopePosition().X() << endl
44  << "Y0 of merger PCB inside the single merger envelope : " << getSingleMergeEnvelopePosition().Y() << endl
45  << "Z0 of merger PCB inside the single merger envelope : " << getSingleMergeEnvelopePosition().Z() << endl;
46 
47  //checkMergerPositionsDataConsistency();
48 
49  cout << setw(20) << "#"
50  << setw(20) << "mergerSlotID"
51  << setw(20) << "mergerPosR"
52  << setw(20) << "mergerAngle"
53  << setw(20) << "mergerOrientation"
54  << setw(20) << "mergerDeltaZ" << endl;
55  for (unsigned i = 0; i < getMergerSlotID().size(); i++) {
56  cout << setw(20) << i
57  << setw(20) << getMergerSlotID().at(i)
58  << setw(20) << getMergerPosR().at(i)
59  << setw(20) << getMergerAngle().at(i)
60  << setw(20) << getMergerOrientation().at(i)
61  << setw(20) << getSingleMergerenvelopeDeltaZ().at(i)
62  << endl;
63  }
64 }
65 
66 void ARICHGeoMerger::checkMergerPositionsDataConsistency() const
67 {
68 
69  //if(m_mergerSlotID.size() != m_mergerPosR.size()){
70  //string outMessage = " Data of the merger board positions is inconsisten : m_mergerSlotID.size() != m_mergerPosR.size() ";
71  //B2ERROR( outMessage << endl );
72  //B2FATAL(outMessage);
73  //}
74  //if(m_mergerSlotID.size() != m_mergerAngle.size()){
75  //string outMessage = " Data of the merger board positions is inconsisten : m_mergerSlotID.size() != m_mergerAngle.size() ";
76  //B2ERROR( outMessage << endl );
77  //B2FATAL(outMessage);
78  //}
79 
80  B2ASSERT("Data of the merger board positions is inconsisten : getEnvelopeThickness() <= getThickness() ",
81  getEnvelopeThickness() > getThickness());
82  B2ASSERT("Data of the merger board positions is inconsisten : m_mergerSlotID.size() != m_mergerPosR.size()",
83  m_mergerSlotID.size() == m_mergerPosR.size());
84  B2ASSERT("Data of the merger board positions is inconsisten : m_mergerSlotID.size() != m_mergerAngle.size()",
85  m_mergerSlotID.size() == m_mergerAngle.size());
86  B2ASSERT("Data of the merger board positions is inconsisten : m_mergerSlotID.size() != m_singlemergerenvelopeDeltaZ.size()",
87  m_mergerSlotID.size() == m_singlemergerenvelopeDeltaZ.size());
88 
89 }
Abstract base class for different kinds of events.