BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
MyMdcGeomSvc Class Reference

#include <MyMdcGeomSvc.hh>

Public Member Functions

 MyMdcGeomSvc ()
 
 ~MyMdcGeomSvc ()
 
void ReadFilePar ()
 
int TotalElecLayerNo ()
 
int Layerr (int n)
 
int ElecNo (int n)
 
double X (int n)
 
double Y (int n)
 
double Z (int n)
 
double R (int n)
 
double BoxInStep (int n)
 
double BoxEndcape (int n)
 
double FixRing (int n)
 
double InnerRCableFrame (int n)
 
double OuterRCableFrame (int n)
 
double LengthCableFrame (int n)
 
double ZCableFrame (int n)
 
double ThinPlate (int n)
 
double XCenThinPlate (int n)
 
double YCenThinPlate (int n)
 
double ZCenThinPlate (int n)
 
double RotateXAngle (int n)
 
double LengthCableTub (int n)
 
 MyMdcGeomSvc ()
 
 ~MyMdcGeomSvc ()
 
void ReadFilePar ()
 
int TotalElecLayerNo ()
 
int Layerr (int n)
 
int ElecNo (int n)
 
double X (int n)
 
double Y (int n)
 
double Z (int n)
 
double R (int n)
 
double BoxInStep (int n)
 
double BoxEndcape (int n)
 
double FixRing (int n)
 
double InnerRCableFrame (int n)
 
double OuterRCableFrame (int n)
 
double LengthCableFrame (int n)
 
double ZCableFrame (int n)
 
double ThinPlate (int n)
 
double XCenThinPlate (int n)
 
double YCenThinPlate (int n)
 
double ZCenThinPlate (int n)
 
double RotateXAngle (int n)
 
double LengthCableTub (int n)
 

Detailed Description

Constructor & Destructor Documentation

◆ MyMdcGeomSvc() [1/2]

MyMdcGeomSvc::MyMdcGeomSvc ( )

Definition at line 10 of file MyMdcGeomSvc.cc.

10{ReadFilePar();}
void ReadFilePar()
Definition: MyMdcGeomSvc.cc:12

◆ ~MyMdcGeomSvc() [1/2]

MyMdcGeomSvc::~MyMdcGeomSvc ( )

Definition at line 11 of file MyMdcGeomSvc.cc.

11{}

◆ MyMdcGeomSvc() [2/2]

MyMdcGeomSvc::MyMdcGeomSvc ( )

◆ ~MyMdcGeomSvc() [2/2]

MyMdcGeomSvc::~MyMdcGeomSvc ( )

Member Function Documentation

◆ BoxEndcape() [1/2]

double MyMdcGeomSvc::BoxEndcape ( int  n)

Definition at line 119 of file MyMdcGeomSvc.cc.

120{
121 return fBoxEndcape[n];
122}
const Int_t n

Referenced by BesMdcConstruction::Construct().

◆ BoxEndcape() [2/2]

double MyMdcGeomSvc::BoxEndcape ( int  n)

◆ BoxInStep() [1/2]

double MyMdcGeomSvc::BoxInStep ( int  n)

Definition at line 115 of file MyMdcGeomSvc.cc.

116{
117 return fBoxInStep[n];
118}

◆ BoxInStep() [2/2]

double MyMdcGeomSvc::BoxInStep ( int  n)

◆ ElecNo() [1/2]

int MyMdcGeomSvc::ElecNo ( int  n)

Definition at line 95 of file MyMdcGeomSvc.cc.

96{
97 return fElecNo[n];
98}

Referenced by BesMdcConstruction::Construct().

◆ ElecNo() [2/2]

int MyMdcGeomSvc::ElecNo ( int  n)

◆ FixRing() [1/2]

double MyMdcGeomSvc::FixRing ( int  n)

Definition at line 167 of file MyMdcGeomSvc.cc.

168{
169 return fFixRing[n];
170}

Referenced by BesMdcConstruction::Construct().

◆ FixRing() [2/2]

double MyMdcGeomSvc::FixRing ( int  n)

◆ InnerRCableFrame() [1/2]

double MyMdcGeomSvc::InnerRCableFrame ( int  n)

Definition at line 127 of file MyMdcGeomSvc.cc.

128{
129 return fInnerRCableFrame[n];
130}

◆ InnerRCableFrame() [2/2]

double MyMdcGeomSvc::InnerRCableFrame ( int  n)

◆ Layerr() [1/2]

int MyMdcGeomSvc::Layerr ( int  n)

Definition at line 91 of file MyMdcGeomSvc.cc.

92{
93 return fLayerr[n];
94}

◆ Layerr() [2/2]

int MyMdcGeomSvc::Layerr ( int  n)

◆ LengthCableFrame() [1/2]

double MyMdcGeomSvc::LengthCableFrame ( int  n)

Definition at line 135 of file MyMdcGeomSvc.cc.

136{
137 return fLengthCableFrame[n];
138
139}

◆ LengthCableFrame() [2/2]

double MyMdcGeomSvc::LengthCableFrame ( int  n)

◆ LengthCableTub() [1/2]

double MyMdcGeomSvc::LengthCableTub ( int  n)

Definition at line 123 of file MyMdcGeomSvc.cc.

124{
125 return fLengthCableTub[n];
126}

Referenced by BesMdcConstruction::Construct().

◆ LengthCableTub() [2/2]

double MyMdcGeomSvc::LengthCableTub ( int  n)

◆ OuterRCableFrame() [1/2]

double MyMdcGeomSvc::OuterRCableFrame ( int  n)

Definition at line 131 of file MyMdcGeomSvc.cc.

132{
133 return fOuterRCableFrame[n];
134}

◆ OuterRCableFrame() [2/2]

double MyMdcGeomSvc::OuterRCableFrame ( int  n)

◆ R() [1/2]

double MyMdcGeomSvc::R ( int  n)

Definition at line 111 of file MyMdcGeomSvc.cc.

112{
113 return fR[n];
114}

Referenced by BesMdcConstruction::Construct().

◆ R() [2/2]

double MyMdcGeomSvc::R ( int  n)

◆ ReadFilePar() [1/2]

void MyMdcGeomSvc::ReadFilePar ( )

Definition at line 12 of file MyMdcGeomSvc.cc.

13{
14 std::string geometryFilePath1 = getenv("MDCSIMROOT");
15 geometryFilePath1 +="/dat/MdcElectronics.txt";
16
17 std::ifstream in;
18 in.open(geometryFilePath1.c_str());
19 assert(in);
20 const int maxCharOneLine=255;
21 char temp[maxCharOneLine];
22 int i=0;
23 while(in.peek()!=EOF)
24 {
25 in.getline(temp,maxCharOneLine);
26 i++;
27 if (temp[0]=='#')
28 continue;
29 // i is the row number of MdcElectronics.dat
30 if(i==2) {istringstream(temp)>>fTotalElecLayerNo;
31 continue;
32 }
33 if(i>=4&&i<=26)
34 {
35 istringstream(temp)>>fLayerr[i-4]>>fElecNo[i-4];
36 continue;
37 }
38 if(i>28&&i<=51)
39 {
40 istringstream(temp)>>fX[i-29]>>fY[i-29]>>fZ[i-29]>>fR[i-29];
41 continue;
42 }
43 if(i==55)
44 {
45 istringstream(temp)>>fBoxInStep[0]>>fBoxInStep[1]>>fBoxInStep[2];
46 continue;
47 }
48 if(i==59)
49 {
50 istringstream(temp)>>fBoxEndcape[0]>>fBoxEndcape[1]>>fBoxEndcape[2];
51 continue;
52 }
53 if(i==63){istringstream(temp)>>fFixRing[0]>>fFixRing[1]>>fFixRing[2];}
54 if(i>=76&&i<87)
55 {
56 istringstream(temp)>>fInnerRCableFrame[i-76]>>fOuterRCableFrame[i-76]>>fLengthCableFrame[i-76]>>fZCableFrame[i-76];
57 continue;
58 }
59 if(i==90)
60 {
61 istringstream(temp)>>fThinPlate[0]>>fThinPlate[1]>>fThinPlate[2];
62 continue;
63 }
64
65 if(i>=93&&i<105)
66 {
67 istringstream(temp)>>fXCenThinPlate[i-93]>>fYCenThinPlate[i-93]>> fZCenThinPlate[i-93]>>fRotateXAngle[i-93];
68 continue;
69 }
70
71
72 if(i==107)
73 {
74 istringstream(temp)>>fLengthCableTub[0]>>fLengthCableTub[1]>>fLengthCableTub[2]>>fLengthCableTub[3]>>fLengthCableTub[4]>>fLengthCableTub[5]>>fLengthCableTub[6]>>fLengthCableTub[7]>>fLengthCableTub[8]>>fLengthCableTub[9]>>fLengthCableTub[10]>>fLengthCableTub[11]>>fLengthCableTub[12];
75 continue;
76 }
77 if (i==109)
78 {
79 istringstream(temp)>>fLengthCableTub[13]>>fLengthCableTub[14]>>fLengthCableTub[15]>>fLengthCableTub[16]>>fLengthCableTub[17]>>fLengthCableTub[18]>>fLengthCableTub[19]>>fLengthCableTub[20]>>fLengthCableTub[21]>>fLengthCableTub[22]>>fLengthCableTub[23]>>fLengthCableTub[24];
80 continue;
81 }
82
83 }
84}

Referenced by MyMdcGeomSvc().

◆ ReadFilePar() [2/2]

void MyMdcGeomSvc::ReadFilePar ( )

◆ RotateXAngle() [1/2]

double MyMdcGeomSvc::RotateXAngle ( int  n)

Definition at line 162 of file MyMdcGeomSvc.cc.

163{
164 return fRotateXAngle[n];
165}

◆ RotateXAngle() [2/2]

double MyMdcGeomSvc::RotateXAngle ( int  n)

◆ ThinPlate() [1/2]

double MyMdcGeomSvc::ThinPlate ( int  n)

Definition at line 146 of file MyMdcGeomSvc.cc.

147{
148 return fThinPlate[n];
149}

◆ ThinPlate() [2/2]

double MyMdcGeomSvc::ThinPlate ( int  n)

◆ TotalElecLayerNo() [1/2]

int MyMdcGeomSvc::TotalElecLayerNo ( )

Definition at line 87 of file MyMdcGeomSvc.cc.

88{
89 return fTotalElecLayerNo;
90}

Referenced by BesMdcConstruction::Construct().

◆ TotalElecLayerNo() [2/2]

int MyMdcGeomSvc::TotalElecLayerNo ( )

◆ X() [1/2]

double MyMdcGeomSvc::X ( int  n)

Definition at line 99 of file MyMdcGeomSvc.cc.

100{
101 return fX[n];
102}

Referenced by BesMdcConstruction::Construct().

◆ X() [2/2]

double MyMdcGeomSvc::X ( int  n)

◆ XCenThinPlate() [1/2]

double MyMdcGeomSvc::XCenThinPlate ( int  n)

Definition at line 150 of file MyMdcGeomSvc.cc.

151{
152 return fXCenThinPlate[n];
153}

◆ XCenThinPlate() [2/2]

double MyMdcGeomSvc::XCenThinPlate ( int  n)

◆ Y() [1/2]

double MyMdcGeomSvc::Y ( int  n)

Definition at line 103 of file MyMdcGeomSvc.cc.

104{
105 return fY[n];
106}

◆ Y() [2/2]

double MyMdcGeomSvc::Y ( int  n)

◆ YCenThinPlate() [1/2]

double MyMdcGeomSvc::YCenThinPlate ( int  n)

Definition at line 154 of file MyMdcGeomSvc.cc.

155{
156 return fYCenThinPlate[n];
157}

◆ YCenThinPlate() [2/2]

double MyMdcGeomSvc::YCenThinPlate ( int  n)

◆ Z() [1/2]

double MyMdcGeomSvc::Z ( int  n)

Definition at line 107 of file MyMdcGeomSvc.cc.

108{
109 return fZ[n];
110}

Referenced by BesMdcConstruction::Construct().

◆ Z() [2/2]

double MyMdcGeomSvc::Z ( int  n)

◆ ZCableFrame() [1/2]

double MyMdcGeomSvc::ZCableFrame ( int  n)

Definition at line 140 of file MyMdcGeomSvc.cc.

141{
142 return fZCableFrame[n];
143
144}

◆ ZCableFrame() [2/2]

double MyMdcGeomSvc::ZCableFrame ( int  n)

◆ ZCenThinPlate() [1/2]

double MyMdcGeomSvc::ZCenThinPlate ( int  n)

Definition at line 158 of file MyMdcGeomSvc.cc.

159{
160 return fZCenThinPlate[n];
161}

◆ ZCenThinPlate() [2/2]

double MyMdcGeomSvc::ZCenThinPlate ( int  n)

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