CbmRoot
CbmMuchPadRadial.cxx
Go to the documentation of this file.
1 
8 #include "CbmMuchPadRadial.h"
9 
10 #include <TColor.h> // for TColor
11 #include <TCrown.h> // for TCrown
12 #include <TMath.h> // for RadToDeg
13 
14 #include <math.h> // for cos, sin
15 
16 // ----- Default constructor ----------------------------------------------
18  : CbmMuchPad(), TCrown(), fPhi1(0.), fPhi2(0.) {}
19 // -------------------------------------------------------------------------
20 
21 // -------------------------------------------------------------------------
23  Double_t r1,
24  Double_t r2,
25  Double_t phi1,
26  Double_t phi2)
27  : CbmMuchPad(address,
28  (r1 + r2) / 2. * cos((phi1 + phi2) / 2.),
29  (r1 + r2) / 2. * sin((phi1 + phi2) / 2.),
30  r2 - r1,
31  r2 - r1)
32  , TCrown(0, 0, r1, r2, phi1 * TMath::RadToDeg(), phi2 * TMath::RadToDeg())
33  , fPhi1(phi1)
34  , fPhi2(phi2) {
35  SetFillColor(kYellow);
36  SetLineWidth(1);
37  SetLineColor(34);
38 }
39 // -------------------------------------------------------------------------
40 
41 // -------------------------------------------------------------------------
42 void CbmMuchPadRadial::SetFired(Int_t iDigi,
43  Int_t ADCcharge,
44  Int_t nADCChannels) {
45  fDigiIndex = iDigi;
46  if (fDigiIndex >= 0)
47  SetFillColor(TColor::GetColor(
48  nADCChannels - 1 - ADCcharge, nADCChannels - 1 - ADCcharge, 245));
49  else
50  SetFillColor(kYellow);
51 }
52 // -------------------------------------------------------------------------
53 
54 // -------------------------------------------------------------------------
56  Draw("f");
57  Draw();
58 }
59 // -------------------------------------------------------------------------
60 
sin
friend F32vec4 sin(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:136
CbmMuchPadRadial::CbmMuchPadRadial
CbmMuchPadRadial()
Definition: CbmMuchPadRadial.cxx:17
CbmMuchPadRadial::DrawPad
void DrawPad()
Definition: CbmMuchPadRadial.cxx:55
CbmMuchPadRadial
Definition: CbmMuchPadRadial.h:17
CbmMuchPadRadial::SetFired
void SetFired(Int_t iDigi, Int_t ADCcharge, Int_t nADCChannels=256)
Definition: CbmMuchPadRadial.cxx:42
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmMuchPad
Definition: CbmMuchPad.h:21
CbmMuchPadRadial.h
cos
friend F32vec4 cos(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:137
CbmMuchPad::fDigiIndex
Int_t fDigiIndex
Definition: CbmMuchPad.h:59