Project
Loading...
Searching...
No Matches
FT3Materials.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
16
18
19#include <fairlogger/Logger.h>
20
22{
23 auto* medium = o2::base::MaterialManager::Instance().getTGeoMedium(Materials::moduleName, static_cast<int>(id));
24 if (!medium) {
25 LOG(fatal) << "FT3: no medium registered for " << Materials::materials.at(id).name
26 << "; createMaterials() has to run before the geometry is built";
27 }
28 return medium;
29}
Materials of the FT3 detector, and access to the media made from them.
static MaterialManager & Instance()
TGeoMedium * getTGeoMedium(const std::string &modname, int localid)
constexpr const char * moduleName
const std::unordered_map< MaterialID, MaterialProperties > materials
TGeoMedium * getMedium(Materials::MaterialID id)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"