5 #include <FairLogger.h>
6 #include <FairParamList.h>
9 #include <TDirectory.h>
11 #include <TGenericClassInfo.h>
13 #include <TObjArray.h>
14 #include <TObjString.h>
29 if (!l)
return kFALSE;
30 if (!l->fill(
"NrOfModules", &
fNrOfModules))
return kFALSE;
32 if (!l->fill(
"Gas", gasMix, 100))
return kFALSE;
33 Text_t repo[100], pid[100];
34 if (!l->fill(
"RepoDrift", repo, 100))
return kFALSE;
35 if (!l->fill(
"RepoPid", pid, 100))
return kFALSE;
37 TDirectory* cwd(gDirectory);
38 if (!TFile::Open(Form(
"%s/%s", gSystem->Getenv(
"VMCWORKDIR"), repo))) {
39 LOG(error) <<
"Missing TRD DriftMap Repository : " << repo;
42 LOG(debug) <<
"TRD DriftMap Repository : " << gFile->GetName();
43 LOG(debug) <<
"TRD PID Repository : " << pid;
47 if (!l->fill(
"ModuleIdArray", &moduleId))
return kFALSE;
50 TObjArray* so = sgas.Tokenize(
"_");
51 Int_t pgas = ((TObjString*) (*so)[1])->String().Atoi();
55 if (!l->fill(Form(
"%d", moduleId[
i]), &value))
return kFALSE;
61 ((TObjString*) (*so)[0])->GetName()));
64 GetDriftMap(((TObjString*) (*so)[0])->GetName(), value[0], value[1]),
83 LOG(info) << GetName() <<
"::putParams(FairParamList*)";
87 for (std::map<Int_t, CbmTrdParMod*>::iterator imod =
fModuleMap.begin();
90 moduleId[idx++] = imod->first;
95 l->add(
"RepoDrift",
"parameters/trd/CbmTrdDriftMap.root");
96 l->add(
"RepoPid",
"parameters/trd/Likelihood_Xenon_85_GSI_12.root");
97 l->add(
"Gas", Form(
"Xe_%d", Int_t(1.e2 * mod->
GetNobleGas())));
99 l->add(
"ModuleIdArray", moduleId);
108 l->add(Form(
"%d", moduleId[
i]), values);
116 TString smap = Form(
"%s_%4d_%3d", g, ua, ud);
117 TH2F* hm = (TH2F*) gFile->Get(smap.Data());
120 LOG(debug) << GetName() <<
"::GetDriftMap() : Interpolate drift map for " << g
121 <<
" Ua[" << ua <<
"]"
122 <<
" Ud[" << ud <<
"]";
124 return (TH2F*) gFile->Get(Form(
"%s_1500_300", g));