51 TGeoVolume* fm = (TGeoVolume*) gGeoManager->GetListOfVolumes()->FindObject(
"gas");
53 TObjArray* volList = gGeoManager->GetListOfVolumes();
54 TObjArrayIter iter(volList);
55 TGeoVolume* vol =
nullptr;
56 LOG(error) <<
"********** List of available volumes ************ ";
57 while ((vol = (TGeoVolume*) iter.Next())) {
58 LOG(error) << vol->GetName();
60 LOG(error) <<
"***************** End of List ******************* \n"
61 <<
" -E- Could not find volume <gas>. \n"
62 <<
" -E- If there is no list above this text then probably \n"
63 <<
" -E- the geometry was not loaded in the macro.\n"
64 <<
" -E- Please do it with fRun->LoadGeometry(). \n "
65 <<
" -E- If you see a list probably the names of the \n"
66 <<
" -E- volumes have changed and CbmTrdRadiator has to \n"
67 <<
" -E- be changed accordingly. ";
68 LOG(fatal) <<
"CbmTrdGas::Init: No volumes defined.";
73 TGeoVolume* fm1 = (TGeoVolume*) gGeoManager->GetListOfVolumes()->FindObject(
"trd1mb");
76 TGeoBBox*
shape = (TGeoBBox*) fm->GetShape();
85 LOG(info) <<
"CbmTrdGas::Init: Detector type : double sided geometry (1) ";
86 LOG(info) <<
"CbmTrdGas::Init: Gas thickness : " <<
fGasThick <<
" cm";
91 LOG(info) <<
"CbmTrdGas::Init: Detector type : standard GSI geometry (2) ";
92 LOG(info) <<
"CbmTrdGas::Init: Gas thickness : " <<
fGasThick <<
" cm";
96 TGeoMixture* mixt = (TGeoMixture*) fm->GetMaterial();
97 Int_t nmixt = mixt->GetNelements();
99 LOG(error) <<
"CbmTrdGas::Init: This is not a mixture composed out of "
100 "three different elements.";
101 LOG(error) <<
"CbmTrdGas::Init: Don't know what to do, so stop execution here.";
102 LOG(fatal) <<
"CbmTrdGas::Init: Unknown gas mixture.";
105 Bool_t foundCarbon = kFALSE;
106 Bool_t foundOxygen = kFALSE;
111 Double_t* elem = mixt->GetZmixt();
112 Double_t* weight = mixt->GetWmixt();
113 Double_t* amixt = mixt->GetAmixt();
115 for (Int_t i = 0; i < nmixt; i++) {
116 if (elem[i] == 6.0) {
120 else if (elem[i] == 8.0) {
127 if (!(foundCarbon && foundOxygen)) {
128 LOG(error) <<
"CbmTrdGas::Init: This gas mixture has no CO2 admixture \n"
129 <<
"CbmTrdGas::Init: If you want to use this mixture you have "
131 <<
"CbmTrdGas::Init: CbmTrdRadiator to be consistent \n";
132 LOG(fatal) <<
"CbmTrdGas::Init: Unknown gas mixture.";
134 if (elem[noblegas] != 54) {
135 LOG(error) <<
"CbmTrdGas::Init: This gas mixture has no Xe admixture \n"
136 <<
"CbmTrdGas::Init: If you want to use this mixture you have "
138 <<
"CbmTrdGas::Init: CbmTrdRadiator to be consistent";
139 LOG(fatal) <<
"CbmTrdGas::Init: Unknown gas mixture.";
145 Double_t massC = amixt[carbon];
146 Double_t massO = amixt[oxygen];
147 Double_t massXe = amixt[noblegas];
148 Double_t
x = weight[noblegas];
149 Double_t percentNoblegas =
150 100 * (((massC *
x) + (2 * massO *
x)) / (massXe + massC *
x + 2 * massO *
x - massXe *
x));
155 if (elem[noblegas] == 54) { LOG(info) <<
"CbmTrdGas::Init: Percent (Xe) : " << (
fPercentNobleGas * 100); }
156 LOG(info) <<
"CbmTrdGas::Init: Percent (CO2) : " << (
fPercentCO2 * 100);
177 Int_t thickness = TMath::Nint(
fGasThick * 10);
179 const char* detector =
"";
180 if (
fDetType == 0) { detector =
"GSI"; }
185 LOG(error) <<
"CbmTrdGas::SetFileName: Detector type " <<
fDetType <<
" not known";
186 LOG(error) <<
"CbmTrdGas::SetFileName: Stop execution of program due to "
187 "initialization error.";
188 LOG(fatal) <<
"CbmTrdGas::SetFileName: Unknown detector type.";
190 const char* gastype =
"";
193 LOG(error) <<
"CbmTrdGas::SetFileName: Gas type " <<
fNobleGasType <<
" not known";
194 LOG(error) <<
"CbmTrdGas::SetFileName: Stop execution of program due to "
195 "initialization error.";
196 LOG(fatal) <<
"CbmTrdGas::SetFileName: Unknown gas type.";
199 TString path = getenv(
"VMCWORKDIR");
200 path = path +
"/parameters/trd/";
201 fFileNameLike.Form(
"Likelihood_%s_%d_%s_%d.root", gastype, fraction, detector, thickness);
202 fFileNameANN.Form(
"ANN_%s_%d_%s_%d.root", gastype, fraction, detector, thickness);