BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcRecEndCapGeo Class Reference

#include <EmcRecEndCapGeo.h>

Public Member Functions

 EmcRecEndCapGeo ()
 ~EmcRecEndCapGeo ()
EmcRecCrystal GetCrystal (const Identifier &id) const
HepPoint3D GetCCenter (const Identifier &id) const
HepPoint3D GetCFrontCenter (const Identifier &id) const
 EmcRecEndCapGeo ()
 ~EmcRecEndCapGeo ()
EmcRecCrystal GetCrystal (const Identifier &id) const
HepPoint3D GetCCenter (const Identifier &id) const
HepPoint3D GetCFrontCenter (const Identifier &id) const
 EmcRecEndCapGeo ()
 ~EmcRecEndCapGeo ()
EmcRecCrystal GetCrystal (const Identifier &id) const
HepPoint3D GetCCenter (const Identifier &id) const
HepPoint3D GetCFrontCenter (const Identifier &id) const

Detailed Description

Constructor & Destructor Documentation

◆ EmcRecEndCapGeo() [1/3]

EmcRecEndCapGeo::EmcRecEndCapGeo ( )

Definition at line 10 of file EmcRecEndCapGeo.cxx.

10 {
11 ParameterInitialize();
12 CalculateStandardSector1();
13 CalculateStandardSector2();
14 FillCCenterVector();
15}

◆ ~EmcRecEndCapGeo() [1/3]

EmcRecEndCapGeo::~EmcRecEndCapGeo ( )

Definition at line 17 of file EmcRecEndCapGeo.cxx.

17{}

◆ EmcRecEndCapGeo() [2/3]

EmcRecEndCapGeo::EmcRecEndCapGeo ( )

◆ ~EmcRecEndCapGeo() [2/3]

EmcRecEndCapGeo::~EmcRecEndCapGeo ( )

◆ EmcRecEndCapGeo() [3/3]

EmcRecEndCapGeo::EmcRecEndCapGeo ( )

◆ ~EmcRecEndCapGeo() [3/3]

EmcRecEndCapGeo::~EmcRecEndCapGeo ( )

Member Function Documentation

◆ GetCCenter() [1/3]

HepPoint3D EmcRecEndCapGeo::GetCCenter ( const Identifier & id) const

Definition at line 900 of file EmcRecEndCapGeo.cxx.

900 {
901 unsigned int module, theta, phi;
902 unsigned int i, j;
903
904 module = EmcID::barrel_ec( id );
905 theta = EmcID::theta_module( id );
906 phi = EmcID::phi_module( id );
907
908 i = 0;
909 if ( module == EmcID::getENDCAP_EAST() )
910 {
911 for ( j = 0; j < theta; ++j ) { i += ( EmcID::getPHI_ENDCAP_MAX( j ) + 1 ); }
912 i += ( phi + 1 );
913 }
914 else
915 {
916 for ( j = 0; j < 6; ++j ) { i += ( EmcID::getPHI_ENDCAP_MAX( j ) + 1 ); }
917 for ( j = 0; j < theta; ++j ) { i += ( EmcID::getPHI_ENDCAP_MAX( j ) + 1 ); }
918 i += ( phi + 1 );
919 }
920
921 return fCCenter[i - 1];
922}
static unsigned int getENDCAP_EAST()
Definition EmcID.cxx:95
static unsigned int theta_module(const Identifier &id)
Definition EmcID.cxx:41
static unsigned int getPHI_ENDCAP_MAX(const unsigned int theta)
Definition EmcID.cxx:85
static unsigned int phi_module(const Identifier &id)
Definition EmcID.cxx:46

◆ GetCCenter() [2/3]

HepPoint3D EmcRecEndCapGeo::GetCCenter ( const Identifier & id) const

◆ GetCCenter() [3/3]

HepPoint3D EmcRecEndCapGeo::GetCCenter ( const Identifier & id) const

◆ GetCFrontCenter() [1/3]

HepPoint3D EmcRecEndCapGeo::GetCFrontCenter ( const Identifier & id) const

Definition at line 924 of file EmcRecEndCapGeo.cxx.

924 {
925 unsigned int module, theta, phi;
926 unsigned int i, j;
927
928 module = EmcID::barrel_ec( id );
929 theta = EmcID::theta_module( id );
930 phi = EmcID::phi_module( id );
931
932 i = 0;
933 if ( module == EmcID::getENDCAP_EAST() )
934 {
935 for ( j = 0; j < theta; ++j ) { i += ( EmcID::getPHI_ENDCAP_MAX( j ) + 1 ); }
936 i += ( phi + 1 );
937 }
938 else
939 {
940 for ( j = 0; j < 6; ++j ) { i += ( EmcID::getPHI_ENDCAP_MAX( j ) + 1 ); }
941 for ( j = 0; j < theta; ++j ) { i += ( EmcID::getPHI_ENDCAP_MAX( j ) + 1 ); }
942 i += ( phi + 1 );
943 }
944
945 return fCFrontCenter[i - 1];
946}

◆ GetCFrontCenter() [2/3]

HepPoint3D EmcRecEndCapGeo::GetCFrontCenter ( const Identifier & id) const

◆ GetCFrontCenter() [3/3]

HepPoint3D EmcRecEndCapGeo::GetCFrontCenter ( const Identifier & id) const

◆ GetCrystal() [1/3]

EmcRecCrystal EmcRecEndCapGeo::GetCrystal ( const Identifier & id) const

Definition at line 832 of file EmcRecEndCapGeo.cxx.

832 {
833 int i;
834 EmcRecCrystal cry;
835 unsigned int module = EmcID::barrel_ec( id );
836 unsigned int theta = EmcID::theta_module( id );
837 unsigned int phi = EmcID::phi_module( id );
838
839 unsigned int phiMax, phiMax16;
840 unsigned int phiQuotient, phiRemainder;
841
842 phiMax = EmcID::getPHI_ENDCAP_MAX( theta );
843 phiMax16 = ( phiMax + 1 ) / 16;
844 phiQuotient = (unsigned int)( phi / phiMax16 );
845 phiRemainder = phi % phiMax16;
846
847 // cout<<phiQuotient<<" "<<phiRemainder<<endl;
848
849 if ( module == EmcID::getENDCAP_EAST() )
850 {
851 if ( phiQuotient != 3 && phiQuotient != 4 && phiQuotient != 11 && phiQuotient != 12 )
852 {
853 cry = fCrystal[0][theta][phiRemainder];
854 for ( i = 0; i < 10; ++i )
855 { cry.Set( i, cry.Get( i ).rotateZ( phiQuotient * fphi5[6] ) ); }
856 }
857 else
858 {
859 if ( phiQuotient == 4 ) { cry = fCrystal[1][theta][phiRemainder]; }
860 if ( phiQuotient == 3 )
861 {
862 cry = fCrystal[1][theta][phiMax16 - 1 - phiRemainder];
863 for ( i = 0; i < 10; ++i ) { cry.SetX( i, -cry.Get( i ).x() ); }
864 }
865 if ( phiQuotient == 11 )
866 {
867 cry = fCrystal[1][theta][phiMax16 - 1 - phiRemainder];
868 for ( i = 0; i < 10; ++i ) { cry.SetY( i, -cry.Get( i ).y() ); }
869 }
870 if ( phiQuotient == 12 )
871 {
872 cry = fCrystal[1][theta][phiRemainder];
873 for ( i = 0; i < 10; ++i )
874 {
875 cry.SetX( i, -cry.Get( i ).x() );
876 cry.SetY( i, -cry.Get( i ).y() );
877 }
878 }
879 }
880 }
881
882 if ( module == EmcID::getENDCAP_WEST() )
883 {
884 unsigned int phipp;
885 unsigned int phiMax2 = ( phiMax + 1 ) / 2;
886 if ( phi < phiMax2 ) { phipp = phiMax2 - 1 - phi; }
887 else { phipp = phiMax + phiMax2 - phi; }
888 Identifier idd = EmcID::crystal_id( EmcID::getENDCAP_EAST(), theta, phipp );
889 cry = GetCrystal( idd );
890 for ( i = 0; i < 10; ++i )
891 {
892 cry.SetX( i, -cry.Get( i ).x() );
893 cry.SetZ( i, -cry.Get( i ).z() );
894 }
895 }
896
897 return cry;
898}
static Identifier crystal_id(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
For a single crystal.
Definition EmcID.cxx:63
static unsigned int getENDCAP_WEST()
Definition EmcID.cxx:99
static unsigned int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0).
Definition EmcID.cxx:36
void Set(int index, const HepPoint3D &aPoint)
EmcRecCrystal GetCrystal(const Identifier &id) const

Referenced by GetCrystal().

◆ GetCrystal() [2/3]

EmcRecCrystal EmcRecEndCapGeo::GetCrystal ( const Identifier & id) const

◆ GetCrystal() [3/3]

EmcRecCrystal EmcRecEndCapGeo::GetCrystal ( const Identifier & id) const

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