Belle II Software  release-05-02-19
TOPGeometryPar.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Petric, Marko Staric *
7  * Major revision: 2016 *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #include <top/geometry/TOPGeometryPar.h>
13 
14 #include <framework/gearbox/GearDir.h>
15 #include <framework/logging/Logger.h>
16 #include <framework/logging/LogSystem.h>
17 #include <framework/geometry/BFieldManager.h>
18 #include <geometry/Materials.h>
19 #include <iostream>
20 #include <TSpline.h>
21 #include <algorithm>
22 #include <set>
23 
24 using namespace std;
25 
26 namespace Belle2 {
32  namespace TOP {
33 
34  TOPGeometryPar* TOPGeometryPar::s_instance = 0;
35  const double TOPGeometryPar::c_hc = 1239.84193; // [eV*nm]
36 
37  TOPGeometryPar::~TOPGeometryPar()
38  {
39  if (m_geo) delete m_geo;
40  if (m_geoDB) delete m_geoDB;
41  s_instance = 0;
42  }
43 
44 
45  TOPGeometryPar* TOPGeometryPar::Instance()
46  {
47  if (!s_instance) {
48  s_instance = new TOPGeometryPar();
49  }
50  return s_instance;
51  }
52 
53 
54  void TOPGeometryPar::Initialize(const GearDir& content)
55  {
56 
57  m_fromDB = false;
58  m_valid = false;
59 
60  if (m_geo) delete m_geo;
61  m_geo = createConfiguration(content);
62  if (!m_geo->isConsistent()) {
63  B2ERROR("TOPGeometryPar::createConfiguration: geometry not consistently defined");
64  return;
65  }
66 
67  GearDir frontEndMapping(content, "FrontEndMapping");
68  m_frontEndMapper.initialize(frontEndMapping);
69  if (!m_frontEndMapper.isValid()) {
70  return;
71  }
72 
73  GearDir channelMapping0(content, "ChannelMapping[@type='IRS3B']");
74  m_channelMapperIRS3B.initialize(channelMapping0);
75  if (!m_channelMapperIRS3B.isValid()) {
76  return;
77  }
78 
79  GearDir channelMapping1(content, "ChannelMapping[@type='IRSX']");
80  m_channelMapperIRSX.initialize(channelMapping1);
81  if (!m_channelMapperIRSX.isValid()) {
82  return;
83  }
84  m_valid = true;
85 
86  finalizeInitialization();
87 
88  }
89 
90 
91  void TOPGeometryPar::Initialize()
92  {
93  m_fromDB = true;
94  m_valid = false;
95 
96  if (m_geoDB) delete m_geoDB;
97  m_geoDB = new DBObjPtr<TOPGeometry>();
98 
99  if (!m_geoDB->isValid()) {
100  B2ERROR("TOPGeometry: no payload found in database");
101  return;
102  }
103  if ((*m_geoDB)->getWavelengthFilter().getName().empty()) {
104  m_oldPayload = true;
105  B2WARNING("TOPGeometry: obsolete payload revision (pixel independent PDE) - please, check global tag");
106  }
107  if ((*m_geoDB)->getTTSes().empty()) {
108  B2WARNING("TOPGeometry: obsolete payload revision (nominal TTS only) - please, check global tag");
109  }
110  if ((*m_geoDB)->arePDETuningFactorsEmpty()) {
111  B2WARNING("TOPGeometry: old payload revision (before bugfix and update of optical properties)");
112  }
113 
114  // Make sure that we abort as soon as the geometry changes
115  m_geoDB->addCallback([]() {
116  B2FATAL("Geometry cannot change during processing, "
117  "aborting (component TOP)");
118  });
119 
120  m_frontEndMapper.initialize();
121  if (!m_frontEndMapper.isValid()) {
122  B2ERROR("TOPFrontEndMaps: no payload found in database");
123  return;
124  }
125 
126  m_channelMapperIRSX.initialize();
127  if (!m_channelMapperIRSX.isValid()) {
128  B2ERROR("TOPChannelMaps: no payload found in database");
129  return;
130  }
131  m_valid = true;
132 
133  finalizeInitialization();
134 
135  }
136 
137  void TOPGeometryPar::finalizeInitialization()
138  {
139  // set B field flag
140  m_BfieldOn = (BFieldManager::getField(0, 0, 0).Mag() / Unit::T) > 0.1;
141 
142  // add call backs for PMT data
143  m_pmtInstalled.addCallback(this, &TOPGeometryPar::clearCache);
144  m_pmtQEData.addCallback(this, &TOPGeometryPar::clearCache);
145 
146  // print geometry if the debug level for 'top' is set 10000
147  const auto& logSystem = LogSystem::Instance();
148  if (logSystem.isLevelEnabled(LogConfig::c_Debug, 10000, "top")) {
149  getGeometry()->print();
150  if (m_oldPayload) {
151  cout << "Envelope QE same as nominal quantum efficiency" << endl << endl;
152  return;
153  }
154  if (m_envelopeQE.isEmpty()) setEnvelopeQE();
155  m_envelopeQE.print("Envelope QE");
156  }
157  }
158 
159  void TOPGeometryPar::clearCache()
160  {
161  m_envelopeQE.clear();
162  m_pmts.clear();
163  m_relEfficiencies.clear();
164  m_pmtTypes.clear();
165  }
166 
167  const TOPGeometry* TOPGeometryPar::getGeometry() const
168  {
169  if (!m_valid) B2FATAL("No geometry available for TOP");
170 
171  TOPGeometry::useBasf2Units();
172  if (m_fromDB) {
173  return &(**m_geoDB);
174  } else {
175  return m_geo;
176  }
177  }
178 
179  double TOPGeometryPar::getPMTEfficiencyEnvelope(double energy) const
180  {
181  double lambda = c_hc / energy;
182 
183  if (m_oldPayload) { // filter transmittance is included in nominal QE, return it!
184  return getGeometry()->getNominalQE().getEfficiency(lambda);
185  }
186 
187  if (m_envelopeQE.isEmpty()) setEnvelopeQE();
188  return m_envelopeQE.getEfficiency(lambda);
189  }
190 
191  double TOPGeometryPar::getPMTEfficiency(double energy,
192  int moduleID, int pmtID,
193  double x, double y) const
194  {
195  const auto* geo = getGeometry();
196  if (!geo->isModuleIDValid(moduleID)) return 0;
197 
198  double lambda = c_hc / energy;
199 
200  if (m_oldPayload) { // filter transmittance is included in nominal QE, return it!
201  return geo->getNominalQE().getEfficiency(lambda);
202  }
203 
204  if (m_pmts.empty()) mapPmtQEToPositions();
205 
206  int id = getUniquePmtID(moduleID, pmtID);
207  const auto* pmtQE = m_pmts[id];
208  if (!pmtQE) return 0;
209 
210  const auto& pmtArray = geo->getModule(moduleID).getPMTArray();
211  auto pmtPixel = pmtArray.getPMT().getPixelID(x, y);
212  if (pmtPixel == 0) return 0;
213 
214  auto pixelID = pmtArray.getPixelID(pmtID, pmtPixel);
215  auto channel = getChannelMapper().getChannel(pixelID);
216 
217  double RQE = geo->getPDETuningFactor(getPMTType(moduleID, pmtID));
218  if (m_channelRQE.isValid()) RQE *= m_channelRQE->getRQE(moduleID, channel);
219 
220  return pmtQE->getEfficiency(pmtPixel, lambda, m_BfieldOn) * RQE;
221 
222  }
223 
224 
225  double TOPGeometryPar::getRelativePixelEfficiency(int moduleID, int pixelID) const
226  {
227 
228  auto channel = getChannelMapper().getChannel(pixelID);
229  auto pmtID = getChannelMapper().getPmtID(pixelID);
230 
231  double RQE = getGeometry()->getPDETuningFactor(getPMTType(moduleID, pmtID));
232  if (m_channelRQE.isValid()) RQE *= m_channelRQE->getRQE(moduleID, channel);
233 
234  double thrEffi = 1.0;
235  if (m_thresholdEff.isValid()) thrEffi = m_thresholdEff->getThrEff(moduleID, channel);
236 
237  if (m_oldPayload) { // nominal QE is used
238  return RQE * thrEffi;
239  }
240 
241  if (m_relEfficiencies.empty()) prepareRelEfficiencies();
242 
243  int id = getUniquePixelID(moduleID, pixelID);
244  return m_relEfficiencies[id] * RQE * thrEffi;
245  }
246 
247 
248  unsigned TOPGeometryPar::getPMTType(int moduleID, int pmtID) const
249  {
250  if (m_pmtTypes.empty()) mapPmtTypeToPositions();
251 
252  int id = getUniquePmtID(moduleID, pmtID);
253  return m_pmtTypes[id];
254  }
255 
256 
257  const TOPNominalTTS& TOPGeometryPar::getTTS(int moduleID, int pmtID) const
258  {
259  auto pmtType = getPMTType(moduleID, pmtID);
260  return getGeometry()->getTTS(pmtType);
261  }
262 
263 
264  void TOPGeometryPar::setEnvelopeQE() const
265  {
266  if (m_pmtQEData.getEntries() == 0) {
267  B2ERROR("DBArray TOPPmtQEs is empty");
268  return;
269  }
270 
271  double lambdaFirst = 0;
272  for (const auto& pmt : m_pmtQEData) {
273  if (pmt.getLambdaFirst() > 0) {
274  lambdaFirst = pmt.getLambdaFirst();
275  break;
276  }
277  }
278  if (lambdaFirst == 0) {
279  B2ERROR("DBArray TOPPmtQEs: lambdaFirst of all PMT found to be less or equal 0");
280  return;
281  }
282  for (const auto& pmt : m_pmtQEData) {
283  if (pmt.getLambdaFirst() > 0) {
284  lambdaFirst = std::min(lambdaFirst, pmt.getLambdaFirst());
285  }
286  }
287 
288  double lambdaStep = 0;
289  for (const auto& pmt : m_pmtQEData) {
290  if (pmt.getLambdaStep() > 0) {
291  lambdaStep = pmt.getLambdaStep();
292  break;
293  }
294  }
295  if (lambdaStep == 0) {
296  B2ERROR("DBArray TOPPmtQEs: lambdaStep of all PMT found to be less or equal 0");
297  return;
298  }
299  for (const auto& pmt : m_pmtQEData) {
300  if (pmt.getLambdaStep() > 0) {
301  lambdaStep = std::min(lambdaStep, pmt.getLambdaStep());
302  }
303  }
304 
305  std::map<std::string, const TOPPmtInstallation*> map;
306  for (const auto& pmt : m_pmtInstalled) {
307  map[pmt.getSerialNumber()] = &pmt;
308  }
309  const auto* geo = getGeometry();
310 
311  std::vector<float> envelopeQE;
312  for (const auto& pmt : m_pmtQEData) {
313  float ce = pmt.getCE(m_BfieldOn);
314  auto pmtInstalled = map[pmt.getSerialNumber()];
315  if (pmtInstalled) ce *= geo->getPDETuningFactor(pmtInstalled->getType());
316  if (pmt.getLambdaFirst() == lambdaFirst and pmt.getLambdaStep() == lambdaStep) {
317  const auto& envelope = pmt.getEnvelopeQE();
318  if (envelopeQE.size() < envelope.size()) {
319  envelopeQE.resize(envelope.size() - envelopeQE.size(), 0);
320  }
321  for (size_t i = 0; i < std::min(envelopeQE.size(), envelope.size()); i++) {
322  envelopeQE[i] = std::max(envelopeQE[i], envelope[i] * ce);
323  }
324  } else {
325  double lambdaLast = pmt.getLambdaLast();
326  int nExtra = (lambdaLast - lambdaFirst) / lambdaStep + 1 - envelopeQE.size();
327  if (nExtra > 0) envelopeQE.resize(nExtra, 0);
328  for (size_t i = 0; i < envelopeQE.size(); i++) {
329  float qe = pmt.getEnvelopeQE(lambdaFirst + lambdaStep * i);
330  envelopeQE[i] = std::max(envelopeQE[i], qe * ce);
331  }
332  }
333  }
334 
335  m_envelopeQE.set(lambdaFirst, lambdaStep, 1.0, envelopeQE, "EnvelopeQE");
336 
337  B2INFO("TOPGeometryPar: envelope of PMT dependent QE has been set");
338 
339  }
340 
341 
342  void TOPGeometryPar::mapPmtQEToPositions() const
343  {
344  m_pmts.clear();
345 
346  std::map<std::string, const TOPPmtQE*> map;
347  for (const auto& pmt : m_pmtQEData) {
348  map[pmt.getSerialNumber()] = &pmt;
349  }
350  for (const auto& pmt : m_pmtInstalled) {
351  int id = getUniquePmtID(pmt.getSlotNumber(), pmt.getPosition());
352  m_pmts[id] = map[pmt.getSerialNumber()];
353  }
354 
355  B2INFO("TOPGeometryPar: QE of PMT's mapped to positions, size = " << m_pmts.size());
356  }
357 
358 
359  void TOPGeometryPar::mapPmtTypeToPositions() const
360  {
361  for (const auto& pmt : m_pmtInstalled) {
362  int id = getUniquePmtID(pmt.getSlotNumber(), pmt.getPosition());
363  m_pmtTypes[id] = pmt.getType();
364  }
365 
366  B2INFO("TOPGeometryPar: PMT types mapped to positions, size = "
367  << m_pmtTypes.size());
368 
369 
370  std::set<unsigned> types;
371  for (const auto& pmt : m_pmtInstalled) {
372  types.insert(pmt.getType());
373  }
374  const auto* geo = getGeometry();
375  for (const auto& type : types) {
376  if (geo->getTTS(type).getPMTType() != type) {
377  B2WARNING("No TTS found for an installed PMT type. Nominal one will be used."
378  << LogVar("PMT type", type));
379  }
380  }
381 
382  }
383 
384 
385  void TOPGeometryPar::prepareRelEfficiencies() const
386  {
387  m_relEfficiencies.clear();
388  if (m_pmts.empty()) mapPmtQEToPositions();
389 
390  const auto* geo = getGeometry();
391 
392  const auto& nominalQE = geo->getNominalQE();
393  double s0 = integralOfQE(nominalQE.getQE(), nominalQE.getCE(),
394  nominalQE.getLambdaFirst(), nominalQE.getLambdaStep());
395 
396  for (const auto& module : geo->getModules()) {
397  auto moduleID = module.getModuleID();
398  const auto& pmtArray = module.getPMTArray();
399  int numPMTs = pmtArray.getSize();
400  int numPMTPixels = pmtArray.getPMT().getNumPixels();
401  for (int pmtID = 1; pmtID <= numPMTs; pmtID++) {
402  const auto* pmtQE = m_pmts[getUniquePmtID(moduleID, pmtID)];
403  for (int pmtPixel = 1; pmtPixel <= numPMTPixels; pmtPixel++) {
404  double s = 0;
405  if (pmtQE) {
406  s = integralOfQE(pmtQE->getQE(pmtPixel), pmtQE->getCE(m_BfieldOn),
407  pmtQE->getLambdaFirst(), pmtQE->getLambdaStep());
408  }
409  auto pixelID = pmtArray.getPixelID(pmtID, pmtPixel);
410  auto id = getUniquePixelID(moduleID, pixelID);
411  m_relEfficiencies[id] = s / s0;
412  }
413  }
414  }
415 
416  B2INFO("TOPGeometryPar: pixel relative quantum efficiencies have been set, size = "
417  << m_relEfficiencies.size());
418  }
419 
420 
421  double TOPGeometryPar::integralOfQE(const std::vector<float>& qe, double ce,
422  double lambdaFirst, double lambdaStep) const
423  {
424  if (qe.empty()) return 0;
425 
426  double s = 0;
427  double lambda = lambdaFirst;
428  double f1 = qe[0] / (lambda * lambda);
429  for (size_t i = 1; i < qe.size(); i++) {
430  lambda += lambdaStep;
431  double f2 = qe[i] / (lambda * lambda);
432  s += (f1 + f2) / 2;
433  f1 = f2;
434  }
435  return s * c_hc * lambdaStep * ce;
436  }
437 
438 
439  TOPGeometry* TOPGeometryPar::createConfiguration(const GearDir& content)
440  {
441  TOPGeometry* geo = new TOPGeometry("TOPGeometry");
442 
443  // PMT array
444 
445  GearDir pmtParams(content, "PMTs/PMT");
446  TOPGeoPMT pmt(pmtParams.getLength("ModuleXSize"),
447  pmtParams.getLength("ModuleYSize"),
448  pmtParams.getLength("ModuleZSize") +
449  pmtParams.getLength("WindowThickness") +
450  pmtParams.getLength("BottomThickness"));
451  pmt.setWallThickness(pmtParams.getLength("ModuleWall"));
452  pmt.setWallMaterial(pmtParams.getString("wallMaterial"));
453  pmt.setFillMaterial(pmtParams.getString("fillMaterial"));
454  pmt.setSensVolume(pmtParams.getLength("SensXSize"),
455  pmtParams.getLength("SensYSize"),
456  pmtParams.getLength("SensThickness"),
457  pmtParams.getString("sensMaterial"));
458  pmt.setNumPixels(pmtParams.getInt("PadXNum"),
459  pmtParams.getInt("PadYNum"));
460  pmt.setWindow(pmtParams.getLength("WindowThickness"),
461  pmtParams.getString("winMaterial"));
462  pmt.setBottom(pmtParams.getLength("BottomThickness"),
463  pmtParams.getString("botMaterial"));
464 
465  auto& materials = geometry::Materials::getInstance();
466  GearDir reflEdgeSurfParams(pmtParams, "reflectiveEdge/Surface");
467  pmt.setReflEdge(pmtParams.getLength("reflectiveEdge/width"),
468  pmtParams.getLength("reflectiveEdge/thickness"),
469  materials.createOpticalSurfaceConfig(reflEdgeSurfParams));
470 
471  GearDir arrayParams(content, "PMTs");
472  TOPGeoPMTArray pmtArray(arrayParams.getInt("nPMTx"),
473  arrayParams.getInt("nPMTy"),
474  arrayParams.getLength("Xgap"),
475  arrayParams.getLength("Ygap"),
476  arrayParams.getString("stackMaterial"),
477  pmt);
478  pmtArray.setSiliconeCookie(arrayParams.getLength("siliconeCookie/thickness"),
479  arrayParams.getString("siliconeCookie/material"));
480  pmtArray.setWavelengthFilter(arrayParams.getLength("wavelengthFilter/thickness"),
481  arrayParams.getString("wavelengthFilter/material"));
482  pmtArray.setAirGap(arrayParams.getLength("airGap", 0));
483  double decoupledFraction = arrayParams.getDouble("decoupledFraction", 0);
484 
485  // modules
486 
487  GearDir moduleParams(content, "Modules");
488  GearDir glueParams(moduleParams, "Glue");
489  int numModules = moduleParams.getNumberNodes("Module");
490  for (int slotID = 1; slotID <= numModules; slotID++) {
491  std::string gearName = "Module[@slotID='" + std::to_string(slotID) + "']";
492  GearDir slotParams(moduleParams, gearName);
493  TOPGeoModule module(slotID,
494  slotParams.getLength("Radius"),
495  slotParams.getAngle("Phi"),
496  slotParams.getLength("BackwardZ"));
497  int cNumber = slotParams.getInt("ConstructionNumber");
498  module.setModuleCNumber(cNumber);
499  module.setName(addNumber(module.getName(), cNumber));
500 
501  auto prism = createPrism(content, slotParams.getString("Prism"));
502  prism.setName(addNumber(prism.getName(), cNumber));
503  module.setPrism(prism);
504 
505  auto barSegment2 = createBarSegment(content, slotParams.getString("BarSegment2"));
506  barSegment2.setName(addNumber(barSegment2.getName() + "2-", cNumber));
507  barSegment2.setGlue(glueParams.getLength("Thicknes1"),
508  glueParams.getString("GlueMaterial"));
509  module.setBarSegment2(barSegment2);
510 
511  auto barSegment1 = createBarSegment(content, slotParams.getString("BarSegment1"));
512  barSegment1.setName(addNumber(barSegment1.getName() + "1-", cNumber));
513  barSegment1.setGlue(glueParams.getLength("Thicknes2"),
514  glueParams.getString("GlueMaterial"));
515  module.setBarSegment1(barSegment1);
516 
517  auto mirror = createMirrorSegment(content, slotParams.getString("Mirror"));
518  mirror.setName(addNumber(mirror.getName(), cNumber));
519  mirror.setGlue(glueParams.getLength("Thicknes3"),
520  glueParams.getString("GlueMaterial"));
521  module.setMirrorSegment(mirror);
522 
523  module.setPMTArray(pmtArray);
524  if (decoupledFraction > 0) module.generateDecoupledPMTs(decoupledFraction);
525 
526  geo->appendModule(module);
527  }
528 
529  // displaced geometry (if defined)
530 
531  GearDir displacedGeometry(content, "DisplacedGeometry");
532  if (displacedGeometry) {
533  if (displacedGeometry.getInt("SwitchON") != 0) {
534  B2WARNING("TOP: displaced geometry is activated");
535  for (const GearDir& slot : displacedGeometry.getNodes("Slot")) {
536  int moduleID = slot.getInt("@ID");
537  if (!geo->isModuleIDValid(moduleID)) {
538  B2WARNING("TOPGeometryPar: DisplacedGeometry.xml: invalid moduleID."
539  << LogVar("moduleID", moduleID));
540  continue;
541  }
542  TOPGeoModuleDisplacement moduleDispl(slot.getLength("x"),
543  slot.getLength("y"),
544  slot.getLength("z"),
545  slot.getAngle("alpha"),
546  slot.getAngle("beta"),
547  slot.getAngle("gamma"));
548  auto& module = const_cast<TOPGeoModule&>(geo->getModule(moduleID));
549  module.setModuleDisplacement(moduleDispl);
550  }
551  }
552  }
553 
554  // displaced PMT arrays (if defined)
555 
556  GearDir displacedPMTArrays(content, "DisplacedPMTArrays");
557  if (displacedPMTArrays) {
558  if (displacedPMTArrays.getInt("SwitchON") != 0) {
559  B2WARNING("TOP: displaced PMT arrays are activated");
560  for (const GearDir& slot : displacedPMTArrays.getNodes("Slot")) {
561  int moduleID = slot.getInt("@ID");
562  if (!geo->isModuleIDValid(moduleID)) {
563  B2WARNING("TOPGeometryPar: DisplacedPMTArrays.xml: invalid moduleID."
564  << LogVar("moduleID", moduleID));
565  continue;
566  }
567  TOPGeoPMTArrayDisplacement arrayDispl(slot.getLength("x"),
568  slot.getLength("y"),
569  slot.getAngle("alpha"));
570  auto& module = const_cast<TOPGeoModule&>(geo->getModule(moduleID));
571  module.setPMTArrayDisplacement(arrayDispl);
572  }
573  }
574  }
575 
576  // broken glues (if any)
577 
578  GearDir brokenGlues(content, "BrokenGlues");
579  if (brokenGlues) {
580  if (brokenGlues.getInt("SwitchON") != 0) {
581  auto material = brokenGlues.getString("material");
582  for (const GearDir& slot : brokenGlues.getNodes("Slot")) {
583  int moduleID = slot.getInt("@ID");
584  if (!geo->isModuleIDValid(moduleID)) {
585  B2WARNING("TOPGeometryPar: BrokenGlues.xml: invalid moduleID."
586  << LogVar("moduleID", moduleID));
587  continue;
588  }
589  auto& module = const_cast<TOPGeoModule&>(geo->getModule(moduleID));
590  for (const GearDir& glue : slot.getNodes("Glue")) {
591  int glueID = glue.getInt("@ID");
592  double fraction = glue.getDouble("fraction");
593  if (fraction <= 0) continue;
594  double angle = glue.getAngle("angle");
595  module.setBrokenGlue(glueID, fraction, angle, material);
596  }
597  }
598  }
599  }
600 
601  // peel-off cookies (if any)
602 
603  GearDir peelOff(content, "PeelOffCookies");
604  if (peelOff) {
605  if (peelOff.getInt("SwitchON") != 0) {
606  auto material = peelOff.getString("material");
607  double thickness = peelOff.getLength("thickness");
608  for (const GearDir& slot : peelOff.getNodes("Slot")) {
609  int moduleID = slot.getInt("@ID");
610  if (!geo->isModuleIDValid(moduleID)) {
611  B2WARNING("TOPGeometryPar: PeelOffCookiess.xml: invalid moduleID."
612  << LogVar("moduleID", moduleID));
613  continue;
614  }
615  auto& module = const_cast<TOPGeoModule&>(geo->getModule(moduleID));
616  module.setPeelOffRegions(thickness, material);
617  for (const GearDir& region : slot.getNodes("Region")) {
618  int regionID = region.getInt("@ID");
619  double fraction = region.getDouble("fraction");
620  if (fraction <= 0) continue;
621  double angle = region.getAngle("angle");
622  module.appendPeelOffRegion(regionID, fraction, angle);
623  }
624  }
625  }
626  }
627 
628  // front-end electronics geometry
629 
630  GearDir feParams(content, "FrontEndGeo");
631  GearDir fbParams(feParams, "FrontBoard");
632  TOPGeoFrontEnd frontEnd;
633  frontEnd.setFrontBoard(fbParams.getLength("width"),
634  fbParams.getLength("height"),
635  fbParams.getLength("thickness"),
636  fbParams.getLength("gap"),
637  fbParams.getLength("y"),
638  fbParams.getString("material"));
639  GearDir hvParams(feParams, "HVBoard");
640  frontEnd.setHVBoard(hvParams.getLength("width"),
641  hvParams.getLength("length"),
642  hvParams.getLength("thickness"),
643  hvParams.getLength("gap"),
644  hvParams.getLength("y"),
645  hvParams.getString("material"));
646  GearDir bsParams(feParams, "BoardStack");
647  frontEnd.setBoardStack(bsParams.getLength("width"),
648  bsParams.getLength("height"),
649  bsParams.getLength("length"),
650  bsParams.getLength("gap"),
651  bsParams.getLength("y"),
652  bsParams.getString("material"),
653  bsParams.getLength("spacerWidth"),
654  bsParams.getString("spacerMaterial"));
655  geo->setFrontEnd(frontEnd, feParams.getInt("numBoardStacks"));
656 
657  // QBB
658 
659  GearDir qbbParams(content, "QBB");
660  TOPGeoQBB qbb(qbbParams.getLength("width"),
661  qbbParams.getLength("length"),
662  qbbParams.getLength("prismPosition"),
663  qbbParams.getString("material"));
664 
665  GearDir outerPanelParams(qbbParams, "outerPanel");
666  TOPGeoHoneycombPanel outerPanel(outerPanelParams.getLength("width"),
667  outerPanelParams.getLength("length"),
668  outerPanelParams.getLength("minThickness"),
669  outerPanelParams.getLength("maxThickness"),
670  outerPanelParams.getLength("radius"),
671  outerPanelParams.getLength("edgeWidth"),
672  outerPanelParams.getLength("y"),
673  outerPanelParams.getInt("N"),
674  outerPanelParams.getString("material"),
675  outerPanelParams.getString("edgeMaterial"),
676  "TOPOuterHoneycombPanel");
677  qbb.setOuterPanel(outerPanel);
678 
679  GearDir innerPanelParams(qbbParams, "innerPanel");
680  TOPGeoHoneycombPanel innerPanel(innerPanelParams.getLength("width"),
681  innerPanelParams.getLength("length"),
682  innerPanelParams.getLength("minThickness"),
683  innerPanelParams.getLength("maxThickness"),
684  innerPanelParams.getLength("radius"),
685  innerPanelParams.getLength("edgeWidth"),
686  innerPanelParams.getLength("y"),
687  innerPanelParams.getInt("N"),
688  innerPanelParams.getString("material"),
689  innerPanelParams.getString("edgeMaterial"),
690  "TOPInnerHoneycombPanel");
691  qbb.setInnerPanel(innerPanel);
692 
693  GearDir sideRailsParams(qbbParams, "sideRails");
694  TOPGeoSideRails sideRails(sideRailsParams.getLength("thickness"),
695  sideRailsParams.getLength("reducedThickness"),
696  sideRailsParams.getLength("height"),
697  sideRailsParams.getString("material"));
698  qbb.setSideRails(sideRails);
699 
700  GearDir prismEnclParams(qbbParams, "prismEnclosure");
701  TOPGeoPrismEnclosure prismEncl(prismEnclParams.getLength("length"),
702  prismEnclParams.getLength("height"),
703  prismEnclParams.getAngle("angle"),
704  prismEnclParams.getLength("bottomThickness"),
705  prismEnclParams.getLength("sideThickness"),
706  prismEnclParams.getLength("backThickness"),
707  prismEnclParams.getLength("frontThickness"),
708  prismEnclParams.getLength("extensionThickness"),
709  prismEnclParams.getString("material"));
710  qbb.setPrismEnclosure(prismEncl);
711 
712  GearDir endPlateParams(qbbParams, "forwardEndPlate");
713  TOPGeoEndPlate endPlate(endPlateParams.getLength("thickness"),
714  endPlateParams.getLength("height"),
715  endPlateParams.getString("material"),
716  "TOPForwardEndPlate");
717  qbb.setEndPlate(endPlate);
718 
719  GearDir coldPlateParams(qbbParams, "coldPlate");
720  TOPGeoColdPlate coldPlate(coldPlateParams.getLength("baseThickness"),
721  coldPlateParams.getString("baseMaterial"),
722  coldPlateParams.getLength("coolThickness"),
723  coldPlateParams.getLength("coolWidth"),
724  coldPlateParams.getString("coolMaterial"));
725  qbb.setColdPlate(coldPlate);
726 
727  geo->setQBB(qbb);
728 
729  // nominal QE
730 
731  GearDir qeParams(content, "QE");
732  std::vector<float> qeData;
733  for (const GearDir& Qeffi : qeParams.getNodes("Qeffi")) {
734  qeData.push_back(Qeffi.getDouble(""));
735  }
736  TOPNominalQE nominalQE(qeParams.getLength("LambdaFirst") / Unit::nm,
737  qeParams.getLength("LambdaStep") / Unit::nm,
738  qeParams.getDouble("ColEffi"),
739  qeData);
740  geo->setNominalQE(nominalQE);
741 
742  // nominal TTS
743 
744  GearDir ttsParams(content, "PMTs/TTS");
745  TOPNominalTTS nominalTTS("TOPNominalTTS");
746  for (const GearDir& Gauss : ttsParams.getNodes("Gauss")) {
747  nominalTTS.appendGaussian(Gauss.getDouble("fraction"),
748  Gauss.getTime("mean"),
749  Gauss.getTime("sigma"));
750  }
751  nominalTTS.normalize();
752  geo->setNominalTTS(nominalTTS);
753 
754  // PMT type dependent TTS
755 
756  GearDir pmtTTSParams(content, "TTSofPMTs");
757  for (const GearDir& ttsPar : pmtTTSParams.getNodes("TTSpar")) {
758  int type = ttsPar.getInt("type");
759  double tuneFactor = ttsPar.getDouble("PDEtuneFactor");
760  TOPNominalTTS tts("TTS of " + ttsPar.getString("@name") + " PMT");
761  tts.setPMTType(type);
762  for (const GearDir& Gauss : ttsPar.getNodes("Gauss")) {
763  tts.appendGaussian(Gauss.getDouble("fraction"),
764  Gauss.getTime("mean"),
765  Gauss.getTime("sigma"));
766  }
767  tts.normalize();
768  geo->appendTTS(tts);
769  geo->appendPDETuningFactor(type, tuneFactor);
770  }
771 
772  // nominal TDC
773 
774  GearDir tdcParams(content, "TDC");
775  if (tdcParams) {
776  TOPNominalTDC nominalTDC(tdcParams.getInt("numWindows"),
777  tdcParams.getInt("subBits"),
778  tdcParams.getTime("syncTimeBase"),
779  tdcParams.getInt("numofBunches"),
780  tdcParams.getTime("offset"),
781  tdcParams.getTime("pileupTime"),
782  tdcParams.getTime("doubleHitResolution"),
783  tdcParams.getTime("timeJitter"),
784  tdcParams.getDouble("efficiency"));
785  nominalTDC.setADCBits(tdcParams.getInt("adcBits"));
786  nominalTDC.setAveragePedestal(tdcParams.getInt("averagePedestal"));
787  geo->setNominalTDC(nominalTDC);
788  } else {
789  TOPNominalTDC nominalTDC(pmtParams.getInt("TDCbits"),
790  pmtParams.getTime("TDCbitwidth"),
791  pmtParams.getTime("TDCoffset", 0),
792  pmtParams.getTime("TDCpileupTime", 0),
793  pmtParams.getTime("TDCdoubleHitResolution", 0),
794  pmtParams.getTime("TDCtimeJitter", 50e-3),
795  pmtParams.getDouble("TDCefficiency", 1));
796  geo->setNominalTDC(nominalTDC);
797  }
798 
799  // single photon signal shape
800 
801  GearDir shapeParams(content, "SignalShape");
802  if (shapeParams) {
803  GearDir noiseBandwidth(shapeParams, "noiseBandwidth");
804  TOPSignalShape signalShape(shapeParams.getArray("sampleValues"),
805  geo->getNominalTDC().getSampleWidth(),
806  shapeParams.getTime("tailTimeConstant"),
807  noiseBandwidth.getDouble("pole1") / 1000,
808  noiseBandwidth.getDouble("pole2") / 1000);
809  geo->setSignalShape(signalShape);
810  }
811 
812  // calibration pulse shape
813 
814  GearDir calpulseParams(content, "CalPulseShape");
815  if (calpulseParams) {
816  GearDir noiseBandwidth(calpulseParams, "noiseBandwidth");
817  TOPSignalShape shape(calpulseParams.getArray("sampleValues"),
818  geo->getNominalTDC().getSampleWidth(),
819  calpulseParams.getTime("tailTimeConstant"),
820  noiseBandwidth.getDouble("pole1") / 1000,
821  noiseBandwidth.getDouble("pole2") / 1000);
822  geo->setCalPulseShape(shape);
823  }
824 
825  // wavelength filter bulk transmittance
826 
827  std::string materialNode = "Materials/Material[@name='TOPWavelengthFilterIHU340']";
828  GearDir filterMaterial(content, materialNode);
829  if (!filterMaterial) {
830  B2FATAL("TOPGeometry: " << materialNode << " not found");
831  }
832  GearDir property(filterMaterial, "Property[@name='ABSLENGTH']");
833  if (!property) {
834  B2FATAL("TOPGeometry: " << materialNode << ", Property ABSLENGTH not found");
835  }
836  int numNodes = property.getNumberNodes("value");
837  if (numNodes > 1) {
838  double conversion = Unit::convertValue(1, property.getString("@unit", "GeV"));
839  std::vector<double> energies;
840  std::vector<double> absLengths;
841  for (int i = 0; i < numNodes; i++) {
842  GearDir value(property, "value", i + 1);
843  energies.push_back(value.getDouble("@energy") * conversion / Unit::eV);// [eV]
844  absLengths.push_back(value.getDouble() * Unit::mm); // [cm]
845  }
846  TSpline3 spline("absLen", energies.data(), absLengths.data(), energies.size());
847  double lambdaFirst = c_hc / energies.back();
848  double lambdaLast = c_hc / energies[0];
849  double lambdaStep = 5; // [nm]
850  int numSteps = (lambdaLast - lambdaFirst) / lambdaStep + 1;
851  const double filterThickness = arrayParams.getLength("wavelengthFilter/thickness");
852  std::vector<float> bulkTransmittances;
853  for (int i = 0; i < numSteps; i++) {
854  double wavelength = lambdaFirst + lambdaStep * i;
855  double energy = c_hc / wavelength;
856  double absLen = spline.Eval(energy);
857  bulkTransmittances.push_back(exp(-filterThickness / absLen));
858  }
859  TOPWavelengthFilter filter(lambdaFirst, lambdaStep, bulkTransmittances);
861  } else {
862  B2FATAL("TOPGeometry: " << materialNode
863  << ", Property ABSLENGTH has less than 2 nodes");
864  }
865 
866  return geo;
867  }
868 
869 
870  TOPGeoBarSegment TOPGeometryPar::createBarSegment(const GearDir& content,
871  const std::string& SN)
872  {
873  // dimensions and material
874  GearDir params(content, "QuartzBars/QuartzBar[@SerialNumber='" + SN + "']");
875  TOPGeoBarSegment bar(params.getLength("Width"),
876  params.getLength("Thickness"),
877  params.getLength("Length"),
878  params.getString("Material"));
879  bar.setVendorData(params.getString("Vendor"), SN);
880 
881  // optical surface
882  std::string surfaceName = params.getString("OpticalSurface");
883  double sigmaAlpha = params.getDouble("SigmaAlpha");
884  GearDir surfaceParams(content, "Modules/Surface[@name='" + surfaceName + "']");
885  auto& materials = geometry::Materials::getInstance();
886  auto quartzSurface = materials.createOpticalSurfaceConfig(surfaceParams);
887  bar.setSurface(quartzSurface, sigmaAlpha);
888 
889  return bar;
890  }
891 
892 
893  TOPGeoMirrorSegment TOPGeometryPar::createMirrorSegment(const GearDir& content,
894  const std::string& SN)
895  {
896  // dimensions and material
897  GearDir params(content, "Mirrors/Mirror[@SerialNumber='" + SN + "']");
898  TOPGeoMirrorSegment mirror(params.getLength("Width"),
899  params.getLength("Thickness"),
900  params.getLength("Length"),
901  params.getString("Material"));
902  mirror.setVendorData(params.getString("Vendor"), SN);
903  mirror.setRadius(params.getLength("Radius"));
904  mirror.setCenterOfCurvature(params.getLength("Xpos"), params.getLength("Ypos"));
905 
906  // mirror reflective coating
907  auto& materials = geometry::Materials::getInstance();
908  GearDir coatingParams(params, "Surface");
909  mirror.setCoating(params.getLength("mirrorThickness"), "Al",
910  materials.createOpticalSurfaceConfig(coatingParams));
911 
912  // optical surface
913  std::string surfaceName = params.getString("OpticalSurface");
914  double sigmaAlpha = params.getDouble("SigmaAlpha");
915  GearDir surfaceParams(content, "Modules/Surface[@name='" + surfaceName + "']");
916  auto quartzSurface = materials.createOpticalSurfaceConfig(surfaceParams);
917  mirror.setSurface(quartzSurface, sigmaAlpha);
918 
919  return mirror;
920  }
921 
922 
923  TOPGeoPrism TOPGeometryPar::createPrism(const GearDir& content,
924  const std::string& SN)
925  {
926  // dimensions and material
927  GearDir params(content, "Prisms/Prism[@SerialNumber='" + SN + "']");
928  TOPGeoPrism prism(params.getLength("Width"),
929  params.getLength("Thickness"),
930  params.getLength("Length"),
931  params.getLength("ExitThickness"),
932  0.,
933  params.getString("Material"));
934  prism.setAngle(params.getAngle("Angle"));
935  prism.setVendorData(params.getString("Vendor"), SN);
936 
937  // optical surface
938  std::string surfaceName = params.getString("OpticalSurface");
939  double sigmaAlpha = params.getDouble("SigmaAlpha");
940  GearDir surfaceParams(content, "Modules/Surface[@name='" + surfaceName + "']");
941  auto& materials = geometry::Materials::getInstance();
942  auto quartzSurface = materials.createOpticalSurfaceConfig(surfaceParams);
943  prism.setSurface(quartzSurface, sigmaAlpha);
944 
945  return prism;
946  }
947 
948  std::string TOPGeometryPar::addNumber(const std::string& str, unsigned number)
949  {
950  stringstream ss;
951  if (number < 10) {
952  ss << str << "0" << number;
953  } else {
954  ss << str << number;
955  }
956  string out;
957  ss >> out;
958  return out;
959  }
960 
961 
962 
963  } // End namespace TOP
965 } // End namespace Belle2
Belle2::TOPGeoPMT
Geometry parameters of MCP-PMT.
Definition: TOPGeoPMT.h:34
Belle2::TOPGeoBarSegment::setVendorData
void setVendorData(const std::string &vendor, const std::string &serialNumber)
Sets vendor's name and serial number.
Definition: TOPGeoBarSegment.h:101
Belle2::TOPNominalTTS
Nominal time transition spread of PMT.
Definition: TOPNominalTTS.h:33
Belle2::TOPGeometry::appendPDETuningFactor
void appendPDETuningFactor(unsigned type, double factor)
Appends photon detection efficiency tuning factor of a particular PMT type.
Definition: TOPGeometry.h:116
Belle2::TOPGeoPrism
Geometry parameters of prism.
Definition: TOPGeoPrism.h:36
Belle2::TOPGeometry
Geometry parameters of TOP.
Definition: TOPGeometry.h:44
Belle2::TOPGeoFrontEnd::setHVBoard
void setHVBoard(double width, double length, double thickness, double gap, double y, const std::string &material)
Sets HV board data.
Definition: TOPGeoFrontEnd.h:72
Belle2::TOPNominalTDC::setAveragePedestal
void setAveragePedestal(int averagePedestal)
Sets average of pedestals.
Definition: TOPNominalTDC.h:112
Belle2::TOPGeoBarSegment
Geometry parameters of a quartz bar segment.
Definition: TOPGeoBarSegment.h:37
Belle2::TOPGeoPMT::setWindow
void setWindow(double thickness, const std::string &material)
Sets entrance window.
Definition: TOPGeoPMT.h:105
Belle2::gearbox::Interface::getAngle
double getAngle(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard angle unit.
Definition: Interface.h:301
Belle2::TOPGeoPMTArray::setAirGap
void setAirGap(double gap)
Sets air gap for optically decoupled PMT's.
Definition: TOPGeoPMTArray.h:70
Belle2::gearbox::Interface::getTime
double getTime(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard time unit.
Definition: Interface.h:421
Belle2::TOPNominalTTS::normalize
double normalize()
Normalize the distribution (fractions)
Definition: TOPNominalTTS.cc:38
Belle2::gearbox::Interface::getInt
int getInt(const std::string &path="") const noexcept(false)
Get the parameter path as a int.
Definition: Interface.cc:70
Belle2::TOPGeoQBB::setOuterPanel
void setOuterPanel(const TOPGeoHoneycombPanel &outerPanel)
Sets outer honeycomb panel.
Definition: TOPGeoQBB.h:76
Belle2::TOPGeometry::appendModule
void appendModule(const TOPGeoModule &module)
Appends module (if its ID differs from already appended modules)
Definition: TOPGeometry.cc:24
Belle2::TOPGeoQBB
Geometry parameters of Quartz Bar Box (mother class)
Definition: TOPGeoQBB.h:40
Belle2::TOPNominalQE
Nominal quantum efficiency of PMT.
Definition: TOPNominalQE.h:33
Belle2::TOPGeometry::setNominalQE
void setNominalQE(const TOPNominalQE &nominalQE)
Sets nominal quantum efficiency of PMT.
Definition: TOPGeometry.h:97
Belle2::filter
std::map< ExpRun, std::pair< double, double > > filter(const std::map< ExpRun, std::pair< double, double >> &runs, double cut, std::map< ExpRun, std::pair< double, double >> &runsRemoved)
filter events to remove runs shorter than cut, it stores removed runs in runsRemoved
Definition: Splitter.cc:43
Belle2::TOPNominalTTS::setPMTType
void setPMTType(unsigned type)
Set type of PMT (see TOPPmtObsoleteData::EType for the defined types)
Definition: TOPNominalTTS.h:70
Belle2::TOPGeoFrontEnd
Geometry parameters of board stack (front-end electronic module)
Definition: TOPGeoFrontEnd.h:33
Belle2::TOPGeometry::getNominalTDC
const TOPNominalTDC & getNominalTDC() const
Returns nominal time-to-digit conversion parameters.
Definition: TOPGeometry.h:228
Belle2::TOPGeoPMT::setWallThickness
void setWallThickness(double thickness)
Sets wall thickness.
Definition: TOPGeoPMT.h:59
Belle2::TOPGeoModuleDisplacement
Displacement parameters of a TOP module.
Definition: TOPGeoModuleDisplacement.h:36
Belle2::TOPGeoSideRails
Geometry parameters of side rails (simplified)
Definition: TOPGeoSideRails.h:34
Belle2::TOPGeometry::getModule
const TOPGeoModule & getModule(int moduleID) const
Returns module.
Definition: TOPGeometry.cc:44
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::TOPSignalShape
Normalized shape of single photon pulse (waveform) Pulse must be positive.
Definition: TOPSignalShape.h:35
Belle2::gearbox::Interface::getDouble
double getDouble(const std::string &path="") const noexcept(false)
Get the parameter path as a double.
Definition: Interface.cc:51
Belle2::TOPGeometry::setNominalTDC
void setNominalTDC(const TOPNominalTDC &nominalTDC)
Sets nominal time-to-digit conversion parameters.
Definition: TOPGeometry.h:122
Belle2::TOPGeoPMT::setBottom
void setBottom(double thickness, const std::string &material)
Sets bottom.
Definition: TOPGeoPMT.h:116
Belle2::TOPGeoHoneycombPanel
Geometry parameters of honeycomb panel.
Definition: TOPGeoHoneycombPanel.h:35
Belle2::TOPNominalTTS::appendGaussian
void appendGaussian(double norm, double mean, double sigma)
Append Gaussian.
Definition: TOPNominalTTS.cc:24
Belle2::TOPGeoPMT::setWallMaterial
void setWallMaterial(const std::string &material)
Sets casing material.
Definition: TOPGeoPMT.h:65
Belle2::TOPGeoModule
Geometry parameters of a module (optical components + positioning)
Definition: TOPGeoModule.h:40
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPGeoPMT::setNumPixels
void setNumPixels(unsigned numColumns, unsigned numRows)
Sets number of pixel rows and columns.
Definition: TOPGeoPMT.h:94
Belle2::TOPGeoPrism::setAngle
void setAngle(double angle)
Recalculates flatLength according to given prism angle.
Definition: TOPGeoPrism.h:76
Belle2::TOPGeoPMTArray
Geometry parameters of MCP-PMT array.
Definition: TOPGeoPMTArray.h:34
Belle2::TOPGeometry::setFrontEnd
void setFrontEnd(const TOPGeoFrontEnd &frontEnd, unsigned num=4)
Sets front-end.
Definition: TOPGeometry.h:81
Belle2::TOPGeometry::appendTTS
void appendTTS(const TOPNominalTTS &tts)
Appends time transition spread of a particular PMT type.
Definition: TOPGeometry.h:109
Belle2::TOPGeoPMT::setReflEdge
void setReflEdge(double width, double thickness, const GeoOpticalSurface &surf)
Sets reflective edge.
Definition: TOPGeoPMT.h:128
Belle2::TOPNominalTDC::getSampleWidth
double getSampleWidth() const
Returns time difference between two samples.
Definition: TOPNominalTDC.h:207
Belle2::TOPGeoQBB::setEndPlate
void setEndPlate(const TOPGeoEndPlate &endPlate)
Sets forward end plate.
Definition: TOPGeoQBB.h:100
Belle2::GearDir
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:41
LogVar
Class to store variables with their name which were sent to the logging service.
Definition: LogVariableStream.h:24
Belle2::TOPNominalTDC
Nominal time-to-digit conversion parameters (simplified model)
Definition: TOPNominalTDC.h:32
Belle2::TOPGeoMirrorSegment::setRadius
void setRadius(double radius)
Sets spherical mirror radius of curvature.
Definition: TOPGeoMirrorSegment.h:59
Belle2::TOPGeometry::setNominalTTS
void setNominalTTS(const TOPNominalTTS &nominalTTS)
Sets nominal time transition spread of PMT.
Definition: TOPGeometry.h:103
Belle2::TOPGeoPMTArray::setSiliconeCookie
void setSiliconeCookie(double thickness, const std::string &material)
Sets silicone cookie.
Definition: TOPGeoPMTArray.h:83
Belle2::TOPNominalTDC::setADCBits
void setADCBits(unsigned adcBits)
Sets the number of ADC bits.
Definition: TOPNominalTDC.h:106
Belle2::TOPGeometry::setQBB
void setQBB(const TOPGeoQBB &QBB)
Sets quartz bar box.
Definition: TOPGeometry.h:91
Belle2::TOPGeoQBB::setColdPlate
void setColdPlate(const TOPGeoColdPlate &coldPlate)
Sets forward cold plate.
Definition: TOPGeoQBB.h:106
Belle2::TOPGeoMirrorSegment::setCoating
void setCoating(double thickness, const std::string &material, const GeoOpticalSurface &surface)
Sets parameters of reflective coating.
Definition: TOPGeoMirrorSegment.h:78
Belle2::TOPWavelengthFilter
Bulk transmittance of wavelength filter.
Definition: TOPWavelengthFilter.h:33
Belle2::TOPGeoQBB::setSideRails
void setSideRails(const TOPGeoSideRails &sideRails)
Sets side rails.
Definition: TOPGeoQBB.h:85
Belle2::TOPGeoMirrorSegment
Geometry parameters of a mirror segment.
Definition: TOPGeoMirrorSegment.h:32
Belle2::gearbox::Interface::getLength
double getLength(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard length unit.
Definition: Interface.h:261
Belle2::GearDir::getString
virtual std::string getString(const std::string &path="") const noexcept(false) override
Get the parameter path as a string.
Definition: GearDir.h:79
Belle2::TOPGeoBarSegment::setSurface
void setSurface(const GeoOpticalSurface &surface, double sigmaAlpha)
Sets optical surface.
Definition: TOPGeoBarSegment.h:90
Belle2::gearbox::Interface::getArray
std::vector< double > getArray(const std::string &path) const noexcept(false)
Get the parameter path as a list of double values converted to the standard unit.
Definition: Interface.cc:133
Belle2::TOPGeoFrontEnd::setFrontBoard
void setFrontBoard(double width, double height, double thickness, double gap, double y, const std::string &material)
Sets front board data.
Definition: TOPGeoFrontEnd.h:51
Belle2::TOPGeoPMT::setSensVolume
void setSensVolume(double sizeX, double sizeY, double thickness, const std::string &material)
Sets sensitive volume (photo-cathode)
Definition: TOPGeoPMT.h:80
Belle2::TOPGeoQBB::setInnerPanel
void setInnerPanel(const TOPGeoHoneycombPanel &innerPanel)
Sets inner honeycomb panel.
Definition: TOPGeoQBB.h:67
Belle2::TOPGeoEndPlate
Geometry parameters of forward end plate (simplified)
Definition: TOPGeoEndPlate.h:33
Belle2::TOPGeoPMT::setFillMaterial
void setFillMaterial(const std::string &material)
Sets inside material.
Definition: TOPGeoPMT.h:71
Belle2::TOPGeometry::setSignalShape
void setSignalShape(const TOPSignalShape &signalShape)
Sets single photon signal shape.
Definition: TOPGeometry.h:128
Belle2::TOP::TOPGeometryPar
Singleton class for TOP Geometry Parameters.
Definition: TOPGeometryPar.h:47
Belle2::TOPGeometry::isModuleIDValid
bool isModuleIDValid(int moduleID) const
Checks if module exists in m_modules.
Definition: TOPGeometry.cc:35
Belle2::TOPGeoPrismEnclosure
Geometry parameters of prism enclosure (simplified)
Definition: TOPGeoPrismEnclosure.h:33
Belle2::TOPGeoColdPlate
Geometry parameters of cold plate (simplified)
Definition: TOPGeoColdPlate.h:33
Belle2::TOPGeoFrontEnd::setBoardStack
void setBoardStack(double width, double height, double length, double gap, double y, const std::string &material, double spacerWidth, const std::string &spacerMaterial)
Sets board stack data.
Definition: TOPGeoFrontEnd.h:95
Belle2::gearbox::Interface::getNodes
std::vector< GearDir > getNodes(const std::string &path="") const
Get vector of GearDirs which point to all the nodes the given path evaluates to.
Definition: Interface.cc:31
Belle2::TOPGeoPMTArrayDisplacement
Displacement parameters of MCP-PMT array.
Definition: TOPGeoPMTArrayDisplacement.h:33
Belle2::TOPGeometry::setWavelengthFilter
void setWavelengthFilter(const TOPWavelengthFilter &filter)
Sets wavelength filter transmittance.
Definition: TOPGeometry.h:140
Belle2::TOPGeometry::setCalPulseShape
void setCalPulseShape(const TOPSignalShape &shape)
Sets calibration pulse shape.
Definition: TOPGeometry.h:134
Belle2::TOPGeoMirrorSegment::setCenterOfCurvature
void setCenterOfCurvature(double xc, double yc)
Sets spherical mirror center of curvature.
Definition: TOPGeoMirrorSegment.h:66
Belle2::GearDir::getNumberNodes
virtual int getNumberNodes(const std::string &path="") const override
Return the number of nodes a given path will expand to.
Definition: GearDir.h:68
Belle2::TOPGeoPMTArray::setWavelengthFilter
void setWavelengthFilter(double thickness, const std::string &material)
Sets wavelength filter.
Definition: TOPGeoPMTArray.h:94
Belle2::TOPGeoQBB::setPrismEnclosure
void setPrismEnclosure(const TOPGeoPrismEnclosure &prismEnclosure)
Sets prism enclosure.
Definition: TOPGeoQBB.h:91