BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcRecCrystal Class Reference

#include <EmcRecCrystal.h>

Public Member Functions

 EmcRecCrystal ()
 
 ~EmcRecCrystal ()
 
 EmcRecCrystal (const EmcRecCrystal &aCry)
 
EmcRecCrystaloperator= (const EmcRecCrystal &aCry)
 
int Type () const
 
int Type (int typ)
 
HepPoint3D Get (int index) const
 
HepPoint3D Center () const
 
HepPoint3D FrontCenter () const
 
void Set (int index, const HepPoint3D &aPoint)
 
void SetX (int index, double value)
 
void SetY (int index, double value)
 
void SetZ (int index, double value)
 
void BarrelCheckout () const
 
void EndCapCheckout () const
 
 EmcRecCrystal ()
 
 ~EmcRecCrystal ()
 
 EmcRecCrystal (const EmcRecCrystal &aCry)
 
EmcRecCrystaloperator= (const EmcRecCrystal &aCry)
 
int Type () const
 
int Type (int typ)
 
HepPoint3D Get (int index) const
 
HepPoint3D Center () const
 
HepPoint3D FrontCenter () const
 
void Set (int index, const HepPoint3D &aPoint)
 
void SetX (int index, double value)
 
void SetY (int index, double value)
 
void SetZ (int index, double value)
 
void BarrelCheckout () const
 
void EndCapCheckout () const
 

Static Public Member Functions

static int InvalidCrystal ()
 
static int SixPlane ()
 
static int SevenPlane ()
 
static int InvalidCrystal ()
 
static int SixPlane ()
 
static int SevenPlane ()
 

Detailed Description

Constructor & Destructor Documentation

◆ EmcRecCrystal() [1/4]

EmcRecCrystal::EmcRecCrystal ( )
inline

Definition at line 31 of file Emc/EmcRecGeoSvc/EmcRecGeoSvc-01-01-07/EmcRecGeoSvc/EmcRecCrystal.h.

31 {
32 fType=INVALID_CRYSTAL;
33 HepPoint3D O(0,0,0);
34 for(int i=0;i<10;i++){
35 fV[i]=O;
36 }
37 }

◆ ~EmcRecCrystal() [1/2]

EmcRecCrystal::~EmcRecCrystal ( )
inline

◆ EmcRecCrystal() [2/4]

EmcRecCrystal::EmcRecCrystal ( const EmcRecCrystal aCry)
inline

Definition at line 42 of file Emc/EmcRecGeoSvc/EmcRecGeoSvc-01-01-07/EmcRecGeoSvc/EmcRecCrystal.h.

42 {
43 fType=aCry.Type();
44 for(int i=0;i<10;i++){
45 fV[i]=aCry.Get(i);
46 }
47 }

◆ EmcRecCrystal() [3/4]

EmcRecCrystal::EmcRecCrystal ( )
inline

Definition at line 31 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

31 {
32 fType=INVALID_CRYSTAL;
33 HepPoint3D O(0,0,0);
34 for(int i=0;i<10;i++){
35 fV[i]=O;
36 }
37 }

◆ ~EmcRecCrystal() [2/2]

EmcRecCrystal::~EmcRecCrystal ( )
inline

◆ EmcRecCrystal() [4/4]

EmcRecCrystal::EmcRecCrystal ( const EmcRecCrystal aCry)
inline

Definition at line 42 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

42 {
43 fType=aCry.Type();
44 for(int i=0;i<10;i++){
45 fV[i]=aCry.Get(i);
46 }
47 }

Member Function Documentation

◆ BarrelCheckout() [1/2]

void EmcRecCrystal::BarrelCheckout ( ) const
inline

Definition at line 129 of file Emc/EmcRecGeoSvc/EmcRecGeoSvc-01-01-07/EmcRecGeoSvc/EmcRecCrystal.h.

129 {
130 HepPoint3D t1,t2;
131 cout<<"H="<<fV[4].distance(fV[7])<<endl;
132 cout<<"h="<<fV[0].distance(fV[3])<<endl;
133 t1=fV[3]-fV[7];
134 t2=fV[4]-fV[7];
135 cout<<"t="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
136 cout<<"B="<<fV[4].distance(fV[5])<<endl;
137 cout<<"b="<<fV[0].distance(fV[1])<<endl;
138 cout<<"A="<<fV[7].distance(fV[6])<<endl;
139 cout<<"a="<<fV[3].distance(fV[2])<<endl;
140 cout<<"L="<<fV[4].distance(fV[0])<<endl;
141 }

◆ BarrelCheckout() [2/2]

void EmcRecCrystal::BarrelCheckout ( ) const
inline

Definition at line 129 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

129 {
130 HepPoint3D t1,t2;
131 cout<<"H="<<fV[4].distance(fV[7])<<endl;
132 cout<<"h="<<fV[0].distance(fV[3])<<endl;
133 t1=fV[3]-fV[7];
134 t2=fV[4]-fV[7];
135 cout<<"t="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
136 cout<<"B="<<fV[4].distance(fV[5])<<endl;
137 cout<<"b="<<fV[0].distance(fV[1])<<endl;
138 cout<<"A="<<fV[7].distance(fV[6])<<endl;
139 cout<<"a="<<fV[3].distance(fV[2])<<endl;
140 cout<<"L="<<fV[4].distance(fV[0])<<endl;
141 }

◆ Center() [1/2]

HepPoint3D EmcRecCrystal::Center ( ) const
inline

Definition at line 88 of file Emc/EmcRecGeoSvc/EmcRecGeoSvc-01-01-07/EmcRecGeoSvc/EmcRecCrystal.h.

88 {
89 if(fType==SIX_PLANE) {
90 return (fV[0]+fV[1]+fV[2]+fV[3]+fV[4]+fV[5]+fV[6]+fV[7])/8;
91 }
92 if(fType==SEVEN_PLANE) {
93 return (fV[0]+fV[1]+fV[2]+fV[3]+fV[4]+fV[5]+fV[6]+fV[7]+fV[8]+fV[9])/10;
94 }
95 HepPoint3D O(0,0,0);
96 return O;
97 }

Referenced by EmcRecROOTGeo::GetCCenter().

◆ Center() [2/2]

HepPoint3D EmcRecCrystal::Center ( ) const
inline

Definition at line 88 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

88 {
89 if(fType==SIX_PLANE) {
90 return (fV[0]+fV[1]+fV[2]+fV[3]+fV[4]+fV[5]+fV[6]+fV[7])/8;
91 }
92 if(fType==SEVEN_PLANE) {
93 return (fV[0]+fV[1]+fV[2]+fV[3]+fV[4]+fV[5]+fV[6]+fV[7]+fV[8]+fV[9])/10;
94 }
95 HepPoint3D O(0,0,0);
96 return O;
97 }

◆ EndCapCheckout() [1/2]

void EmcRecCrystal::EndCapCheckout ( ) const
inline

Definition at line 143 of file Emc/EmcRecGeoSvc/EmcRecGeoSvc-01-01-07/EmcRecGeoSvc/EmcRecCrystal.h.

143 {
144 if(fType==SIX_PLANE) {
145 cout<<"A="<<fV[5].distance(fV[6])<<endl;
146 cout<<"a="<<fV[1].distance(fV[2])<<endl;
147 cout<<"B="<<fV[7].distance(fV[4])<<endl;
148 cout<<"b="<<fV[0].distance(fV[3])<<endl;
149 cout<<"C="<<fV[7].distance(fV[6])<<endl;
150 cout<<"c="<<fV[3].distance(fV[2])<<endl;
151 cout<<"D="<<fV[4].distance(fV[5])<<endl;
152 cout<<"d="<<fV[1].distance(fV[0])<<endl;
153 HepPoint3D t1,t2;
154 double t;
155 t1=fV[0]-fV[3];
156 t2=fV[2]-fV[3];
157 cout<<"alpha1="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
158 t1=fV[3]-fV[2];
159 t2=fV[1]-fV[2];
160 cout<<"alpha2="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
161 t1=fV[2]-fV[1];
162 t2=fV[0]-fV[1];
163 cout<<"alpha3="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
164 t1=fV[3]-fV[0];
165 t2=fV[1]-fV[0];
166 cout<<"alpha4="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
167 t1=fV[3]-fV[7];
168 t2=fV[4]-fV[7];
169 t=t1*t2/(t1.mag()*t2.mag());
170 t=sqrt(1-t*t);
171 cout<<"L="<<t1.mag()*t<<endl;
172 } else {
173 cout<<"A="<<fV[5].distance(fV[9])<<endl;
174 cout<<"a="<<fV[0].distance(fV[4])<<endl;
175 cout<<"B="<<fV[9].distance(fV[8])<<endl;
176 cout<<"b="<<fV[4].distance(fV[3])<<endl;
177 cout<<"C="<<fV[8].distance(fV[7])<<endl;
178 cout<<"c="<<fV[3].distance(fV[2])<<endl;
179 cout<<"D="<<fV[7].distance(fV[6])<<endl;
180 cout<<"d="<<fV[2].distance(fV[1])<<endl;
181 cout<<"E="<<fV[6].distance(fV[5])<<endl;
182 cout<<"e="<<fV[1].distance(fV[0])<<endl;
183 HepPoint3D t1,t2;
184 double t;
185 t1=fV[1]-fV[0];
186 t2=fV[4]-fV[0];
187 cout<<"alpha1="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
188 t1=fV[3]-fV[4];
189 t2=fV[0]-fV[4];
190 cout<<"alpha2="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
191 t1=fV[2]-fV[3];
192 t2=fV[4]-fV[3];
193 cout<<"alpha3="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
194 t1=fV[3]-fV[2];
195 t2=fV[1]-fV[2];
196 cout<<"alpha4="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
197 t1=fV[0]-fV[1];
198 t2=fV[2]-fV[1];
199 cout<<"alpha5="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
200 t1=fV[0]-fV[6];
201 t2=fV[5]-fV[6];
202 t=t1*t2/(t1.mag()*t2.mag());
203 t=sqrt(1-t*t);
204 cout<<"L="<<t1.mag()*t<<endl;
205 }
206 }
int t()
Definition: t.c:1

◆ EndCapCheckout() [2/2]

void EmcRecCrystal::EndCapCheckout ( ) const
inline

Definition at line 143 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

143 {
144 if(fType==SIX_PLANE) {
145 cout<<"A="<<fV[5].distance(fV[6])<<endl;
146 cout<<"a="<<fV[1].distance(fV[2])<<endl;
147 cout<<"B="<<fV[7].distance(fV[4])<<endl;
148 cout<<"b="<<fV[0].distance(fV[3])<<endl;
149 cout<<"C="<<fV[7].distance(fV[6])<<endl;
150 cout<<"c="<<fV[3].distance(fV[2])<<endl;
151 cout<<"D="<<fV[4].distance(fV[5])<<endl;
152 cout<<"d="<<fV[1].distance(fV[0])<<endl;
153 HepPoint3D t1,t2;
154 double t;
155 t1=fV[0]-fV[3];
156 t2=fV[2]-fV[3];
157 cout<<"alpha1="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
158 t1=fV[3]-fV[2];
159 t2=fV[1]-fV[2];
160 cout<<"alpha2="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
161 t1=fV[2]-fV[1];
162 t2=fV[0]-fV[1];
163 cout<<"alpha3="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
164 t1=fV[3]-fV[0];
165 t2=fV[1]-fV[0];
166 cout<<"alpha4="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
167 t1=fV[3]-fV[7];
168 t2=fV[4]-fV[7];
169 t=t1*t2/(t1.mag()*t2.mag());
170 t=sqrt(1-t*t);
171 cout<<"L="<<t1.mag()*t<<endl;
172 } else {
173 cout<<"A="<<fV[5].distance(fV[9])<<endl;
174 cout<<"a="<<fV[0].distance(fV[4])<<endl;
175 cout<<"B="<<fV[9].distance(fV[8])<<endl;
176 cout<<"b="<<fV[4].distance(fV[3])<<endl;
177 cout<<"C="<<fV[8].distance(fV[7])<<endl;
178 cout<<"c="<<fV[3].distance(fV[2])<<endl;
179 cout<<"D="<<fV[7].distance(fV[6])<<endl;
180 cout<<"d="<<fV[2].distance(fV[1])<<endl;
181 cout<<"E="<<fV[6].distance(fV[5])<<endl;
182 cout<<"e="<<fV[1].distance(fV[0])<<endl;
183 HepPoint3D t1,t2;
184 double t;
185 t1=fV[1]-fV[0];
186 t2=fV[4]-fV[0];
187 cout<<"alpha1="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
188 t1=fV[3]-fV[4];
189 t2=fV[0]-fV[4];
190 cout<<"alpha2="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
191 t1=fV[2]-fV[3];
192 t2=fV[4]-fV[3];
193 cout<<"alpha3="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
194 t1=fV[3]-fV[2];
195 t2=fV[1]-fV[2];
196 cout<<"alpha4="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
197 t1=fV[0]-fV[1];
198 t2=fV[2]-fV[1];
199 cout<<"alpha5="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl;
200 t1=fV[0]-fV[6];
201 t2=fV[5]-fV[6];
202 t=t1*t2/(t1.mag()*t2.mag());
203 t=sqrt(1-t*t);
204 cout<<"L="<<t1.mag()*t<<endl;
205 }
206 }

◆ FrontCenter() [1/2]

HepPoint3D EmcRecCrystal::FrontCenter ( ) const
inline

Definition at line 100 of file Emc/EmcRecGeoSvc/EmcRecGeoSvc-01-01-07/EmcRecGeoSvc/EmcRecCrystal.h.

100 {
101 if(fType==SIX_PLANE) {
102 return (fV[0]+fV[1]+fV[2]+fV[3])/4;
103 }
104 if(fType==SEVEN_PLANE) {
105 return (fV[0]+fV[1]+fV[2]+fV[3]+fV[4])/5;
106 }
107 HepPoint3D O(0,0,0);
108 return O;
109 }

Referenced by EmcRecROOTGeo::GetCFrontCenter().

◆ FrontCenter() [2/2]

HepPoint3D EmcRecCrystal::FrontCenter ( ) const
inline

Definition at line 100 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

100 {
101 if(fType==SIX_PLANE) {
102 return (fV[0]+fV[1]+fV[2]+fV[3])/4;
103 }
104 if(fType==SEVEN_PLANE) {
105 return (fV[0]+fV[1]+fV[2]+fV[3]+fV[4])/5;
106 }
107 HepPoint3D O(0,0,0);
108 return O;
109 }

◆ Get() [1/2]

◆ Get() [2/2]

HepPoint3D EmcRecCrystal::Get ( int  index) const
inline

Definition at line 83 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

83 {
84 return fV[index];
85 }

◆ InvalidCrystal() [1/2]

static int EmcRecCrystal::InvalidCrystal ( )
inlinestatic

Definition at line 62 of file Emc/EmcRecGeoSvc/EmcRecGeoSvc-01-01-07/EmcRecGeoSvc/EmcRecCrystal.h.

63 { return INVALID_CRYSTAL; }

◆ InvalidCrystal() [2/2]

static int EmcRecCrystal::InvalidCrystal ( )
inlinestatic

Definition at line 62 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

63 { return INVALID_CRYSTAL; }

◆ operator=() [1/2]

EmcRecCrystal & EmcRecCrystal::operator= ( const EmcRecCrystal aCry)
inline

Definition at line 49 of file Emc/EmcRecGeoSvc/EmcRecGeoSvc-01-01-07/EmcRecGeoSvc/EmcRecCrystal.h.

49 {
50 if(this!=&aCry)
51 {
52 fType=aCry.Type();
53 for(int i=0;i<10;i++){
54 fV[i]=aCry.Get(i);
55 }
56 }
57 return *this;
58 }

◆ operator=() [2/2]

EmcRecCrystal & EmcRecCrystal::operator= ( const EmcRecCrystal aCry)
inline

Definition at line 49 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

49 {
50 if(this!=&aCry)
51 {
52 fType=aCry.Type();
53 for(int i=0;i<10;i++){
54 fV[i]=aCry.Get(i);
55 }
56 }
57 return *this;
58 }

◆ Set() [1/2]

void EmcRecCrystal::Set ( int  index,
const HepPoint3D aPoint 
)
inline

◆ Set() [2/2]

void EmcRecCrystal::Set ( int  index,
const HepPoint3D aPoint 
)
inline

Definition at line 112 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

112 {
113 fV[index]=aPoint;
114 }

◆ SetX() [1/2]

void EmcRecCrystal::SetX ( int  index,
double  value 
)
inline

Definition at line 116 of file Emc/EmcRecGeoSvc/EmcRecGeoSvc-01-01-07/EmcRecGeoSvc/EmcRecCrystal.h.

116 {
117 fV[index].setX(value);
118 }

Referenced by EmcRecEndCapGeo::GetCrystal().

◆ SetX() [2/2]

void EmcRecCrystal::SetX ( int  index,
double  value 
)
inline

Definition at line 116 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

116 {
117 fV[index].setX(value);
118 }

◆ SetY() [1/2]

void EmcRecCrystal::SetY ( int  index,
double  value 
)
inline

Definition at line 120 of file Emc/EmcRecGeoSvc/EmcRecGeoSvc-01-01-07/EmcRecGeoSvc/EmcRecCrystal.h.

120 {
121 fV[index].setY(value);
122 }

Referenced by EmcRecEndCapGeo::GetCrystal().

◆ SetY() [2/2]

void EmcRecCrystal::SetY ( int  index,
double  value 
)
inline

Definition at line 120 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

120 {
121 fV[index].setY(value);
122 }

◆ SetZ() [1/2]

void EmcRecCrystal::SetZ ( int  index,
double  value 
)
inline

Definition at line 124 of file Emc/EmcRecGeoSvc/EmcRecGeoSvc-01-01-07/EmcRecGeoSvc/EmcRecCrystal.h.

124 {
125 fV[index].setZ(value);
126 }

Referenced by EmcRecBarrelGeo::GetCrystal(), and EmcRecEndCapGeo::GetCrystal().

◆ SetZ() [2/2]

void EmcRecCrystal::SetZ ( int  index,
double  value 
)
inline

Definition at line 124 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

124 {
125 fV[index].setZ(value);
126 }

◆ SevenPlane() [1/2]

static int EmcRecCrystal::SevenPlane ( )
inlinestatic

Definition at line 68 of file Emc/EmcRecGeoSvc/EmcRecGeoSvc-01-01-07/EmcRecGeoSvc/EmcRecCrystal.h.

69 { return SEVEN_PLANE; }

Referenced by EmcRecROOTGeo::InitFromXML(), and operator<<().

◆ SevenPlane() [2/2]

static int EmcRecCrystal::SevenPlane ( )
inlinestatic

Definition at line 68 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

69 { return SEVEN_PLANE; }

◆ SixPlane() [1/2]

static int EmcRecCrystal::SixPlane ( )
inlinestatic

Definition at line 65 of file Emc/EmcRecGeoSvc/EmcRecGeoSvc-01-01-07/EmcRecGeoSvc/EmcRecCrystal.h.

66 { return SIX_PLANE; }

Referenced by EmcRecROOTGeo::InitFromXML(), and operator<<().

◆ SixPlane() [2/2]

static int EmcRecCrystal::SixPlane ( )
inlinestatic

Definition at line 65 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

66 { return SIX_PLANE; }

◆ Type() [1/4]

int EmcRecCrystal::Type ( ) const
inline

◆ Type() [2/4]

int EmcRecCrystal::Type ( ) const
inline

Definition at line 72 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

73 { return fType; }

◆ Type() [3/4]

int EmcRecCrystal::Type ( int  typ)
inline

Definition at line 75 of file Emc/EmcRecGeoSvc/EmcRecGeoSvc-01-01-07/EmcRecGeoSvc/EmcRecCrystal.h.

76 { fType=typ;
77 if( (fType!=SIX_PLANE) && (fType!=SEVEN_PLANE) )
78 { fType=INVALID_CRYSTAL; }
79 return fType;
80 }

◆ Type() [4/4]

int EmcRecCrystal::Type ( int  typ)
inline

Definition at line 75 of file InstallArea/include/EmcRecGeoSvc/EmcRecGeoSvc/EmcRecCrystal.h.

76 { fType=typ;
77 if( (fType!=SIX_PLANE) && (fType!=SEVEN_PLANE) )
78 { fType=INVALID_CRYSTAL; }
79 return fType;
80 }

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