CbmRoot
CbmMuchSegmentManual.cxx
Go to the documentation of this file.
1 
9 #include "CbmMuchSegmentManual.h"
10 
11 #include "CbmGeoMuchPar.h" // for CbmGeoMuchPar
12 #include "CbmMuchAddress.h" // for CbmMuchAddress
13 #include "CbmMuchLayer.h" // for CbmMuchLayer
14 #include "CbmMuchLayerSide.h" // for CbmMuchLayerSide
15 #include "CbmMuchModule.h" // for CbmMuchModule
16 #include "CbmMuchModuleGemRectangular.h" // for CbmMuchModuleGemRectangular
17 #include "CbmMuchSectorRectangular.h" // for CbmMuchSectorRectangular
18 #include "CbmMuchStation.h" // for CbmMuchStation
19 
20 #include <FairRuntimeDb.h> // for FairRuntimeDb
21 #include <FairTask.h> // for FairTask, InitStatus, kSUCCESS
22 
23 #include <TArc.h> // for TArc
24 #include <TCanvas.h> // for TCanvas
25 #include <TFile.h> // for TFile, gFile
26 #include <TMath.h> // for Sqrt, Power, Log2
27 #include <TMathBase.h> // for Abs, Max, Min
28 #include <TObjArray.h> // for TObjArray
29 #include <TSystem.h> // for TSystem, gSystem
30 #include <TVector3.h> // for TVector3
31 
32 #include <limits> // for numeric_limits
33 #include <stdio.h> // for printf, fprintf, fclose
34 #include <string.h> // for strcat, strlen, strncpy
35 
36 using std::ifstream;
37 using std::string;
38 using std::vector;
39 
40 // ----- Default constructor -------------------------------------------
42  : FairTask()
43  , fGeoPar(nullptr)
44  , fNStations(0)
45  , fStations(nullptr)
46  , fInputFileName((char*) "much.digi.root")
47  , fDigiFileName()
48  , fNRegions()
49  , fRadii()
50  , fSecLx()
51  , fSecLy()
52  , fNChannels()
53  , fNCols()
54  , fNRows()
55  , fDebug(0) {}
56 // -------------------------------------------------------------------------
57 
58 // ----- Standard constructor ------------------------------------------
60  char* digiFileName)
61  : FairTask()
62  , fGeoPar(nullptr)
63  , fNStations(0)
64  , fStations(nullptr)
65  , fInputFileName(inputFileName)
66  , fDigiFileName(digiFileName)
67  , fNRegions()
68  , fRadii()
69  , fSecLx()
70  , fSecLy()
71  , fNChannels()
72  , fNCols()
73  , fNRows()
74  , fDebug(0) {}
75 // -------------------------------------------------------------------------
76 
77 // ----- Destructor ----------------------------------------------------
79 // -------------------------------------------------------------------------
80 
81 // ----- Public method SetNRegions --------------------------------------
82 void CbmMuchSegmentManual::SetNRegions(Int_t iStation, Int_t nRegions) {
83  if (iStation < 0 || iStation >= fNStations)
84  Fatal("SetNRegions", "iStation is out of range.");
85  fNRegions[iStation] = nRegions;
86  fRadii[iStation].resize(nRegions);
87  fSecLx[iStation].resize(nRegions);
88  fSecLy[iStation].resize(nRegions);
89  fNCols[iStation].resize(nRegions);
90  fNRows[iStation].resize(nRegions);
91 
92  if (fDebug) { printf("Station %i has %i regions\n", iStation + 1, nRegions); }
93 
94  // Deal with channels more universally
95  Int_t n = Int_t(TMath::Log2(fNChannels[iStation]) + 1e-2);
96  Int_t nChans = Int_t(TMath::Power(2, n) + 1e-2);
97  if (nChans != fNChannels[iStation])
98  Fatal("Init",
99  "Number of channels should be equal to two with integer power.");
100  Int_t nPower = n / 2;
101  for (Int_t iRegion = 0; iRegion < fNRegions[iStation]; ++iRegion) {
102  fNCols[iStation].at(iRegion) = (Int_t) TMath::Power(2, nPower);
103  fNRows[iStation].at(iRegion) = n % 2 != 0
104  ? (Int_t) TMath::Power(2, nPower + 1)
105  : fNCols[iStation].at(iRegion);
106 
107  if (fDebug) {
108  printf("Region %i has %i columns and %i rows per sector\n",
109  iRegion + 1,
110  fNCols[iStation].at(iRegion),
111  fNRows[iStation].at(iRegion));
112  }
113  }
114 }
115 // -------------------------------------------------------------------------
116 
117 // ----- Public method SetNChannels --------------------------------------
118 void CbmMuchSegmentManual::SetNChannels(Int_t iStation, Int_t nChannels) {
119  if (iStation < 0 || iStation >= fNStations)
120  Fatal("SetNChannels", "iStation is out of range.");
121 
122  fNChannels[iStation] = nChannels;
123 
124  if (fDebug) {
125  printf("Station %i has %i channels per sector\n", iStation + 1, nChannels);
126  }
127 }
128 // -------------------------------------------------------------------------
129 
130 // ----- Public method SetRegionRadius ----------------------------------
132  Int_t iRegion,
133  Double_t radius) {
134  if (iStation < 0 || iStation >= fNStations)
135  Fatal("SetRegionRadius", "iStation is out of range.");
136  if (iRegion < 0 || iRegion >= fNRegions[iStation])
137  Fatal("SetRegionRadius", "iRegion is out of range.");
138  fRadii[iStation].at(iRegion) = radius;
139  if (fDebug) {
140  printf("Radius of the Region %i of station %i is %4.2f cm\n",
141  iRegion + 1,
142  iStation + 1,
143  fRadii[iStation].at(iRegion));
144  }
145 }
146 // -------------------------------------------------------------------------
147 
148 // ----- Public method SetSigma -----------------------------------------
149 void CbmMuchSegmentManual::SetSigma(Int_t iStation,
150  Int_t iRegion,
151  Double_t sigmaX,
152  Double_t sigmaY) {
153  if (iStation < 0 || iStation >= fNStations)
154  Fatal("SetSigma", "iStation is out of range.");
155  if (iRegion < 0 || iRegion >= fNRegions[iStation])
156  Fatal("SetSigma", "iRegion is out of range.");
157 
158  Double_t secLx = fSecLx[iStation].at(iRegion) =
159  fNCols[iStation].at(iRegion) * TMath::Sqrt(12.) * sigmaX;
160  Double_t secLy = fSecLy[iStation].at(iRegion) =
161  fNRows[iStation].at(iRegion) * TMath::Sqrt(12.) * sigmaY;
162  if (TMath::Abs(secLy - secLx) < 1e-5) return;
163  if (TMath::Abs(secLy / secLx - 2) > 1e-5) {
164  if (secLy > 2 * secLx) {
165  fNCols[iStation].at(iRegion) *= 2;
166  fNRows[iStation].at(iRegion) /= 2;
167  } else {
168  fNCols[iStation].at(iRegion) /= 2;
169  fNRows[iStation].at(iRegion) *= 2;
170  }
171  SetSigma(iStation, iRegion, sigmaX, sigmaY);
172  }
173 }
174 // -------------------------------------------------------------------------
175 
176 // ----- Public method SetPadSize ----------------------------------------
178  Int_t iRegion,
179  Double_t padLx,
180  Double_t padLy) {
181  if (iStation < 0 || iStation >= fNStations)
182  Fatal("SetPadSize", "iStation is out of range.");
183  if (iRegion < 0 || iRegion >= fNRegions[iStation])
184  Fatal("SetPadSize", "iRegion is out of range.");
185 
186  Double_t secLx = fSecLx[iStation].at(iRegion) =
187  fNCols[iStation].at(iRegion) * padLx;
188  Double_t secLy = fSecLy[iStation].at(iRegion) =
189  fNRows[iStation].at(iRegion) * padLy;
190  if (TMath::Abs(secLy - secLx) < 1e-5) return;
191  if (TMath::Abs(secLy / secLx - 2) > 1e-5) {
192  if (secLy > 2 * secLx) {
193  fNCols[iStation].at(iRegion) *= 2;
194  fNRows[iStation].at(iRegion) /= 2;
195  } else {
196  fNCols[iStation].at(iRegion) /= 2;
197  fNRows[iStation].at(iRegion) *= 2;
198  }
199  SetPadSize(iStation, iRegion, padLx, padLy);
200  }
201 }
202 // -------------------------------------------------------------------------
203 
204 // ----- Private method SetParContainers --------------------------------
206  // Get runtime database
207  FairRuntimeDb* db = FairRuntimeDb::instance();
208  if (!db) Fatal("Init", "No runtime database");
209  fGeoPar = (CbmGeoMuchPar*) db->getContainer("CbmGeoMuchPar");
210 }
211 // -------------------------------------------------------------------------
212 
213 // ----- Private method Init ---------------------------------------------
215  printf("\n============================= Inputs segmentation parameters "
216  "================================\n");
217  ReadInputFile();
218  printf("\n==================================================================="
219  "============================\n");
220 
221 
222  // Get MUCH geometry parameter container
224  if (!fStations) Fatal("Init", "No input array of MUCH stations.");
225  if (fStations->GetEntries() != fNStations)
226  Fatal("Init", "Incorrect number of stations.");
227 
228  if (fDebug) {
229  for (Int_t iStation = 0; iStation < fNStations; ++iStation) {
230  printf("Station %i\n", iStation + 1);
231  for (Int_t iRegion = 0; iRegion < fNRegions[iStation]; ++iRegion) {
232  printf("Region %i: fSecLx = %f fSecLy = %f\n",
233  iRegion + 1,
234  fSecLx[iStation].at(iRegion),
235  fSecLy[iStation].at(iRegion));
236  printf("fNCols = %i fNRows = %i\n",
237  fNCols[iStation].at(iRegion),
238  fNRows[iStation].at(iRegion));
239  }
240  }
241  }
242  // Segment MuCh
243  SegmentMuch();
244  return kSUCCESS;
245 }
246 // -------------------------------------------------------------------------
247 
248 // ----- Public method SegmentMuch --------------------------------------
250  for (Int_t iStation = 0; iStation < fStations->GetEntries(); ++iStation) {
251  CbmMuchStation* station = (CbmMuchStation*) fStations->At(iStation);
252 
253  Int_t nLayers = station->GetNLayers();
254  for (Int_t iLayer = 0; iLayer < nLayers; ++iLayer) {
255  CbmMuchLayer* layer = station->GetLayer(iLayer);
256  if (!layer) Fatal("SegmentMuch", "Incomplete layers array.");
257  // Segment layer sides
258  SegmentLayerSide(layer->GetSideF());
259  SegmentLayerSide(layer->GetSideB());
260  }
261  printf("Station %i segmented\n", iStation + 1);
262  }
263 
264  // Save parameters
265  TFile* oldfile = gFile;
266  TFile* f = new TFile(fDigiFileName, "RECREATE");
267  fStations->Write("stations", 1);
268 
269  f->Close();
270  gFile = oldfile;
271 
272  // Draw colored stations
274 
275  // Print some output info
276  Print();
277 }
278 // -------------------------------------------------------------------------
279 
280 // ----- Private method SegmentLayerSide --------------------------------
282  if (!layerSide) Fatal("SegmentLayerSide", "Incomplete layer sides array.");
283  Int_t nModules = layerSide->GetNModules();
284  for (Int_t iModule = 0; iModule < nModules; iModule++) {
285  CbmMuchModule* module = layerSide->GetModule(iModule);
286  if (module->GetDetectorType() != 1) continue;
288  if (nModules > 1)
289  SegmentModule(mod, true); // Module design
290  else
291  SegmentModule(mod, false); // Monolithic design
292  }
293 }
294 // -------------------------------------------------------------------------
295 
296 // ----- Private method SegmentSector -----------------------------------
298  Bool_t useModuleDesign) {
299  Int_t detectorId = module->GetDetectorId();
300  Int_t iStation = CbmMuchAddress::GetStationIndex(detectorId);
301  // CbmMuchStation* station = (CbmMuchStation*)fStations->At(iStation);
302  Int_t iRegion = -1;
303  Double_t secMaxLx = GetSectorMaxSize(module, "Width", iRegion);
304  Double_t secMaxLy = GetSectorMaxSize(module, "Length", iRegion);
305  Double_t padMaxLx = GetPadMaxSize(module, "Width");
306  Double_t padMaxLy = GetPadMaxSize(module, "Length");
307  TVector3 size = module->GetSize();
308  Double_t modLx = size.X();
309  Double_t modLy = size.Y();
310  Double_t modLz = size.Z();
311  TVector3 position = module->GetPosition();
312  Double_t modX = position.X();
313  Double_t modY = position.Y();
314  Double_t modZ = position.Z();
315 
316  Int_t nCols = Int_t(modLx / secMaxLx);
317  Int_t nRows = Int_t(modLy / secMaxLy);
318  Int_t nX = modX < 0 ? -1 : 1;
319  Int_t nY = modY < 0 ? -1 : 1;
320 
321  Double_t secX, secY; //, secLx, secLy;
322  TVector3 secSize, secPosition;
323  Int_t iSector;
324  for (Int_t iCol = 0; iCol < nCols; ++iCol) {
325  secX = useModuleDesign ? modX + nX * ((iCol + 0.5) * secMaxLx - modLx / 2.)
326  : secMaxLx * nCols / 2. - (0.5 + iCol) * secMaxLx;
327  for (Int_t iRow = 0; iRow < nRows; ++iRow) {
328  secY = useModuleDesign
329  ? modY + nY * ((iRow + 0.5) * secMaxLy - modLy / 2.)
330  : secMaxLy * nRows / 2. - (0.5 + iRow) * secMaxLy;
331  iSector = module->GetNSectors();
332  secSize.SetXYZ(secMaxLx, secMaxLy, modLz);
333  secPosition.SetXYZ(secX, secY, modZ);
334  SegmentSector(module,
335  new CbmMuchSectorRectangular(detectorId,
336  iSector,
337  secPosition,
338  secSize,
339  fNCols[iStation].at(iRegion),
340  fNRows[iStation].at(iRegion)));
341  }
342  }
343 
344  // Process incomplete sectors
345  Int_t nPadRows, nPadCols;
346  Int_t n = useModuleDesign ? 1 : 2;
347  Double_t ly = useModuleDesign ? modLy - secMaxLy * nRows
348  : (modLy - secMaxLy * nRows) / 2.;
349  if (ly > padMaxLy) {
350  nPadRows = Int_t(ly / padMaxLy);
351  for (Int_t i = 0; i < n; ++i) {
352  secY = useModuleDesign ? modY + nY * (modLy / 2. - ly / 2.)
353  : TMath::Power(-1, i) * (modLy / 2. - ly / 2.);
354  for (Int_t iCol = 0; iCol < nCols; ++iCol) {
355  secX = useModuleDesign
356  ? modX + nX * ((iCol + 0.5) * secMaxLx - modLx / 2.)
357  : secMaxLx * nCols / 2. - (0.5 + iCol) * secMaxLx;
358  iSector = module->GetNSectors();
359  secSize.SetXYZ(secMaxLx, ly, modLz);
360  secPosition.SetXYZ(secX, secY, modZ);
361  SegmentSector(module,
362  new CbmMuchSectorRectangular(detectorId,
363  iSector,
364  secPosition,
365  secSize,
366  fNCols[iStation].at(iRegion),
367  nPadRows));
368  }
369  }
370  }
371 
372  Double_t lx = useModuleDesign ? modLx - secMaxLx * nCols
373  : (modLx - secMaxLx * nCols) / 2.;
374  if (lx > padMaxLx) {
375  nPadCols = (Int_t)(lx / padMaxLx);
376  for (Int_t i = 0; i < n; ++i) {
377  secX = useModuleDesign ? modX + nX * (modLx / 2. - lx / 2.)
378  : TMath::Power(-1, i) * (modLx / 2. - lx / 2.);
379  for (Int_t iRow = 0; iRow < nRows; ++iRow) {
380  secY = useModuleDesign
381  ? modY + nY * ((iRow + 0.5) * secMaxLy - modLy / 2.)
382  : secMaxLy * nRows / 2. - (0.5 + iRow) * secMaxLy;
383  iSector = module->GetNSectors();
384  secSize.SetXYZ(lx, secMaxLy, modLz);
385  secPosition.SetXYZ(secX, secY, modZ);
387  module,
388  new CbmMuchSectorRectangular(detectorId,
389  iSector,
390  secPosition,
391  secSize,
392  nPadCols,
393  fNRows[iStation].at(iRegion)));
394  }
395  }
396  }
397 
398  if (lx > padMaxLx && ly > padMaxLy) {
399  nPadCols = (Int_t)(lx / padMaxLx);
400  nPadRows = (Int_t)(ly / padMaxLy);
401  secX = modX + nX * (modLx / 2. - lx / 2.);
402  secY = modY + nY * (modLy / 2. - ly / 2.);
403  iSector = module->GetNSectors();
404  secSize.SetXYZ(lx, ly, modLz);
405  secPosition.SetXYZ(secX, secY, modZ);
407  module,
409  detectorId, iSector, secPosition, secSize, nPadCols, nPadRows));
410  }
411 }
412 // -------------------------------------------------------------------------
413 
414 // ----- Private method SegmentSector -----------------------------------
416  CbmMuchSectorRectangular* sector) {
417  TVector3 secSize = sector->GetSize();
418  TVector3 secPosition = sector->GetPosition();
419  Int_t detectorId = module->GetDetectorId();
420  Int_t iStation = CbmMuchAddress::GetStationIndex(detectorId);
421  Int_t iSector = module->GetNSectors();
422  Double_t secLx = secSize.X();
423  Double_t secLy = secSize.Y();
424  Double_t secLz = secSize.Z();
425  Double_t padLx = sector->GetPadDx();
426  Double_t padLy = sector->GetPadDy();
427  Double_t secX = secPosition.X();
428  Double_t secY = secPosition.Y();
429  Double_t secZ = secPosition.Z();
430  Bool_t isIncomplete = IsIncompleteSector(sector);
431  Int_t nCols = sector->GetPadNx();
432  Int_t nRows = sector->GetPadNy();
433  Int_t nX = secX < 0 ? -1 : 1;
434  Int_t nY = secY < 0 ? -1 : 1;
435 
436  Int_t iRegion = -1;
437  Bool_t resultX = ShouldSegment(sector, "X", iRegion);
438  Bool_t resultY = ShouldSegment(sector, "Y", iRegion);
439 
440  if (!resultX && !resultY) {
441  delete sector;
442 
443  CbmMuchStation* station = (CbmMuchStation*) fStations->At(iStation);
444  Double_t rMax = station->GetRmax();
445  if (IntersectsRad(sector, module->GetCutRadius()) == 2
446  || !IntersectsRad(sector, rMax))
447  return;
448  nCols = isIncomplete ? nCols : fNCols[iStation].at(iRegion);
449  nRows = isIncomplete ? nRows : fNRows[iStation].at(iRegion);
451  detectorId, iSector, secPosition, secSize, nCols, nRows));
452  return;
453  }
454 
455  // Needed for the case of incomplete sectors
456  Int_t iReg = -1;
457  Int_t nC = Int_t(padLx / GetPadMaxSize(module, "Width"));
458  Int_t nR = Int_t(padLy / GetPadMaxSize(module, "Length"));
459  Double_t pLx = nC == 0 ? padLx : nC * GetPadMaxSize(module, "Width");
460  Double_t pLy = nR == 0 ? padLy : nR * GetPadMaxSize(module, "Length");
461  Double_t sLx = nC == 0 ? secLx : nC * GetSectorMaxSize(module, "Width", iReg);
462  Double_t sLy =
463  nR == 0 ? secLy : nR * GetSectorMaxSize(module, "Length", iReg);
464  nCols = Int_t(sLx / pLx);
465  nRows = Int_t(sLy / pLy);
466  delete sector;
467 
468  TVector3 position, size;
469  Double_t newSecLx = 0., newSecLy = 0., newSecX = 0., newSecY = 0.;
470  for (Int_t i = 0; i < 2; ++i) {
471  newSecLx =
472  resultX ? i * (secLx - newSecLx) + (1 - i) * pLx / 2. * nCols : secLx;
473  newSecLy =
474  resultY ? i * (secLy - newSecLy) + (1 - i) * pLy / 2. * nRows : secLy;
475  newSecX = resultX
476  ? secX - TMath::Power(-1, i) * nX * (secLx / 2. - newSecLx / 2.)
477  : secX;
478  newSecY = resultY
479  ? secY - TMath::Power(-1, i) * nY * (secLy / 2. - newSecLy / 2.)
480  : secY;
481 
482  Double_t newPadLx = resultX ? pLx / 2. : padLx;
483  Double_t newPadLy = resultY ? pLy / 2. : padLy;
484  nCols = Int_t(newSecLx / newPadLx);
485  nRows = Int_t(newSecLy / newPadLy);
486 
487  position.SetXYZ(newSecX, newSecY, secZ);
488  size.SetXYZ(newSecLx, newSecLy, secLz);
489  iSector = module->GetNSectors();
490  SegmentSector(module,
492  detectorId, iSector, position, size, nCols, nRows));
493  }
494 }
495 // -------------------------------------------------------------------------
496 
497 // ----- Private method IntersectsRad -----------------------------------
499  Double_t radius) {
500  if (radius < 0) return 0;
501 
502  Int_t intersects = 0;
503 
504  Double_t modLx = module->GetSize()[0];
505  Double_t modLy = module->GetSize()[1];
506  Double_t modX = module->GetPosition()[0];
507  Double_t modY = module->GetPosition()[1];
508 
509  Double_t ulR = TMath::Sqrt((modX - modLx / 2.) * (modX - modLx / 2.)
510  + (modY + modLy / 2.) * (modY + modLy / 2.));
511  Double_t urR = TMath::Sqrt((modX + modLx / 2.) * (modX + modLx / 2.)
512  + (modY + modLy / 2.) * (modY + modLy / 2.));
513  Double_t blR = TMath::Sqrt((modX - modLx / 2.) * (modX - modLx / 2.)
514  + (modY - modLy / 2.) * (modY - modLy / 2.));
515  Double_t brR = TMath::Sqrt((modX + modLx / 2.) * (modX + modLx / 2.)
516  + (modY - modLy / 2.) * (modY - modLy / 2.));
517 
518  if (ulR < radius) intersects++;
519  if (urR < radius) intersects++;
520  if (blR < radius) intersects++;
521  if (brR < radius) intersects++;
522 
523  if (intersects == 4) return 2;
524  if (intersects)
525  return 1;
526  else
527  return 0;
528 }
529 // -------------------------------------------------------------------------
530 
531 // ----- Private method IntersectsRad -----------------------------------
533  Double_t radius) {
534  if (radius < 0) return 0;
535 
536  Int_t intersects = 0;
537 
538  Double_t secLx = sector->GetSize()[0];
539  Double_t secLy = sector->GetSize()[1];
540  Double_t secX = sector->GetPosition()[0];
541  Double_t secY = sector->GetPosition()[1];
542 
543  Double_t ulR = TMath::Sqrt((secX - secLx / 2.) * (secX - secLx / 2.)
544  + (secY + secLy / 2.) * (secY + secLy / 2.));
545  Double_t urR = TMath::Sqrt((secX + secLx / 2.) * (secX + secLx / 2.)
546  + (secY + secLy / 2.) * (secY + secLy / 2.));
547  Double_t blR = TMath::Sqrt((secX - secLx / 2.) * (secX - secLx / 2.)
548  + (secY - secLy / 2.) * (secY - secLy / 2.));
549  Double_t brR = TMath::Sqrt((secX + secLx / 2.) * (secX + secLx / 2.)
550  + (secY - secLy / 2.) * (secY - secLy / 2.));
551 
552  if (ulR < radius) intersects++;
553  if (urR < radius) intersects++;
554  if (blR < radius) intersects++;
555  if (brR < radius) intersects++;
556 
557  if (intersects == 4) return 2;
558  if (intersects)
559  return 1;
560  else
561  return 0;
562 }
563 // -------------------------------------------------------------------------
564 
565 // ----- Private method ShouldSegment -----------------------------------
567  const TString direction,
568  Int_t& iRegion) {
569  Double_t secLx = sector->GetSize()[0];
570  Double_t secLy = sector->GetSize()[1];
571  Double_t secArea = secLx * secLy;
572  Double_t secL = direction == "X" ? secLx : secLy;
573  // Bool_t isIncomplete = IsIncompleteSector(sector);
574 
575  Int_t iStation = CbmMuchAddress::GetStationIndex(sector->GetAddress());
576 
577  // Get region index for the sector
578  iRegion = GetRegionIndex(sector);
579  Double_t secRegL = direction == "X" ? fSecLx[iStation].at(iRegion)
580  : fSecLy[iStation].at(iRegion);
581  Double_t secRegArea =
582  fSecLx[iStation].at(iRegion) * fSecLy[iStation].at(iRegion);
583 
584  if (secArea > secRegArea) {
585  // If sector length is larger than it's width
586  if (secLy > secLx && direction == "X"
587  && ShouldSegment(sector, "Y", iRegion))
588  return false;
589  // If sector width is larger than or equal to it's length
590  if (secLy <= secLx && direction == "Y") return false;
591 
592  // If sector size is larger than that corresponding to the region
593  if (secL > secRegL) return true;
594  }
595  return false;
596 }
597 // -------------------------------------------------------------------------
598 
599 // ----- Private method GetRegionIndex ----------------------------------
601  Int_t iStation = CbmMuchAddress::GetStationIndex(sector->GetAddress());
602  Double_t secLx = sector->GetSize()[0];
603  Double_t secLy = sector->GetSize()[1];
604  Double_t secArea = secLx * secLy;
605  Double_t sX = TMath::Abs(sector->GetPosition()[0]) - secLx / 2.;
606  Double_t sY = TMath::Abs(sector->GetPosition()[1]) - secLy / 2.;
607  Double_t secRad = TMath::Sqrt(sX * sX + sY * sY);
608 
609  Int_t iRegion = fNRegions[iStation] - 1;
610 
611  for (Int_t iReg = 0; iReg < fNRegions[iStation]; ++iReg) {
612  Double_t secRegArea = fSecLx[iStation].at(iReg) * fSecLy[iStation].at(iReg);
613  Double_t regionRad = fRadii[iStation].at(iReg);
614  if (secRad > regionRad) continue;
615 
616  iRegion = iReg;
617  if (iReg > 0 && !IsIncompleteSector(sector)) {
618  Double_t secPrevRegArea =
619  fSecLx[iStation].at(iReg - 1) * fSecLy[iStation].at(iReg - 1);
620  if (secArea < secRegArea && secArea >= secPrevRegArea) iRegion--;
621  }
622  break;
623  }
624  return iRegion;
625 }
626 // -------------------------------------------------------------------------
627 
628 // ----- Private method GetSectorMaxSize --------------------------------
629 Double_t
631  const TString side,
632  Int_t& iRegion) {
633  Int_t iStation = CbmMuchAddress::GetStationIndex(module->GetDetectorId());
634  Int_t nRegions = fNRegions[iStation];
635  for (iRegion = 0; iRegion < nRegions; ++iRegion) {
636  Double_t rad = fRadii[iStation].at(iRegion);
637  Int_t result = IntersectsRad(module, rad);
638  if (result == 2)
639  return side == "Width" ? fSecLx[iStation].at(iRegion)
640  : fSecLy[iStation].at(iRegion);
641  }
642  iRegion = nRegions - 1;
643  return side == "Width" ? fSecLx[iStation].at(iRegion)
644  : fSecLy[iStation].at(iRegion);
645 }
646 // -------------------------------------------------------------------------
647 
648 // ----- Private method GetPadMaxSize -----------------------------------
649 Double_t
651  const TString side) {
652  Int_t iStation = CbmMuchAddress::GetStationIndex(module->GetDetectorId());
653  Int_t iRegion = -1;
654  Double_t sectorSize = GetSectorMaxSize(module, side, iRegion);
655  return side == "Width" ? sectorSize / fNCols[iStation].at(iRegion)
656  : sectorSize / fNRows[iStation].at(iRegion);
657 }
658 // -------------------------------------------------------------------------
659 
660 // ----- Private method IsIncompleteSector ------------------------------
661 Bool_t
663  Bool_t result = false;
664  Int_t iStation = CbmMuchAddress::GetStationIndex(sector->GetAddress());
665  Double_t secLx = sector->GetSize()[0];
666  Double_t secLy = sector->GetSize()[1];
667  Double_t minL = TMath::Min(secLx, secLy);
668  Double_t maxL = TMath::Max(secLx, secLy);
669  Int_t nFrac = Int_t((maxL + 1e-5) / minL);
670  Int_t nPower = Int_t(TMath::Log2(nFrac) + 1e-2);
671  Double_t maxL1 = minL * TMath::Power(2, nPower);
672 
673  if (TMath::Abs(maxL - maxL1) > 1e-5
674  || sector->GetNChannels() < fNChannels[iStation])
675  result = true;
676  return result;
677 }
678 // -------------------------------------------------------------------------
679 
680 // ----- Private method Print -------------------------------------------
681 void CbmMuchSegmentManual::Print(Option_t*) const {
682  printf("Segmentation written to file %s\n", fDigiFileName);
683  Int_t nTotSectors = 0;
684  Int_t nTotChannels = 0;
685  Int_t nTotGems = 0;
686  Int_t nTotStraws = 0;
687  printf("====================================================================="
688  "============================\n");
689  for (Int_t iStation = 0; iStation < fStations->GetEntries(); ++iStation) {
690  CbmMuchStation* station = (CbmMuchStation*) fStations->At(iStation);
691  Int_t nGems = 0;
692  Int_t nStraws = 0;
693  Int_t nSectors = 0;
694  Int_t nChannels = 0;
695  Double_t padMaxLx = std::numeric_limits<Double_t>::min();
696  Double_t padMinLx = std::numeric_limits<Double_t>::max();
697  Double_t padMaxLy = std::numeric_limits<Double_t>::min();
698  Double_t padMinLy = std::numeric_limits<Double_t>::max();
699  Double_t secMaxLx = std::numeric_limits<Double_t>::min();
700  Double_t secMinLx = std::numeric_limits<Double_t>::max();
701  Double_t secMaxLy = std::numeric_limits<Double_t>::min();
702  Double_t secMinLy = std::numeric_limits<Double_t>::max();
703  if (!station) continue;
704  for (Int_t iLayer = 0; iLayer < station->GetNLayers(); ++iLayer) {
705  CbmMuchLayer* layer = station->GetLayer(iLayer);
706  if (!layer) continue;
707  for (Int_t iSide = 0; iSide < 2; ++iSide) {
708  CbmMuchLayerSide* side = layer->GetSide(iSide);
709  if (!side) continue;
710  for (Int_t iModule = 0; iModule < side->GetNModules(); ++iModule) {
711  CbmMuchModule* mod = side->GetModule(iModule);
712  if (!mod) continue;
713  switch (mod->GetDetectorType()) {
714  case 1: { // GEMs
717  if (!module) continue;
718  nGems++;
719  nSectors += module->GetNSectors();
720  for (Int_t iSector = 0; iSector < module->GetNSectors();
721  ++iSector) {
722  CbmMuchSectorRectangular* sector =
723  (CbmMuchSectorRectangular*) module->GetSectorByIndex(iSector);
724  if (!sector) continue;
725  Double_t padLx = sector->GetPadDx();
726  Double_t padLy = sector->GetPadDy();
727  if (padLx > padMaxLx) {
728  padMaxLx = padLx;
729  secMaxLx = sector->GetPadNx() * padLx;
730  }
731  if (padLx < padMinLx) {
732  padMinLx = padLx;
733  secMinLx = sector->GetPadNx() * padLx;
734  }
735  if (padLy > padMaxLy) {
736  padMaxLy = padLy;
737  secMaxLy = sector->GetPadNy() * padLy;
738  }
739  if (padLy < padMinLy) {
740  padMinLy = padLy;
741  secMinLy = sector->GetPadNy() * padLy;
742  }
743  nChannels += sector->GetNChannels();
744  }
745  break;
746  }
747  case 2: // Straw tubes
748  nStraws++;
749  break;
750  }
751  }
752  }
753  }
754  printf("Station %i:\n", iStation + 1);
755  printf(" GEM modules: %i\n", nGems);
756  if (nGems) {
757  printf(" Sectors: %i, Min.Sector size:%3.2fx%3.2f, Max.Sector "
758  "size:%3.2fx%3.2f\n",
759  nSectors,
760  secMinLx,
761  secMinLy,
762  secMaxLx,
763  secMaxLy);
764  for (Int_t iReg = 0; iReg < fNRegions.at(iStation); ++iReg) {
765  printf("Region %i: size %fx%f\n",
766  iReg,
767  fSecLx.at(iStation).at(iReg),
768  fSecLy.at(iStation).at(iReg));
769  }
770  printf(
771  " Pads: %i, Min.Pad size:%3.2fx%3.2f, Max.Pad size:%3.2fx%3.2f\n",
772  nChannels,
773  padMinLx,
774  padMinLy,
775  padMaxLx,
776  padMaxLy);
777  }
778  printf(" Straw modules: %i\n", nStraws);
779  nTotSectors += nSectors;
780  nTotChannels += nChannels;
781  nTotGems += nGems;
782  nTotStraws += nStraws;
783  }
784  printf("---------------------------------------------------------------------"
785  "----------------------------\n");
786  printf(" Summary: \n GEM modules: %i\n Sectors: %i, Pads: %i\n "
787  "Straw modules: %i\n",
788  nTotGems,
789  nTotSectors,
790  nTotChannels,
791  nTotStraws);
792  printf("====================================================================="
793  "============================\n");
794 }
795 
797  // Change file extension
798  char txtfile[100];
799  Int_t length = strlen(fDigiFileName);
800  Int_t iChar;
801  for (iChar = length - 1; iChar >= 0; --iChar) {
802  if (fDigiFileName[iChar] == '.') break;
803  }
804  strncpy(txtfile, fDigiFileName, iChar + 1);
805  txtfile[iChar + 1] = '\0';
806  strcat(txtfile, "txt");
807 
808  FILE* outfile;
809  outfile = fopen(txtfile, "w");
810  /*
811  Int_t colors[] = {kGreen, kMagenta, kCyan, kRed, kBlue, kYellow, kTeal,
812  kPink, kAzure, kOrange, kViolet, kSpring,
813  kGreen+2, kMagenta+2, kCyan+2, kRed+2, kBlue+2, kYellow+2, kTeal+2,
814  kPink+2, kAzure+2, kOrange+2, kViolet+2, kSpring+2,
815  kGreen+4, kMagenta+4, kCyan+4, kRed+4, kBlue+4, kYellow+4, kTeal+4,
816  kPink+4, kAzure+4, kOrange+4, kViolet+4, kSpring+4};
817 */
818  for (Int_t iStation = 0; iStation < fStations->GetEntriesFast(); ++iStation) {
819  fprintf(outfile,
820  "=================================================================="
821  "=========\n");
822  fprintf(outfile, "Station %i\n", iStation + 1);
823  fprintf(outfile,
824  "Sector size, cm Sector position, cm Number of pads Side "
825  "Pad size, cm\n");
826  fprintf(outfile,
827  "------------------------------------------------------------------"
828  "----------\n");
829  TCanvas* c1 = new TCanvas(Form("station%i", iStation + 1),
830  Form("station%i", iStation + 1),
831  800,
832  800);
833  c1->SetFillColor(0);
834  c1->Range(-250, -250, 250, 250);
835  CbmMuchStation* station = (CbmMuchStation*) fStations->At(iStation);
836  CbmMuchLayer* layer = station->GetLayer(0);
837  for (Int_t iSide = 1; iSide >= 0; iSide--) {
838  CbmMuchLayerSide* layerSide = layer->GetSide(iSide);
839  for (Int_t iModule = 0; iModule < layerSide->GetNModules(); ++iModule) {
840  CbmMuchModule* mod = layerSide->GetModule(iModule);
841  if (mod->GetDetectorType() != 1) continue;
844  module->InitModule();
845  for (Int_t iSector = 0; iSector < module->GetNSectors(); ++iSector) {
846  CbmMuchSectorRectangular* sector =
847  (CbmMuchSectorRectangular*) module->GetSectorByIndex(iSector);
848  // Reject incomplete sectors by size
849  Double_t secLx = sector->GetSize()[0];
850  Double_t secLy = sector->GetSize()[1];
851  // Bool_t isIncomplete = IsIncompleteSector(sector);
852  // TODO
853  // if(isIncomplete){
854  // iSide ? sector->SetFillColor(TColor::GetColorDark(kGray+1)) : sector->SetFillColor(kGray + 1);
855  // }
856  // else{
857  // Int_t i = Int_t((secLx+1e-5)/fSecLx[iStation].at(0)) - 1;
858  // Int_t j = Int_t((secLy+1e-5)/fSecLy[iStation].at(0)) - 1;
859  // sector->SetFillColor(iSide ? TColor::GetColorDark(colors[i+j]) : colors[i+j]);
860  // }
861  sector->DrawPads();
862  const char* side = iSide ? "Back" : "Front";
863  fprintf(outfile,
864  "%-4.2fx%-10.2f %-6.2fx%-12.2f %-14i %-5s ",
865  secLx,
866  secLy,
867  sector->GetPosition()[0],
868  sector->GetPosition()[1],
869  sector->GetNChannels(),
870  side);
871  fprintf(
872  outfile, "%-4.2fx%-4.2f\n", sector->GetPadDx(), sector->GetPadDy());
873  } // sectors
874  } // modules
875  } // sides
876 
877  // Draw a hole
878  TArc* holeArc = new TArc(0., 0., station->GetRmin());
879  holeArc->Draw();
880 
881  for (Int_t iRegion = 0; iRegion < fNRegions[iStation]; ++iRegion) {
882  TArc* arc = new TArc(0., 0., fRadii[iStation].at(iRegion));
883  arc->SetLineColor(kBlack);
884  arc->SetLineWidth(2);
885  arc->SetFillStyle(0);
886  arc->Draw();
887  }
888 
889  c1->Print(
890  Form("%s/station%i.eps", gSystem->DirName(fDigiFileName), iStation + 1));
891  c1->Print(
892  Form("%s/station%i.png", gSystem->DirName(fDigiFileName), iStation + 1));
893  } //stations
894  fclose(outfile);
895 }
896 
898  ifstream infile;
899  infile.open(fInputFileName);
900  if (!infile) { Fatal("ReadInputFile", "Error: Cannot open the input file."); }
901 
902  Int_t index;
903  string str;
904  vector<string> strs;
905 
906  // Set number of stations
907  OmitDummyLines(infile, str);
908  strs = Split(str, ' ');
909  index = strs.size() - 1;
910  Int_t nStations;
911  StrToNum(strs.at(index), nStations);
912  SetNStations(nStations);
913  printf("Number of stations: \t%i", fNStations);
914 
915  // Set number of channels
916  OmitDummyLines(infile, str);
917  strs = Split(str, ' ');
918  printf("\nNumber of channels: ");
919  for (Int_t iStation = 0; iStation < fNStations; ++iStation) {
920  index = strs.size() - fNStations + iStation;
921  Int_t nChannels;
922  StrToNum(strs.at(index), nChannels);
923  SetNChannels(iStation, nChannels);
924  printf("\t%i", fNChannels[iStation]);
925  }
926 
927  // Set number of regions
928  OmitDummyLines(infile, str);
929  strs = Split(str, ' ');
930  printf("\nNumber of regions: ");
931  for (Int_t iStation = 0; iStation < fNStations; ++iStation) {
932  index = strs.size() - fNStations + iStation;
933  Int_t nRegions;
934  StrToNum(strs.at(index), nRegions);
935  SetNRegions(iStation, nRegions);
936  printf("\t%i", fNRegions[iStation]);
937  }
938 
939  for (Int_t iStation = 0; iStation < fNStations; ++iStation) {
940  vector<Double_t> padWidth(fNRegions[iStation], 0);
941  vector<Double_t> padLength(fNRegions[iStation], 0);
942 
943  // Set region radii
944  OmitDummyLines(infile, str);
945  strs = Split(str, ' ');
946  printf("\nStation %i", iStation + 1);
947  printf("\n Region radii [cm]: ");
948  for (Int_t iRegion = 0; iRegion < fNRegions[iStation]; ++iRegion) {
949  index = strs.size() - fNRegions[iStation] + iRegion;
950  Double_t radius;
951  StrToNum(strs.at(index), radius);
952  SetRegionRadius(iStation, iRegion, radius);
953  printf("\t%4.2f", fRadii[iStation].at(iRegion));
954  }
955 
956  // Set pad width
957  OmitDummyLines(infile, str);
958  strs = Split(str, ' ');
959  printf("\n Pad width [cm]: ");
960  for (Int_t iRegion = 0; iRegion < fNRegions[iStation]; ++iRegion) {
961  index = strs.size() - fNRegions[iStation] + iRegion;
962  StrToNum(strs.at(index), padWidth.at(iRegion));
963  printf("\t%4.2f", padWidth.at(iRegion));
964  }
965 
966  // Set pad length
967  OmitDummyLines(infile, str);
968  strs = Split(str, ' ');
969  printf("\n Pad length [cm]: ");
970  for (Int_t iRegion = 0; iRegion < fNRegions[iStation]; ++iRegion) {
971  index = strs.size() - fNRegions[iStation] + iRegion;
972  StrToNum(strs.at(index), padLength.at(iRegion));
973  printf("\t%4.2f", padLength.at(iRegion));
974  }
975 
976  for (Int_t iRegion = 0; iRegion < fNRegions[iStation]; ++iRegion)
977  SetPadSize(
978  iStation, iRegion, padWidth.at(iRegion), padLength.at(iRegion));
979  }
980  infile.close();
981 }
982 
CbmMuchLayerSide.h
CbmMuchSectorRectangular::GetPadNx
Int_t GetPadNx() const
Definition: CbmMuchSectorRectangular.h:37
CbmMuchModule.h
CbmMuchSegmentManual::GetPadMaxSize
Double_t GetPadMaxSize(CbmMuchModuleGemRectangular *module, const TString side)
Definition: CbmMuchSegmentManual.cxx:650
CbmMuchSectorRectangular::GetPadNy
Int_t GetPadNy() const
Definition: CbmMuchSectorRectangular.h:38
CbmMuchModuleGem::AddSector
void AddSector(CbmMuchSector *sector)
Definition: CbmMuchModuleGem.h:67
f
float f
Definition: L1/vectors/P4_F32vec4.h:24
CbmMuchStation::GetLayer
CbmMuchLayer * GetLayer(Int_t iLayer) const
Definition: CbmMuchStation.h:58
CbmMuchStation
Definition: CbmMuchStation.h:22
CbmMuchSegmentManual::fSecLy
std::map< Int_t, std::vector< Double_t > > fSecLy
Definition: CbmMuchSegmentManual.h:108
CbmMuchSegmentManual::GetSectorMaxSize
Double_t GetSectorMaxSize(CbmMuchModuleGemRectangular *module, const TString side, Int_t &iRegion)
Definition: CbmMuchSegmentManual.cxx:630
CbmMuchSegmentManual::ShouldSegment
Bool_t ShouldSegment(CbmMuchSectorRectangular *sector, const TString direction, Int_t &iRegion)
Definition: CbmMuchSegmentManual.cxx:566
CbmMuchSectorRectangular::GetPadDy
Double_t GetPadDy() const
Definition: CbmMuchSectorRectangular.h:40
CbmMuchSectorRectangular::GetPadDx
Double_t GetPadDx() const
Definition: CbmMuchSectorRectangular.h:39
CbmMuchSegmentManual::SegmentModule
void SegmentModule(CbmMuchModuleGemRectangular *module, Bool_t useModuleDesign)
Definition: CbmMuchSegmentManual.cxx:297
CbmMuchSegmentManual::SegmentSector
void SegmentSector(CbmMuchModuleGemRectangular *module, CbmMuchSectorRectangular *sector)
Definition: CbmMuchSegmentManual.cxx:415
CbmMuchSegmentManual::fNChannels
std::map< Int_t, Int_t > fNChannels
Definition: CbmMuchSegmentManual.h:110
CbmMuchModuleGemRectangular::InitModule
virtual Bool_t InitModule()
Definition: CbmMuchModuleGemRectangular.cxx:253
CbmMuchSegmentManual::Split
std::vector< std::string > & Split(const std::string &s, char delim, std::vector< std::string > &elems)
Definition: CbmMuchSegmentManual.h:238
CbmMuchSegmentManual.h
CbmMuchSectorRectangular::GetSize
TVector3 GetSize() const
Definition: CbmMuchSectorRectangular.h:36
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmGeoMuchPar::GetStations
TObjArray * GetStations()
Definition: CbmGeoMuchPar.h:40
CbmMuchSegmentManual::ReadInputFile
void ReadInputFile()
Definition: CbmMuchSegmentManual.cxx:897
CbmMuchSegmentManual::DrawSegmentation
void DrawSegmentation()
Definition: CbmMuchSegmentManual.cxx:796
CbmMuchSector::GetNChannels
Int_t GetNChannels() const
Definition: CbmMuchSector.h:31
CbmMuchSectorRectangular::DrawPads
void DrawPads()
Definition: CbmMuchSectorRectangular.cxx:74
CbmGeoMuchPar
Definition: CbmGeoMuchPar.h:25
CbmMuchSegmentManual::SetNStations
void SetNStations(Int_t nStations)
Definition: CbmMuchSegmentManual.h:54
CbmMuchLayer::GetSide
CbmMuchLayerSide * GetSide(Bool_t side)
Definition: CbmMuchLayer.h:49
min
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition: L1/vectors/P4_F32vec4.h:33
CbmMuchSegmentManual::fNCols
std::map< Int_t, std::vector< Int_t > > fNCols
Definition: CbmMuchSegmentManual.h:112
CbmMuchModuleGemRectangular
Definition: CbmMuchModuleGemRectangular.h:20
CbmMuchModule::GetPosition
TVector3 GetPosition() const
Definition: CbmMuchModule.h:51
CbmMuchModule::GetSize
TVector3 GetSize() const
Definition: CbmMuchModule.h:50
CbmMuchSectorRectangular.h
CbmMuchModuleGemRectangular.h
CbmMuchSegmentManual::GetRegionIndex
Int_t GetRegionIndex(CbmMuchSectorRectangular *sector)
Definition: CbmMuchSegmentManual.cxx:600
CbmMuchSegmentManual::Init
virtual InitStatus Init()
Definition: CbmMuchSegmentManual.cxx:214
CbmMuchSegmentManual
Definition: CbmMuchSegmentManual.h:30
CbmMuchSegmentManual::~CbmMuchSegmentManual
virtual ~CbmMuchSegmentManual()
Definition: CbmMuchSegmentManual.cxx:78
CbmMuchSegmentManual::SetNRegions
void SetNRegions(Int_t iStation, Int_t nRegions)
Definition: CbmMuchSegmentManual.cxx:82
CbmMuchSegmentManual::fGeoPar
CbmGeoMuchPar * fGeoPar
Definition: CbmMuchSegmentManual.h:96
CbmMuchSegmentManual::Print
void Print(Option_t *="") const
Definition: CbmMuchSegmentManual.cxx:681
CbmGeoMuchPar.h
CbmMuchSegmentManual::SetNChannels
void SetNChannels(Int_t iStation, Int_t nChannels)
Definition: CbmMuchSegmentManual.cxx:118
CbmMuchStation::GetRmax
Double_t GetRmax() const
Definition: CbmMuchStation.h:52
CbmMuchLayerSide::GetModule
CbmMuchModule * GetModule(Int_t iModule) const
Definition: CbmMuchLayerSide.h:52
CbmMuchModule::GetCutRadius
Double_t GetCutRadius() const
Definition: CbmMuchModule.h:49
CbmMuchSectorRectangular
Definition: CbmMuchSectorRectangular.h:24
CbmMuchSegmentManual::SetParContainers
virtual void SetParContainers()
Definition: CbmMuchSegmentManual.cxx:205
CbmMuchSegmentManual::fRadii
std::map< Int_t, std::vector< Double_t > > fRadii
Definition: CbmMuchSegmentManual.h:104
CbmMuchSegmentManual::SegmentMuch
void SegmentMuch()
Definition: CbmMuchSegmentManual.cxx:249
CbmMuchLayerSide
Definition: CbmMuchLayerSide.h:22
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmMuchSegmentManual::SegmentLayerSide
void SegmentLayerSide(CbmMuchLayerSide *layerSide)
Definition: CbmMuchSegmentManual.cxx:281
CbmMuchModule
Definition: CbmMuchModule.h:24
CbmMuchLayer.h
CbmMuchSegmentManual::IsIncompleteSector
Bool_t IsIncompleteSector(CbmMuchSectorRectangular *sector)
Definition: CbmMuchSegmentManual.cxx:662
CbmMuchAddress::GetStationIndex
static Int_t GetStationIndex(Int_t address)
Definition: CbmMuchAddress.h:103
CbmMuchModule::GetDetectorId
Int_t GetDetectorId() const
Definition: CbmMuchModule.h:48
CbmMuchSegmentManual::SetRegionRadius
void SetRegionRadius(Int_t iStation, Int_t iRegion, Double_t radius)
Definition: CbmMuchSegmentManual.cxx:131
CbmMuchSegmentManual::fDigiFileName
Char_t * fDigiFileName
Definition: CbmMuchSegmentManual.h:100
CbmMuchSectorRectangular::GetPosition
TVector3 GetPosition() const
Definition: CbmMuchSectorRectangular.h:35
CbmMuchModule::GetDetectorType
Int_t GetDetectorType() const
Definition: CbmMuchModule.h:52
CbmMuchSegmentManual::fSecLx
std::map< Int_t, std::vector< Double_t > > fSecLx
Definition: CbmMuchSegmentManual.h:106
CbmMuchSegmentManual::fNRegions
std::map< Int_t, Int_t > fNRegions
Definition: CbmMuchSegmentManual.h:102
CbmMuchAddress.h
CbmMuchSegmentManual::fStations
TObjArray * fStations
Definition: CbmMuchSegmentManual.h:98
CbmMuchSegmentManual::fNRows
std::map< Int_t, std::vector< Int_t > > fNRows
Definition: CbmMuchSegmentManual.h:114
CbmMuchStation::GetNLayers
Int_t GetNLayers() const
Definition: CbmMuchStation.h:50
CbmMuchLayer::GetSideF
CbmMuchLayerSide * GetSideF()
Definition: CbmMuchLayer.h:47
CbmMuchSegmentManual::fDebug
Int_t fDebug
Definition: CbmMuchSegmentManual.h:115
CbmMuchSegmentManual::fInputFileName
Char_t * fInputFileName
Definition: CbmMuchSegmentManual.h:99
CbmMuchSector::GetAddress
UInt_t GetAddress() const
Definition: CbmMuchSector.h:27
CbmMuchLayer
Definition: CbmMuchLayer.h:21
max
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: L1/vectors/P4_F32vec4.h:36
CbmMuchLayer::GetSideB
CbmMuchLayerSide * GetSideB()
Definition: CbmMuchLayer.h:48
CbmMuchStation::GetRmin
Double_t GetRmin() const
Definition: CbmMuchStation.h:51
CbmMuchStation.h
CbmMuchSegmentManual::StrToNum
void StrToNum(std::string &str, T &number)
Definition: CbmMuchSegmentManual.h:254
CbmMuchSegmentManual::SetSigma
void SetSigma(Int_t iStation, Int_t iRegion, Double_t sigmaX, Double_t sigmaY)
Definition: CbmMuchSegmentManual.cxx:149
CbmMuchSegmentManual::OmitDummyLines
void OmitDummyLines(std::ifstream &infile, std::string &str)
Definition: CbmMuchSegmentManual.h:231
CbmMuchModuleGem::GetSectorByIndex
CbmMuchSector * GetSectorByIndex(Int_t iSector)
Definition: CbmMuchModuleGem.h:54
CbmMuchSegmentManual::CbmMuchSegmentManual
CbmMuchSegmentManual()
Definition: CbmMuchSegmentManual.cxx:41
CbmMuchModuleGem::GetNSectors
Int_t GetNSectors() const
Definition: CbmMuchModuleGem.h:57
CbmMuchSegmentManual::fNStations
Int_t fNStations
Definition: CbmMuchSegmentManual.h:97
CbmMuchSegmentManual::IntersectsRad
Int_t IntersectsRad(CbmMuchModuleGemRectangular *module, Double_t radius)
Definition: CbmMuchSegmentManual.cxx:498
CbmMuchSegmentManual::SetPadSize
void SetPadSize(Int_t iStation, Int_t iRegion, Double_t padLx, Double_t padLy)
Definition: CbmMuchSegmentManual.cxx:177
CbmMuchLayerSide::GetNModules
Int_t GetNModules() const
Definition: CbmMuchLayerSide.h:47