6 #include <FairLogger.h>
7 #include <FairParamList.h>
25 if (!l)
return kFALSE;
27 LOG(error) << GetName() <<
"::getParams : Couldn't find \"NrOfModules\"";
31 if (!l->fill(
"MaxSectors", &maxSectors)) {
32 LOG(error) << GetName() <<
"::getParams : Couldn't find \"MaxSectors\"";
36 if (!l->fill(
"ModuleIdArray", &moduleId)) {
37 LOG(error) << GetName() <<
"::getParams : Couldn't find \"MaxSectors\"";
42 Int_t nrValues = 10 + (maxSectors * 4);
43 TArrayD values(nrValues);
44 TArrayD sectorSizeX(maxSectors);
45 TArrayD sectorSizeY(maxSectors);
46 TArrayD padSizeX(maxSectors);
47 TArrayD padSizeY(maxSectors);
55 Double_t awPitch(-1.);
62 if (!l->fill(Form(
"%d", moduleId[
i]), &values)) {
63 LOG(error) << GetName()
64 <<
"::getParams : Missing parameter definiton for module "
69 orientation = values[k++];
71 awPitch = values[k++];
80 for (Int_t j = 0; j < maxSectors; j++) {
81 sectorSizeX.AddAt(values[k++], j);
82 sectorSizeY.AddAt(values[k++], j);
83 padSizeX.AddAt(values[k++], j);
84 padSizeY.AddAt(values[k++], j);
100 ->SetAnodeWireToPadPlaneDistance(awPP);
102 ->SetAnodeWireOffset(awOff);
104 ->SetAnodeWireSpacing(awPitch);
105 if (FairLogger::GetLogger()->IsLogNeeded(fair::Severity::debug))
133 LOG(info) << GetName() <<
"::putParams(FairParamList*)";
135 Int_t maxSectors(0), idx(0);
137 for (std::map<Int_t, CbmTrdParMod*>::iterator imod =
fModuleMap.begin();
140 moduleIdArray[idx++] = imod->first;
142 if (sectors > maxSectors) maxSectors = sectors;
146 l->add(
"MaxSectors", maxSectors);
147 l->add(
"ModuleIdArray", moduleIdArray);
150 Int_t nrValues = 10 + (maxSectors * 4);
151 TArrayD values(nrValues);
164 values.AddAt(mod->
GetX(), k++);
165 values.AddAt(mod->
GetY(), k++);
166 values.AddAt(mod->
GetZ(), k++);
170 for (Int_t j = 0; j < maxSectors; j++) {
178 text += moduleIdArray[
i];
179 l->add(text.Data(), values);