EmcRecCrystal Class Reference

#include <EmcRecCrystal.h>

List of all members.

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 ()

Private Attributes

int fType
HepPoint3D fV [10]

Static Private Attributes

static const int INVALID_CRYSTAL = -1
static const int SIX_PLANE = 0
static const int SEVEN_PLANE = 1


Detailed Description

Definition at line 27 of file EmcRecCrystal.h.


Constructor & Destructor Documentation

EmcRecCrystal::EmcRecCrystal (  )  [inline]

Definition at line 31 of file EmcRecCrystal.h.

References fType, fV, genRecEmupikp::i, and INVALID_CRYSTAL.

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    }

EmcRecCrystal::~EmcRecCrystal (  )  [inline]

Definition at line 39 of file EmcRecCrystal.h.

00039 {}

EmcRecCrystal::EmcRecCrystal ( const EmcRecCrystal aCry  )  [inline]

Definition at line 42 of file EmcRecCrystal.h.

References fType, fV, Get(), genRecEmupikp::i, and Type().

00042                                             {
00043       fType=aCry.Type();
00044       for(int i=0;i<10;i++){
00045          fV[i]=aCry.Get(i);
00046       }
00047    }


Member Function Documentation

void EmcRecCrystal::BarrelCheckout (  )  const [inline]

Definition at line 129 of file EmcRecCrystal.h.

References fV, and pi.

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    }

HepPoint3D EmcRecCrystal::Center (  )  const [inline]

Definition at line 88 of file EmcRecCrystal.h.

References fType, fV, SEVEN_PLANE, and SIX_PLANE.

Referenced by EmcRecEndCapGeo::FillCCenterVector(), EmcRecBarrelGeo::FillCCenterVector(), and EmcRecROOTGeo::GetCCenter().

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    }

void EmcRecCrystal::EndCapCheckout (  )  const [inline]

Definition at line 143 of file EmcRecCrystal.h.

References fType, fV, pi, SIX_PLANE, and t().

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    }

HepPoint3D EmcRecCrystal::FrontCenter (  )  const [inline]

Definition at line 100 of file EmcRecCrystal.h.

References fType, fV, SEVEN_PLANE, and SIX_PLANE.

Referenced by EmcRecEndCapGeo::FillCCenterVector(), EmcRecBarrelGeo::FillCCenterVector(), and EmcRecROOTGeo::GetCFrontCenter().

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    }

HepPoint3D EmcRecCrystal::Get ( int  index  )  const [inline]

Definition at line 83 of file EmcRecCrystal.h.

References fV.

Referenced by EmcRecBarrelGeo::CalculateStandardCrystal(), EmcRecEndCapGeo::CalculateStandardSector1(), EmcRecEndCapGeo::CalculateStandardSector2(), EmcRecCrystal(), EmcRecEndCapGeo::GetCrystal(), EmcRecBarrelGeo::GetCrystal(), EmcRecGeoSvc::GetCrystalPoint(), EmcRecROOTGeo::InitFromXML(), operator<<(), and operator=().

00083                                    {
00084       return fV[index];
00085    }

static int EmcRecCrystal::InvalidCrystal (  )  [inline, static]

Definition at line 62 of file EmcRecCrystal.h.

References INVALID_CRYSTAL.

00063      { return INVALID_CRYSTAL; }

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

Definition at line 49 of file EmcRecCrystal.h.

References fType, fV, Get(), genRecEmupikp::i, and Type().

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    }

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

Definition at line 112 of file EmcRecCrystal.h.

References fV.

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

00112                                                  {
00113       fV[index]=aPoint;
00114    }

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

Definition at line 116 of file EmcRecCrystal.h.

References fV.

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

00116                                       {
00117       fV[index].setX(value);
00118    }

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

Definition at line 120 of file EmcRecCrystal.h.

References fV.

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

00120                                       {
00121       fV[index].setY(value);
00122    }

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

Definition at line 124 of file EmcRecCrystal.h.

References fV.

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

00124                                       {
00125       fV[index].setZ(value);
00126    }

static int EmcRecCrystal::SevenPlane (  )  [inline, static]

Definition at line 68 of file EmcRecCrystal.h.

References SEVEN_PLANE.

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

00069      { return SEVEN_PLANE; }

static int EmcRecCrystal::SixPlane (  )  [inline, static]

Definition at line 65 of file EmcRecCrystal.h.

References SIX_PLANE.

Referenced by EmcRecEndCapGeo::CalculateStandardSector1(), EmcRecROOTGeo::InitFromXML(), operator<<(), and EmcRecBarrelGeo::Transform2Column1().

00066      { return SIX_PLANE; }

int EmcRecCrystal::Type ( int  typ  )  [inline]

Definition at line 75 of file EmcRecCrystal.h.

References fType, INVALID_CRYSTAL, SEVEN_PLANE, and SIX_PLANE.

00076      {  fType=typ;
00077         if( (fType!=SIX_PLANE) && (fType!=SEVEN_PLANE) )
00078           { fType=INVALID_CRYSTAL; }
00079         return fType; 
00080      }

int EmcRecCrystal::Type (  )  const [inline]

Definition at line 72 of file EmcRecCrystal.h.

References fType.

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

00073      { return fType; }


Member Data Documentation

int EmcRecCrystal::fType [private]

Definition at line 211 of file EmcRecCrystal.h.

Referenced by Center(), EmcRecCrystal(), EndCapCheckout(), FrontCenter(), operator=(), and Type().

HepPoint3D EmcRecCrystal::fV[10] [private]

Definition at line 214 of file EmcRecCrystal.h.

Referenced by BarrelCheckout(), Center(), EmcRecCrystal(), EndCapCheckout(), FrontCenter(), Get(), operator=(), Set(), SetX(), SetY(), and SetZ().

const int EmcRecCrystal::INVALID_CRYSTAL = -1 [static, private]

Definition at line 217 of file EmcRecCrystal.h.

Referenced by EmcRecCrystal(), InvalidCrystal(), and Type().

const int EmcRecCrystal::SEVEN_PLANE = 1 [static, private]

Definition at line 219 of file EmcRecCrystal.h.

Referenced by Center(), FrontCenter(), SevenPlane(), and Type().

const int EmcRecCrystal::SIX_PLANE = 0 [static, private]

Definition at line 218 of file EmcRecCrystal.h.

Referenced by Center(), EndCapCheckout(), FrontCenter(), SixPlane(), and Type().


Generated on Tue Nov 29 23:18:44 2016 for BOSS_7.0.2 by  doxygen 1.4.7