BOSS 6.6.4.p01
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
 

Static Public Member Functions

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

Detailed Description

Definition at line 27 of file EmcRecCrystal.h.

Constructor & Destructor Documentation

◆ EmcRecCrystal() [1/2]

EmcRecCrystal::EmcRecCrystal ( )
inline

Definition at line 31 of file 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()

EmcRecCrystal::~EmcRecCrystal ( )
inline

Definition at line 39 of file EmcRecCrystal.h.

39{}

◆ EmcRecCrystal() [2/2]

EmcRecCrystal::EmcRecCrystal ( const EmcRecCrystal aCry)
inline

Definition at line 42 of file EmcRecCrystal.h.

42 {
43 fType=aCry.Type();
44 for(int i=0;i<10;i++){
45 fV[i]=aCry.Get(i);
46 }
47 }
HepPoint3D Get(int index) const
Definition: EmcRecCrystal.h:83
int Type() const
Definition: EmcRecCrystal.h:72

Member Function Documentation

◆ BarrelCheckout()

void EmcRecCrystal::BarrelCheckout ( ) const
inline

Definition at line 129 of file 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 }
const float pi
Definition: vector3.h:133

◆ Center()

HepPoint3D EmcRecCrystal::Center ( ) const
inline

Definition at line 88 of file 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().

◆ EndCapCheckout()

void EmcRecCrystal::EndCapCheckout ( ) const
inline

Definition at line 143 of file 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

◆ FrontCenter()

HepPoint3D EmcRecCrystal::FrontCenter ( ) const
inline

Definition at line 100 of file 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().

◆ Get()

HepPoint3D EmcRecCrystal::Get ( int  index) const
inline

◆ InvalidCrystal()

static int EmcRecCrystal::InvalidCrystal ( )
inlinestatic

Definition at line 62 of file EmcRecCrystal.h.

63 { return INVALID_CRYSTAL; }

◆ operator=()

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

Definition at line 49 of file 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()

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

Definition at line 112 of file EmcRecCrystal.h.

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

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

◆ SetX()

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

Definition at line 116 of file EmcRecCrystal.h.

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

Referenced by EmcRecEndCapGeo::GetCrystal().

◆ SetY()

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

Definition at line 120 of file EmcRecCrystal.h.

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

Referenced by EmcRecEndCapGeo::GetCrystal().

◆ SetZ()

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

Definition at line 124 of file EmcRecCrystal.h.

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

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

◆ SevenPlane()

static int EmcRecCrystal::SevenPlane ( )
inlinestatic

Definition at line 68 of file EmcRecCrystal.h.

69 { return SEVEN_PLANE; }

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

◆ SixPlane()

static int EmcRecCrystal::SixPlane ( )
inlinestatic

Definition at line 65 of file EmcRecCrystal.h.

66 { return SIX_PLANE; }

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

◆ Type() [1/2]

int EmcRecCrystal::Type ( ) const
inline

Definition at line 72 of file EmcRecCrystal.h.

73 { return fType; }

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

◆ Type() [2/2]

int EmcRecCrystal::Type ( int  typ)
inline

Definition at line 75 of file 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 file: