CbmRoot
Loading...
Searching...
No Matches
CbmTrdParManager.cxx
Go to the documentation of this file.
1/* Copyright (C) 2008-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer], Alexandru Bercuci, Pascal Raisig */
4
10#include "CbmTrdParManager.h"
11
12#include "CbmTrdGeoHandler.h" // for CbmTrdGeoHandler
13#include "CbmTrdPads.h" // for fst1_pad_type, fst1_sect_count
14#include "CbmTrdParAsic.h" // for CbmTrdParAsic, CbmTrdParAsic::kCriId...
15#include "CbmTrdParFasp.h" // for CbmTrdParFasp
16#include "CbmTrdParModAsic.h" // for CbmTrdParModAsic
17#include "CbmTrdParModDigi.h" // for CbmTrdParModDigi
18#include "CbmTrdParModGain.h" // for CbmTrdParModGain
19#include "CbmTrdParModGas.h" // for CbmTrdParModGas
20#include "CbmTrdParModGeo.h" // for CbmTrdParModGeo
21#include "CbmTrdParSet.h" // for CbmTrdParSet
22#include "CbmTrdParSetAsic.h" // for CbmTrdParSetAsic
23#include "CbmTrdParSetDigi.h" // for CbmTrdParSetDigi
24#include "CbmTrdParSetGain.h" // for CbmTrdParSetGain
25#include "CbmTrdParSetGas.h" // for CbmTrdParSetGas
26#include "CbmTrdParSetGeo.h" // for CbmTrdParSetGeo
27#include "CbmTrdParSpadic.h" // for CbmTrdParSpadic
28
29#include <FairParAsciiFileIo.h> // for FairParAsciiFileIo
30#include <FairParRootFileIo.h> // for FairParRootFileIo
31#include <FairRunAna.h> // for FairRunAna
32#include <FairRuntimeDb.h> // for FairRuntimeDb
33#include <FairTask.h> // for FairTask, InitStatus, kSUCCESS
34
35#include <TArrayD.h> // for TArrayD
36#include <TFile.h> // for TFile
37#include <TGeoManager.h> // for TGeoManager, gGeoManager
38#include <TGeoNode.h> // for TGeoNode
39#include <TList.h> // for TList
40#include <TObjArray.h> // for TObjArray
41#include <TObject.h> // for TObject
42#include <TRandom.h> // for TRandom, gRandom
43
44#include <memory>
45#include <vector> // for vector
46
47#include <stdio.h> // for printf
48#include <stdlib.h> // for getenv
49
51 : FairTask("TrdParManager")
52 , fMaxSectors(0)
53 , fFASP(fasp)
54 // fModuleMap(),
55 , fAsicPar(nullptr)
56 , fDigiPar(nullptr)
57 , fGasPar(nullptr)
58 , fGainPar(nullptr)
59 , fGeoPar(nullptr)
60 , fGeoHandler(new CbmTrdGeoHandler())
61 , fGeometryTag("")
62 , fHardwareSetup()
63{
64 // Get the maximum number of sectors. All arrays will have this number of entries.
66}
67
69
71{
72 FairRuntimeDb* rtdb = FairRunAna::Instance()->GetRuntimeDb();
73 fAsicPar = (CbmTrdParSetAsic*) (rtdb->getContainer("CbmTrdParSetAsic"));
74 fDigiPar = (CbmTrdParSetDigi*) (rtdb->getContainer("CbmTrdParSetDigi"));
75 fGasPar = (CbmTrdParSetGas*) (rtdb->getContainer("CbmTrdParSetGas"));
76 fGainPar = (CbmTrdParSetGain*) (rtdb->getContainer("CbmTrdParSetGain"));
77 fGeoPar = (CbmTrdParSetGeo*) (rtdb->getContainer("CbmTrdParSetGeo"));
78}
79
81{
82 // The geometry structure is treelike with cave as
83 // the top node. For the TRD there are keeping volume
84 // trd_vXXy_1 which is only container for the different layers.
85 // The trd layer is again only a container for all volumes of this layer.
86 // Loop over all nodes below the top node (cave). If one of
87 // the nodes contains a string trd it must be TRD detector.
88 // Now loop over the layers and
89 // then over all modules of the layer to extract in the end
90 // all active regions (gas) of the complete TRD. For each
91 // of the gas volumes get the information about size and
92 // position from the geomanager and the sizes of the sectors
93 // and pads from the definitions in CbmTrdPads. This info
94 // is then stored in a CbmTrdModuleSim object for each of the
95 // TRD modules.
96
97 TGeoNode* topNode = gGeoManager->GetTopNode();
98 TObjArray* nodes = topNode->GetNodes();
99 for (Int_t iNode = 0; iNode < nodes->GetEntriesFast(); iNode++) {
100 TGeoNode* node = static_cast<TGeoNode*>(nodes->At(iNode));
101 if (!TString(node->GetName()).Contains("trd")) continue; // trd_vXXy top node, e.g. trd_v13a, trd_v14b
102 TGeoNode* station = node;
103 fGeometryTag = station->GetName();
105 TObjArray* layers = station->GetNodes();
106 for (Int_t iLayer = 0; iLayer < layers->GetEntriesFast(); iLayer++) {
107 TGeoNode* layer = static_cast<TGeoNode*>(layers->At(iLayer));
108 if (!TString(layer->GetName()).Contains("layer")) continue; // only layers
109
110 TObjArray* modules = layer->GetNodes();
111 for (Int_t iModule = 0; iModule < modules->GetEntriesFast(); iModule++) {
112 TGeoNode* module = static_cast<TGeoNode*>(modules->At(iModule));
113 TObjArray* parts = module->GetNodes();
114 for (Int_t iPart = 0; iPart < parts->GetEntriesFast(); iPart++) {
115 TGeoNode* part = static_cast<TGeoNode*>(parts->At(iPart));
116 if (!TString(part->GetName()).BeginsWith("gas_")) continue; // only active gas volume
117
118 // Put together the full path to the interesting volume, which
119 // is needed to navigate with the geomanager to this volume.
120 // Extract the geometry information (size, global position)
121 // from this volume.
122 TString path = TString("/") + topNode->GetName() + "/" + station->GetName() + "/" + layer->GetName() + "/"
123 + module->GetName() + "/" + part->GetName();
124
126 }
127 }
128 }
129 }
130 Finish();
131 return kSUCCESS;
132}
133
135{
136 printf("CbmTrdParManager::Finish()\n");
137 FairRuntimeDb* rtdb = FairRunAna::Instance()->GetRuntimeDb();
138 fDigiPar = (CbmTrdParSetDigi*) (rtdb->getContainer("CbmTrdParSetDigi"));
139 fAsicPar = (CbmTrdParSetAsic*) (rtdb->getContainer("CbmTrdParSetAsic"));
140 fDigiPar->Print();
141 fAsicPar->Print();
142}
143
144void CbmTrdParManager::Exec(Option_t*) {}
145
146
148{
153 Int_t moduleAddress = fGeoHandler->GetModuleAddress(path);
154 Int_t orientation = fGeoHandler->GetModuleOrientation(path);
155
156 Double_t sizeX = fGeoHandler->GetSizeX(path);
157 Double_t sizeY = fGeoHandler->GetSizeY(path);
158 Double_t sizeZ = fGeoHandler->GetSizeZ(path);
159 Double_t x = fGeoHandler->GetX(path);
160 Double_t y = fGeoHandler->GetY(path);
161 Double_t z = fGeoHandler->GetZ(path);
162
163 TArrayD sectorSizeX(fMaxSectors);
164 TArrayD sectorSizeY(fMaxSectors);
165 TArrayD padSizeX(fMaxSectors);
166 TArrayD padSizeY(fMaxSectors);
167 Int_t moduleType = fGeoHandler->GetModuleType(path);
168
169 printf("\nCbmTrdParManager::CreateModuleParameters(%s) type[%d]\n", path.Data(), moduleType);
170 // TODO Should move the geoHandler functionality to CbmTrdParSetGeo and remove code duplication
171 CbmTrdParModGeo* geo = new CbmTrdParModGeo(Form("TRD_%d", moduleAddress), path.Data());
172 fGeoPar->addParam(geo);
173
174 for (Int_t i = 0; i < fst1_sect_count; i++) {
175 sectorSizeX.AddAt(fst1_pad_type[moduleType - 1][i][0], i);
176 sectorSizeY.AddAt(fst1_pad_type[moduleType - 1][i][1], i);
177 padSizeX.AddAt(fst1_pad_type[moduleType - 1][i][2], i);
178 padSizeY.AddAt(fst1_pad_type[moduleType - 1][i][3], i);
179 printf(" sec[%d] dx[%5.2f] dy[%5.2f] px[%5.2f] py[%5.2f]\n", i, sectorSizeX[i], sectorSizeY[i], padSizeX[i],
180 padSizeY[i]);
181 }
182
183 // Orientation of the detector layers
184 // Odd layers (1,3,5..) have resolution in x-direction (isRotated == 0) - vertical pads
185 // Even layers (2,4,6..) have resolution in y-direction (isRotated == 1) - horizontal pads
186 // Int_t isRotated = fGeoHandler->GetModuleOrientation(path);
187 // if( (isRotated%2) == 1 ) { // flip pads for even layers
188 // Double_t copybuf;
189 // for (Int_t i = 0; i < fMaxSectors; i++) {
190 // copybuf = padSizeX.At(i);
191 // padSizeX.AddAt(padSizeY.At(i), i);
192 // padSizeY.AddAt(copybuf, i);
193 // copybuf = sectorSizeX.At(i);
194 // sectorSizeX.AddAt(sectorSizeY.At(i), i);
195 // sectorSizeY.AddAt(copybuf, i);
196 // }
197 // }
198
199 // Create new digi par for this module.
200 CbmTrdParModDigi* digi = new CbmTrdParModDigi(x, y, z, sizeX, sizeY, sizeZ, fMaxSectors, orientation, sectorSizeX,
201 sectorSizeY, padSizeX, padSizeY);
202 if (moduleType >= 9) { // for the Bucharest inner detector special anode wire geometry
204 digi->SetAnodeWireOffset(0.);
205 digi->SetAnodeWireSpacing(0.3);
206 }
207 digi->SetModuleId(moduleAddress);
208 digi->Print();
209 fDigiPar->addParam(digi);
210
211 // Create new asic par for this module
212 CbmTrdParModAsic* asics(nullptr);
213 // if(moduleType>=9 && fFASP){ // I do not think this check is required, actually I think it creates a bug in parameter creation
214 if (moduleType >= 9) {
215 asics = new CbmTrdParModAsic(Form("FaspPars%03d", moduleAddress), Form("Fasp set for Module %d", moduleAddress));
216 asics->SetChamberType(moduleType);
217 Double_t par[6];
218 par[1] = 14;
219 par[4] = 4.181e-6;
220 Int_t iasic(0), ncol(digi->GetNofColumns()), asicAddress, chAddress;
221 CbmTrdParFasp* asic(nullptr);
222 for (Int_t r(0); r < digi->GetNofRows(); r++) {
223 for (Int_t c(0); c < ncol; c++) {
224 if (c % 8 == 0) {
225 if (asic) asics->SetAsicPar(asic);
226 asicAddress = moduleAddress * 1000 + iasic;
227 asic = new CbmTrdParFasp(asicAddress);
228 iasic++;
229 }
230 for (Int_t ipair(0); ipair < 2; ipair++) {
231 par[0] = gRandom->Gaus(300, 4);
232 par[2] = gRandom->Gaus(600, 40);
233 par[3] = gRandom->Gaus(2580, 10);
234 chAddress = 2 * (r * ncol + c) + ipair;
235 par[5] = ipair;
236 asic->SetChannelAddress(chAddress);
237 Int_t chIdFasp = asic->QueryChannel(chAddress);
238 asic->SetCalibParameters(chIdFasp, par);
239 }
240 }
241 }
242 if (asic) asics->SetAsicPar(asic);
243 }
244 else { // Here only rectangular modules should enter. Hence, we have spadics in use.
245 asics = new CbmTrdParModAsic("TrdParModSpadic", Form("Spadic set for Module %d", moduleAddress));
246 asics->SetChamberType(moduleType);
247 CbmTrdParSpadic* asic(nullptr);
248
249 // To write the channelAddresses to the parameter files we first of all need to now the number of columns, rows and channels. The numbering of the channels starts at the bottom left and goes along the short side (column) of the pads row by row, for a not rotated module. The rotation is also taken care about in the following code.
250 Int_t nModuleColumns(digi->GetNofColumns());
251 Int_t nModuleRows(digi->GetNofRows());
252 Int_t nModuleChannels(nModuleColumns * nModuleRows);
253
254 Int_t nAsicsAlongColumns(-1);
255
256 std::vector<Int_t> chAddressesVec;
257 for (Int_t iAsic = 0; iAsic < CbmTrdParSpadic::GetNasicsOnModule(moduleType); iAsic++) {
258 asic = new CbmTrdParSpadic(
259 1000 * moduleAddress
260 + iAsic); // nTh-asic + module address define asicAddress counting for asic starts at bottom left and goes left to right row by row
261
262 Int_t nAsicChannels(asic->GetNchannels());
263
264 // Figure out the number of asics per column, this is required since one spadic is connected to two rows
265 nAsicsAlongColumns = nModuleColumns < nModuleRows ? nModuleRows / 2 : nModuleColumns / (nAsicChannels / 2);
266
267 // Get the asic-row (= rows/2) for the given asic
268 Int_t nThAsicRow(iAsic / nAsicsAlongColumns);
269
270 Int_t nThAsicColumn(iAsic % nAsicsAlongColumns);
271
272 chAddressesVec.clear();
273 chAddressesVec.resize(nAsicChannels);
274
275 Int_t iAsicChannel = 0; // This is the nth asic channel as it is written to the raw messages
276 for (auto channelAddress : chAddressesVec) {
277 // Now apply the asic specific mapping
278 channelAddress = asic->GetAsicChAddress(iAsicChannel); // returns the channeladdress in the scope of one asic
279
280 // Get the channel addressed to the top or bottom row of the single asic
281 if ((channelAddress / (nAsicChannels / 2)) > 0) {
282 // if the address corresponds to the second 16 channels 16..31 it goes into the next row
283 channelAddress -= (nAsicChannels / 2);
284 // since we have only 16 channels per row we have to subtract 16 from channels 16..31
285 channelAddress += nModuleColumns;
286 }
287 // move channel address to the correct column according to the asic column position
288 channelAddress += nThAsicColumn * nAsicChannels / 2; // one asic is split over two rows
289 // move channel address to the correct row according to the asic row position
290 channelAddress += nThAsicRow * nModuleColumns * 2; // one asic is split over two rows
291
292 // if the module is rotated 180 or 270 degrees, the channel number counting has to be rotated as well, since the X-Y placing in CbmTrdParModDigi expect it in this way.
293 if (orientation == 2) {
294 channelAddress *= (-1);
295 channelAddress += (nModuleChannels - 1);
296 }
297 chAddressesVec.at(iAsicChannel) = channelAddress;
298 iAsicChannel++;
299 }
300
301 asic->SetChannelAddresses(chAddressesVec);
302 // Get the according hardware component Id for the real asic placed at the according position in the experiment
304 asics->SetAsicPar(asic);
305 }
306 }
307 asics->SetModuleId(moduleAddress);
308 asics->Print();
309 fAsicPar->addParam(asics);
310
311 // Create new gas par for this module
312 CbmTrdParModGas* gas(nullptr);
313 if (moduleType >= 9) {
314 gas = new CbmTrdParModGas(Form("Module/%d/Ua/%d/Ud/%d/Gas/Xe", moduleAddress, 1900, 500));
315 gas->SetDetType(1);
316 gas->SetPidType(1);
317 }
318 else
319 gas = new CbmTrdParModGas(Form("Module/%d/Ua/%d/Ud/%d/Gas/Xe", moduleAddress, 1600, 500));
320 gas->Print();
321 fGasPar->addParam(gas);
322
323 // Create new gain par for this module
324 CbmTrdParModGain* gain(nullptr);
325 if (moduleType == 9) gain = new CbmTrdParModGain();
326 else
327 gain = new CbmTrdParModGain();
328 gain->SetModuleId(moduleAddress);
329 gain->Print();
330 fGainPar->addParam(gain);
331}
332
333// ---- CreateParFilesFromGeometry ------------------------------------------------
334bool CbmTrdParManager::CreateParFilesFromGeometry(bool createRootFileOutput, TString outDir)
335{
336 // This function creates the trd parameter files based on a given geometry file, which has to be passed in a macro to the FairRunAna instance. Such a geometry file is produced by FairRunSim bases on the trd geometry input.
337
338 if (!createRootFileOutput) return CreateParFilesFromGeometry(outDir);
339
340 FairRunAna* run = FairRunAna::Instance();
341 FairRuntimeDb* rtdb = run->GetRuntimeDb();
342
344
345 TString inputDirectory = run->GetGeoFile()->GetName();
346 inputDirectory.Resize((inputDirectory.Last('/') + 1));
347 TString geoName = run->GetGeoFile()->GetName();
348 geoName.ReplaceAll(inputDirectory.Data(), "");
349 geoName.ReplaceAll("geofile_", "");
350 geoName.ReplaceAll(".root", "");
351
352 if (outDir.IsNull()) { outDir = Form("%s/../src/parameters/trd", getenv("CBM_ROOT")); }
353
354 TList* containerList = rtdb->getListOfContainers();
355
356 TString currentPar = "";
357 CbmTrdParSet* currentContainer = nullptr;
358 FairParRootFileIo parOut;
359 parOut.open(Form("%s/%s.par.root", outDir.Data(), geoName.Data()), "RECREATE");
360 rtdb->setOutput(&parOut);
361
362 for (auto iContainerIt : *containerList) {
363 currentPar = iContainerIt->GetName();
364 if (!currentPar.Contains("CbmTrd")) continue; // make sure that we only edit Trd container
365 currentContainer = (CbmTrdParSet*) iContainerIt;
366 currentContainer->setChanged();
367 currentContainer->setInputVersion(0, 1);
368 }
369 rtdb->saveOutput();
370 rtdb->closeOutput();
371
372 return true; // check if rtdb->writeContainers() could be used to run a bool check and return that bool instead of saveOutput void
373}
374
375// ---- private - CreateParFilesFromGeometry --------------------------------------
377{
378 // This function creates the trd parameter files based on a given geometry file, which has to be passed in a macro to the FairRunAna instance. Such a geometry file is produced by FairRunSim bases on the trd geometry input.
379
380 FairRunAna* run = FairRunAna::Instance();
381 FairRuntimeDb* rtdb = run->GetRuntimeDb();
382
384
385 TString inputDirectory = run->GetGeoFile()->GetName();
386 inputDirectory.Resize((inputDirectory.Last('/') + 1));
387 TString geoName = run->GetGeoFile()->GetName();
388 geoName.ReplaceAll(inputDirectory.Data(), "");
389 geoName.ReplaceAll("geofile_", "");
390 geoName.ReplaceAll(".root", "");
391
392 if (outDir.IsNull()) { outDir = Form("%s/../src/parameters/trd", getenv("CBM_ROOT")); }
393
394 TList* containerList = rtdb->getListOfContainers();
395
396 TString currentPar = "";
397 TString currentFile = "";
398 CbmTrdParSet* currentContainer = nullptr;
399
400 for (auto iContainerIt : *containerList) {
401 currentPar = iContainerIt->GetName();
402 if (!currentPar.Contains("CbmTrd")) continue; // make sure that we only edit Trd container
403 currentContainer = (CbmTrdParSet*) iContainerIt;
404 currentPar.ReplaceAll("CbmTrdParSet", "");
405 currentPar.ToLower();
406 currentFile.Form("%s/%s.%s.par", outDir.Data(), geoName.Data(), currentPar.Data());
407 FairParAsciiFileIo parOut;
408 parOut.open(currentFile, "out");
409 rtdb->setOutput(&parOut);
410 currentContainer->setChanged();
411 currentContainer->setInputVersion(0, 1);
412 rtdb->saveOutput();
413 rtdb->closeOutput();
414 }
415 return true; // check if rtdb->writeContainers() could be used to run a bool check and return that bool instead of saveOutput void
416}
417
418// ---- GetParSetList ----
419void CbmTrdParManager::GetParSetList(std::vector<std::shared_ptr<CbmTrdParSet>>* parSetList)
420{
421 // std::vector<CbmTrdParSet*> parSetList;
422 std::shared_ptr<CbmTrdParSet> parSet = nullptr;
423 for (Int_t iParSetType = (Int_t) ECbmTrdParSets::kBegin; iParSetType <= (Int_t) ECbmTrdParSets::kEnd; iParSetType++) {
424 switch (iParSetType) {
425 case (Int_t) ECbmTrdParSets::kCbmTrdParSetAsic: parSet = std::make_shared<CbmTrdParSetAsic>(); break;
426 case (Int_t) ECbmTrdParSets::kCbmTrdParSetDigi: parSet = std::make_shared<CbmTrdParSetDigi>(); break;
427 case (Int_t) ECbmTrdParSets::kCbmTrdParSetGain: parSet = std::make_shared<CbmTrdParSetGain>(); break;
428 case (Int_t) ECbmTrdParSets::kCbmTrdParSetGas: parSet = std::make_shared<CbmTrdParSetGas>(); break;
429 case (Int_t) ECbmTrdParSets::kCbmTrdParSetGeo: parSet = std::make_shared<CbmTrdParSetGeo>(); break;
430 }
431 parSetList->emplace_back(parSet);
432 }
433}
434
435// ---- GetParFileExtensions ----
436void CbmTrdParManager::GetParFileExtensions(std::vector<std::string>* vec)
437{
438 for (Int_t iParSetType = (Int_t) ECbmTrdParSets::kBegin; iParSetType <= (Int_t) ECbmTrdParSets::kEnd; iParSetType++) {
439 switch (iParSetType) {
440 case (Int_t) ECbmTrdParSets::kCbmTrdParSetAsic: vec->emplace_back("asic"); break;
441 case (Int_t) ECbmTrdParSets::kCbmTrdParSetDigi: vec->emplace_back("digi"); break;
442 case (Int_t) ECbmTrdParSets::kCbmTrdParSetGain: vec->emplace_back("gas"); break;
443 case (Int_t) ECbmTrdParSets::kCbmTrdParSetGas: vec->emplace_back("gain"); break;
444 case (Int_t) ECbmTrdParSets::kCbmTrdParSetGeo: vec->emplace_back("geo"); break;
445 }
446 }
447}
448
449
450// void CbmTrdParManager::FillDigiPar()
451// {
452// printf("CbmTrdParManager::FillDigiPar()\n");
453// // Int_t nofModules = fModuleMap.size();
454// // fDigiPar->SetNrOfModules(nofModules);
455// // fDigiPar->SetMaxSectors(fMaxSectors);
456// //
457// // TArrayI moduleId(nofModules);
458// // Int_t iModule = 0;
459// // std::map<Int_t, CbmTrdModuleSim*>::iterator it;
460// // for (it = fModuleMap.begin() ; it != fModuleMap.end(); it++) {
461// // moduleId.AddAt(it->second->GetModuleAddress(), iModule);
462// // iModule++;
463// // }
464// //
465// // fDigiPar->SetModuleIdArray(moduleId);
466// // fDigiPar->SetModuleMap(fModuleMap);
467// }
468
ClassImp(CbmConverterManager)
Helper class to extract information from the GeoManager.
Float_t fst1_pad_type[10][3][4]
Definition CbmTrdPads.h:18
Int_t fst1_sect_count
Definition CbmTrdPads.h:15
Assign pad layout to TRD Modules.
Double_t GetY(const TString &path)
Int_t GetModuleType(const TString &path)
Double_t GetSizeX(const TString &path)
Double_t GetSizeZ(const TString &path)
Double_t GetSizeY(const TString &path)
Double_t GetZ(const TString &path)
Double_t GetX(const TString &path)
Int_t GetModuleOrientation(const TString &path)
Return pad orientation of the current node in the TGeoManager.
Int_t GetModuleAddress()
Return module address calculated based on the current node in the TGeoManager.
void SelectComponentIdMap(ECbmTrdHardwareSetupVersion hwSetup)
size_t GetComponentId(Int_t asicAddress, ECbmTrdHardwareSetupVersion hwSetup)
Retrieve componentId of the asic add the passed address for the passed hwSetup.
virtual Int_t QueryChannel(Int_t ch) const
Query ASIC for specific pad address.
virtual void SetComponentId(size_t id)
virtual Int_t GetAddress() const
virtual void SetChannelAddress(Int_t address)
virtual void SetChannelAddresses(std::vector< Int_t > addresses)
Definition of FASP parameters.
virtual Bool_t SetCalibParameters(Int_t ch, Double_t const *par)
Load FASP calibration parameters for a specific channel.
Manipulate calibration parameters for the TRD detectors.
static void GetParFileExtensions(std::vector< std::string > *vec)
virtual void SetParContainers()
Inherited from FairTask.
CbmTrdParSetDigi * fDigiPar
The set of read-out description parameters.
bool CreateParFilesFromGeometry(bool createRootFileOutput, TString outDir="")
Create parameter files from geometry in gGeoManager A run macro can be found in the trd cbm....
CbmTrdParSetGeo * fGeoPar
The set of gain conversion parameters.
void CreateModuleParameters(const TString &path)
virtual void Finish()
Inherited from FairTask.
CbmTrdParManager(Bool_t fasp=kFALSE)
enumerator for organising the existing parameter sets of the trd
static void GetParSetList(std::vector< std::shared_ptr< CbmTrdParSet > > *parSetList)
virtual InitStatus Init()
Inherited from FairTask.
virtual ~CbmTrdParManager()
Destructor.
CbmTrdParSetGas * fGasPar
The set of gas description parameters.
CbmTrdParSetAsic * fAsicPar
The set of ASIC characterization parameters.
CbmTrdGeoHandler * fGeoHandler
CbmTrdHardwareSetupR fHardwareSetup
virtual void Exec(Option_t *option)
Inherited from FairTask.
CbmTrdParSetGain * fGainPar
The set of gain conversion parameters.
Describe TRD module ASIC settings (electronic gain, delays, etc)
virtual void SetChamberType(Int_t t)
virtual void Print(Option_t *opt="") const
virtual void SetAsicPar(CbmTrdParAsic *p)
Initialize the ASIC parameters for DAQ id It applies to the list of ASICs.
Definition of chamber gain conversion for one TRD module.
void Print(Option_t *opt="") const
void SetAnodeWireToPadPlaneDistance(Double_t d)
void SetAnodeWireOffset(Double_t off)
Int_t GetNofRows() const
void SetAnodeWireSpacing(Double_t dw)
Int_t GetNofColumns() const
Definition of gain parameters for one TRD module.
Definition of gas parameters for one TRD module.
void SetDetType(Int_t gsi=0)
void SetPidType(Int_t like=1)
virtual void Print(Option_t *opt="") const
Definition of geometry for one TRD module.
virtual void SetModuleId(int m)
Describe TRD module ASIC settings (electronic gain, delays, etc)
Describe TRD module working settings (HV, etc)
virtual void Print(Option_t *opt="") const
virtual void addParam(CbmTrdParMod *mod)
Definition of SPADIC parameters.
virtual Int_t GetNchannels() const
static Int_t GetNasicsOnModule(Int_t moduleType)
Returns the number of asics on a given moduleType defined in eCbmTrdModuleTypes.
Int_t GetAsicChAddress(const Int_t asicChannel)
Returns the nth asic Channel in asic coordinates in single asic padplane coordinates....