CbmRoot
Loading...
Searching...
No Matches
CbmMuchLayerSide.cxx
Go to the documentation of this file.
1/* Copyright (C) 2008-2020 St. Petersburg Polytechnic University, St. Petersburg
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Mikhail Ryzhinskiy [committer], Florian Uhlig */
4
13#include "CbmMuchLayerSide.h"
14
15#include "CbmMuchAddress.h" // for CbmMuchAddress
16#include "CbmMuchModule.h" // for CbmMuchModule
17
18#include <TObjArray.h> // for TObjArray
19
20// ----- Default constructor -------------------------------------------
21CbmMuchLayerSide::CbmMuchLayerSide() : TObject(), fDetectorId(0), fZ(0.), fModules() {}
22// -------------------------------------------------------------------------
23
24// ----- Standard constructor ------------------------------------------
25CbmMuchLayerSide::CbmMuchLayerSide(Int_t detId, Double_t z) : TObject(), fDetectorId(detId), fZ(z), fModules() {}
26// -------------------------------------------------------------------------
27
28// ----- Standard constructor ------------------------------------------
29CbmMuchLayerSide::CbmMuchLayerSide(Int_t iStation, Int_t iLayer, Bool_t iSide, Double_t z)
30 : TObject()
31 , fDetectorId(CbmMuchAddress::GetAddress(iStation, iLayer, iSide))
32 , fZ(z)
33 , fModules()
34{
35}
36// -------------------------------------------------------------------------
37
38// ----- Destructor ----------------------------------------------------
40// -------------------------------------------------------------------------
41
42// ----- Public method AddModule ---------------------------------------
44// -------------------------------------------------------------------------
45
46void CbmMuchLayerSide::DrawModules(Color_t color, Bool_t modulesVisible, Bool_t)
47{
48 for (Int_t m = 0; m < GetNModules(); m++) {
49 CbmMuchModule* module = GetModule(m);
50 if (modulesVisible) {
51 module->SetFillColor(color);
52 module->SetFillStyle(3001);
53 module->Draw("f");
54 }
55 module->DrawModule(color);
56 }
57}
ClassImp(CbmConverterManager)
Interface class to unique address for the MUCH.
Int_t GetNModules() const
void AddModule(CbmMuchModule *module)
CbmMuchModule * GetModule(Int_t iModule) const
void DrawModules(Color_t color=kYellow, Bool_t modulesVisible=true, Bool_t sectorsVisible=true)