2#include "EmcGeneralClass/EmcStructure.h"
29 for (
int phi=0; phi <
crystalsInRing((
unsigned int) the ); phi++) {
31 index =
getIndex( (
unsigned int)the , (
unsigned int)phi);
33 m_phiIndex[index]=phi;
34 if (the>=0 && the<=5) {
36 m_thetaIndex[index]=the;
38 if (the>=6 && the<=49) {
40 m_thetaIndex[index]=the-6;
42 if (the>=50 && the<=55){
44 m_thetaIndex[index]=55 - the;
48 m_ThetaMaxIndex[the]=index;
54 unsigned int ThetaIndex,
55 unsigned int PhiIndex)
const
58 cout<<
"PartId is out of EMC"<<endl;
61 unsigned int newThetaIndex;
63 if (PartId==0) newThetaIndex = ThetaIndex;
64 if (PartId==1) newThetaIndex = ThetaIndex + 6;
65 if (PartId==2) newThetaIndex = 55 - ThetaIndex;
73 index =
getIndex(newThetaIndex,PhiIndex);
94 unsigned int phiIndex)
const
96 if ( thetaIndex > 55 )
98 cout<<
"warning " <<
" theta out of acceptance !"
105 if ( ((thetaIndex==0 || thetaIndex==1 || thetaIndex==55 || thetaIndex==54)
107 || ((thetaIndex==2 || thetaIndex==3 || thetaIndex==53 || thetaIndex==52)
109 || ((thetaIndex==4 || thetaIndex==5 || thetaIndex==51 || thetaIndex==50)
111 || ((thetaIndex>=6 && thetaIndex<=49) && ( phiIndex > 119)) )
113 cout<<
"warning "<<
" phi out of acceptance !" << endl;
126 unsigned int numberOfTheRings=0;
130 return numberOfTheRings;
136 unsigned int numberOfXtals=0;
137 unsigned int numberOfBarrelXtals, numberOfEndcapXtals;
145 numberOfXtals = numberOfBarrelXtals + numberOfEndcapXtals * 2;
147 return numberOfXtals;
155 unsigned int theXtalInRing;
157 if (theta==0 || theta==1 || theta==55 || theta==54)
162 if (theta==2 || theta==3 || theta==53 || theta==52)
167 if (theta==4 || theta==5 || theta==51 || theta==50)
172 if (theta>=6 && theta<=49)
183 return theXtalInRing;
static unsigned int getPHI_BARREL_MAX()
static unsigned int getTHETA_ENDCAP_MAX()
static unsigned int getTHETA_BARREL_MAX()
static unsigned int getPHI_ENDCAP_MAX(const unsigned int theta)
int getGeomIndex(unsigned int PartId, unsigned int ThetaIndex, unsigned int PhiIndex) const
long getIndex(unsigned int thetaIndex, unsigned int phiIndex) const
unsigned int getNumberOfTheRings()
unsigned int startingTheta()
unsigned int crystalsInRing(unsigned int theta) const
long getThisThetaMaxIndex(int Theta) const
bool isOutofAccep(unsigned int thetaIndex, unsigned int phiIndex) const
unsigned int getNumberOfXtals()