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

#include <EmcStructure.h>

Public Member Functions

 EmcStructure ()
 ~EmcStructure ()
long getIndex (unsigned int thetaIndex, unsigned int phiIndex) const
bool isOutofAccep (unsigned int thetaIndex, unsigned int phiIndex) const
unsigned int getNumberOfTheRings ()
unsigned int getNumberOfXtals ()
unsigned int startingTheta ()
unsigned int crystalsInRing (unsigned int theta) const
void setEmcStruc ()
long getThisThetaMaxIndex (int Theta) const
unsigned int getPartId (long Index) const
unsigned int getTheta (long Index) const
unsigned int getPhi (long Index) const
int getGeomIndex (unsigned int PartId, unsigned int ThetaIndex, unsigned int PhiIndex) const
 EmcStructure ()
 ~EmcStructure ()
long getIndex (unsigned int thetaIndex, unsigned int phiIndex) const
bool isOutofAccep (unsigned int thetaIndex, unsigned int phiIndex) const
unsigned int getNumberOfTheRings ()
unsigned int getNumberOfXtals ()
unsigned int startingTheta ()
unsigned int crystalsInRing (unsigned int theta) const
void setEmcStruc ()
long getThisThetaMaxIndex (int Theta) const
unsigned int getPartId (long Index) const
unsigned int getTheta (long Index) const
unsigned int getPhi (long Index) const
int getGeomIndex (unsigned int PartId, unsigned int ThetaIndex, unsigned int PhiIndex) const
 EmcStructure ()
 ~EmcStructure ()
long getIndex (unsigned int thetaIndex, unsigned int phiIndex) const
bool isOutofAccep (unsigned int thetaIndex, unsigned int phiIndex) const
unsigned int getNumberOfTheRings ()
unsigned int getNumberOfXtals ()
unsigned int startingTheta ()
unsigned int crystalsInRing (unsigned int theta) const
void setEmcStruc ()
long getThisThetaMaxIndex (int Theta) const
unsigned int getPartId (long Index) const
unsigned int getTheta (long Index) const
unsigned int getPhi (long Index) const
int getGeomIndex (unsigned int PartId, unsigned int ThetaIndex, unsigned int PhiIndex) const

Detailed Description

Constructor & Destructor Documentation

◆ EmcStructure() [1/3]

EmcStructure::EmcStructure ( )

Definition at line 11 of file EmcStructure.cxx.

11{}

◆ ~EmcStructure() [1/3]

EmcStructure::~EmcStructure ( )

Definition at line 16 of file EmcStructure.cxx.

16{}

◆ EmcStructure() [2/3]

EmcStructure::EmcStructure ( )

◆ ~EmcStructure() [2/3]

EmcStructure::~EmcStructure ( )

◆ EmcStructure() [3/3]

EmcStructure::EmcStructure ( )

◆ ~EmcStructure() [3/3]

EmcStructure::~EmcStructure ( )

Member Function Documentation

◆ crystalsInRing() [1/3]

unsigned int EmcStructure::crystalsInRing ( unsigned int theta) const

Definition at line 131 of file EmcStructure.cxx.

131 {
132 // The theta index is defined by Endcap_east(0-5),Barrel(6-49),Endcap_west(50-55)
133 // in Emc Bhabha Calibration
134 unsigned int theXtalInRing;
135
136 if ( theta == 0 || theta == 1 || theta == 55 || theta == 54 )
137 { theXtalInRing = aEmcId->getPHI_ENDCAP_MAX( 0 ) + 1; }
138
139 if ( theta == 2 || theta == 3 || theta == 53 || theta == 52 )
140 { theXtalInRing = aEmcId->getPHI_ENDCAP_MAX( 2 ) + 1; }
141
142 if ( theta == 4 || theta == 5 || theta == 51 || theta == 50 )
143 { theXtalInRing = aEmcId->getPHI_ENDCAP_MAX( 4 ) + 1; }
144
145 if ( theta >= 6 && theta <= 49 ) { theXtalInRing = aEmcId->getPHI_BARREL_MAX() + 1; }
146
147 // if (theta<0 || theta>55) theXtalInRing= 0;
148 if ( theta > 55 ) { theXtalInRing = 0; }
149
150 return theXtalInRing;
151}

Referenced by EmcSelBhaEvent::initGeom(), and setEmcStruc().

◆ crystalsInRing() [2/3]

unsigned int EmcStructure::crystalsInRing ( unsigned int theta) const

◆ crystalsInRing() [3/3]

unsigned int EmcStructure::crystalsInRing ( unsigned int theta) const

◆ getGeomIndex() [1/3]

int EmcStructure::getGeomIndex ( unsigned int PartId,
unsigned int ThetaIndex,
unsigned int PhiIndex ) const

Definition at line 49 of file EmcStructure.cxx.

50 {
51 if ( PartId > 2 )
52 {
53 cout << "PartId is out of EMC" << endl;
54 return -1;
55 }
56 else
57 {
58 unsigned int newThetaIndex;
59 // The newThetaIndex is defined by Endcap_east(0-5),Barrel(6-49),Endcap_west(50-55)
60 if ( PartId == 0 ) newThetaIndex = ThetaIndex;
61 if ( PartId == 1 ) newThetaIndex = ThetaIndex + 6;
62 if ( PartId == 2 ) newThetaIndex = 55 - ThetaIndex;
63
64 if ( isOutofAccep( newThetaIndex, PhiIndex ) ) { return -1; }
65 else
66 {
67
68 int index;
69 index = getIndex( newThetaIndex, PhiIndex );
70
71 return index;
72 }
73 }
74}
long getIndex(unsigned int thetaIndex, unsigned int phiIndex) const
bool isOutofAccep(unsigned int thetaIndex, unsigned int phiIndex) const

Referenced by BesEmcParameter::GetLightOutput().

◆ getGeomIndex() [2/3]

int EmcStructure::getGeomIndex ( unsigned int PartId,
unsigned int ThetaIndex,
unsigned int PhiIndex ) const

◆ getGeomIndex() [3/3]

int EmcStructure::getGeomIndex ( unsigned int PartId,
unsigned int ThetaIndex,
unsigned int PhiIndex ) const

◆ getIndex() [1/3]

long EmcStructure::getIndex ( unsigned int thetaIndex,
unsigned int phiIndex ) const

Definition at line 76 of file EmcStructure.cxx.

76 {
77 long index = -1;
78 if ( thetaIndex == 0 ) { index = phiIndex; }
79 else { index = getThisThetaMaxIndex( thetaIndex - 1 ) + 1 + phiIndex; }
80 return index;
81}

Referenced by getGeomIndex(), EmcSelBhaEvent::initGeom(), and setEmcStruc().

◆ getIndex() [2/3]

long EmcStructure::getIndex ( unsigned int thetaIndex,
unsigned int phiIndex ) const

◆ getIndex() [3/3]

long EmcStructure::getIndex ( unsigned int thetaIndex,
unsigned int phiIndex ) const

◆ getNumberOfTheRings() [1/3]

unsigned int EmcStructure::getNumberOfTheRings ( )

Definition at line 108 of file EmcStructure.cxx.

108 {
109 unsigned int numberOfTheRings = 0;
110 numberOfTheRings =
111 ( aEmcId->getTHETA_BARREL_MAX() + 1 ) + ( aEmcId->getTHETA_ENDCAP_MAX() + 1 ) * 2;
112
113 return numberOfTheRings;
114}

Referenced by EmcSelBhaEvent::initGeom(), and setEmcStruc().

◆ getNumberOfTheRings() [2/3]

unsigned int EmcStructure::getNumberOfTheRings ( )

◆ getNumberOfTheRings() [3/3]

unsigned int EmcStructure::getNumberOfTheRings ( )

◆ getNumberOfXtals() [1/3]

unsigned int EmcStructure::getNumberOfXtals ( )

Definition at line 115 of file EmcStructure.cxx.

115 {
116 unsigned int numberOfXtals = 0;
117 unsigned int numberOfBarrelXtals, numberOfEndcapXtals;
118
119 numberOfEndcapXtals = numberOfOneEndcapRings * ( aEmcId->getPHI_ENDCAP_MAX( 0 ) + 1 ) +
120 numberOfTwoEndcapRings * ( aEmcId->getPHI_ENDCAP_MAX( 2 ) + 1 ) +
121 numberOfThreeEndcapRings * ( aEmcId->getPHI_ENDCAP_MAX( 4 ) + 1 );
122
123 numberOfBarrelXtals =
124 ( aEmcId->getTHETA_BARREL_MAX() + 1 ) * ( aEmcId->getPHI_BARREL_MAX() + 1 );
125
126 numberOfXtals = numberOfBarrelXtals + numberOfEndcapXtals * 2;
127
128 return numberOfXtals;
129}

Referenced by EmcSelBhaEvent::initGeom().

◆ getNumberOfXtals() [2/3]

unsigned int EmcStructure::getNumberOfXtals ( )

◆ getNumberOfXtals() [3/3]

unsigned int EmcStructure::getNumberOfXtals ( )

◆ getPartId() [1/3]

unsigned int EmcStructure::getPartId ( long Index) const
inline

Definition at line 33 of file Emc/EmcGeneralClass/include/EmcGeneralClass/EmcStructure.h.

33{ return m_partID[Index]; }
Index
Definition EvtCyclic3.hh:19

Referenced by main().

◆ getPartId() [2/3]

unsigned int EmcStructure::getPartId ( long Index) const
inline

Definition at line 33 of file InstallArea/x86_64-el9-gcc13-dbg/include/EmcGeneralClass/EmcStructure.h.

33{ return m_partID[Index]; }

◆ getPartId() [3/3]

unsigned int EmcStructure::getPartId ( long Index) const
inline

Definition at line 33 of file InstallArea/x86_64-el9-gcc13-opt/include/EmcGeneralClass/EmcStructure.h.

33{ return m_partID[Index]; }

◆ getPhi() [1/3]

unsigned int EmcStructure::getPhi ( long Index) const
inline

Definition at line 35 of file Emc/EmcGeneralClass/include/EmcGeneralClass/EmcStructure.h.

35{ return m_phiIndex[Index]; }

Referenced by main().

◆ getPhi() [2/3]

unsigned int EmcStructure::getPhi ( long Index) const
inline

Definition at line 35 of file InstallArea/x86_64-el9-gcc13-dbg/include/EmcGeneralClass/EmcStructure.h.

35{ return m_phiIndex[Index]; }

◆ getPhi() [3/3]

unsigned int EmcStructure::getPhi ( long Index) const
inline

Definition at line 35 of file InstallArea/x86_64-el9-gcc13-opt/include/EmcGeneralClass/EmcStructure.h.

35{ return m_phiIndex[Index]; }

◆ getTheta() [1/3]

unsigned int EmcStructure::getTheta ( long Index) const
inline

Definition at line 34 of file Emc/EmcGeneralClass/include/EmcGeneralClass/EmcStructure.h.

34{ return m_thetaIndex[Index]; }

Referenced by main().

◆ getTheta() [2/3]

unsigned int EmcStructure::getTheta ( long Index) const
inline

Definition at line 34 of file InstallArea/x86_64-el9-gcc13-dbg/include/EmcGeneralClass/EmcStructure.h.

34{ return m_thetaIndex[Index]; }

◆ getTheta() [3/3]

unsigned int EmcStructure::getTheta ( long Index) const
inline

Definition at line 34 of file InstallArea/x86_64-el9-gcc13-opt/include/EmcGeneralClass/EmcStructure.h.

34{ return m_thetaIndex[Index]; }

◆ getThisThetaMaxIndex() [1/3]

long EmcStructure::getThisThetaMaxIndex ( int Theta) const
inline

Definition at line 32 of file Emc/EmcGeneralClass/include/EmcGeneralClass/EmcStructure.h.

32{ return m_ThetaMaxIndex[Theta]; }

Referenced by getIndex().

◆ getThisThetaMaxIndex() [2/3]

long EmcStructure::getThisThetaMaxIndex ( int Theta) const
inline

Definition at line 32 of file InstallArea/x86_64-el9-gcc13-dbg/include/EmcGeneralClass/EmcStructure.h.

32{ return m_ThetaMaxIndex[Theta]; }

◆ getThisThetaMaxIndex() [3/3]

long EmcStructure::getThisThetaMaxIndex ( int Theta) const
inline

Definition at line 32 of file InstallArea/x86_64-el9-gcc13-opt/include/EmcGeneralClass/EmcStructure.h.

32{ return m_ThetaMaxIndex[Theta]; }

◆ isOutofAccep() [1/3]

bool EmcStructure::isOutofAccep ( unsigned int thetaIndex,
unsigned int phiIndex ) const

Definition at line 83 of file EmcStructure.cxx.

83 {
84 if ( thetaIndex > 55 )
85 {
86 cout << "warning "
87 << " theta out of acceptance !" << endl;
88 return true;
89 }
90 else
91 {
92 if ( ( ( thetaIndex == 0 || thetaIndex == 1 || thetaIndex == 55 || thetaIndex == 54 ) &&
93 ( phiIndex > 63 ) ) ||
94 ( ( thetaIndex == 2 || thetaIndex == 3 || thetaIndex == 53 || thetaIndex == 52 ) &&
95 ( phiIndex > 79 ) ) ||
96 ( ( thetaIndex == 4 || thetaIndex == 5 || thetaIndex == 51 || thetaIndex == 50 ) &&
97 ( phiIndex > 95 ) ) ||
98 ( ( thetaIndex >= 6 && thetaIndex <= 49 ) && ( phiIndex > 119 ) ) )
99 {
100 cout << "warning "
101 << " phi out of acceptance !" << endl;
102 return true;
103 }
104 else { return false; }
105 }
106}

Referenced by EmcBhabhaEvent::getDepoMCShowerEnergy(), EmcBhabhaEvent::getDepoMCShowerEnergy_lab(), EmcBhabhaEvent::getErrorDepoMCShowerEnergy(), and getGeomIndex().

◆ isOutofAccep() [2/3]

bool EmcStructure::isOutofAccep ( unsigned int thetaIndex,
unsigned int phiIndex ) const

◆ isOutofAccep() [3/3]

bool EmcStructure::isOutofAccep ( unsigned int thetaIndex,
unsigned int phiIndex ) const

◆ setEmcStruc() [1/3]

void EmcStructure::setEmcStruc ( )

Definition at line 18 of file EmcStructure.cxx.

18 {
19 int index = -999;
20 int nrOfTheRings = getNumberOfTheRings();
21 for ( int the = startingTheta(); the < nrOfTheRings; the++ )
22 {
23
24 for ( int phi = 0; phi < crystalsInRing( (unsigned int)the ); phi++ )
25 {
26
27 index = getIndex( (unsigned int)the, (unsigned int)phi );
28
29 m_phiIndex[index] = phi;
30 if ( the >= 0 && the <= 5 )
31 {
32 m_partID[index] = 0;
33 m_thetaIndex[index] = the;
34 }
35 if ( the >= 6 && the <= 49 )
36 {
37 m_partID[index] = 1;
38 m_thetaIndex[index] = the - 6;
39 }
40 if ( the >= 50 && the <= 55 )
41 {
42 m_partID[index] = 2;
43 m_thetaIndex[index] = 55 - the;
44 }
45 }
46 m_ThetaMaxIndex[the] = index;
47 }
48}
unsigned int getNumberOfTheRings()
unsigned int crystalsInRing(unsigned int theta) const

Referenced by BesEmcParameter::GetLightOutput(), EmcSelBhaEvent::initGeom(), and main().

◆ setEmcStruc() [2/3]

void EmcStructure::setEmcStruc ( )

◆ setEmcStruc() [3/3]

void EmcStructure::setEmcStruc ( )

◆ startingTheta() [1/3]

unsigned int EmcStructure::startingTheta ( )
inline

Definition at line 24 of file Emc/EmcGeneralClass/include/EmcGeneralClass/EmcStructure.h.

24{ return 0; }

Referenced by EmcSelBhaEvent::initGeom(), and setEmcStruc().

◆ startingTheta() [2/3]

unsigned int EmcStructure::startingTheta ( )
inline

◆ startingTheta() [3/3]

unsigned int EmcStructure::startingTheta ( )
inline

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