1 #include "KVTrapezoidalStripDetector.h"
8 double vert[] = {dX +
C / 2, A / 2, dX +
C / 2, -A / 2, dX -
C / 2, -B / 2, dX -
C / 2, B / 2, dX +
C / 2, A / 2, dX +
C / 2, -A / 2, dX -
C / 2, -B / 2, dX -
C / 2, B / 2};
18 double vert[] = {x_D + dX, y_A, x_C + dX, y_B, x_AB + dX, y_B, x_AB + dX, y_A, x_D + dX, y_A, x_C + dX, y_B, x_AB + dX, y_B, x_AB + dX, y_A};
28 double vert[] = {x_CD + dX, y_D, x_CD + dX, -y_D, x_AB + dX, -y_A, x_AB + dX, y_A, x_CD + dX, y_D, x_CD + dX, -y_D, x_AB + dX, -y_A, x_AB + dX, y_A};
43 if (Ycoord < -A / 2) Ycoord = -A / 2;
44 if (Ycoord > A / 2) Ycoord = A / 2;
49 if (Ycoord <= -B / 2 && Ycoord >= -A / 2) {
51 return C / 2 - 2 *
C / (A - B) * (Ycoord + A / 2);
53 if (Ycoord >= B / 2 && Ycoord <= A / 2) {
55 return 2 *
C / (A - B) * (Ycoord - B / 2) -
C / 2;
73 return B / 2 + (A - B) / 2 /
C * (Xcoord +
C / 2);
86 KVTrapezoidalStripDetector::KVTrapezoidalStripDetector(
const TString& name,
double OF_A,
double OF_B,
double OF_C,
double IF_A,
double IF_B,
double IF_C,
double a,
double dZ,
StripDirection strip_direction,
int N,
double inter_strip)
100 auto b = OF_C -
a - IF_C;
101 std::cout <<
"calculated b = " <<
b <<
" [cm]\n";
105 auto ofr =
new TGeoVolume(
Form(
"DEADZONE_FRAME_%s",
name.Data()), cs, cu.GetGeoMedium());
106 ofr->SetTransparency((
Char_t)25);
110 double pitch = (IF_A - (
N - 1) * inter_strip) / double(
N);
111 std::cout <<
"Strip width is " << pitch /
KVUnits::um <<
" microns (" << inter_strip /
KVUnits::um <<
" micron inter-strip)\n";
112 double strip_B_y = IF_A / 2;
113 double strip_A_y = strip_B_y - pitch;
114 for (
int strip = 0; strip <
N; ++strip) {
118 auto _svol =
new TGeoVolume(
"SUBDET", _s, si.GetGeoMedium());
121 strip_B_y -= (pitch + inter_strip);
122 strip_A_y -= (pitch + inter_strip);
125 strip_B_y = IF_A / 2 - pitch;
126 strip_A_y = strip_B_y - inter_strip;
127 for (
int strip = 1; strip <
N; ++strip) {
134 strip_B_y -= (pitch + inter_strip);
135 strip_A_y -= (pitch + inter_strip);
140 double pitch = (IF_C - (
N - 1) * inter_strip) / double(
N);
141 std::cout <<
"Strip width is " << pitch /
KVUnits::um <<
" microns (" << inter_strip /
KVUnits::um <<
" micron inter-strip)\n";
142 double strip_AB_x = -IF_C / 2;
143 double strip_CD_x = strip_AB_x + pitch;
144 for (
int strip = 0; strip <
N; ++strip) {
148 auto _svol =
new TGeoVolume(
"SUBDET", _s, si.GetGeoMedium());
151 strip_AB_x += (pitch + inter_strip);
152 strip_CD_x += (pitch + inter_strip);
155 strip_AB_x = -IF_C / 2 + pitch;
156 strip_CD_x = strip_AB_x + inter_strip;
157 for (
int strip = 1; strip <
N; ++strip) {
164 strip_AB_x += (pitch + inter_strip);
165 strip_CD_x += (pitch + inter_strip);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
char * Form(const char *fmt,...)
Description of physical materials used to construct detectors & targets; interface to range tables.
virtual TGeoMedium * GetGeoMedium(const Char_t *="")
Single-sided stripped trapezoidal silicon detector.
double Ycoord_of_frame_side(double Xcoord, double A, double B, double C)
double Xcoord_of_frame_bottom(double Ycoord, double A, double B, double C)
KVTrapezoidalStripDetector()
TGeoArb8 * make_arb8(const TString &name, double A, double B, double C, double dZ, double dX=0)
TGeoArb8 * make_hori_strip_arb8(const TString &name, double x_AB, double y_A, double x_CD, double y_D, double dZ, double dX=0)
TGeoArb8 * make_vert_strip_arb8(const TString &name, double y_A, double y_B, double x_AB, double x_C, double x_D, double dZ, double dX=0)
TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="") override