CbmRoot
Loading...
Searching...
No Matches
CbmMuchStation.cxx
Go to the documentation of this file.
1/* Copyright (C) 2007-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Mikhail Ryzhinskiy, Florian Uhlig, Volker Friese [committer], Evgeny Kryshen */
4
13#include "CbmMuchStation.h"
14
15#include "CbmMuchAddress.h" // for CbmMuchAddress
16#include "CbmMuchLayer.h" // for CbmMuchLayer
17
18#include <TMathBase.h> // for Abs
19#include <TObjArray.h> // for TObjArray
20
21// ----- Default constructor -------------------------------------------
23 : TObject()
24 , fDetectorId(0)
25 , fZ(0.)
26 , fLayers()
27 , fRmin(0.)
28 , fRmax(0.)
29 , fModuleDesign(kFALSE)
30 , fTubeRmin(0.)
31 , fTubeRmax(0.)
32 , fTubeZ(0.)
33{
34}
35// -------------------------------------------------------------------------
36
37// ----- Standard constructor ------------------------------------------
38CbmMuchStation::CbmMuchStation(Int_t iStation, Double_t z)
39 : TObject()
40 , fDetectorId(CbmMuchAddress::GetAddress(iStation))
41 , fZ(z)
42 , fLayers()
43 , fRmin(0.)
44 , fRmax(0.)
45 , fModuleDesign(kFALSE)
46 , fTubeRmin(0.)
47 , fTubeRmax(0.)
48 , fTubeZ(0.)
49{
50}
51// -------------------------------------------------------------------------
52
53// ----- Destructor ----------------------------------------------------
55// -------------------------------------------------------------------------
56
57// ----- Public method AddSector ---------------------------------------
58void CbmMuchStation::AddLayer(CbmMuchLayer* layer) { fLayers.Add(layer); }
59// -------------------------------------------------------------------------
60
61
62// -------------------------------------------------------------------------
64{
65 Double_t dzmax = 0;
66
67 for (Int_t l = 0; l < GetNLayers(); l++) {
68 CbmMuchLayer* layer = GetLayer(l);
69 Double_t ldz = layer->GetDz();
70 Double_t z = layer->GetZ();
71 Double_t dz = TMath::Abs(z - fZ) + ldz;
72 if (dz > dzmax) dzmax = dz;
73 }
74
75 return dzmax;
76}
77// -------------------------------------------------------------------------
78
ClassImp(CbmConverterManager)
Interface class to unique address for the MUCH.
Double_t GetZ() const
Double_t GetDz()
TObjArray fLayers
CbmMuchLayer * GetLayer(Int_t iLayer) const
void AddLayer(CbmMuchLayer *layer)
virtual ~CbmMuchStation()
Int_t GetNLayers() const
Double_t GetTubeDz() const