Belle II Software  release-08-01-10
ARICHGeoMergerCooling.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/ARICHGeoMergerCooling.h>
11 #include <arich/dbobjects/tessellatedSolidStr.h>
12 #include <framework/gearbox/Unit.h>
13 #include <framework/logging/Logger.h>
14 #include <math.h>
15 #include <iostream>
16 #include <iomanip>
17 
18 //root
19 #include <TVector3.h>
20 
21 using namespace std;
22 using namespace Belle2;
23 
24 void ARICHGeoMergerCooling::print(const std::string& title) const
25 {
26 
27  ARICHGeoBase::print(title);
28 
29  cout << " Merger cooling bodies info" << endl;
30  cout << " Merger cooling bodies material name : " << getMergerCoolingBodiesMaterialName() << endl;
31  cout << " m_mergerCoolingBodiesInfo.size() = " << m_mergerCoolingBodiesInfo.size() << endl;
32 
33  for (unsigned i = 0; i < m_mergerCoolingBodiesInfo.size(); i++) {
34  tessellatedSolidStr mergerCoolingBodiesStr = getMergerCoolingBodiesInfo(i + 1);
35  mergerCoolingBodiesStr.printInfo();
36  //mergerCoolingBodiesStr.printInfo(1);
37  }
38 
39  cout << "mergerCoolingBodiesv2/mergerCoolingPositionID" << endl;
40  for (unsigned i = 0; i < getMergerCoolingPositionID().size(); i++) {
41  cout << setw(20) << i + 1
42  << setw(25) << getMergerCoolingPositionID().at(i) << endl;
43  }
44 
45 }
46 
47 void ARICHGeoMergerCooling::checkMergerCoolingSystemDataConsistency() const
48 {
49 
50  B2ASSERT("Data of the cooling system V2 is inconsisten : getMergerCoolingPositionID().size() != 72",
51  getMergerCoolingPositionID().size() == 72);
52  for (unsigned i = 0; i < m_mergerCoolingBodiesInfo.size(); i++) {
53  tessellatedSolidStr mergerCoolingBodiesStr = getMergerCoolingBodiesInfo(i + 1);
54  }
55 }
56 
57 const tessellatedSolidStr ARICHGeoMergerCooling::getMergerCoolingBodiesInfo_globalMergerID(unsigned int iMergerSlot) const
58 {
59  B2ASSERT("iMergerSlot <=0 ", iMergerSlot > 0);
60  B2ASSERT("iMergerSlot > 72", iMergerSlot <= 72);
61  int positionID = (int)getMergerCoolingPositionID().at(iMergerSlot - 1);
62  B2ASSERT("positionID <=0 ", positionID > 0);
63  B2ASSERT("positionID > 12", positionID <= 12);
64  return getMergerCoolingBodiesInfo(positionID);
65 }
Abstract base class for different kinds of events.
Structure which holds apexes of the tessellation volumes.