Project
Loading...
Searching...
No Matches
ShishKebabTrd1Module.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef ALICEO2_EMCAL_SHISHKEBABTRD1MODULE_H
13#define ALICEO2_EMCAL_SHISHKEBABTRD1MODULE_H
14
15#include <iomanip>
16#include <memory>
17
18#include <TMath.h>
19#include <TNamed.h>
20#include <TVector2.h>
21
22#include <fairlogger/Logger.h>
23
24namespace o2
25{
26namespace emcal
27{
28
41{
42 public:
44 ShishKebabTrd1Module(Double_t theta = 0.0, Geometry* g = nullptr);
45
48
50 void Init(Double_t A, Double_t B);
51
53 void DefineAllStuff();
54
57
59 {
60 LOG(fatal) << "operator = not implemented";
61 return *this;
62 }
63
65
67 Bool_t SetParameters();
68
75 void DefineFirstModule(const Int_t key = 0); // key=0-zero tilt of first module
76
77 Double_t GetTheta() const { return mTheta; }
78 const TVector2& GetCenterOfModule() const { return mOK; }
79 Double_t GetPosX() const { return mOK.Y(); }
80 Double_t GetPosZ() const { return mOK.X(); }
81 Double_t GetPosXfromR() const { return mOK.Y() - sr; }
82 Double_t GetA() const { return mA; }
83 Double_t GetB() const { return mB; }
84 Double_t GetRadius() const { return sr; }
85 TVector2 GetORB() const { return mORB; }
86 TVector2 GetORT() const { return mORT; }
87
88 // Additional offline stuff
89 // ieta=0 or 1 - Jun 02, 2006
90 const TVector2& GetCenterOfCellInLocalCoordinateofSM(Int_t ieta) const
91 {
92 if (ieta <= 0) {
93 return mOK2;
94 } else {
95 return mOK1;
96 }
97 }
98
99 void GetCenterOfCellInLocalCoordinateofSM(Int_t ieta, Double_t& xr, Double_t& zr) const
100 {
101 if (ieta <= 0) {
102 xr = mOK2.Y();
103 zr = mOK2.X();
104 } else {
105 xr = mOK1.Y();
106 zr = mOK1.X();
107 }
108 LOG(debug2) << " ieta " << std::setw(2) << std::setprecision(2) << ieta << " xr " << std::setw(8)
109 << std::setprecision(4) << xr << " zr " << std::setw(8) << std::setprecision(4) << zr;
110 }
111
112 void GetCenterOfCellInLocalCoordinateofSM3X3(Int_t ieta, Double_t& xr, Double_t& zr) const
113 { // 3X3 case - Nov 9,2006
114 if (ieta < 0) {
115 ieta = 0; // ieta = ieta<0? ieta=0 : ieta; // check index
116 }
117 if (ieta > 2) {
118 ieta = 2; // ieta = ieta>2? ieta=2 : ieta;
119 }
120 xr = mOK3X3[2 - ieta].Y();
121 zr = mOK3X3[2 - ieta].X();
122 }
123
124 void GetCenterOfCellInLocalCoordinateofSM1X1(Double_t& xr, Double_t& zr) const
125 { // 1X1 case - Nov 27,2006 // Center of cell is center of module
126 xr = mOK.Y() - sr;
127 zr = mOK.X();
128 }
129
130 // 15-may-06
131 const TVector2& GetCenterOfModuleFace() const { return mOB; }
132 const TVector2& GetCenterOfModuleFace(Int_t ieta) const
133 {
134 if (ieta <= 0) {
135 return mOB2;
136 } else {
137 return mOB1;
138 }
139 }
140
141 // Jul 30, 2007
142 void GetPositionAtCenterCellLine(Int_t ieta, Double_t dist, TVector2& v) const;
143
144 //
145 Double_t GetTanBetta() const { return stanBetta; }
146 Double_t Getb() const { return sb; }
147
148 // service methods
149 void PrintShish(Int_t pri = 1) const; // *MENU*
150 Double_t GetThetaInDegree() const;
151 Double_t GetEtaOfCenterOfModule() const;
152 Double_t GetMaxEtaOfModule() const;
153 static Double_t ThetaToEta(Double_t theta) { return -TMath::Log(TMath::Tan(theta / 2.)); }
154
155 protected:
156 // geometry info
158 static Double_t sa;
159 static Double_t sa2;
160 static Double_t sb;
161 static Double_t sangle;
162 static Double_t stanBetta;
163 static Double_t sr;
164
165 TVector2 mOK;
166 Double_t mA{0.};
167 Double_t mB{0.};
168 Double_t mThetaA{0.};
169 Double_t mTheta;
170
171 // position of towers(cells) with differents ieta (1 or 2) in local coordinate of SM
172 // Nov 04,2004; Feb 19,2006
173 TVector2 mOK1;
174 TVector2 mOK2;
175
176 // May 13, 2006; local position of module (cells) center face
177 TVector2 mOB;
178 TVector2 mOB1;
179 TVector2 mOB2;
180
181 // Jul 30, 2007
182 Double_t mThetaOB1{0.};
183 Double_t mThetaOB2{0.};
184
185 // 3X3 case - Nov 9,2006
186 TVector2 mOK3X3[3];
187
188 // Apr 14, 2010 - checking of geometry
189 TVector2 mORB;
190 TVector2 mORT;
191};
192} // namespace emcal
193} // namespace o2
194#endif
StringRef key
Definition A.h:16
Definition B.h:16
EMCAL geometry definition.
Definition Geometry.h:40
Main class for TRD1 geometry of Shish-Kebab case.
Double_t mB
system where zero point is IP.
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)
void GetCenterOfCellInLocalCoordinateofSM3X3(Int_t ieta, Double_t &xr, Double_t &zr) const
void GetCenterOfCellInLocalCoordinateofSM1X1(Double_t &xr, Double_t &zr) const
TVector2 mOK
position the module center in ALICE system; x->y; z->x;
Double_t mThetaOB1
theta of cell center line (go through OB1)
const TVector2 & GetCenterOfModuleFace(Int_t ieta) const
Double_t mThetaA
angle coresponding fA - for convinience
void GetCenterOfCellInLocalCoordinateofSM(Int_t ieta, Double_t &xr, Double_t &zr) const
TVector2 mORB
position of right/bottom point of module
Double_t mTheta
theta angle of perpendicular to SK module
ShishKebabTrd1Module & operator=(const ShishKebabTrd1Module &)
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
const TVector2 & GetCenterOfModuleFace() const
TVector2 mORT
position of right/top point of module
const TVector2 & GetCenterOfModule() const
const TVector2 & GetCenterOfCellInLocalCoordinateofSM(Int_t ieta) const
void DefineAllStuff()
Define more things (add explanation)
const GLdouble * v
Definition glcorearb.h:832
GLboolean GLboolean g
Definition glcorearb.h:1233
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"