Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • le.koch/cbmroot
  • patrick.pfistner_AT_kit.edu/cbmroot
  • lena.rossel_AT_stud.uni-frankfurt.de/cbmroot
  • i.deppner/cbmroot
  • fweig/cbmroot
  • karpushkin_AT_inr.ru/cbmroot
  • v.akishina/cbmroot
  • rishat.sultanov_AT_cern.ch/cbmroot
  • l_fabe01_AT_uni-muenster.de/cbmroot
  • pwg-c2f/cbmroot
  • j.decuveland/cbmroot
  • a.toia/cbmroot
  • i.vassiliev/cbmroot
  • n.herrmann/cbmroot
  • o.lubynets/cbmroot
  • se.gorbunov/cbmroot
  • cornelius.riesen_AT_physik.uni-giessen.de/cbmroot
  • zhangqn17_AT_mails.tsinghua.edu.cn/cbmroot
  • bartosz.sobol/cbmroot
  • ajit.kumar/cbmroot
  • computing/cbmroot
  • a.agarwal_AT_vecc.gov.in/cbmroot
  • osingh/cbmroot
  • wielanek_AT_if.pw.edu.pl/cbmroot
  • malgorzata.karabowicz.stud_AT_pw.edu.pl/cbmroot
  • m.shiroya/cbmroot
  • s.roy/cbmroot
  • p.-a.loizeau/cbmroot
  • a.weber/cbmroot
  • ma.beyer/cbmroot
  • d.klein/cbmroot
  • d.smith/cbmroot
  • mvdsoft/cbmroot
  • d.spicker/cbmroot
  • y.h.leung/cbmroot
  • aksharma/cbmroot
  • m.deveaux/cbmroot
  • mkunold/cbmroot
  • h.darwish/cbmroot
  • pk.sharma_AT_vecc.gov.in/cbmroot
  • f_fido01_AT_uni-muenster.de/cbmroot
  • g.kozlov/cbmroot
  • d.emschermann/cbmroot
  • evgeny.lavrik/cbmroot
  • v.friese/cbmroot
  • f.uhlig/cbmroot
  • ebechtel_AT_ikf.uni-frankfurt.de/cbmroot
  • a.senger/cbmroot
  • praisig/cbmroot
  • s.lebedev/cbmroot
  • redelbach_AT_compeng.uni-frankfurt.de/cbmroot
  • p.subramani/cbmroot
  • a_meye37_AT_uni-muenster.de/cbmroot
  • om/cbmroot
  • o.golosov/cbmroot
  • l.chlad/cbmroot
  • a.bercuci/cbmroot
  • d.ramirez/cbmroot
  • v.singhal/cbmroot
  • h.schiller/cbmroot
  • apuntke/cbmroot
  • f.zorn/cbmroot
  • rubio_AT_physi.uni-heidelberg.de/cbmroot
  • p.chudoba/cbmroot
  • apuntke/mcbmroot
  • r.karabowicz/cbmroot
66 results
Show changes
Commits on Source (7)
Showing
with 511 additions and 82 deletions
......@@ -156,7 +156,7 @@ namespace cbm::algo
void EnsureDimensions() const
{
if (fOffsets.size() - 1 != fAdresses.size()) {
throw std::runtime_error("PartitionedSpan: fOffsets.size() != fAdresses.size()");
throw std::runtime_error("PartitionedSpan: fOffsets.size() - 1 != fAdresses.size()");
}
if (fOffsets.front() != 0) throw std::runtime_error("PartitionedSpan: fOffsets.front() != 0");
if (fOffsets.back() != fData.size()) {
......
......@@ -35,7 +35,7 @@ namespace cbm::algo
/**
* @brief Default constructor. Creates an empty vector.
*/
PartitionedVector() : fData(), fOffsets({0}), fAdresses() { EnsureDimensions(); }
PartitionedVector() : fData(), fOffsets({0}), fAddresses() { EnsureDimensions(); }
/**
* @brief Constructor. Creates a vector with n partitions.
......@@ -49,7 +49,7 @@ namespace cbm::algo
PartitionedVector(Container_t&& data, gsl::span<const size_t> sizes, gsl::span<const u32> addresses)
: fData(std::move(data))
, fOffsets()
, fAdresses(addresses.begin(), addresses.end())
, fAddresses(addresses.begin(), addresses.end())
{
ComputeOffsets(sizes);
EnsureDimensions();
......@@ -62,22 +62,72 @@ namespace cbm::algo
PartitionedVector(const PartitionedVector<T, OtherAllocator>& other)
: fData(other.Data().begin(), other.Data().end())
, fOffsets(other.Offsets())
, fAdresses(other.Addresses())
, fAddresses(other.Addresses())
{
// TODO: this check is overkill? We already know that the dimensions are correct,
// since they were already checked in the other vector
EnsureDimensions();
}
/**
* @brief Copy constructor for a given type (to satisfy the rule of five)
*/
PartitionedVector(const PartitionedVector<T, Allocator>& other)
: fData(other.Data().begin(), other.Data().end())
, fOffsets(other.Offsets())
, fAddresses(other.Addresses())
{
EnsureDimensions();
}
/**
* @brief Move constructor
*/
PartitionedVector(PartitionedVector<T, Allocator>&& other)
: fData(std::move(other.fData))
, fOffsets(std::move(other.fOffsets))
, fAddresses(std::move(other.fAddresses))
{
EnsureDimensions();
other.fOffsets = {0};
}
template<typename U>
PartitionedVector(PartitionedSpan<U> other)
: fData(other.Data().begin(), other.Data().end())
, fOffsets(other.Offsets().begin(), other.Offsets().end())
, fAdresses(other.Addresses().begin(), other.Addresses().end())
, fAddresses(other.Addresses().begin(), other.Addresses().end())
{
EnsureDimensions();
}
/**
* @brief Copy assignment operator
*/
PartitionedVector& operator=(const PartitionedVector<T, Allocator>& other)
{
if (this != &other) {
fData = other.fData;
fOffsets = other.fOffsets;
fAddresses = other.fAddresses;
}
return *this;
}
/**
* @brief Move assignment operator
*/
PartitionedVector& operator=(PartitionedVector<T, Allocator>&& other)
{
if (this != &other) {
fData = std::move(other.fData);
fOffsets = std::move(other.fOffsets);
fAddresses = std::move(other.fAddresses);
other.fOffsets = {0};
}
return *this;
}
/**
* @brief Access data at partition i.
*/
......@@ -102,7 +152,18 @@ namespace cbm::algo
u32 Address(size_t i) const
{
EnsureBounds(i);
return fAdresses[i];
return fAddresses[i];
}
/**
* @brief Clears the vector
*/
void Clear()
{
fData.clear();
fOffsets.clear();
fOffsets = {0};
fAddresses.clear();
}
/**
......@@ -111,7 +172,7 @@ namespace cbm::algo
std::pair<gsl::span<T>, u32> Partition(size_t i)
{
EnsureBounds(i);
return std::pair<gsl::span<T>, u32>(UnsafePartitionSpan(i), fAdresses[i]);
return std::pair<gsl::span<T>, u32>(UnsafePartitionSpan(i), fAddresses[i]);
}
/**
......@@ -120,13 +181,13 @@ namespace cbm::algo
std::pair<gsl::span<const T>, u32> Partition(size_t i) const
{
EnsureBounds(i);
return std::pair<gsl::span<const T>, u32>(UnsafePartitionSpan(i), fAdresses[i]);
return std::pair<gsl::span<const T>, u32>(UnsafePartitionSpan(i), fAddresses[i]);
}
/**
* @brief Get the number of partitions.
*/
size_t NPartitions() const { return fAdresses.size(); }
size_t NPartitions() const { return fAddresses.size(); }
/**
* @brief Get the size of partition i.
......@@ -160,22 +221,23 @@ namespace cbm::algo
/**
* @brief Get the addresses.
*/
const std::vector<u32>& Addresses() const { return fAdresses; }
const std::vector<u32>& Addresses() const { return fAddresses; }
/**
* @brief Get the underlying offsets.
*/
const std::vector<size_t>& Offsets() const { return fOffsets; }
private:
Container_t fData; //< Data
std::vector<size_t> fOffsets; // < Offsets of the partitions in fData
std::vector<u32> fAdresses; //< Hardware addresses of the partitions
std::vector<u32> fAddresses; //< Hardware addresses of the partitions
void EnsureDimensions() const
{
if (fOffsets.size() - 1 != fAdresses.size()) {
throw std::runtime_error("PartitionedVector: fOffsets.size() != fAdresses.size()");
if (fOffsets.size() - 1 != fAddresses.size()) {
throw std::runtime_error("PartitionedVector: fOffsets.size() - 1 != fAddresses.size()");
}
if (fOffsets.front() != 0) {
throw std::runtime_error("PartitionedVector: fOffsets.front() != 0");
......@@ -187,7 +249,7 @@ namespace cbm::algo
void EnsureBounds(size_t i) const
{
if (i >= fAdresses.size()) throw std::out_of_range("PartitionedVector: index out of bounds");
if (i >= fAddresses.size()) throw std::out_of_range("PartitionedVector: index out of bounds");
}
void ComputeOffsets(gsl::span<const size_t> sizes)
......@@ -216,7 +278,7 @@ namespace cbm::algo
{
ar& fData;
ar& fOffsets;
ar& fAdresses;
ar& fAddresses;
}
};
......
# FIXME: SZh 2.4.2025: Rewrite the file in the same manner as for KfCore
set(INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/utils
......
......@@ -18,6 +18,7 @@
#include <boost/serialization/string.hpp>
#include <boost/serialization/vector.hpp>
#include <memory>
#include <sstream>
namespace cbm::algo::ca
......@@ -39,7 +40,20 @@ namespace cbm::algo::ca
friend class boost::serialization::access;
public:
typedef std::vector<T> Tbase;
using Tbase = std::vector<T>;
using value_type = T;
using allocator_type = typename Tbase::allocator_type;
using pointer = typename std::allocator_traits<allocator_type>::pointer;
using const_pointer = typename std::allocator_traits<allocator_type>::const_pointer;
using reference = value_type&;
using const_reference = const value_type&;
using size_type = typename Tbase::size_type;
using difference_type = typename Tbase::difference_type;
using iterator = typename Tbase::iterator;
using const_iterator = typename Tbase::const_iterator;
using reverse_iterator = std::reverse_iterator<iterator>;
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
/// \brief Generic constructor from vairadic parameter list
template<typename... Tinput>
......@@ -258,7 +272,7 @@ namespace cbm::algo::ca
using Tbase::reserve;
using Tbase::shrink_to_fit;
using Tbase::size;
using typename Tbase::iterator;
private:
std::string fName{"no name"}; ///< Name of the vector
......
......@@ -22,6 +22,9 @@ namespace cbm::algo::bmon
/// \brief A BMON hit
class Hit {
public:
/// \brief Default constructor
Hit() = default;
/// \brief Constructor from a single digi
/// \param address Address of the diamond
/// \param digi A digi
......
......@@ -466,6 +466,7 @@ RecoResults Reco::Run(const fles::Timeslice& ts)
results.tracks = std::move(recoData.tracks);
results.trackStsHitIndices = std::move(trackingOutput.stsHitIndices);
results.trackTofHitIndices = std::move(trackingOutput.tofHitIndices);
results.trackTrdHitIndices = std::move(trackingOutput.trdHitIndices);
}
if (Opts().HasOutput(RecoData::DigiEvent)) results.events = std::move(events);
if (Opts().HasOutput(RecoData::Cluster)) results.stsClusters = std::move(recoData.stsClusters);
......
......@@ -21,6 +21,7 @@ size_t StorableRecoResults::SizeBytes() const
}
size += fStsClusters.SizeBytes();
size += fBmonHits.SizeBytes();
size += fStsHits.SizeBytes();
size += fTofHits.SizeBytes();
size += fTrdHits.SizeBytes();
......
......@@ -6,6 +6,7 @@
#include "CbmDigiEvent.h"
#include "PartitionedVector.h"
#include "bmon/Hit.h"
#include "ca/core/data/CaTrack.h"
#include "ca/core/utils/CaVector.h"
#include "sts/Cluster.h"
......@@ -76,6 +77,9 @@ namespace cbm::algo
PartitionedVector<sts::Cluster>& StsClusters() { return fStsClusters; }
const PartitionedVector<sts::Cluster>& StsClusters() const { return fStsClusters; }
PartitionedVector<bmon::Hit>& BmonHits() { return fBmonHits; }
const PartitionedVector<bmon::Hit>& BmonHits() const { return fBmonHits; }
PartitionedVector<sts::Hit>& StsHits() { return fStsHits; }
const PartitionedVector<sts::Hit>& StsHits() const { return fStsHits; }
......@@ -94,6 +98,9 @@ namespace cbm::algo
TrackHitIndexContainer_t& TrackTofHitIndices() { return fTrackTofHitIndices; }
const TrackHitIndexContainer_t& TrackTofHitIndices() const { return fTrackTofHitIndices; }
TrackHitIndexContainer_t& TrackTrdHitIndices() { return fTrackTrdHitIndices; }
const TrackHitIndexContainer_t& TrackTrdHitIndices() const { return fTrackTrdHitIndices; }
private:
uint64_t fTsIndex = UINT64_MAX;
uint64_t fTsStartTime = UINT64_MAX;
......@@ -112,6 +119,7 @@ namespace cbm::algo
// Local Reconstruction output
PartitionedVector<sts::Cluster> fStsClusters;
PartitionedVector<bmon::Hit> fBmonHits;
PartitionedVector<sts::Hit> fStsHits;
PartitionedVector<tof::Hit> fTofHits;
PartitionedVector<trd::Hit> fTrdHits;
......@@ -127,6 +135,10 @@ namespace cbm::algo
/// \note index: [trkID][hitID], value: pair(partitionID, hitPartitionID)
TrackHitIndexContainer_t fTrackTofHitIndices;
/// \brief TRD hit indices of tracks
/// \note index: [trkID][hitID], value: pair(partitionID, hitPartitionID)
TrackHitIndexContainer_t fTrackTrdHitIndices;
friend class boost::serialization::access;
template<class Archive>
......@@ -146,6 +158,7 @@ namespace cbm::algo
ar& fDigiEvents;
ar& fStsClusters;
ar& fBmonHits;
ar& fStsHits;
ar& fTofHits;
ar& fTrdHits;
......@@ -153,6 +166,7 @@ namespace cbm::algo
ar& fTracks;
ar& fTrackStsHitIndices;
ar& fTrackTofHitIndices;
ar& fTrackTrdHitIndices;
}
};
......
......@@ -63,37 +63,36 @@ target_link_libraries(KfCore
##### Offline version without the NO_ROOT in order to get standard logger! #############################################
if (NOT CBM_ONLINE_STANDALONE)
add_library(KfCoreOffline SHARED ${SRCS})
target_include_directories(KfCoreOffline
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/algo
${CMAKE_CURRENT_SOURCE_DIR}/data
${CMAKE_CURRENT_SOURCE_DIR}/geo
${CMAKE_CURRENT_SOURCE_DIR}/pars
${CMAKE_CURRENT_SOURCE_DIR}/utils
${CMAKE_CURRENT_SOURCE_DIR}
set(LIBRARY_NAME KfCoreOffline)
if (SSE_FOUND)
set(LINKDEF ${LIBRARY_NAME}LinkDef.h)
else()
set(LINKDEF ${LIBRARY_NAME}NoSSELinkDef.h)
endif()
list(APPEND HEADERS data/KfTrackParam.h
)
set(LIBRARY_NAME KfCoreOffline)
set(PUBLIC_DEPENDENCIES
Vc::Vc
OnlineDataLog # needed for the logger?
FairLogger::FairLogger
ROOT::Core # for ClassDef
)
set(PRIVATE_DEPENDENCIES
Boost::serialization
fmt::fmt
external::yaml-cpp
)
target_link_libraries(KfCoreOffline
PUBLIC Vc::Vc
OnlineDataLog # needed for the logger?
FairLogger::FairLogger
PRIVATE Boost::serialization
fmt::fmt
external::yaml-cpp
)
install(TARGETS KfCoreOffline DESTINATION lib)
generate_cbm_library()
#install(TARGETS KfCoreOffline DESTINATION lib)
endif()
########################################################################################################################
install(TARGETS KfCore DESTINATION lib)
install(DIRECTORY kf TYPE INCLUDE FILES_MATCHING PATTERN "*.h")
install(DIRECTORY kf/utils TYPE INCLUDE FILES_MATCHING PATTERN "*.h")
install(DIRECTORY kf/data TYPE INCLUDE FILES_MATCHING PATTERN "*.h")
install(DIRECTORY kf/geo TYPE INCLUDE FILES_MATCHING PATTERN "*.h")
install(DIRECTORY kf/algo TYPE INCLUDE FILES_MATCHING PATTERN "*.h")
install(DIRECTORY kf/pars TYPE INCLUDE FILES_MATCHING PATTERN "*.h")
install(
FILES
KfFramework.h
......
/* Copyright (C) 2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
SPDX-License-Identifier: GPL-3.0-only
Authors: Sergei Zharko [committer] */
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class cbm::algo::kf::TrackParamBaseScalar<float> + ;
#pragma link C++ class cbm::algo::kf::TrackParamBaseScalar<double> + ;
#pragma link C++ class cbm::algo::kf::TrackParamBase<float> + ;
#pragma link C++ class cbm::algo::kf::TrackParamBase<double> + ;
#pragma link C++ class cbm::algo::kf::TrackParamBase<Vc_1::Vector<float, Vc_1::VectorAbi::Sse> > + ;
#pragma link C++ class cbm::algo::kf::TrackParam<float> + ;
#pragma link C++ class cbm::algo::kf::TrackParam<double> + ;
#pragma link C++ class cbm::algo::kf::TrackParam<Vc_1::Vector<float, Vc_1::VectorAbi::Sse> > + ;
#endif
/* Copyright (C) 2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
SPDX-License-Identifier: GPL-3.0-only
Authors: Sergei Zharko [committer] */
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class cbm::algo::kf::TrackParamBaseScalar<float> + ;
#pragma link C++ class cbm::algo::kf::TrackParamBaseScalar<double> + ;
#pragma link C++ class cbm::algo::kf::TrackParamBase<float> + ;
#pragma link C++ class cbm::algo::kf::TrackParamBase<double> + ;
#pragma link C++ class cbm::algo::kf::TrackParamBase<Vc_1::Vector<float, Vc_1::VectorAbi::Scalar> > + ;
#pragma link C++ class cbm::algo::kf::TrackParam<float> + ;
#pragma link C++ class cbm::algo::kf::TrackParam<double> + ;
#pragma link C++ class cbm::algo::kf::TrackParam<Vc_1::Vector<float, Vc_1::VectorAbi::Scalar> > + ;
#endif
......@@ -19,6 +19,10 @@
#include <string>
#if !defined(NO_ROOT) && !XPU_IS_HIP_CUDA
#include <Rtypes.h> // for ClassDef
#endif
namespace cbm::algo::kf
{
/// \class cbm::algo::kf::TrackParamBase
......@@ -619,6 +623,10 @@ namespace cbm::algo::kf
T fChiSqTime{0.}; ///< chi^2 of track fit, time measurements
T fNdfTime{0.}; ///< NDF of track fit, time measurements
#if !defined(NO_ROOT) && !XPU_IS_HIP_CUDA
ClassDefNV(TrackParamBase, 1);
#endif
}; // class TrackParamBase
......@@ -634,6 +642,10 @@ namespace cbm::algo::kf
/// ---------------------------------------------------------------------------------------------------------------------using
/// \brief Gets pseudo-rapidity
T GetEta() const { return -log(tan(this->GetTheta() * T(0.5))); }
#if !defined(NO_ROOT) && !XPU_IS_HIP_CUDA
ClassDefNV(TrackParamBaseScalar, 1);
#endif
};
......@@ -647,12 +659,20 @@ namespace cbm::algo::kf
class TrackParam : public TrackParamBaseScalar<T> {
public:
using TrackParamBaseScalar<T>::TrackParamBaseScalar;
#if !defined(NO_ROOT) && !XPU_IS_HIP_CUDA
ClassDefNV(TrackParam, 1);
#endif
};
template<>
class TrackParam<fvec> : public TrackParamBase<fvec> {
public:
using TrackParamBase<fvec>::TrackParamBase;
#if !defined(NO_ROOT) && !XPU_IS_HIP_CUDA
ClassDefNV(TrackParam<fvec>, 1);
#endif
};
......
......@@ -67,7 +67,7 @@ namespace cbm
}
else {
/// Missing runs, exception there to force implementation and support from users side
throw(std::invalid_argument(Form("RunId %d is not mapped! Please complete the map!", ulRunId)));
throw(std::invalid_argument(Form("RunId %lu is not mapped! Please complete the map!", ulRunId)));
}
return sSetupName;
......
......@@ -27,6 +27,7 @@
#pragma link C++ class cbm::trd::geo::ChamberBuilder::Volume + ;
#pragma link C++ class cbm::trd::geo::ChamberBuilder::BackPanel + ;
#pragma link C++ class cbm::trd::geo::ChamberBuilder::FEB + ;
#pragma link C++ class cbm::trd::geo::ChamberBuilder::AUX + ;
#pragma link C++ class cbm::trd::geo::SetupManager + ;
#pragma link C++ class cbm::trd::geo::Setup + ;
#pragma link C++ class cbm::trd::geo::Setup::Module + ;
......
......@@ -27,8 +27,8 @@
using namespace cbm::trd;
using namespace cbm::trd::geo;
const char* ChamberBuilder::Component::fgName[(int) ChamberBuilder::eGeoPart::kNparts] = {"Radiator", "Window",
"Volume", "BackPanel", "FEB"};
const char* ChamberBuilder::Component::fgName[(int) ChamberBuilder::eGeoPart::kNparts] = {
"Radiator", "Window", "Volume", "BackPanel", "FEB", "AUX"};
//________________________________________________________________________________________
const TGeoMedium* cbm::trd::geo::GetMaterial(const char* mname)
{
......@@ -170,13 +170,17 @@ ChamberBuilder::ChamberBuilder(int typ) : FairTask(Form("module%d", typ))
fComponent[(int) eGeoPart::kVolume] = new Volume;
fComponent[(int) eGeoPart::kBackPanel] = new BackPanel;
fComponent[(int) eGeoPart::kFEB] = nullptr;
fComponent[(int) eGeoPart::kAUX] = nullptr;
}
//________________________________________________________________________________________
InitStatus ChamberBuilder::Init()
{
if (HasRadiator()) fComponent[(int) eGeoPart::kRadiator] = new Radiator;
if (HasFEB()) fComponent[(int) eGeoPart::kFEB] = new FEB;
if (HasFEB()) {
fComponent[(int) eGeoPart::kFEB] = new FEB;
fComponent[(int) eGeoPart::kAUX] = new AUX;
}
switch (fChmbTyp) {
case 1:
LOG(info) << "Init for TRD2D.";
......@@ -224,23 +228,17 @@ void ChamberBuilder::Exec(Option_t*)
int idx(0);
double vh[(int) eGeoPart::kNparts];
bool kAdd(true);
double hOffset(0.), hTot(0.);
double hTot(0.);
for (auto icomp : fComponent) {
if (!icomp) continue;
vh[idx] = icomp->GetHeight();
hTot += vh[idx];
if (kAdd) {
if (idx == (int) eGeoPart::kVolume) {
hOffset += vh[idx] / 2;
kAdd = false;
}
else
hOffset += vh[idx];
if (idx == (int) eGeoPart::kVolume) kAdd = false;
}
idx++;
}
// add global z offset
hOffset = hTot / 2;
fVol = new TGeoVolume(Form("module%d", fChmbTyp), new TGeoBBox("", sizeX / 2, sizeY / 2, hTot / 2),
cbm::trd::geo::GetMaterial("air"));
fVol->SetLineColor(kGreen);
......@@ -256,7 +254,8 @@ void ChamberBuilder::Exec(Option_t*)
switch (idx) {
case (int) eGeoPart::kFEB: { // special case for feb multiple placement.
// FEB characteristics and identification stored in geometry
auto vFeb = new TGeoVolume(icomp->GetName(), new TGeoBBox("", sizeX / 2, sizeY / 2, vh[idx] / 2));
auto vFeb =
new TGeoVolume("FEB", new TGeoBBox("", sizeX / 2, sizeY / 2, vh[idx] / 2), cbm::trd::geo::GetMaterial("air"));
for (int ifeb(0), jfeb(0); ifeb < Nfebs; ifeb++) {
infoFeb.id = ifeb;
infoFeb.superId = 0; // gDB.GetFebId(imod, ifeb);
......@@ -499,6 +498,12 @@ InitStatus ChamberBuilder::BackPanel::Init()
}
}
fHeight += hHC;
// supports for electronics
TGeoBBox* faspro_fy = new TGeoBBox("faspro_fy", 1.0 / 2, 0.5 * activeAreaY, 0.5 * ChamberBuilder::FEB::FASPRO_zspace);
TGeoVolume* vol_faspro_fy =
new TGeoVolume("faspro_fy", faspro_fy, cbm::trd::geo::GetMaterial("TRDG10") /*frameVolMed*/);
vol_faspro_fy->SetLineColor(kViolet + 2); // vol_faspro_fy->SetTransparency(50);
fHeight += ChamberBuilder::FEB::FASPRO_zspace;
// framex
auto xoutBd =
......@@ -526,13 +531,14 @@ InitStatus ChamberBuilder::BackPanel::Init()
vol_bkp_yout->SetLineColor(kViolet + 2);
// Add up all components
fVol = new TGeoVolume(GetName(), new TGeoBBox("", bkp_size_x / 2, bkp_size_y / 2, fHeight / 2),
float height(fHeight);
fVol = new TGeoVolume(GetName(), new TGeoBBox("", bkp_size_x / 2, bkp_size_y / 2, height / 2),
cbm::trd::geo::GetMaterial("air"));
fVol->SetLineColor(kOrange);
fVol->SetTransparency(50);
double x, y;
fHeight = -fHeight / 2 + 0.5 * pp_pads_thickness;
fHeight = -height / 2 + 0.5 * pp_pads_thickness;
fVol->AddNode(vol_pp, 1, new TGeoTranslation("", 0., 0., fHeight));
fHeight += 0.5 * (pp_pads_thickness + pp_pcb_thickness);
fVol->AddNode(vol_pp_PCB, 1, new TGeoTranslation("", 0., 0., fHeight));
......@@ -554,19 +560,33 @@ InitStatus ChamberBuilder::BackPanel::Init()
fy_mat = new TGeoHMatrix("");
(*fy_mat) = (*fy_rot) * (*fy_tra);
fVol->AddNode(vol_bkp_xout, 2, fy_mat);
fHeight += 0.5 * hHC;
fHeight += 0.5 * (hHC + ChamberBuilder::FEB::FASPRO_zspace);
int cFeb(0);
for (int ifeb(0); ifeb < Nfebs; ifeb++) {
if (ifeb % 5 != 0) continue;
// add support
fVol->AddNode(
vol_faspro_fy, cFeb,
new TGeoTranslation("", feb_pos[ifeb][0] - 0.5 * (ChamberBuilder::FEB::FASPRO_length + 0.2), 0., fHeight));
cFeb++;
}
fVol->AddNode(
vol_faspro_fy, cFeb,
new TGeoTranslation("", feb_pos[Nfebs - 1][0] + 0.5 * (ChamberBuilder::FEB::FASPRO_length + 0.2), 0., fHeight));
fHeight += 0.5 * ChamberBuilder::FEB::FASPRO_zspace;
fHeight *= 2;
return kSUCCESS;
}
//________________________________________________________________________________________
ChamberBuilder::FEB::FEB() : Component("FEB") { ; }
ChamberBuilder::FEB::FEB() : Component("FASPRO") { ; }
InitStatus ChamberBuilder::FEB::Init()
{
// Create the FASPRO FEBs out of all CU/PCB layers
fHeight = FASPRO_zspace;
TString scu = "", spcb = "";
TGeoTranslation* tr(nullptr);
double FASPRO_thickness(0.);
......@@ -605,7 +625,7 @@ InitStatus ChamberBuilder::FEB::Init()
cbm::trd::geo::GetMaterial("TRDG10") /*febVolMed*/); // the FEB made of PCB
vol_faspro_pcb->SetLineColor(kGreen + 3);
//vol_faspro_pcb->SetTransparency(50);
fHeight += FASPRO_thickness;
fHeight = FASPRO_thickness;
// create FASP ASIC
auto fasp = new TGeoBBox("fasp", FASP_x / 2., FASP_y / 2., FASP_z / 2.);
......@@ -631,29 +651,34 @@ InitStatus ChamberBuilder::FEB::Init()
auto connBrg = new TGeoBBox("connBrg", ConnBRG_x / 2., ConnBRG_y / 2., ConnBRG_z / 2.);
auto vol_conn_brg = new TGeoVolume("connBrg", connBrg, cbm::trd::geo::GetMaterial("polypropylene"));
vol_conn_brg->SetLineColor(kYellow + 2);
fHeight += FASP_z;
fHeight += ConnBRG_z;
// Init volume:
// FEB family FASPRO
// FEB type v1 (12 FASPs)
int fType = 1;
fVol = new TGeoVolumeAssembly(Form("%s1%d", GetName(), fType));
fVol = new TGeoVolume(Form("%s1%d", GetName(), fType),
new TGeoBBox("", FASPRO_length / 2., FASPRO_width / 2., fHeight / 2.),
cbm::trd::geo::GetMaterial("air"));
fVol->SetLineColor(kGreen);
fVol->SetTransparency(50);
// Add up all components
fHeight = -0.5 * fHeight + FASPRO_zspace;
fVol->AddNode(vol_faspro_cu, 1, new TGeoTranslation("", 0., 0., fHeight));
fVol->AddNode(vol_faspro_pcb, 1, new TGeoTranslation("", 0., 0., fHeight));
double offset = -0.5 * fHeight;
fHeight = offset + FASP_z / 2;
// add FASPs on the back side of the FEB
info_t infoAsic;
//info_t infoAsic;
for (int ifasp(0), jfasp(0); ifasp < faspFeb[fType].nasic; ifasp++) {
vol_fasp->SetTitle(Form("%x", 0xff /*gDB->GetASICMask*/));
// if ((jfasp = WriteAsicInfo(&infoAsic)) < 0) continue;
fVol->AddNode(vol_fasp, jfasp,
new TGeoTranslation("", FASP_pos[ifasp][0], FASP_pos[ifasp][1], fHeight - FASP_z / 2));
fVol->AddNode(vol_fasp, jfasp, new TGeoTranslation("", FASP_pos[ifasp][0], FASP_pos[ifasp][1], fHeight));
}
fHeight += 0.5 * FASP_z;
fVol->AddNode(vol_faspro_cu, 1, new TGeoTranslation("", 0., 0., fHeight));
fVol->AddNode(vol_faspro_pcb, 1, new TGeoTranslation("", 0., 0., fHeight));
fHeight += FASPRO_thickness;
// add ADCs, FPGAs and DCDC converters on the tob side of the FEB
for (int iadc(0); iadc < FASPRO_Nadc; iadc++)
fVol->AddNode(vol_adc, iadc + 1, new TGeoTranslation("", ADC_pos[iadc][0], ADC_pos[iadc][1], fHeight + ADC_z / 2));
......@@ -671,7 +696,101 @@ InitStatus ChamberBuilder::FEB::Init()
fVol->AddNode(vol_conn_brg, iconn + 1,
new TGeoTranslation("", ConnBRG_pos[iconn][0], ConnBRG_pos[iconn][1], fHeight + ConnBRG_z / 2));
fHeight += ConnBRG_z;
fHeight *= 2;
fHeight -= offset;
return kSUCCESS;
}
//________________________________________________________________________________________
ChamberBuilder::AUX::AUX() : Component("AUX") { ; }
InitStatus ChamberBuilder::AUX::Init()
{
// create BRIDGE Coonector (see also FEB::Init())
auto connBrg = new TGeoBBox("connBrg", ChamberBuilder::FEB::ConnBRG_x / 2., ChamberBuilder::FEB::ConnBRG_y / 2.,
ChamberBuilder::FEB::ConnBRG_z / 2.);
auto vol_conn_brg = new TGeoVolume("connBrg", connBrg, cbm::trd::geo::GetMaterial("polypropylene"));
vol_conn_brg->SetLineColor(kYellow + 2);
// GA01 board - create
float ga01_z = ChamberBuilder::FEB::ConnBRG_z + GA01_z + SATAz;
TGeoBBox* ga01_bd = new TGeoBBox("ga01_bd", GA01_x / 2., GA01_y / 2., GA01_z / 2.);
TGeoVolume* vol_ga01_bd = new TGeoVolume("ga01_bd", ga01_bd, cbm::trd::geo::GetMaterial("TRDG10"));
vol_ga01_bd->SetLineColor(kGreen + 7);
// GA01 board - create SATA connectors
TGeoBBox* sata_conn = new TGeoBBox("sata_conn", 0.5 * SATAx, 0.5 * SATAy, 0.5 * SATAz);
TGeoVolume* vol_conn_sata = new TGeoVolume("sata_conn", sata_conn, cbm::trd::geo::GetMaterial("TRDG10"));
vol_conn_sata->SetLineColor(kGray + 2);
// GA01 board - assembly
TGeoVolumeAssembly* ga01 = new TGeoVolumeAssembly("GA01");
ga01->AddNode(vol_ga01_bd, 1, new TGeoTranslation("", 0., 0., 0.5 * ga01_z - SATAz - 0.5 * GA01_z));
Float_t sataConnPosX[] = {2, 1.2, -1.}, sataConnPosY[] = {0, 1.5, 1};
for (Int_t ic(-2); ic <= 2; ic++) {
ga01->AddNode(vol_conn_sata, ic + 2,
new TGeoTranslation("", sataConnPosX[abs(ic)], (ic > 0 ? 1 : -1) * sataConnPosY[abs(ic)],
0.5 * ga01_z - 0.5 * SATAz));
}
ga01->AddNode(vol_conn_brg, 1,
new TGeoTranslation("", -0.5 * GA01_x + ChamberBuilder::FEB::ConnBRG_x, 0,
-0.5 * ga01_z + 0.5 * ChamberBuilder::FEB::ConnBRG_z));
// Board to Board (B2B) - create
TGeoBBox* b2b_bd = new TGeoBBox("b2b_bd", B2B_y / 2., B2B_x / 2., B2B_z / 2.);
TGeoVolume* vol_b2b_bd = new TGeoVolume("b2b_bd", b2b_bd, cbm::trd::geo::GetMaterial("TRDG10"));
vol_b2b_bd->SetLineColor(kGreen + 7);
// B2B board - assembly
float b2b_z = B2B_z + ChamberBuilder::FEB::ConnBRG_z;
TGeoVolumeAssembly* b2b = new TGeoVolumeAssembly("B2B");
b2b->AddNode(vol_b2b_bd, 1, new TGeoTranslation("", 0., 0., 0.5 * b2b_z - 0.5 * B2B_z));
b2b->AddNode(vol_conn_brg, 1, new TGeoTranslation("", -0.6, 0., -0.5 * b2b_z + 0.5 * ChamberBuilder::FEB::ConnBRG_z));
b2b->AddNode(vol_conn_brg, 2, new TGeoTranslation("", +0.6, 0., -0.5 * b2b_z + 0.5 * ChamberBuilder::FEB::ConnBRG_z));
// VTTX Board - create
float vttx_z = VTTX_z + ChamberBuilder::FEB::ConnBRG_z;
new TGeoBBox("vttx_bd0", VTTX_y / 2., VTTX_x / 2., VTTX_z / 2.);
new TGeoBBox("vttx_bd1", VTTX_y1 / 2. + 0.01, VTTX_x1 / 2. + 0.01, VTTX_z / 2. + 0.01);
auto tr = new TGeoTranslation("t_vttx_bd1", -0.5 * (VTTX_y - VTTX_y1), 0.5 * (VTTX_x - VTTX_x1), 0.);
tr->RegisterYourself();
new TGeoBBox("vttx_bd2", VTTX_y2 / 2. + 0.01, VTTX_x2 / 2. + 0.01, VTTX_z / 2. + 0.01);
tr = new TGeoTranslation("t_vttx_bd2", -0.5 * (VTTX_y - VTTX_y2), 0.5 * (VTTX_x - VTTX_x2) - VTTX_x1, 0.);
tr->RegisterYourself();
auto vttx_bd = new TGeoCompositeShape("vttx_bd", "vttx_bd0 - vttx_bd1:t_vttx_bd1 - vttx_bd2:t_vttx_bd2");
TGeoVolume* vol_vttx_bd = new TGeoVolume("vttx_bd", vttx_bd, cbm::trd::geo::GetMaterial("TRDG10"));
vol_vttx_bd->SetLineColor(kGreen + 7);
// VTTX board - assembly
TGeoVolumeAssembly* vttx = new TGeoVolumeAssembly("VTTX");
vttx->AddNode(vol_vttx_bd, 1, new TGeoTranslation("", 0., 0., 0.5 * vttx_z - 0.5 * VTTX_z));
vttx->AddNode(vol_conn_brg, 1,
new TGeoTranslation("", 0.5 * VTTX_y - ChamberBuilder::FEB::ConnBRG_x, 0.,
-0.5 * vttx_z + 0.5 * ChamberBuilder::FEB::ConnBRG_z));
fHeight = ChamberBuilder::FEB::ConnBRG_z + SATAz + GA01_z;
// Init volume:
// FEB - AUX family FASPRO type v1 (12 FASPs)
fVol =
new TGeoVolume(GetName(), new TGeoBBox("", sizeX / 2, sizeY / 2, fHeight / 2.), cbm::trd::geo::GetMaterial("air"));
fVol->SetLineColor(kGreen);
fVol->SetTransparency(50);
int cFeb(0);
for (int ifeb(0), ib2b(0), ivttx(0); ifeb < Nfebs; ifeb++) {
cFeb = ifeb % 3;
if (cFeb > 0) // add B2B boards
fVol->AddNode(b2b, ib2b++,
new TGeoTranslation("", feb_pos[ifeb][0] - 0.5 * (ChamberBuilder::FEB::FASPRO_length + 0.2),
feb_pos[ifeb][1], -0.5 * fHeight + 0.5 * b2b_z));
if (cFeb > 1) // add VTTX boards
fVol->AddNode(vttx, ivttx++,
new TGeoTranslation(
"", feb_pos[ifeb][0] + 0.5 * (ChamberBuilder::FEB::FASPRO_length + 0.2) - 0.5 * VTTX_y - 0.1,
feb_pos[ifeb][1], -0.5 * fHeight + 0.5 * vttx_z));
}
fVol->AddNode(
ga01, 1,
new TGeoTranslation("", feb_pos[0][0] - 0.5 * (ChamberBuilder::FEB::FASPRO_length + 0.2) + 0.5 * GA01_y + 0.05,
feb_pos[0][1], -0.5 * fHeight + 0.5 * ga01_z));
return kSUCCESS;
}
......@@ -697,4 +816,5 @@ ClassImp(cbm::trd::geo::ChamberBuilder::Window)
ClassImp(cbm::trd::geo::ChamberBuilder::Volume)
ClassImp(cbm::trd::geo::ChamberBuilder::BackPanel)
ClassImp(cbm::trd::geo::ChamberBuilder::FEB)
ClassImp(cbm::trd::geo::ChamberBuilder::AUX)
/* clang-format on */
......@@ -100,6 +100,7 @@ namespace cbm::trd::geo
kVolume,
kBackPanel,
kFEB,
kAUX,
kNparts
};
enum eConfig
......@@ -114,6 +115,7 @@ namespace cbm::trd::geo
class Volume;
class BackPanel;
class FEB;
class AUX;
/** \brief Constructor for the chamber. Adds all elements according to config.
* \param[in] typ TRD chamber type [1, 3, 5, 7].
**/
......@@ -143,9 +145,9 @@ namespace cbm::trd::geo
short fChmbTyp = 1; //! chamber type [1, 3, 5, 7]
array<Component*, (int) eGeoPart::kNparts> fComponent = {}; //! list of chamber component builders
static const int Nfebs = faspFeb[1].nmax;
const double feb_pos[Nfebs][2] = {{-18, -21.6}, {0, -21.6}, {18, -21.6}, {-18, -10.8}, {0, -10.8},
{18, -10.8}, {-18, 0.0}, {0, 0.0}, {18, 0.0}, {-18, +10.8},
{0, +10.8}, {18, +10.8}, {-18, +21.6}, {0, +21.6}, {18, +21.6}};
static constexpr double feb_pos[Nfebs][2] = {{-18, -21.6}, {0, -21.6}, {18, -21.6}, {-18, -10.8}, {0, -10.8},
{18, -10.8}, {-18, 0.0}, {0, 0.0}, {18, 0.0}, {-18, +10.8},
{0, +10.8}, {18, +10.8}, {-18, +21.6}, {0, +21.6}, {18, +21.6}};
TGeoVolume* fVol = nullptr; //! the geo volume itself
ClassDef(ChamberBuilder, 1) // Manager of the TRD support structure
};
......@@ -284,6 +286,37 @@ namespace cbm::trd::geo
ClassDef(ChamberBuilder::BackPanel, 1) // Model for the TRD back panel
};
/** \brief Inner class describing the geometry of the TRD AUXILIARY boards (FEE):
**/
class ChamberBuilder::AUX : public ChamberBuilder::Component {
public:
/** \brief Constructor.
**/
AUX();
/** \brief Init task **/
virtual InitStatus Init();
private:
AUX(const AUX&);
// ADD AUXILIARY BOARDS
const double GA01_x = 5.; // length of LV FEBs in cm
const double GA01_y = 5.1; // width of LV FEBs in cm
const double GA01_z = 0.2;
const double B2B_x = 4.8; // length of B2B board in cm
const double B2B_y = 2.3; // width of B2B board in cm
const double B2B_z = 0.16;
const double VTTX_x = 10.6; // length of VTTX board in cm
const double VTTX_y = 5.0; // width of VTTX board in cm
const double VTTX_z = 0.16;
const double VTTX_x1 = 4.3; // length of VTTX large subtraction cm
const double VTTX_y1 = 3.9; // width of VTTX large subtraction cm
const double VTTX_x2 = 5.3; // length of VTTX small subtraction cm
const double VTTX_y2 = 0.94; // width of VTTX small subtraction cm
const double SATAx = 0.7; // width of a SATA connector on GA01
const double SATAy = 1.7; // length of a SATA connector on GA01
const double SATAz = 0.8; // height of a SATA connector on GA01
ClassDef(ChamberBuilder::AUX, 1) // Model for auxiliary TRD FEBs layer
};
/** \brief Inner class describing the geometry of the TRD Front End Electronics (FEE):
**/
class ChamberBuilder::FEB : public ChamberBuilder::Component {
......@@ -294,6 +327,15 @@ namespace cbm::trd::geo
/** \brief Init task **/
virtual InitStatus Init();
// Connector reused by FEB-AUX component of 2D
static constexpr double ConnBRG_x = 0.5; //!
static constexpr double ConnBRG_y = 4.58; //!
static constexpr double ConnBRG_z = 0.658; //!
static constexpr double ConnBRG_pos[2][2] = {{-8.4, 0}, {+8.4, 0}};
static constexpr double FASPRO_zspace = 1.0; //! gap size between boards
static constexpr double FASPRO_length = 17.8; //! length of FASP FEBs in cm
static constexpr double FASPRO_width = 10.6; //! width of FASP FEBs in cm
private:
FEB(const FEB&);
//ChamberBuilder::FEB operator=(const FEB&);
......@@ -312,18 +354,13 @@ namespace cbm::trd::geo
const double ConnFC_x = 2.37; //!
const double ConnFC_y = 0.535; //!
const double ConnFC_z = 0.266; //!
const double ConnBRG_x = 0.5; //!
const double ConnBRG_y = 4.58; //!
const double ConnBRG_z = 0.658; //!
static const int FASPRO_Nly = 18; //!
static const int FASPRO_Nfasp = 12; //!
static const int FASPRO_Nadc = 6; //!
static const int FASPRO_Nfpga = 3; //!
static const int FASPRO_Ndcdc = 3; //!
const double FASPRO_zspace = 1.0; //! gap size between boards
const double FASPRO_length = 17.8; //! length of FASP FEBs in cm
const double FASPRO_width = 10.6; //! width of FASP FEBs in cm
const double FASPRO_hole_x = 2.2; //!
const double FASPRO_hole_y = 0.4; //!
const double FASPRO_ly_cu[FASPRO_Nly][2] = { // FASPRO(Cu) layer thickness [um] and covarage [%]
......@@ -344,7 +381,6 @@ namespace cbm::trd::geo
const double DCDC_pos[FASPRO_Ndcdc][2] = {{-3, 0.1}, {3, -1.2}, {2.89, 0.1}};
const double ConnFC_pos[FASPRO_Nfasp][2] = {{-6, -4.9}, {-6, -2.9}, {-6, 2.9}, {-6, 4.9}, {0, -4.9}, {0, -2.9},
{0, 2.9}, {0, 4.9}, {+6, -4.9}, {+6, -2.9}, {+6, 2.9}, {+6, 4.9}};
const double ConnBRG_pos[2][2] = {{-8.4, 0}, {+8.4, 0}};
ClassDef(ChamberBuilder::FEB, 1) // Model for the TRD FEB geometry
};
......
set(GEOMETRY_VERSION d312187f1c8e3443db291bf1f3d0c361fa37e25a)
set(GEOMETRY_VERSION 5524fdf37b4b88d186e7b049c9e5407ea59bc56b)
set(GEOMETRY_SRC_URL "https://git.cbm.gsi.de/CbmSoft/cbmroot_geometry.git")
download_project_if_needed(PROJECT Geometry_source
......
set(PARAMETER_VERSION 8a60540080a5ab3bda1165bcef18b317254865cb) # 2025/03/25
set(PARAMETER_VERSION fc402a25347c5a9f8df60fea216054d414df1321) # 2025/04/07
set(PARAMETER_SRC_URL "https://git.cbm.gsi.de/CbmSoft/cbmroot_parameter.git")
download_project_if_needed(PROJECT Parameter_source
......
/* Copyright (C) 2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
SPDX-License-Identifier: GPL-3.0-only
Authors: Sergei Zharko [committer] */
/// \file run_inspect_reco_timeslice.C
/// \brief ROOT macro to convert reconstructed data output from the online binary to a ROOT file
/// \author Sergei Zharko <s.zharko@gsi.de>
// --- Includes needed for IDE
#include <RtypesCore.h>
#if !defined(__CLING__)
#include "CbmSourceRecoTimeslice.h"
#include "CbmTaskInspectRecoTimeslice.h"
#include "CbmTsEventHeader.h"
#include <FairRunAna.h>
#include <FairSystemInfo.h>
#include <TStopwatch.h>
#endif
/// \brief Main function of the macro
/// \param inputFileName Name of input file
/// \param outputFileName Name of output file
/// \param numTimeslices Number of time-slices to process
void run_inspect_reco_timeslice(TString inputFileName, TString outputFileName, size_t numTimeslices = -1)
{
// ========================================================================
// Adjust this part according to your requirements
// --- Logger settings ----------------------------------------------------
TString logLevel = "INFO";
TString logVerbosity = "LOW";
// ------------------------------------------------------------------------
// ----- Environment --------------------------------------------------
TString myName = "run_inspect_reco_timeslice"; // this macro's name for screen output
TString srcDir = gSystem->Getenv("VMCWORKDIR"); // top source directory
// ------------------------------------------------------------------------
// ----- Timer --------------------------------------------------------
TStopwatch timer;
timer.Start();
// ------------------------------------------------------------------------
// ----- FairRunAna ---------------------------------------------------
FairRunOnline* run = new FairRunOnline();
run->SetEventHeader(new CbmTsEventHeader{});
FairSource* source = new CbmSourceRecoTimeslice(inputFileName);
run->SetSource(source);
auto sink = new FairRootFileSink(outputFileName);
run->SetSink(sink);
run->SetGenerateRunInfo(kTRUE);
// ------------------------------------------------------------------------
// ----- Logger settings ----------------------------------------------
FairLogger::GetLogger()->SetLogScreenLevel(logLevel.Data());
FairLogger::GetLogger()->SetLogVerbosityLevel(logVerbosity.Data());
// ------------------------------------------------------------------------
// ----- Event inspection ---------------------------------------------
FairTask* inspect = new CbmTaskInspectRecoTimeslice();
LOG(info) << "-I- " << myName << ": Adding task " << inspect->GetName();
run->AddTask(inspect);
// ------------------------------------------------------------------------
// ----- Run initialisation -------------------------------------------
std::cout << std::endl;
std::cout << "-I- " << myName << ": Initialise run" << std::endl;
run->Init();
// ------------------------------------------------------------------------
// ----- Start run ----------------------------------------------------
std::cout << std::endl << std::endl;
std::cout << "-I- " << myName << ": Starting run" << std::endl;
if (numTimeslices == -1)
run->Run(-1, 0);
else
run->Run(0, numTimeslices);
// ------------------------------------------------------------------------
// ----- Finish -------------------------------------------------------
timer.Stop();
FairMonitor::GetMonitor()->Print();
Double_t rtime = timer.RealTime();
Double_t ctime = timer.CpuTime();
std::cout << std::endl << std::endl;
std::cout << "Macro finished successfully." << std::endl;
std::cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << std::endl;
FairSystemInfo sysInfo;
Float_t maxMemory = sysInfo.GetMaxMemory();
std::cout << "<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
std::cout << maxMemory;
std::cout << "</DartMeasurement>" << std::endl;
Float_t cpuUsage = ctime / rtime;
std::cout << "<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
std::cout << cpuUsage;
std::cout << "</DartMeasurement>" << std::endl;
// ------------------------------------------------------------------------
} // End of main macro function
......@@ -43,5 +43,8 @@
//#pragma link C++ class cbm::ca::IdealHitProducer < L1DetectorID::kTof > + ;
#pragma link C++ class cbm::ca::IdealHitProducer + ;
#pragma link C++ class cbm::ca::tools::MaterialHelper + ;
#pragma link C++ class cbm::algo::ca::Vector + ;
#pragma link C++ class cbm::algo::ca::Track + ;
#pragma link C++ class cbm::algo::ca::Vector < cbm::algo::ca::Track > + ;
#endif