14#include "RStringView.h"
41 std::string_view sname =
g->GetName();
43 if (sname.find(
"v1") != std::string::npos || sname.find(
"V1") != std::string::npos) {
52 LOG(debug4) <<
"o2::emcal::ShishKebabTrd1Module - first module key=" <<
key <<
": theta " << std::setw(1)
53 << std::setprecision(4) <<
mTheta <<
" geometry " <<
g;
57 : mGeometry(leftNeighbor.mGeometry),
75 : mGeometry(mod.mGeometry),
86 mThetaOB1(mod.mThetaOB1),
87 mThetaOB2(mod.mThetaOB2),
91 for (Int_t
i = 0;
i < 3;
i++) {
100 Double_t xl = (yl -
B) /
A;
108 Double_t yt = xt / TMath::Tan(
mTheta), xp = TMath::Sqrt(xt * xt + yt * yt);
109 Double_t
x = xl + xp;
114 Double_t yCprev =
sr +
sa * TMath::Cos(
mTheta);
115 Double_t xCprev = (yCprev -
B) /
A;
116 Double_t xA = xCprev +
sa * TMath::Sin(
mTheta), yA =
sr;
130 Double_t kk1 = (
sa +
sa2) / (2. * 4.);
132 Double_t xk1 =
mOK.X() - kk1 * TMath::Sin(
mTheta);
133 Double_t yk1 =
mOK.Y() + kk1 * TMath::Cos(
mTheta) -
sr;
136 Double_t xk2 =
mOK.X() + kk1 * TMath::Sin(
mTheta);
137 Double_t yk2 =
mOK.Y() - kk1 * TMath::Cos(
mTheta) -
sr;
143 kk1 = ((
sa +
sa2) / 4. +
sa / 6.) / 2.;
145 xk1 =
mOK.X() - kk1 * TMath::Sin(
mTheta);
149 xk2 =
mOK.X() + kk1 * TMath::Sin(
mTheta);
163 Double_t xBottom = (
sr -
mB) /
mA;
164 Double_t yBottom =
sr;
165 mORB.Set(xBottom, yBottom);
167 Double_t l =
sb / TMath::Cos(
sangle / 2.);
168 Double_t xTop = xBottom + l * TMath::Cos(TMath::ATan(
mA));
169 Double_t yTop =
mA * xTop +
mB;
170 mORT.Set(xTop, yTop);
178 mTheta = TMath::PiOver2();
184 Double_t xA =
sa / 2. +
sa2 / 2.;
187 }
else if (
key == 1) {
189 mTheta = 89.25 * TMath::DegToRad();
190 Double_t al1 =
sangle / 2.;
191 Double_t
x = 0.5 * (
sa * TMath::Cos(al1) +
sb * TMath::Sin(al1));
192 Double_t
y = 0.5 * (
sb +
sa * TMath::Sin(al1)) * TMath::Cos(al1);
197 Double_t xA =
sa * TMath::Cos(al1);
201 LOG(error) <<
"key=" <<
key <<
" : wrong case \n";
211 LOG(warning) <<
"GetParameters(): << No geometry\n";
239 printf(
"PrintShish() \n a %7.3f:%7.3f | b %7.2f | r %7.2f \n TRD1 angle %7.6f(%5.2f) | tanBetta %7.6f",
sa,
sa2,
242 printf(
" OK : theta %f : phi = %f(%5.2f) \n",
mTheta,
mOK.Phi(),
mOK.Phi() * TMath::RadToDeg());
245 printf(
" y %9.3f x %9.3f xrb %9.3f (right bottom on r=%9.3f ) \n",
mOK.X(),
mOK.Y(),
mORB.X(),
mORB.Y());
248 printf(
" A %f B %f | fThetaA %7.6f(%5.2f)\n",
mA,
mB,
mThetaA,
mThetaA * TMath::RadToDeg());
250 printf(
" fOK1 : X %9.4f: Y %9.4f : (local, ieta=2)\n",
mOK1.X(),
mOK1.Y());
251 printf(
" fOK2 : X %9.4f: Y %9.4f : (local, ieta=1)\n\n",
mOK2.X(),
mOK2.Y());
252 printf(
" fOB : X %9.4f: Y %9.4f \n",
mOB.X(),
mOB.Y());
253 printf(
" fOB1 : X %9.4f: Y %9.4f (local, ieta=2)\n",
mOB1.X(),
mOB1.Y());
254 printf(
" fOB2 : X %9.4f: Y %9.4f (local, ieta=1)\n",
mOB2.X(),
mOB2.Y());
257 for (
int ieta = 0; ieta < 3; ieta++) {
258 printf(
" fOK3X3[%i] : X %9.4f: Y %9.4f (local) \n", ieta,
mOK3X3[ieta].X(),
mOK3X3[ieta].Y());
273 Double_t theta = 0.,
x = 0.,
y = 0.;
277 }
else if (ieta == 1) {
284 x =
v.X() + TMath::Cos(theta) * dist;
285 y =
v.Y() + TMath::Sin(theta) * dist;
294 Double_t thetaBottom = TMath::ATan2(
mORB.Y(),
mORB.X());
298 Double_t thetaTop = TMath::ATan2(
mORT.Y(),
mORT.X());
301 LOG(
debug) <<
" Right bottom point of module : eta " << std::setw(5) << std::setprecision(4) << etaBottom
302 <<
" : theta " << std::setw(6) << std::setprecision(4) << thetaBottom <<
" (" << std::setw(6)
303 << std::setprecision(2) << thetaBottom * TMath::RadToDeg() <<
" ) : x(zglob) " << std::setw(7)
304 << std::setprecision(2) <<
mORB.X() <<
" y(phi) " << std::setw(5) << std::setprecision(2) <<
mORB.Y();
305 LOG(
debug) <<
" Right top point of module : eta " << std::setw(5) << std::setprecision(4) << etaTop <<
": theta "
306 << std::setw(6) << std::setprecision(4) << thetaTop <<
" (" << std::setw(6) << std::setprecision(2)
307 << thetaTop * TMath::RadToDeg() <<
") : x(zglob) " << std::setw(7) << std::setprecision(2) <<
mORT.X()
308 <<
" y(phi) " << std::setw(5) << std::setprecision(2) <<
mORT.Y();
309 return etaBottom > etaTop ? etaBottom : etaTop;
EMCAL geometry definition.
Float_t Get2Trd1Dx2() const
Float_t GetSteelFrontThickness() const
Float_t GetLongModuleSize() const
const std::string & GetName() const
Float_t GetIPDistance() const
Float_t GetTrd1Angle() const
Float_t GetEtaModuleSize() const
Main class for TRD1 geometry of Shish-Kebab case.
Double_t mB
system where zero point is IP.
Double_t GetTheta() const
void PrintShish(Int_t pri=1) const
void Init(Double_t A, Double_t B)
Init (add explanation)
static Double_t sangle
in rad (1.5 degree)
Bool_t SetParameters()
Recover module parameters stored in geometry.
Double_t mThetaOB2
theta of cell center line (go through OB2)
ShishKebabTrd1Module(Double_t theta=0.0, Geometry *g=nullptr)
Constructor.
TVector2 mOK
position the module center in ALICE system; x->y; z->x;
Double_t mThetaOB1
theta of cell center line (go through OB1)
static Double_t sa
2*dx1=2*dy1
Double_t mThetaA
angle coresponding fA - for convinience
TVector2 mORB
position of right/bottom point of module
Double_t GetMaxEtaOfModule() const
Double_t mTheta
theta angle of perpendicular to SK module
Double_t GetThetaInDegree() const
Double_t mA
parameters of right line : y = A*z + B
static Double_t stanBetta
tan(fgangle/2.)
static Double_t sr
radius to IP
void DefineFirstModule(const Int_t key=0)
static Double_t ThetaToEta(Double_t theta)
void GetPositionAtCenterCellLine(Int_t ieta, Double_t dist, TVector2 &v) const
Geometry * mGeometry
! pointer to geometry info
TVector2 mORT
position of right/top point of module
Double_t GetEtaOfCenterOfModule() const
void DefineAllStuff()
Define more things (add explanation)
GLfloat GLfloat GLfloat alpha
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"