#include <EmcRecCrystal.h>
Public Member Functions | |
void | BarrelCheckout () const |
void | BarrelCheckout () const |
HepPoint3D | Center () const |
HepPoint3D | Center () const |
EmcRecCrystal (const EmcRecCrystal &aCry) | |
EmcRecCrystal () | |
EmcRecCrystal (const EmcRecCrystal &aCry) | |
EmcRecCrystal () | |
void | EndCapCheckout () const |
void | EndCapCheckout () const |
HepPoint3D | FrontCenter () const |
HepPoint3D | FrontCenter () const |
HepPoint3D | Get (int index) const |
HepPoint3D | Get (int index) const |
EmcRecCrystal & | operator= (const EmcRecCrystal &aCry) |
EmcRecCrystal & | operator= (const EmcRecCrystal &aCry) |
void | Set (int index, const HepPoint3D &aPoint) |
void | Set (int index, const HepPoint3D &aPoint) |
void | SetX (int index, double value) |
void | SetX (int index, double value) |
void | SetY (int index, double value) |
void | SetY (int index, double value) |
void | SetZ (int index, double value) |
void | SetZ (int index, double value) |
int | Type (int typ) |
int | Type () const |
int | Type (int typ) |
int | Type () const |
~EmcRecCrystal () | |
~EmcRecCrystal () | |
Static Public Member Functions | |
int | InvalidCrystal () |
int | InvalidCrystal () |
int | SevenPlane () |
int | SevenPlane () |
int | SixPlane () |
int | SixPlane () |
Private Attributes | |
int | fType |
HepPoint3D | fV [10] |
Static Private Attributes | |
const int | INVALID_CRYSTAL = -1 |
const int | SEVEN_PLANE = 1 |
const int | SIX_PLANE = 0 |
|
00031 { 00032 fType=INVALID_CRYSTAL; 00033 HepPoint3D O(0,0,0); 00034 for(int i=0;i<10;i++){ 00035 fV[i]=O; 00036 } 00037 }
|
|
00039 {}
|
|
00042 { 00043 fType=aCry.Type(); 00044 for(int i=0;i<10;i++){ 00045 fV[i]=aCry.Get(i); 00046 } 00047 }
|
|
00031 { 00032 fType=INVALID_CRYSTAL; 00033 HepPoint3D O(0,0,0); 00034 for(int i=0;i<10;i++){ 00035 fV[i]=O; 00036 } 00037 }
|
|
00039 {}
|
|
00042 { 00043 fType=aCry.Type(); 00044 for(int i=0;i<10;i++){ 00045 fV[i]=aCry.Get(i); 00046 } 00047 }
|
|
00129 { 00130 HepPoint3D t1,t2; 00131 cout<<"H="<<fV[4].distance(fV[7])<<endl; 00132 cout<<"h="<<fV[0].distance(fV[3])<<endl; 00133 t1=fV[3]-fV[7]; 00134 t2=fV[4]-fV[7]; 00135 cout<<"t="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00136 cout<<"B="<<fV[4].distance(fV[5])<<endl; 00137 cout<<"b="<<fV[0].distance(fV[1])<<endl; 00138 cout<<"A="<<fV[7].distance(fV[6])<<endl; 00139 cout<<"a="<<fV[3].distance(fV[2])<<endl; 00140 cout<<"L="<<fV[4].distance(fV[0])<<endl; 00141 }
|
|
00129 { 00130 HepPoint3D t1,t2; 00131 cout<<"H="<<fV[4].distance(fV[7])<<endl; 00132 cout<<"h="<<fV[0].distance(fV[3])<<endl; 00133 t1=fV[3]-fV[7]; 00134 t2=fV[4]-fV[7]; 00135 cout<<"t="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00136 cout<<"B="<<fV[4].distance(fV[5])<<endl; 00137 cout<<"b="<<fV[0].distance(fV[1])<<endl; 00138 cout<<"A="<<fV[7].distance(fV[6])<<endl; 00139 cout<<"a="<<fV[3].distance(fV[2])<<endl; 00140 cout<<"L="<<fV[4].distance(fV[0])<<endl; 00141 }
|
|
00088 { 00089 if(fType==SIX_PLANE) { 00090 return (fV[0]+fV[1]+fV[2]+fV[3]+fV[4]+fV[5]+fV[6]+fV[7])/8; 00091 } 00092 if(fType==SEVEN_PLANE) { 00093 return (fV[0]+fV[1]+fV[2]+fV[3]+fV[4]+fV[5]+fV[6]+fV[7]+fV[8]+fV[9])/10; 00094 } 00095 HepPoint3D O(0,0,0); 00096 return O; 00097 }
|
|
00088 { 00089 if(fType==SIX_PLANE) { 00090 return (fV[0]+fV[1]+fV[2]+fV[3]+fV[4]+fV[5]+fV[6]+fV[7])/8; 00091 } 00092 if(fType==SEVEN_PLANE) { 00093 return (fV[0]+fV[1]+fV[2]+fV[3]+fV[4]+fV[5]+fV[6]+fV[7]+fV[8]+fV[9])/10; 00094 } 00095 HepPoint3D O(0,0,0); 00096 return O; 00097 }
|
|
00143 { 00144 if(fType==SIX_PLANE) { 00145 cout<<"A="<<fV[5].distance(fV[6])<<endl; 00146 cout<<"a="<<fV[1].distance(fV[2])<<endl; 00147 cout<<"B="<<fV[7].distance(fV[4])<<endl; 00148 cout<<"b="<<fV[0].distance(fV[3])<<endl; 00149 cout<<"C="<<fV[7].distance(fV[6])<<endl; 00150 cout<<"c="<<fV[3].distance(fV[2])<<endl; 00151 cout<<"D="<<fV[4].distance(fV[5])<<endl; 00152 cout<<"d="<<fV[1].distance(fV[0])<<endl; 00153 HepPoint3D t1,t2; 00154 double t; 00155 t1=fV[0]-fV[3]; 00156 t2=fV[2]-fV[3]; 00157 cout<<"alpha1="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00158 t1=fV[3]-fV[2]; 00159 t2=fV[1]-fV[2]; 00160 cout<<"alpha2="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00161 t1=fV[2]-fV[1]; 00162 t2=fV[0]-fV[1]; 00163 cout<<"alpha3="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00164 t1=fV[3]-fV[0]; 00165 t2=fV[1]-fV[0]; 00166 cout<<"alpha4="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00167 t1=fV[3]-fV[7]; 00168 t2=fV[4]-fV[7]; 00169 t=t1*t2/(t1.mag()*t2.mag()); 00170 t=sqrt(1-t*t); 00171 cout<<"L="<<t1.mag()*t<<endl; 00172 } else { 00173 cout<<"A="<<fV[5].distance(fV[9])<<endl; 00174 cout<<"a="<<fV[0].distance(fV[4])<<endl; 00175 cout<<"B="<<fV[9].distance(fV[8])<<endl; 00176 cout<<"b="<<fV[4].distance(fV[3])<<endl; 00177 cout<<"C="<<fV[8].distance(fV[7])<<endl; 00178 cout<<"c="<<fV[3].distance(fV[2])<<endl; 00179 cout<<"D="<<fV[7].distance(fV[6])<<endl; 00180 cout<<"d="<<fV[2].distance(fV[1])<<endl; 00181 cout<<"E="<<fV[6].distance(fV[5])<<endl; 00182 cout<<"e="<<fV[1].distance(fV[0])<<endl; 00183 HepPoint3D t1,t2; 00184 double t; 00185 t1=fV[1]-fV[0]; 00186 t2=fV[4]-fV[0]; 00187 cout<<"alpha1="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00188 t1=fV[3]-fV[4]; 00189 t2=fV[0]-fV[4]; 00190 cout<<"alpha2="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00191 t1=fV[2]-fV[3]; 00192 t2=fV[4]-fV[3]; 00193 cout<<"alpha3="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00194 t1=fV[3]-fV[2]; 00195 t2=fV[1]-fV[2]; 00196 cout<<"alpha4="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00197 t1=fV[0]-fV[1]; 00198 t2=fV[2]-fV[1]; 00199 cout<<"alpha5="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00200 t1=fV[0]-fV[6]; 00201 t2=fV[5]-fV[6]; 00202 t=t1*t2/(t1.mag()*t2.mag()); 00203 t=sqrt(1-t*t); 00204 cout<<"L="<<t1.mag()*t<<endl; 00205 } 00206 }
|
|
00143 { 00144 if(fType==SIX_PLANE) { 00145 cout<<"A="<<fV[5].distance(fV[6])<<endl; 00146 cout<<"a="<<fV[1].distance(fV[2])<<endl; 00147 cout<<"B="<<fV[7].distance(fV[4])<<endl; 00148 cout<<"b="<<fV[0].distance(fV[3])<<endl; 00149 cout<<"C="<<fV[7].distance(fV[6])<<endl; 00150 cout<<"c="<<fV[3].distance(fV[2])<<endl; 00151 cout<<"D="<<fV[4].distance(fV[5])<<endl; 00152 cout<<"d="<<fV[1].distance(fV[0])<<endl; 00153 HepPoint3D t1,t2; 00154 double t; 00155 t1=fV[0]-fV[3]; 00156 t2=fV[2]-fV[3]; 00157 cout<<"alpha1="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00158 t1=fV[3]-fV[2]; 00159 t2=fV[1]-fV[2]; 00160 cout<<"alpha2="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00161 t1=fV[2]-fV[1]; 00162 t2=fV[0]-fV[1]; 00163 cout<<"alpha3="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00164 t1=fV[3]-fV[0]; 00165 t2=fV[1]-fV[0]; 00166 cout<<"alpha4="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00167 t1=fV[3]-fV[7]; 00168 t2=fV[4]-fV[7]; 00169 t=t1*t2/(t1.mag()*t2.mag()); 00170 t=sqrt(1-t*t); 00171 cout<<"L="<<t1.mag()*t<<endl; 00172 } else { 00173 cout<<"A="<<fV[5].distance(fV[9])<<endl; 00174 cout<<"a="<<fV[0].distance(fV[4])<<endl; 00175 cout<<"B="<<fV[9].distance(fV[8])<<endl; 00176 cout<<"b="<<fV[4].distance(fV[3])<<endl; 00177 cout<<"C="<<fV[8].distance(fV[7])<<endl; 00178 cout<<"c="<<fV[3].distance(fV[2])<<endl; 00179 cout<<"D="<<fV[7].distance(fV[6])<<endl; 00180 cout<<"d="<<fV[2].distance(fV[1])<<endl; 00181 cout<<"E="<<fV[6].distance(fV[5])<<endl; 00182 cout<<"e="<<fV[1].distance(fV[0])<<endl; 00183 HepPoint3D t1,t2; 00184 double t; 00185 t1=fV[1]-fV[0]; 00186 t2=fV[4]-fV[0]; 00187 cout<<"alpha1="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00188 t1=fV[3]-fV[4]; 00189 t2=fV[0]-fV[4]; 00190 cout<<"alpha2="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00191 t1=fV[2]-fV[3]; 00192 t2=fV[4]-fV[3]; 00193 cout<<"alpha3="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00194 t1=fV[3]-fV[2]; 00195 t2=fV[1]-fV[2]; 00196 cout<<"alpha4="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00197 t1=fV[0]-fV[1]; 00198 t2=fV[2]-fV[1]; 00199 cout<<"alpha5="<<acos(t1*t2/(t1.mag()*t2.mag()))*180/pi<<endl; 00200 t1=fV[0]-fV[6]; 00201 t2=fV[5]-fV[6]; 00202 t=t1*t2/(t1.mag()*t2.mag()); 00203 t=sqrt(1-t*t); 00204 cout<<"L="<<t1.mag()*t<<endl; 00205 } 00206 }
|
|
00100 { 00101 if(fType==SIX_PLANE) { 00102 return (fV[0]+fV[1]+fV[2]+fV[3])/4; 00103 } 00104 if(fType==SEVEN_PLANE) { 00105 return (fV[0]+fV[1]+fV[2]+fV[3]+fV[4])/5; 00106 } 00107 HepPoint3D O(0,0,0); 00108 return O; 00109 }
|
|
00100 { 00101 if(fType==SIX_PLANE) { 00102 return (fV[0]+fV[1]+fV[2]+fV[3])/4; 00103 } 00104 if(fType==SEVEN_PLANE) { 00105 return (fV[0]+fV[1]+fV[2]+fV[3]+fV[4])/5; 00106 } 00107 HepPoint3D O(0,0,0); 00108 return O; 00109 }
|
|
00083 { 00084 return fV[index]; 00085 }
|
|
00083 { 00084 return fV[index]; 00085 }
|
|
00063 { return INVALID_CRYSTAL; }
|
|
00063 { return INVALID_CRYSTAL; }
|
|
00049 { 00050 if(this!=&aCry) 00051 { 00052 fType=aCry.Type(); 00053 for(int i=0;i<10;i++){ 00054 fV[i]=aCry.Get(i); 00055 } 00056 } 00057 return *this; 00058 }
|
|
00049 { 00050 if(this!=&aCry) 00051 { 00052 fType=aCry.Type(); 00053 for(int i=0;i<10;i++){ 00054 fV[i]=aCry.Get(i); 00055 } 00056 } 00057 return *this; 00058 }
|
|
00112 { 00113 fV[index]=aPoint; 00114 }
|
|
00112 { 00113 fV[index]=aPoint; 00114 }
|
|
00116 { 00117 fV[index].setX(value); 00118 }
|
|
00116 { 00117 fV[index].setX(value); 00118 }
|
|
00120 { 00121 fV[index].setY(value); 00122 }
|
|
00120 { 00121 fV[index].setY(value); 00122 }
|
|
00124 { 00125 fV[index].setZ(value); 00126 }
|
|
00124 { 00125 fV[index].setZ(value); 00126 }
|
|
00069 { return SEVEN_PLANE; }
|
|
00069 { return SEVEN_PLANE; }
|
|
00066 { return SIX_PLANE; }
|
|
00066 { return SIX_PLANE; }
|
|
00076 { fType=typ; 00077 if( (fType!=SIX_PLANE) && (fType!=SEVEN_PLANE) ) 00078 { fType=INVALID_CRYSTAL; } 00079 return fType; 00080 }
|
|
00073 { return fType; }
|
|
00076 { fType=typ; 00077 if( (fType!=SIX_PLANE) && (fType!=SEVEN_PLANE) ) 00078 { fType=INVALID_CRYSTAL; } 00079 return fType; 00080 }
|
|
00073 { return fType; }
|
|
|
|
|
|
|
|
|
|
|