BOSS 7.0.7
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
 

Detailed Description

Definition at line 40 of file EmcRecEndCapGeo.h.

Constructor & Destructor Documentation

◆ EmcRecEndCapGeo()

EmcRecEndCapGeo::EmcRecEndCapGeo ( )

Definition at line 10 of file EmcRecEndCapGeo.cxx.

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

◆ ~EmcRecEndCapGeo()

EmcRecEndCapGeo::~EmcRecEndCapGeo ( )

Definition at line 18 of file EmcRecEndCapGeo.cxx.

19{
20}

Member Function Documentation

◆ GetCCenter()

HepPoint3D EmcRecEndCapGeo::GetCCenter ( const Identifier id) const

Definition at line 923 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 for(j=0;j<theta;++j) {
935 i+=(EmcID::getPHI_ENDCAP_MAX(j)+1);
936 }
937 i+=(phi+1);
938 } else {
939 for(j=0;j<6;++j) {
940 i+=(EmcID::getPHI_ENDCAP_MAX(j)+1);
941 }
942 for(j=0;j<theta;++j) {
943 i+=(EmcID::getPHI_ENDCAP_MAX(j)+1);
944 }
945 i+=(phi+1);
946 }
947
948 return fCCenter[i-1];
949}
static unsigned int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
Definition: EmcID.cxx:38
static unsigned int getENDCAP_EAST()
Definition: EmcID.cxx:141
static unsigned int theta_module(const Identifier &id)
Definition: EmcID.cxx:43
static unsigned int getPHI_ENDCAP_MAX(const unsigned int theta)
Definition: EmcID.cxx:115
static unsigned int phi_module(const Identifier &id)
Definition: EmcID.cxx:48

Referenced by EmcRecGeoSvc::GetCCenter().

◆ GetCFrontCenter()

HepPoint3D EmcRecEndCapGeo::GetCFrontCenter ( const Identifier id) const

Definition at line 951 of file EmcRecEndCapGeo.cxx.

952{
953 unsigned int module,theta,phi;
954 unsigned int i,j;
955
956 module=EmcID::barrel_ec(id);
957 theta=EmcID::theta_module(id);
958 phi=EmcID::phi_module(id);
959
960 i=0;
961 if(module==EmcID::getENDCAP_EAST()) {
962 for(j=0;j<theta;++j) {
963 i+=(EmcID::getPHI_ENDCAP_MAX(j)+1);
964 }
965 i+=(phi+1);
966 } else {
967 for(j=0;j<6;++j) {
968 i+=(EmcID::getPHI_ENDCAP_MAX(j)+1);
969 }
970 for(j=0;j<theta;++j) {
971 i+=(EmcID::getPHI_ENDCAP_MAX(j)+1);
972 }
973 i+=(phi+1);
974 }
975
976 return fCFrontCenter[i-1];
977}

Referenced by EmcRecGeoSvc::GetCFrontCenter().

◆ GetCrystal()

EmcRecCrystal EmcRecEndCapGeo::GetCrystal ( const Identifier id) const

Definition at line 853 of file EmcRecEndCapGeo.cxx.

854{
855 int i;
856 EmcRecCrystal cry;
857 unsigned int module=EmcID::barrel_ec(id);
858 unsigned int theta=EmcID::theta_module(id);
859 unsigned int phi=EmcID::phi_module(id);
860
861 unsigned int phiMax,phiMax16;
862 unsigned int phiQuotient,phiRemainder;
863
864 phiMax=EmcID::getPHI_ENDCAP_MAX(theta);
865 phiMax16=(phiMax+1)/16;
866 phiQuotient=(unsigned int)(phi/phiMax16);
867 phiRemainder=phi%phiMax16;
868
869 //cout<<phiQuotient<<" "<<phiRemainder<<endl;
870
871 if(module==EmcID::getENDCAP_EAST()) {
872 if(phiQuotient!=3&&phiQuotient!=4&&
873 phiQuotient!=11&&phiQuotient!=12) {
874 cry=fCrystal[0][theta][phiRemainder];
875 for(i=0;i<10;++i) {
876 cry.Set(i,cry.Get(i).rotateZ(phiQuotient*fphi5[6]));
877 }
878 } else {
879 if(phiQuotient==4) {
880 cry=fCrystal[1][theta][phiRemainder];
881 }
882 if(phiQuotient==3) {
883 cry=fCrystal[1][theta][phiMax16-1-phiRemainder];
884 for(i=0;i<10;++i) {
885 cry.SetX(i,-cry.Get(i).x());
886 }
887 }
888 if(phiQuotient==11) {
889 cry=fCrystal[1][theta][phiMax16-1-phiRemainder];
890 for(i=0;i<10;++i) {
891 cry.SetY(i,-cry.Get(i).y());
892 }
893 }
894 if(phiQuotient==12) {
895 cry=fCrystal[1][theta][phiRemainder];
896 for(i=0;i<10;++i) {
897 cry.SetX(i,-cry.Get(i).x());
898 cry.SetY(i,-cry.Get(i).y());
899 }
900 }
901 }
902 }
903
904 if(module==EmcID::getENDCAP_WEST()) {
905 unsigned int phipp;
906 unsigned int phiMax2=(phiMax+1)/2;
907 if(phi<phiMax2) {
908 phipp=phiMax2-1-phi;
909 } else {
910 phipp=phiMax+phiMax2-phi;
911 }
913 cry=GetCrystal(idd);
914 for(i=0;i<10;++i) {
915 cry.SetX(i,-cry.Get(i).x());
916 cry.SetZ(i,-cry.Get(i).z());
917 }
918 }
919
920 return cry;
921}
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:71
static unsigned int getENDCAP_WEST()
Definition: EmcID.cxx:151
void SetY(int index, double value)
HepPoint3D Get(int index) const
Definition: EmcRecCrystal.h:83
void SetX(int index, double value)
void SetZ(int index, double value)
void Set(int index, const HepPoint3D &aPoint)
EmcRecCrystal GetCrystal(const Identifier &id) const

Referenced by GetCrystal(), EmcRecGeoSvc::GetCrystal(), and EmcRecGeoSvc::GetCrystalPoint().


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