14#include "FairDetector.h"
15#include "FairRunAna.h"
23 : FairTask(
"CbmMuchTrackingInterface")
25 if (!fpInstance) { fpInstance =
this; }
39 LOG(info) <<
"\033[1;33mCALL CbmMuchTrackingInterface::Init()\033[0m";
42 if (!
fGeoScheme) { LOG(fatal) <<
"CbmMuchTrackingInterface::Init: CbmMuchGeoScheme instance is nullptr"; }
46 LOG(error) <<
"CbmMuchTrackingInterface::Init: MuCh digi parameters were not initialized\n"
47 <<
"\033[4;1;32mNOTE\033[0m: For the MuCh digi parameters initialization please place the following "
48 <<
"code to your macro:\n"
49 <<
"\n\t// ----- MuCh digi parameters initialization --------------------------------------"
50 <<
"\n\tif (CbmSetup::Instance()->IsActive(ECbmModuleId::kMuch)) {"
51 <<
"\n\t // Parameter file name"
52 <<
"\n\t TString geoTag;"
53 <<
"\n\t CbmSetup::Instance()->GetGeoTag(ECbmModuleId::kMuch, geoTag);"
54 <<
"\n\t Int_t muchFlag = (geoTag.Contains(\"mcbm\") ? 1 : 0);"
55 <<
"\n\t TString parFile = gSystem->Getenv(\"VMCWORKDIR\");"
56 <<
"\n\t parFile += \"/parameters/much/much_\" + geoTag(0, 4) + \"_digi_sector.root\";"
58 <<
"\n\t // Initialization of the geometry scheme"
59 <<
"\n\t auto muchGeoScheme = CbmMuchGeoScheme::Instance();"
60 <<
"\n\t if (!muchGeoScheme->IsInitialized()) { muchGeoScheme->Init(parFile, muchFlag); }"
62 <<
"\n\t// --------------------------------------------------------------------------------";
79 for (
int iSt = 0; iSt < nStations; ++iSt) {
80 auto* pLayer{GetMuchLayer(iSt)};
81 fvStationFullVolume.emplace_back(-100., +100, -100., +100, pLayer->GetZ() - 0.5 * pLayer->GetDz(),
82 pLayer->GetZ() + 0.5 * pLayer->GetDz());
90 <<
"Some errors occurred in the tracking detector interface initialization for MuCh (see information above)";
119 return std::pair(muchStation, muchLayer);
ClassImp(CbmMuchTrackingInterface) CbmMuchTrackingInterface
CbmMuchStation * GetStation(Int_t iStation) const
static CbmMuchGeoScheme * Instance()
Int_t GetNStations() const
A CbmL1 subtask, which provides necessary methods for L1 tracker to access the geometry and dataflow ...
std::vector< int > fFirstTrackingStation
static CbmMuchTrackingInterface * fpInstance
Instance of the class.
CbmMuchGeoScheme * fGeoScheme
MuCh geometry scheme instance.
std::pair< int, int > ConvTrackingStationId2MuchId(int traStationId) const
Calculates MuCh station ID from tracker station ID.
InitStatus ReInit() override
FairTask: ReInit method.
CbmMuchTrackingInterface()
Default constructor.
void SetParContainers() override
FairTask: sets parameter containers up.
InitStatus Init() override
FairTask: Init method.
~CbmMuchTrackingInterface()
Destructor.
std::vector< VolumeInfo > fvStationFullVolume
Geometric properties of each station passive volume.
std::vector< VolumeInfo > fvStationActiveVolume
Geometric properties of each station active volume.
bool Check() const
Checks detector interface: boundary conditions of the parameters.