CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemMidDriftPlane.cxx
Go to the documentation of this file.
1#include "CgemGeomSvc/CgemMidDriftPlane.h"
2
3#include "GaudiKernel/MsgStream.h"
4#include "GaudiKernel/IMessageSvc.h"
5#include "GaudiKernel/StatusCode.h"
6#include "GaudiKernel/ISvcLocator.h"
7#include "GaudiKernel/Bootstrap.h"
8#include "GaudiKernel/SmartDataPtr.h"
9#include "GaudiKernel/IDataProviderSvc.h"
10#include "GaudiKernel/PropertyMgr.h"
11
12#include <iostream>
13#include <fstream>
14#include <iomanip>
15
16using namespace std;
17
19}
20
22}
23
25 HepPoint3D& posUp, HepPoint3D& posDown,
26 double phiVUp[], double phiVDown[]){
27
28 posDown = pLine.xAtR(m_rad[layer], 1);
29 xyzToPhiVIdealGeom(layer, posDown, phiVDown);
30
31 posUp = pLine.xAtR(m_rad[layer], -1);
32 xyzToPhiVIdealGeom(layer, posUp, phiVUp);
33
34 return true;
35}
36
38 HepPoint3D& posUp, HepPoint3D& posDown,
39 double phiVUp[], double phiVDown[]){
40 return getPointIdealGeom(layer, *pLine, posUp, posDown, phiVUp, phiVDown);
41}
42
44 HepPoint3D& posUp, HepPoint3D& posDown,
45 double phiVUp[], double phiVDown[]){
46 double trk[4];
47 trk[0] = pLine.dr();
48 trk[1] = pLine.phi0();
49 trk[2] = pLine.dz();
50 trk[3] = pLine.tanl();
51
52 double trkCnv[4];
53 StraightLine lineCnv = m_align->StraightLineConversion(layer, pLine);
54
55 HepPoint3D posDownLocal = lineCnv.xAtR(m_rad[layer], 1);
56 xyzToPhiVIdealGeom(layer, posDownLocal, phiVDown);
57 posDown = m_align->point_invTransform(layer, posDownLocal);
58
59 HepPoint3D posUpLocal = lineCnv.xAtR(m_rad[layer], -1);
60 xyzToPhiVIdealGeom(layer, posUpLocal, phiVUp);
61 posUp = m_align->point_invTransform(layer, posUpLocal);
62
63 return true;
64}
65
67 HepPoint3D& posUp, HepPoint3D& posDown,
68 double phiVUp[], double phiVDown[]){
69 return getPointAligned(layer, *pLine, posUp, posDown, phiVUp, phiVDown);
70}
71
72bool CgemMidDriftPlane::xyzToPhiVIdealGeom(int layer, HepPoint3D pos, double phiV[]){
73 double phi=pos.phi();
74 double z =pos.z();
75 phiV[0]=phi;
76 phiV[1]=99999.;
77 int nSheet=2; if(layer==0) nSheet=1;
78 for(int iSheet=0; iSheet<nSheet; iSheet++)
79 {
80 if(m_readoutPlane[layer][iSheet]->OnThePlane(phi,z))
81 {
82 phiV[1]=m_readoutPlane[layer][iSheet]->getVFromPhiZ(phi,z);
83 break;
84 }
85 }
86
87 return true;
88}
StraightLine StraightLineConversion(int layer, StraightLine lineOriginal)
HepPoint3D point_invTransform(int layer, HepPoint3D pos)
bool getPointIdealGeom(int layer, StraightLine pLine, HepPoint3D &posUp, HepPoint3D &posDown, double phiVUp[], double phiVDown[])
bool getPointAligned(int layer, StraightLine pLine, HepPoint3D &posUp, HepPoint3D &posDown, double phiVUp[], double phiVDown[])
bool xyzToPhiVIdealGeom(int layer, HepPoint3D pos, double phiV[])
HepPoint3D xAtR(double R, int direction=1) const
double dr(void) const
returns an element of parameters.