CbmRoot
Loading...
Searching...
No Matches
CbmMuchPadRadial.cxx
Go to the documentation of this file.
1/* Copyright (C) 2012-2020 Petersburg Nuclear Physics Institute named by B.P.Konstantinov of National Research Centre "Kurchatov Institute", Gatchina
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Evgeny Kryshen [committer], Florian Uhlig */
4
12#include "CbmMuchPadRadial.h"
13
14#include <TColor.h> // for TColor
15#include <TCrown.h> // for TCrown
16#include <TMath.h> // for RadToDeg
17
18#include <math.h> // for cos, sin
19
20// ----- Default constructor ----------------------------------------------
21CbmMuchPadRadial::CbmMuchPadRadial() : CbmMuchPad(), TCrown(), fPhi1(0.), fPhi2(0.) {}
22// -------------------------------------------------------------------------
23
24// -------------------------------------------------------------------------
25CbmMuchPadRadial::CbmMuchPadRadial(Int_t address, Double_t r1, Double_t r2, Double_t phi1, Double_t phi2)
26 : CbmMuchPad(address, (r1 + r2) / 2. * cos((phi1 + phi2) / 2.), (r1 + r2) / 2. * sin((phi1 + phi2) / 2.), r2 - r1,
27 r2 - r1)
28 , TCrown(0, 0, r1, r2, phi1 * TMath::RadToDeg(), phi2 * TMath::RadToDeg())
29 , fPhi1(phi1)
30 , fPhi2(phi2)
31{
32 SetFillColor(kYellow);
33 SetLineWidth(1);
34 SetLineColor(34);
35}
36// -------------------------------------------------------------------------
37
38// -------------------------------------------------------------------------
39void CbmMuchPadRadial::SetFired(Int_t iDigi, Int_t ADCcharge, Int_t nADCChannels)
40{
41 fDigiIndex = iDigi;
42 if (fDigiIndex >= 0) SetFillColor(TColor::GetColor(nADCChannels - 1 - ADCcharge, nADCChannels - 1 - ADCcharge, 245));
43 else
44 SetFillColor(kYellow);
45}
46// -------------------------------------------------------------------------
47
48// -------------------------------------------------------------------------
50{
51 Draw("f");
52 Draw();
53}
54// -------------------------------------------------------------------------
55
ClassImp(CbmConverterManager)
friend fvec cos(const fvec &a)
friend fvec sin(const fvec &a)
void SetFired(Int_t iDigi, Int_t ADCcharge, Int_t nADCChannels=256)
Int_t fDigiIndex
Definition CbmMuchPad.h:57