27 for(ci_NV=NeighborVec.begin();
28 ci_NV!=NeighborVec.end();
30 if((*ci_NV)==id2) { is=
true; }
45 for(ci_NV=NeighborVec.begin();
46 ci_NV!=NeighborVec.end();
48 if((*ci_NV)==id2) { is=
true; }
66 unsigned int phip=999;
67 unsigned int phin=999;
83 NeighborVec.push_back(aNb);
85 NeighborVec.push_back(aNb);
88 unsigned int east_west=0;
91 NeighborVec.push_back(aNb);
93 NeighborVec.push_back(aNb);
95 NeighborVec.push_back(aNb);
99 NeighborVec.push_back(aNb);
101 NeighborVec.push_back(aNb);
103 NeighborVec.push_back(aNb);
110 NeighborVec.push_back(aNb);
115 NeighborVec.push_back(aNb);
118 NeighborVec.push_back(aNb);
124 NeighborVec.push_back(aNb);
127 NeighborVec.push_back(aNb);
134 NeighborVec.push_back(aNb);
136 NeighborVec.push_back(aNb);
138 NeighborVec.push_back(aNb);
140 NeighborVec.push_back(aNb);
142 NeighborVec.push_back(aNb);
144 NeighborVec.push_back(aNb);
151 unsigned int sector=phi/phiInSec;
152 unsigned int phip=999;
153 unsigned int phin=999;
154 unsigned int InvalidPhi = 999;
163 else if((phi==4*phiInSec-1) || (phi==12*phiInSec-1)){
167 else if((phi==4*phiInSec) || (phi==12*phiInSec)) {
172 ((phi>4*phiInSec)&&(phi<12*phiInSec-1)) ||
178 if(phip!=InvalidPhi) {
180 NeighborVec.push_back(aNb);
182 if(phin!=InvalidPhi) {
184 NeighborVec.push_back(aNb);
188 if(phip!=InvalidPhi) {
190 NeighborVec.push_back(aNb);
193 NeighborVec.push_back(aNb);
194 if(phin!=InvalidPhi) {
196 NeighborVec.push_back(aNb);
201 if(phip!=InvalidPhi) {
203 NeighborVec.push_back(aNb);
206 NeighborVec.push_back(aNb);
207 if(phin!=InvalidPhi) {
209 NeighborVec.push_back(aNb);
213 unsigned int min_max=0;
220 NeighborVec.push_back(aNb);
222 NeighborVec.push_back(aNb);
226 NeighborVec.push_back(aNb);
229 NeighborVec.push_back(aNb);
231 }
else if(phi%4==3) {
234 NeighborVec.push_back(aNb);
237 NeighborVec.push_back(aNb);
244 if(phip!=InvalidPhi) {
246 NeighborVec.push_back(aNb);
249 NeighborVec.push_back(aNb);
250 if(phin!=InvalidPhi) {
252 NeighborVec.push_back(aNb);
255 unsigned int phi1=phi*(phiInSec+1)/phiInSec;
257 NeighborVec.push_back(aNb);
259 NeighborVec.push_back(aNb);
260 if(phi%phiInSec==0) {
263 NeighborVec.push_back(aNb);
266 NeighborVec.push_back(aNb);
268 }
else if(phi%phiInSec==phiInSec-1) {
271 NeighborVec.push_back(aNb);
274 NeighborVec.push_back(aNb);
281 unsigned int phi1=phi*(phiInSec-1)/phiInSec;
283 NeighborVec.push_back(aNb);
287 NeighborVec.push_back(aNb);
290 NeighborVec.push_back(aNb);
295 NeighborVec.push_back(aNb);
298 NeighborVec.push_back(aNb);
302 if(phip!=InvalidPhi) {
304 NeighborVec.push_back(aNb);
307 NeighborVec.push_back(aNb);
308 if(phin!=InvalidPhi) {
310 NeighborVec.push_back(aNb);
332 unsigned int phip,phipp;
333 unsigned int phin,phinn;
334 unsigned int thetap,thetapp;
335 unsigned int thetan,thetann;
336 unsigned int invalidTheta=999999;
370 thetapp=invalidTheta;
376 thetapp=invalidTheta;
392 thetann=invalidTheta;
398 thetann=invalidTheta;
406 NeighborVec.push_back(aNb);
408 NeighborVec.push_back(aNb);
410 if(thetapp!=invalidTheta) {
412 NeighborVec.push_back(aNb);
414 NeighborVec.push_back(aNb);
416 NeighborVec.push_back(aNb);
418 NeighborVec.push_back(aNb);
420 NeighborVec.push_back(aNb);
422 if(thetap!=invalidTheta) {
424 NeighborVec.push_back(aNb);
426 NeighborVec.push_back(aNb);
428 if(thetan!=invalidTheta) {
430 NeighborVec.push_back(aNb);
432 NeighborVec.push_back(aNb);
434 if(thetann!=invalidTheta) {
436 NeighborVec.push_back(aNb);
438 NeighborVec.push_back(aNb);
440 NeighborVec.push_back(aNb);
442 NeighborVec.push_back(aNb);
444 NeighborVec.push_back(aNb);
455 bool flagNeighbor=
false;
458 for(ci_tmpNV=tmpNeighborVec.begin();
459 ci_tmpNV!=tmpNeighborVec.end();
463 for(ci_tmpNNV=tmpNextNeighborVec.begin();
464 ci_tmpNNV!=tmpNextNeighborVec.end();
467 for(ci_NV=NeighborVec.begin();
468 ci_NV!=NeighborVec.end();
470 if(*ci_tmpNNV==*ci_NV){
477 for(ci_tmpNV1=tmpNeighborVec.begin();
478 ci_tmpNV1!=tmpNeighborVec.end();
480 if(*ci_tmpNNV==*ci_tmpNV1){
490 NeighborVec.push_back(*ci_tmpNNV);
RecEmcIDVector::const_iterator ci_RecEmcIDVector
vector< RecEmcID > RecEmcIDVector
static unsigned int getPHI_BARREL_MAX()
static Identifier crystal_id(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
For a single crystal.
static unsigned int getENDCAP_WEST()
static unsigned int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
static unsigned int getENDCAP_EAST()
static unsigned int getTHETA_ENDCAP_MIN()
static unsigned int getTHETA_ENDCAP_MAX()
static unsigned int getBARREL()
static unsigned int getTHETA_BARREL_MIN()
static unsigned int getTHETA_BARREL_MAX()
static unsigned int theta_module(const Identifier &id)
static unsigned int getPHI_ENDCAP_MAX(const unsigned int theta)
static unsigned int getPHI_ENDCAP_MIN()
static unsigned int getPHI_BARREL_MIN()
static unsigned int phi_module(const Identifier &id)
bool IsNextNeighbor(const Identifier &id1, const Identifier &id2)
RecEmcIDVector GetNeighbors(const Identifier &id)
bool IsNeighbor(const Identifier &id1, const Identifier &id2)
RecEmcIDVector GetNextNeighbors(const Identifier &id)
virtual void clear()
Reset to invalid state.