CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemMidDriftPlane Class Reference

#include <CgemMidDriftPlane.h>

Public Member Functions

 CgemMidDriftPlane ()
 
 ~CgemMidDriftPlane ()
 
void setAlignment (CgemGeoAlign *alignPtr)
 
void setReadoutPlane (int layer, int sheet, CgemGeoReadoutPlane *readoutPtr)
 
void setR (int layer, double r)
 
double getR (int layer)
 
bool getPointIdealGeom (int layer_vir, StraightLine pLine, HepPoint3D &posUp, HepPoint3D &posDown, double phiVUp[], double phiVDown[])
 
bool getPointIdealGeom (int layer_vir, StraightLine *pLine, HepPoint3D &posUp, HepPoint3D &posDown, double phiVUp[], double phiVDown[])
 
bool getPointIdealGeom (int layer_geo, int sheet, StraightLine pLine, HepPoint3D &posUp, HepPoint3D &posDown, double phiVUp[], double phiVDown[])
 
bool getPointIdealGeom (int layer_geo, int sheet, StraightLine *pLine, HepPoint3D &posUp, HepPoint3D &posDown, double phiVUp[], double phiVDown[])
 
bool getPointIdealGeom (int layer_vir, StraightLine pLine, HepPoint3D &pos, double phiV[])
 
bool getPointIdealGeom (int layer_vir, StraightLine *pLine, HepPoint3D &pos, double phiV[])
 
bool getPointIdealGeom (int layer_geo, int sheet, StraightLine pLine, HepPoint3D &pos, double phiV[])
 
bool getPointIdealGeom (int layer_geo, int sheet, StraightLine *pLine, HepPoint3D &pos, double phiV[])
 
bool getPointAligned (int layer_vir, StraightLine pLine, HepPoint3D &posUp, HepPoint3D &posDown, double phiVUp[], double phiVDown[])
 
bool getPointAligned (int layer_vir, StraightLine *pLine, HepPoint3D &posUp, HepPoint3D &posDown, double phiVUp[], double phiVDown[])
 
bool getPointAligned (int layer_geo, int sheet, StraightLine pLine, HepPoint3D &posUp, HepPoint3D &posDown, double phiVUp[], double phiVDown[])
 
bool getPointAligned (int layer_geo, int sheet, StraightLine *pLine, HepPoint3D &posUp, HepPoint3D &posDown, double phiVUp[], double phiVDown[])
 
bool getPointAligned (int layer_vir, StraightLine pLine, HepPoint3D &pos, double phiV[])
 
bool getPointAligned (int layer_vir, StraightLine *pLine, HepPoint3D &pos, double phiV[])
 
bool getPointAligned (int layer_geo, int sheet, StraightLine pLine, HepPoint3D &pos, double phiV[])
 
bool getPointAligned (int layer_geo, int sheet, StraightLine *pLine, HepPoint3D &pos, double phiV[])
 
bool xyzToPhiVIdealGeom (int layer_geo, HepPoint3D pos, double phiV[])
 

Detailed Description

Definition at line 8 of file CgemMidDriftPlane.h.

Constructor & Destructor Documentation

◆ CgemMidDriftPlane()

CgemMidDriftPlane::CgemMidDriftPlane ( )

Definition at line 18 of file CgemMidDriftPlane.cxx.

18 {
19}

◆ ~CgemMidDriftPlane()

CgemMidDriftPlane::~CgemMidDriftPlane ( )

Definition at line 21 of file CgemMidDriftPlane.cxx.

21 {
22}

Member Function Documentation

◆ getPointAligned() [1/8]

bool CgemMidDriftPlane::getPointAligned ( int  layer_geo,
int  sheet,
StraightLine pLine,
HepPoint3D pos,
double  phiV[] 
)

Definition at line 362 of file CgemMidDriftPlane.cxx.

364 {
365 return getPointAligned(layer_geo, sheet, *pLine, pos, phiV);
366}
bool getPointAligned(int layer_vir, StraightLine pLine, HepPoint3D &posUp, HepPoint3D &posDown, double phiVUp[], double phiVDown[])

◆ getPointAligned() [2/8]

bool CgemMidDriftPlane::getPointAligned ( int  layer_geo,
int  sheet,
StraightLine pLine,
HepPoint3D posUp,
HepPoint3D posDown,
double  phiVUp[],
double  phiVDown[] 
)

Definition at line 268 of file CgemMidDriftPlane.cxx.

270 {
271 return getPointAligned(layer_geo, sheet, *pLine, posUp, posDown, phiVUp, phiVDown);
272}

◆ getPointAligned() [3/8]

bool CgemMidDriftPlane::getPointAligned ( int  layer_geo,
int  sheet,
StraightLine  pLine,
HepPoint3D pos,
double  phiV[] 
)

Definition at line 326 of file CgemMidDriftPlane.cxx.

328 {
329 //int layer_geo = int(layer_vir/2);
330 int layer_vir = layer_geo*2+sheet;
331
332 ToyRay Aray(pLine.dr(),pLine.phi0(),pLine.dz(),pLine.tanl());
333
334 Hep3Vector Gpos;
335 bool findInter = m_align->getinter(Aray, layer_vir, Gpos);
336
337 if(!findInter)
338 {
339 pos.setX(99999.);
340 pos.setY(99999.);
341 pos.setZ(99999.);
342
343 phiV[0]=99999.;
344 phiV[1]=99999.;
345 return false;
346 }
347 else
348 {
349 pos.setX(Gpos.x());
350 pos.setY(Gpos.y());
351 pos.setZ(Gpos.z());
352
353 HepPoint3D Lpos;
354 m_align->GetLocPos(layer_vir, Gpos, Lpos);
355
356 xyzToPhiVIdealGeom(layer_geo, Lpos, phiV);
357
358 return true;
359 }
360}
void GetLocPos(int layer_vir, Hep3Vector GposUp, Hep3Vector GposDown, HepPoint3D &LposUp, HepPoint3D &LposDown)
bool getinter(ToyRay ARay, int layer_vir, Hep3Vector &posUp, Hep3Vector &posDown)
bool xyzToPhiVIdealGeom(int layer_geo, HepPoint3D pos, double phiV[])
double dz(void) const
Definition: StraightLine.h:48
double dr(void) const
returns an element of parameters.
Definition: StraightLine.h:45
double tanl(void) const
Definition: StraightLine.h:49
double phi0(void) const
Definition: StraightLine.h:46

◆ getPointAligned() [4/8]

bool CgemMidDriftPlane::getPointAligned ( int  layer_geo,
int  sheet,
StraightLine  pLine,
HepPoint3D posUp,
HepPoint3D posDown,
double  phiVUp[],
double  phiVDown[] 
)

Definition at line 221 of file CgemMidDriftPlane.cxx.

223 {
224 //int layer_geo = int(layer_vir/2);
225 int layer_vir = layer_geo*2+sheet;
226
227 ToyRay Aray(pLine.dr(),pLine.phi0(),pLine.dz(),pLine.tanl());
228
229 Hep3Vector GposUp, GposDown;
230 bool findInter = m_align->getinter(Aray, layer_vir, GposUp, GposDown);
231
232 if(!findInter)
233 {
234 posUp.setX(99999.);
235 posUp.setY(99999.);
236 posUp.setZ(99999.);
237
238 posDown.setX(99999.);
239 posDown.setY(99999.);
240 posDown.setZ(99999.);
241
242 phiVUp[0]=99999.;
243 phiVUp[1]=99999.;
244 phiVDown[0]=99999.;
245 phiVDown[1]=99999.;
246 return false;
247 }
248 else
249 {
250 posUp.setX(GposUp.x());
251 posUp.setY(GposUp.y());
252 posUp.setZ(GposUp.z());
253
254 posDown.setX(GposDown.x());
255 posDown.setY(GposDown.y());
256 posDown.setZ(GposDown.z());
257
258 HepPoint3D LposUp, LposDown;
259 m_align->GetLocPos(layer_vir, GposUp, GposDown, LposUp, LposDown);
260
261 xyzToPhiVIdealGeom(layer_geo, LposUp, phiVUp);
262 xyzToPhiVIdealGeom(layer_geo, LposDown, phiVDown);
263
264 return true;
265 }
266}

◆ getPointAligned() [5/8]

bool CgemMidDriftPlane::getPointAligned ( int  layer_vir,
StraightLine pLine,
HepPoint3D pos,
double  phiV[] 
)

Definition at line 318 of file CgemMidDriftPlane.cxx.

320 {
321 return getPointAligned(layer_vir, *pLine, pos, phiV);
322}

◆ getPointAligned() [6/8]

bool CgemMidDriftPlane::getPointAligned ( int  layer_vir,
StraightLine pLine,
HepPoint3D posUp,
HepPoint3D posDown,
double  phiVUp[],
double  phiVDown[] 
)

Definition at line 213 of file CgemMidDriftPlane.cxx.

215 {
216 return getPointAligned(layer_vir, *pLine, posUp, posDown, phiVUp, phiVDown);
217}

◆ getPointAligned() [7/8]

bool CgemMidDriftPlane::getPointAligned ( int  layer_vir,
StraightLine  pLine,
HepPoint3D pos,
double  phiV[] 
)

Definition at line 281 of file CgemMidDriftPlane.cxx.

283 {
284
285
286 //cout<<"Make sure the layer here is the VIRTUAL layer !!!"<<endl;
287 int layer_geo = int(layer_vir/2);
288
289 ToyRay Aray(pLine.dr(),pLine.phi0(),pLine.dz(),pLine.tanl());
290
291 Hep3Vector Gpos;
292 bool findInter = m_align->getinter(Aray, layer_vir, Gpos);
293
294 if(!findInter)
295 {
296 pos.setX(99999.);
297 pos.setY(99999.);
298 pos.setZ(99999.);
299
300 phiV[0]=99999.;
301 phiV[1]=99999.;
302 return false;
303 }
304 else
305 {
306 pos.setX(Gpos.x());
307 pos.setY(Gpos.y());
308 pos.setZ(Gpos.z());
309
310 HepPoint3D Lpos;
311 m_align->GetLocPos(layer_vir, Gpos, Lpos);
312 xyzToPhiVIdealGeom(layer_geo, Lpos, phiV);
313
314 return true;
315 }
316}

◆ getPointAligned() [8/8]

bool CgemMidDriftPlane::getPointAligned ( int  layer_vir,
StraightLine  pLine,
HepPoint3D posUp,
HepPoint3D posDown,
double  phiVUp[],
double  phiVDown[] 
)

Definition at line 164 of file CgemMidDriftPlane.cxx.

166 {
167
168
169 //cout<<"Make sure the layer here is the VIRTUAL layer !!!"<<endl;
170 int layer_geo = int(layer_vir/2);
171
172 ToyRay Aray(pLine.dr(),pLine.phi0(),pLine.dz(),pLine.tanl());
173
174 Hep3Vector GposUp, GposDown;
175 bool findInter = m_align->getinter(Aray, layer_vir, GposUp, GposDown);
176
177 if(!findInter)
178 {
179 posUp.setX(99999.);
180 posUp.setY(99999.);
181 posUp.setZ(99999.);
182
183 posDown.setX(99999.);
184 posDown.setY(99999.);
185 posDown.setZ(99999.);
186
187 phiVUp[0]=99999.;
188 phiVUp[1]=99999.;
189 phiVDown[0]=99999.;
190 phiVDown[1]=99999.;
191 return false;
192 }
193 else
194 {
195 posUp.setX(GposUp.x());
196 posUp.setY(GposUp.y());
197 posUp.setZ(GposUp.z());
198
199 posDown.setX(GposDown.x());
200 posDown.setY(GposDown.y());
201 posDown.setZ(GposDown.z());
202
203 HepPoint3D LposUp, LposDown;
204 m_align->GetLocPos(layer_vir, GposUp, GposDown, LposUp, LposDown);
205
206 xyzToPhiVIdealGeom(layer_geo, LposUp, phiVUp);
207 xyzToPhiVIdealGeom(layer_geo, LposDown, phiVDown);
208
209 return true;
210 }
211}

Referenced by CgemLineFit::dV(), CgemLineFit::dx(), CgemMilleAlign::fillHist(), CgemLineFit::Get_Clusters(), CgemLineFit::GetIntersection(), getPointAligned(), CgemLineFit::Layer_cross(), CgemLineFit::Min_dis(), CgemLineFit::Min_dis_down(), and CgemLineFit::Min_dis_up().

◆ getPointIdealGeom() [1/8]

bool CgemMidDriftPlane::getPointIdealGeom ( int  layer_geo,
int  sheet,
StraightLine pLine,
HepPoint3D pos,
double  phiV[] 
)

Definition at line 117 of file CgemMidDriftPlane.cxx.

119 {
120 return getPointIdealGeom(layer_geo, sheet, *pLine, pos, phiV);
121}
bool getPointIdealGeom(int layer_vir, StraightLine pLine, HepPoint3D &posUp, HepPoint3D &posDown, double phiVUp[], double phiVDown[])

◆ getPointIdealGeom() [2/8]

bool CgemMidDriftPlane::getPointIdealGeom ( int  layer_geo,
int  sheet,
StraightLine pLine,
HepPoint3D posUp,
HepPoint3D posDown,
double  phiVUp[],
double  phiVDown[] 
)

Definition at line 60 of file CgemMidDriftPlane.cxx.

62 {
63 return getPointIdealGeom(layer_geo, sheet, *pLine, posUp, posDown, phiVUp, phiVDown);
64}

◆ getPointIdealGeom() [3/8]

bool CgemMidDriftPlane::getPointIdealGeom ( int  layer_geo,
int  sheet,
StraightLine  pLine,
HepPoint3D pos,
double  phiV[] 
)

Definition at line 101 of file CgemMidDriftPlane.cxx.

103 {
104 if(sheet%2==0)
105 {
106 pos = pLine.xAtR(m_rad[layer_geo], 1);
107 xyzToPhiVIdealGeom(layer_geo, pos, phiV);
108 }
109 else{
110 pos = pLine.xAtR(m_rad[layer_geo], -1);
111 xyzToPhiVIdealGeom(layer_geo, pos, phiV);
112 }
113 return true;
114}
HepPoint3D xAtR(double R, int direction=1) const

◆ getPointIdealGeom() [4/8]

bool CgemMidDriftPlane::getPointIdealGeom ( int  layer_geo,
int  sheet,
StraightLine  pLine,
HepPoint3D posUp,
HepPoint3D posDown,
double  phiVUp[],
double  phiVDown[] 
)

Definition at line 47 of file CgemMidDriftPlane.cxx.

49 {
50
51 posDown = pLine.xAtR(m_rad[layer_geo], 1);
52 xyzToPhiVIdealGeom(layer_geo, posDown, phiVDown);
53
54 posUp = pLine.xAtR(m_rad[layer_geo], -1);
55 xyzToPhiVIdealGeom(layer_geo, posUp, phiVUp);
56
57 return true;
58}

◆ getPointIdealGeom() [5/8]

bool CgemMidDriftPlane::getPointIdealGeom ( int  layer_vir,
StraightLine pLine,
HepPoint3D pos,
double  phiV[] 
)

Definition at line 94 of file CgemMidDriftPlane.cxx.

96 {
97 return getPointIdealGeom(layer_vir, *pLine, pos, phiV);
98}

◆ getPointIdealGeom() [6/8]

bool CgemMidDriftPlane::getPointIdealGeom ( int  layer_vir,
StraightLine pLine,
HepPoint3D posUp,
HepPoint3D posDown,
double  phiVUp[],
double  phiVDown[] 
)

Definition at line 40 of file CgemMidDriftPlane.cxx.

42 {
43 return getPointIdealGeom(layer_vir, *pLine, posUp, posDown, phiVUp, phiVDown);
44}

◆ getPointIdealGeom() [7/8]

bool CgemMidDriftPlane::getPointIdealGeom ( int  layer_vir,
StraightLine  pLine,
HepPoint3D pos,
double  phiV[] 
)

Definition at line 71 of file CgemMidDriftPlane.cxx.

73 {
74
75 //cout<<"Make sure the layer here is the VIRTUAL layer !!!"<<endl;
76 int layer_geo = int(layer_vir/2);
77
78 if(layer_vir%2==0)
79 {
80 pos = pLine.xAtR(m_rad[layer_geo], 1);
81 xyzToPhiVIdealGeom(layer_geo, pos, phiV);
82 }
83 else
84 {
85 pos = pLine.xAtR(m_rad[layer_geo], -1);
86 xyzToPhiVIdealGeom(layer_geo, pos, phiV);
87 }
88
89 return true;
90}

◆ getPointIdealGeom() [8/8]

bool CgemMidDriftPlane::getPointIdealGeom ( int  layer_vir,
StraightLine  pLine,
HepPoint3D posUp,
HepPoint3D posDown,
double  phiVUp[],
double  phiVDown[] 
)

Definition at line 24 of file CgemMidDriftPlane.cxx.

26 {
27
28
29 //cout<<"Make sure the layer here is the VIRTUAL layer !!!"<<endl;
30 int layer_geo = int(layer_vir/2);
31 posDown = pLine.xAtR(m_rad[layer_geo], 1);
32 xyzToPhiVIdealGeom(layer_geo, posDown, phiVDown);
33
34 posUp = pLine.xAtR(m_rad[layer_geo], -1);
35 xyzToPhiVIdealGeom(layer_geo, posUp, phiVUp);
36
37 return true;
38}

Referenced by CgemLineFit::dV(), CgemLineFit::dx(), CgemLineFit::Get_Clusters(), CgemLineFit::GetIntersection(), getPointIdealGeom(), CgemLineFit::Layer_cross(), CgemLineFit::Min_dis(), CgemLineFit::Min_dis_down(), and CgemLineFit::Min_dis_up().

◆ getR()

double CgemMidDriftPlane::getR ( int  layer)
inline

Definition at line 19 of file CgemMidDriftPlane.h.

19{return m_rad[layer];}

Referenced by CgemCosmicRayQA::initialize(), and CgemLineFit::initialize().

◆ setAlignment()

void CgemMidDriftPlane::setAlignment ( CgemGeoAlign alignPtr)
inline

Definition at line 14 of file CgemMidDriftPlane.h.

14{m_align = alignPtr;}

Referenced by CgemMilleAlign::fillHist(), and CgemGeomSvc::initialize().

◆ setR()

void CgemMidDriftPlane::setR ( int  layer,
double  r 
)
inline

Definition at line 18 of file CgemMidDriftPlane.h.

18{m_rad[layer] = r;}

Referenced by CgemGeomSvc::initialize().

◆ setReadoutPlane()

void CgemMidDriftPlane::setReadoutPlane ( int  layer,
int  sheet,
CgemGeoReadoutPlane readoutPtr 
)
inline

Definition at line 15 of file CgemMidDriftPlane.h.

16 {m_readoutPlane[layer][sheet]=readoutPtr;}

Referenced by CgemGeomSvc::initialize().

◆ xyzToPhiVIdealGeom()

bool CgemMidDriftPlane::xyzToPhiVIdealGeom ( int  layer_geo,
HepPoint3D  pos,
double  phiV[] 
)

Definition at line 431 of file CgemMidDriftPlane.cxx.

431 {
432 double phi=pos.phi();
433 double z =pos.z();
434 phiV[0]=phi;
435 phiV[1]=99999.;
436 int nSheet=2; if(layer_geo==0) nSheet=1;
437 for(int iSheet=0; iSheet<nSheet; iSheet++)
438 {
439 if(m_readoutPlane[layer_geo][iSheet]->OnThePlane(phi,z))
440 {
441 phiV[1]=m_readoutPlane[layer_geo][iSheet]->getVFromPhiZ(phi,z);
442 break;
443 }
444 }
445
446 return true;
447}
double getVFromPhiZ(double phi, double z, bool checkRange=true) const

Referenced by getPointAligned(), and getPointIdealGeom().


The documentation for this class was generated from the following files: