BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
CbmStsSensorDigiPar.cxx
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- CbmStsSensorDigiPar source file -----
3// ----- Created 01/07/2008 by R. Karabowicz -----
4// -------------------------------------------------------------------------
5
7
8#include "TMath.h"
9
10#include <iostream>
11
12using std::cout;
13using std::endl;
14
15// ----- Default constructor -------------------------------------------
17 : fSensorNr(-1)
18 , fType(0)
19 , fX0(0.)
20 , fY0(0.)
21 , fZ0(0.)
22 , fRotation(0.)
23 , fLx(0.)
24 , fLy(0.)
25 , fDx(0.)
26 , fDy(0.)
27 , fStereoF(0.)
28 , fStereoB(0.)
29 , fD(0.)
30{
31 cout << "-W- CbmStsSensorDigiPar: Do not use this constructor! " << endl;
32}
33
34// ----- Standard constructor ------------------------------------------
36 Int_t iType,
37 Double_t x0,
38 Double_t y0,
39 Double_t rotation,
40 Double_t lx,
41 Double_t ly,
42 Double_t dx,
43 Double_t dy,
44 Double_t stereoF,
45 Double_t stereoB)
46 : fSensorNr(-1)
47 , fType(0)
48 , fX0(0.)
49 , fY0(0.)
50 , fZ0(0.)
51 , fRotation(0.)
52 , fLx(0.)
53 , fLy(0.)
54 , fDx(0.)
55 , fDy(0.)
56 , fStereoF(0.)
57 , fStereoB(0.)
58 , fD(0.)
59{
60 fSensorNr = iSensor;
61 fType = iType;
62 fX0 = x0;
63 fY0 = y0;
64 fRotation = rotation;
65 fLx = lx;
66 fLy = ly;
67 fDx = dx;
68 fDy = dy;
69 fStereoF = stereoF;
70 fStereoB = stereoB;
71
72 // Check for stereoB angle
73 // (Mathematics has not been checked for angles > 90 degrees)
74 if (TMath::Abs(fStereoB) > TMath::Pi() / 2.) {
75 cout << "-E- CbmStsSensorDigiPar: StereoB angle > 90 degrees !" << endl;
76 cout << iSensor << " " << iType << " " << x0 << " " << y0 << " " << rotation << " " << lx << " " << ly << " "
77 << dx << " " << dy << " " << stereoB << endl;
78 cout << " Revise sector layout! " << endl;
79 Fatal("CbmStsSensorDigiPar", "StereoB Angle");
80 }
81 // Check for stereoF angle
82 // (Mathematics has not been checked for angles > 90 degrees)
83 if (TMath::Abs(fStereoF) > TMath::Pi() / 2.) {
84 cout << "-E- CbmStsSensorDigiPar: StereoF angle > 90 degrees !" << endl;
85 cout << iSensor << " " << iType << " " << x0 << " " << y0 << " " << rotation << " " << lx << " " << ly << " "
86 << dx << " " << dy << " " << stereoF << endl;
87 cout << " Revise sector layout! " << endl;
88 Fatal("CbmStsSensorDigiPar", "StereoF Angle");
89 }
90}
91
93 Int_t iType,
94 Double_t x0,
95 Double_t y0,
96 Double_t z0,
97 Double_t rotation,
98 Double_t lx,
99 Double_t ly,
100 Double_t d,
101 Double_t dx,
102 Double_t dy,
103 Double_t stereoF,
104 Double_t stereoB)
105 : fSensorNr(-1)
106 , fType(0)
107 , fX0(0.)
108 , fY0(0.)
109 , fZ0(0.)
110 , fRotation(0.)
111 , fLx(0.)
112 , fLy(0.)
113 , fDx(0.)
114 , fDy(0.)
115 , fStereoF(0.)
116 , fStereoB(0.)
117 , fD(0.)
118{
119 fSensorNr = iSensor;
120 fType = iType;
121 fX0 = x0;
122 fY0 = y0;
123 fZ0 = z0;
124 fRotation = rotation;
125 fLx = lx;
126 fLy = ly;
127 fD = d;
128 fDx = dx;
129 fDy = dy;
130 fStereoF = stereoF;
131 fStereoB = stereoB;
132
133 // Check for stereoB angle
134 // (Mathematics has not been checked for angles > 90 degrees)
135 if (TMath::Abs(fStereoB) > TMath::Pi() / 2.) {
136 cout << "-E- CbmStsSensorDigiPar: StereoB angle > 90 degrees !" << endl;
137 cout << iSensor << " " << iType << " " << x0 << " " << y0 << " " << z0 << " " << rotation << " " << lx << " "
138 << ly << " " << dx << " " << dy << " " << stereoB << endl;
139 cout << " Revise sector layout! " << endl;
140 Fatal("CbmStsSensorDigiPar", "StereoB Angle");
141 }
142 // Check for stereoF angle
143 // (Mathematics has not been checked for angles > 90 degrees)
144 if (TMath::Abs(fStereoF) > TMath::Pi() / 2.) {
145 cout << "-E- CbmStsSensorDigiPar: StereoF angle > 90 degrees !" << endl;
146 cout << iSensor << " " << iType << " " << x0 << " " << y0 << " " << z0 << " " << rotation << " " << lx << " "
147 << ly << " " << dx << " " << dy << " " << stereoF << endl;
148 cout << " Revise sector layout! " << endl;
149 Fatal("CbmStsSensorDigiPar", "StereoF Angle");
150 }
151}
152// -------------------------------------------------------------------------
153
154// ----- Destructor ----------------------------------------------------
156// -------------------------------------------------------------------------
int Int_t
double Double_t
Int_t fSensorNr
Sensor number in station.
Int_t fType
Type of sector.
Double_t fStereoB
StereoF angle of front side strips.
Double_t fDy
Pixel size along y [cm].
Double_t fX0
x coordinate of sector centre in the station c.s.
Double_t fZ0
z coordinate of sector centre in the global c.s.
virtual ~CbmStsSensorDigiPar()
Destructor.
Double_t fY0
y coordinate of sector centre in the station c.s.
CbmStsSensorDigiPar()
Default constructor.
Double_t fStereoF
StereoB angle of back side strips.
Double_t fDx
Strip readout pitch or pixel size along x [cm].
Double_t fRotation
Rotation angle around z axis in the station c.s [rad].
Double_t fLy
Length of sector along y axis [cm].
Double_t fLx
Length of sector along x axis [cm].
virtual void Fatal(const char *method, const char *msgfmt,...) const
constexpr Double_t Pi()
Double_t Abs(Double_t d)