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;
127 numberOfTheRings = (aEmcId->getTHETA_BARREL_MAX() + 1)
128 + (aEmcId->getTHETA_ENDCAP_MAX() + 1 ) * 2;
130 return numberOfTheRings;
136 unsigned int numberOfXtals=0;
137 unsigned int numberOfBarrelXtals, numberOfEndcapXtals;
139 numberOfEndcapXtals = numberOfOneEndcapRings * (aEmcId->getPHI_ENDCAP_MAX(0)+1)
140 + numberOfTwoEndcapRings * (aEmcId->getPHI_ENDCAP_MAX(2)+1)
141 + numberOfThreeEndcapRings * (aEmcId->getPHI_ENDCAP_MAX(4)+1);
143 numberOfBarrelXtals = (aEmcId->getTHETA_BARREL_MAX()+1)*(aEmcId->getPHI_BARREL_MAX()+1);
145 numberOfXtals = numberOfBarrelXtals + numberOfEndcapXtals * 2;
147 return numberOfXtals;
155 unsigned int theXtalInRing;
157 if (theta==0 || theta==1 || theta==55 || theta==54)
159 theXtalInRing= aEmcId->getPHI_ENDCAP_MAX(0)+1;
162 if (theta==2 || theta==3 || theta==53 || theta==52)
164 theXtalInRing=aEmcId->getPHI_ENDCAP_MAX(2)+1;
167 if (theta==4 || theta==5 || theta==51 || theta==50)
169 theXtalInRing=aEmcId->getPHI_ENDCAP_MAX(4)+1;
172 if (theta>=6 && theta<=49)
174 theXtalInRing=aEmcId->getPHI_BARREL_MAX()+1;
183 return theXtalInRing;
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()