1 /**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * All rights reserved. *
6 * Indranil Das <indra.das@saha.ac.in> *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
19 ///////////////////////////////////////////////
20 //Author : Indranil Das, SINP, INDIA
21 // Sukalyan Chattopadhyay, SINP, INDIA
23 //Email : indra.das@saha.ac.in
24 // sukalyan.chattopadhyay@saha.ac.in
26 // This class implements a hit reconstruction algorithm for the dimuon
27 // high level trigger.
28 // The algorithm finds 3 pad clusters by looking for unique pads with a charge
29 // above a certain threshold. A centre of gravity type calculation is applied
30 // to the three pads forming the cluster to find the hit's X or Y coordinate
31 // along the non-bending and bending planes individually.
32 // The sepperate X and Y coordinates are then merged to give the full coordinate
34 /////////////////////////////////////////////////
37 #include "AliHLTMUONHitReconstructor.h"
38 #include "AliHLTMUONRecHitsBlockStruct.h"
41 const int AliHLTMUONHitReconstructor::fgkDetectorId = 0xA00;
42 const int AliHLTMUONHitReconstructor::fgkDDLOffSet = 12 ;
43 const int AliHLTMUONHitReconstructor::fgkNofDDL = 8 ;
45 const int AliHLTMUONHitReconstructor::fgkDDLHeaderSize = 8;
47 const int AliHLTMUONHitReconstructor::fgkEvenLutSize = 1645632 + 1;
48 const int AliHLTMUONHitReconstructor::fgkOddLutSize = 3363840 + 1;
50 const int AliHLTMUONHitReconstructor::fgkLutLine[2] = {54208, 59648};
52 const int AliHLTMUONHitReconstructor::fgkMinIdManuChannel[2] = {917696, 64};
53 const int AliHLTMUONHitReconstructor::fgkMaxIdManuChannel[2] = {2563327, 3363903};
55 const float AliHLTMUONHitReconstructor::fgkHalfPadSize[3] = {1.25, 2.50, 5.00};
58 AliHLTMUONHitReconstructor::AliHLTMUONHitReconstructor():
61 fkBuspatchHeaderSize(4),
64 fLookUpTableData(NULL),
66 fRecPointsCount(NULL),
67 fMaxRecPointsCount(0),
73 fDetManuChannelIdList(NULL),
74 fCentralChargeB(NULL),
75 fCentralChargeNB(NULL),
87 if(AliHLTMUONHitReconstructor::fgkEvenLutSize > AliHLTMUONHitReconstructor::fgkOddLutSize){
88 fPadData = new DHLTPad[AliHLTMUONHitReconstructor::fgkEvenLutSize];
91 fPadData = new DHLTPad[AliHLTMUONHitReconstructor::fgkOddLutSize];
94 fkBlockHeaderSize = 8;
96 fkBuspatchHeaderSize = 4;
98 bzero(fGetIdTotalData,336*80*2*sizeof(int));
102 AliHLTMUONHitReconstructor::~AliHLTMUONHitReconstructor()
107 delete []fLookUpTableData;
111 int AliHLTMUONHitReconstructor::GetLutLine(int iDDL) const
113 return ( iDDL<16 ) ? fgkLutLine[0] : fgkLutLine[1] ;
117 bool AliHLTMUONHitReconstructor::LoadLookUpTable(DHLTLut* lookUpTableData, int lookUpTableId)
119 // function that loads LookUpTable (= position of each pad with electronic channel associated with it)
121 if(lookUpTableId<fgkDDLOffSet || lookUpTableId>= fgkDDLOffSet + fgkNofDDL){
122 HLTError("DDL number is out of range (must be %d<=iDDL<%d)\n",fgkDDLOffSet,fgkDDLOffSet+fgkNofDDL);
126 fDDLId = lookUpTableId;
128 int lutSize = ((lookUpTableId%2)==0) ? fgkEvenLutSize : fgkOddLutSize ;
129 int nofLutLine = GetLutLine(lookUpTableId);
130 int idOffSet = fgkMinIdManuChannel[lookUpTableId%2];
132 int detManuChannelId;
134 fLookUpTableData = new DHLTLut[lutSize];
136 fLookUpTableData[0].fIdManuChannel = 0;
137 fLookUpTableData[0].fIX = 0 ;
138 fLookUpTableData[0].fIY = 0 ;
139 fLookUpTableData[0].fRealX = 0.0 ;
140 fLookUpTableData[0].fRealY = 0.0 ;
141 fLookUpTableData[0].fRealZ = 0.0 ;
142 fLookUpTableData[0].fPlane = -1 ;
143 fLookUpTableData[0].fPcbZone = -1 ;
145 for(int i=0; i<nofLutLine; i++){
147 detManuChannelId = lookUpTableData[i].fIdManuChannel - idOffSet + 1;
148 fLookUpTableData[detManuChannelId].fIdManuChannel = lookUpTableData[i].fIdManuChannel - idOffSet;
149 fLookUpTableData[detManuChannelId].fIX = lookUpTableData[i].fIX ;
150 fLookUpTableData[detManuChannelId].fIY = lookUpTableData[i].fIY ;
151 fLookUpTableData[detManuChannelId].fRealX = lookUpTableData[i].fRealX ;
152 fLookUpTableData[detManuChannelId].fRealY = lookUpTableData[i].fRealY ;
153 fLookUpTableData[detManuChannelId].fRealZ = lookUpTableData[i].fRealZ ;
154 fLookUpTableData[detManuChannelId].fPcbZone = lookUpTableData[i].fPcbZone ;
155 fLookUpTableData[detManuChannelId].fPlane = lookUpTableData[i].fPlane ;
161 bool AliHLTMUONHitReconstructor::SetBusToDetMap(BusToDetElem busToDetElem)
164 // function that loads BusPatch To Detection Element (SlatId) map
166 if(busToDetElem.size()==0)
169 fBusToDetElem = busToDetElem;
175 bool AliHLTMUONHitReconstructor::SetBusToDDLMap(BusToDDL busToDDL)
178 // function that loads BusPatch To DDL Element (DDL) map
180 if(busToDDL.size()==0)
183 fBusToDDL = busToDDL;
189 bool AliHLTMUONHitReconstructor::Run(
190 const AliHLTUInt32_t* rawData,
191 AliHLTUInt32_t rawDataSize,
192 AliHLTMUONRecHitStruct* recHit,
193 AliHLTUInt32_t& nofHit
196 // main function called by HLTReconstructor to perform DHLT Hitreconstruction
199 fMaxRecPointsCount = nofHit;
200 fRecPointsCount = &nofHit;
201 *fRecPointsCount = 0;
203 fPadData[0].fDetElemId = 0;
204 fPadData[0].fBuspatchId = 0;
205 fPadData[0].fIdManuChannel = 0;
206 fPadData[0].fIX = 0 ;
207 fPadData[0].fIY = 0 ;
208 fPadData[0].fRealX = 0.0 ;
209 fPadData[0].fRealY = 0.0 ;
210 fPadData[0].fRealZ = 0.0 ;
211 fPadData[0].fPlane = -1 ;
212 fPadData[0].fPcbZone = -1 ;
213 fPadData[0].fCharge = 0 ;
216 if(!ReadDDL(rawData, rawDataSize)){
217 HLTError("Failed to read the complete DDL file");
222 HLTError("Failed to generate RecHits");
230 bool AliHLTMUONHitReconstructor::ReadDDL(
231 const AliHLTUInt32_t* rawData,
232 AliHLTUInt32_t rawDataSize
235 //function to read Raw Data files
237 const int* buffer = reinterpret_cast<const int*>(rawData);
239 fIdOffSet= fgkMinIdManuChannel[(fDDLId%2)];
240 fDetManuChannelIdList = new int[rawDataSize];
244 fNofFiredDetElem = 0;
247 int prevDetElemId = 0 ;
248 int totalBlockSize,blockRawDataSize;
249 int totalDspSize,dspRawDataSize;
250 int totalBuspatchSize,buspatchRawDataSize;
251 int indexDsp,indexBuspatch,indexRawData;
252 unsigned int dataWord;
256 for(int iBlock = 0; iBlock < 2 ;iBlock++){ // loop over 2 blocks
257 totalBlockSize = buffer[index + 1];
258 blockRawDataSize = buffer[index + 2];
259 indexDsp = index + fkBlockHeaderSize;
260 while(blockRawDataSize > 0){
261 totalDspSize = buffer[indexDsp + 1];
262 dspRawDataSize = buffer[indexDsp + 2];
263 //if(buffer[indexDsp+1] == 1)
264 dspRawDataSize --; // temporary solution to read buspatches
265 indexBuspatch = indexDsp + fkDspHeaderSize + 2; // this extra 2 word comes from the faulty defination of Dsp header size
266 while(dspRawDataSize > 0){
267 totalBuspatchSize = buffer[indexBuspatch + 1];
268 buspatchRawDataSize = buffer[indexBuspatch + 2];
269 buspatchId = buffer[indexBuspatch + 3];
270 if((detElemId = fBusToDetElem[buspatchId])==0){
271 HLTError("No Detection element found for buspatch : %d",buspatchId);
274 indexRawData = indexBuspatch + fkBuspatchHeaderSize;
275 while(buspatchRawDataSize > 0){
276 dataWord = buffer[indexRawData];
277 charge = (unsigned short)(dataWord & 0xFFF);
280 idManuChannel = (idManuChannel|(detElemId%100))<<17;
281 idManuChannel |= (dataWord >> 12) & 0x1FFFF;
282 idManuChannel -= fIdOffSet ;
284 if(charge > fDCCut && charge > 5){ // (charge > 4) is due cut out the noise level
285 fPadData[idManuChannel].fBuspatchId = buspatchId;
286 fPadData[idManuChannel].fDetElemId = detElemId;
287 fPadData[idManuChannel].fIdManuChannel = idManuChannel;
288 fPadData[idManuChannel].fIX = fLookUpTableData[idManuChannel+1].fIX;
289 fPadData[idManuChannel].fIY = fLookUpTableData[idManuChannel+1].fIY;
290 fPadData[idManuChannel].fRealX = fLookUpTableData[idManuChannel+1].fRealX;
291 fPadData[idManuChannel].fRealY = fLookUpTableData[idManuChannel+1].fRealY;
292 fPadData[idManuChannel].fRealZ = fLookUpTableData[idManuChannel+1].fRealZ;
293 fPadData[idManuChannel].fPcbZone = fLookUpTableData[idManuChannel+1].fPcbZone;
294 fPadData[idManuChannel].fPlane = fLookUpTableData[idManuChannel+1].fPlane;
295 fPadData[idManuChannel].fCharge = charge;
297 fDetManuChannelIdList[dataCount] = idManuChannel;
298 if(detElemId != prevDetElemId){
299 if(fNofFiredDetElem>0){
300 fMaxFiredPerDetElem[fNofFiredDetElem-1] = dataCount;
303 prevDetElemId = detElemId ;
306 HLTDebug("buspatch : %d, detele : %d, id : %d, manu : %d, channel : %d, X : %f, Y: %f",
307 fPadData[idManuChannel].fBuspatchId,fPadData[idManuChannel].fDetElemId,
308 idManuChannel,((dataWord >> 12) & 0x7FF),((dataWord >> 23) & 0x3F),
309 fPadData[idManuChannel].fRealX,fPadData[idManuChannel].fRealY);
316 buspatchRawDataSize --;
318 indexBuspatch += totalBuspatchSize;
319 dspRawDataSize -= totalBuspatchSize;
321 indexDsp += totalDspSize;
322 blockRawDataSize -= totalDspSize;
324 index = totalBlockSize;
329 fDigitPerDDL = dataCount;
330 fMaxFiredPerDetElem[fNofFiredDetElem-1] = dataCount;
336 bool AliHLTMUONHitReconstructor::FindRecHits()
338 // fuction that calls hit reconstruction detector element-wise
340 for(int iDet=0; iDet<fNofFiredDetElem ; iDet++){
343 fCentralCountNB = 0 ;
344 fCentralChargeB = new int[fMaxFiredPerDetElem[iDet]];
345 fCentralChargeNB = new int[fMaxFiredPerDetElem[iDet]];
348 FindCentralHits(fMaxFiredPerDetElem[iDet-1],fMaxFiredPerDetElem[iDet]);
350 FindCentralHits(0,fMaxFiredPerDetElem[iDet]);
354 HLTError("Failed to merge hits\n");
359 for(int i=0;i<fMaxFiredPerDetElem[iDet];i++)
360 fGetIdTotalData[fPadData[fDetManuChannelIdList[i]].fIX][fPadData[fDetManuChannelIdList[i]].fIY][fPadData[fDetManuChannelIdList[i]].fPlane] = 0;
362 for(int i=fMaxFiredPerDetElem[iDet-1];i<fMaxFiredPerDetElem[iDet];i++)
363 fGetIdTotalData[fPadData[fDetManuChannelIdList[i]].fIX][fPadData[fDetManuChannelIdList[i]].fIY][fPadData[fDetManuChannelIdList[i]].fPlane] = 0;
367 delete []fCentralChargeB;
368 delete []fCentralChargeNB;
372 //for(int iPad=fDataPerDetElem[i];iPad<fDataPerDetElem[i+1];iPad++){
373 for(int iPad=0;iPad<fDigitPerDDL;iPad++){
374 fGetIdTotalData[fPadData[fDetManuChannelIdList[iPad]].fIX][fPadData[fDetManuChannelIdList[iPad]].fIY][fPadData[fDetManuChannelIdList[iPad]].fPlane] = 0;
375 fPadData[fDetManuChannelIdList[iPad]].fDetElemId = 0;
376 fPadData[fDetManuChannelIdList[iPad]].fBuspatchId = 0;
377 fPadData[fDetManuChannelIdList[iPad]].fIdManuChannel = 0;
378 fPadData[fDetManuChannelIdList[iPad]].fIX = 0 ;
379 fPadData[fDetManuChannelIdList[iPad]].fIY = 0 ;
380 fPadData[fDetManuChannelIdList[iPad]].fRealX = 0.0 ;
381 fPadData[fDetManuChannelIdList[iPad]].fRealY = 0.0 ;
382 fPadData[fDetManuChannelIdList[iPad]].fRealZ = 0.0 ;
383 fPadData[fDetManuChannelIdList[iPad]].fPlane = -1 ;
384 fPadData[fDetManuChannelIdList[iPad]].fPcbZone = -1 ;
385 fPadData[fDetManuChannelIdList[iPad]].fCharge = 0 ;
388 for(int i=0;i<13;i++)
389 fMaxFiredPerDetElem[i] = 0;
390 delete []fDetManuChannelIdList;
396 void AliHLTMUONHitReconstructor::FindCentralHits(int minPadId, int maxPadId)
398 // to find central hit associated with each cluster
401 int idManuChannelCentral;
405 for(int iPad=minPadId;iPad<maxPadId;iPad++){
406 idManuChannel = fDetManuChannelIdList[iPad];
409 fGetIdTotalData[fPadData[idManuChannel].fIX]
410 [fPadData[idManuChannel].fIY]
411 [fPadData[idManuChannel].fPlane] = idManuChannel;
413 if(fPadData[idManuChannel].fPlane == 0 ){//&& fPadData[idManuChannel].fIY > (0+1) && fPadData[idManuChannel].fIY < (79 - 1)){
414 //if(fPadData[idManuChannel].fIY > 0){
415 if(fCentralCountB>0){
417 for(b = 0;b<fCentralCountB;b++){
418 idManuChannelCentral = fCentralChargeB[b];
419 if(fPadData[idManuChannel].fIX == fPadData[idManuChannelCentral].fIX
421 (fPadData[idManuChannel].fIY
422 == fPadData[idManuChannelCentral].fIY + 1
424 fPadData[idManuChannel].fIY
425 == fPadData[idManuChannelCentral].fIY + 2
427 fPadData[idManuChannel].fIY
428 == fPadData[idManuChannelCentral].fIY - 2
430 fPadData[idManuChannel].fIY
431 == fPadData[idManuChannelCentral].fIY - 1)){
434 if(fPadData[idManuChannel].fCharge > fPadData[idManuChannelCentral].fCharge){
435 fCentralChargeB[b] = idManuChannel;
436 }// if condn on pad charge
437 }// if condon on pad position
440 fCentralChargeB[fCentralCountB] = idManuChannel;
445 fCentralChargeB[fCentralCountB] = idManuChannel;
447 }// check the size of centralHitB
448 for(b = 0;b<fCentralCountB;b++){
449 idManuChannelCentral = fCentralChargeB[b];
451 //}// if cond on iY > 2 (to avoid edge value pb)
454 if(fCentralCountNB>0){
456 for(nb = 0;nb<fCentralCountNB;nb++){
457 idManuChannelCentral = fCentralChargeNB[nb];
458 if(fPadData[idManuChannel].fIY == fPadData[idManuChannelCentral].fIY
460 (fPadData[idManuChannel].fIX
461 == fPadData[idManuChannelCentral].fIX + 1
463 fPadData[idManuChannel].fIX
464 == fPadData[idManuChannelCentral].fIX + 2
466 fPadData[idManuChannel].fIX
467 == fPadData[idManuChannelCentral].fIX - 2
469 fPadData[idManuChannel].fIX
470 == fPadData[idManuChannelCentral].fIX - 1)){
473 if(fPadData[idManuChannel].fCharge > fPadData[idManuChannelCentral].fCharge){
474 fCentralChargeNB[nb] = idManuChannel;
475 }// if condn over to find higher charge
476 }// if condn over to find position
477 }// for loop over presently all nb values
479 fCentralChargeNB[fCentralCountNB] = idManuChannel;
482 }// centralHitNB size test
484 fCentralChargeNB[fCentralCountNB] = idManuChannel;
486 }// centralHitNB size test
488 }// fill for bending and nonbending hit
493 void AliHLTMUONHitReconstructor::RecXRecY()
495 // find reconstructed X and Y for each plane separately
502 fRecY = new float[fCentralCountB];
503 fRecX = new float[fCentralCountNB];
505 fAvgChargeY = new float[fCentralCountB];
506 fAvgChargeX = new float[fCentralCountNB];
508 for(b=0;b<fCentralCountB;b++){
509 idCentral = fCentralChargeB[b];
511 if(fPadData[idCentral].fIY==0)
514 idLower = fGetIdTotalData[fPadData[idCentral].fIX][fPadData[idCentral].fIY-1][0];
516 if(fPadData[idCentral].fIY==79)
519 idUpper = fGetIdTotalData[fPadData[idCentral].fIX][fPadData[idCentral].fIY+1][0];
521 fRecY[b] = (fPadData[idCentral].fRealY*fPadData[idCentral].fCharge
523 fPadData[idUpper].fRealY*fPadData[idUpper].fCharge
525 fPadData[idLower].fRealY*fPadData[idLower].fCharge
526 )/(fPadData[idCentral].fCharge + fPadData[idUpper].fCharge + fPadData[idLower].fCharge) ;
528 fAvgChargeY[b] = fPadData[idCentral].fCharge;
531 fRecY[b] += 0.025*sin(12.56637*(0.25-(fRecY[b] - fPadData[idCentral].fRealY))) ;
534 for(nb=0;nb<fCentralCountNB;nb++){
535 idCentral = fCentralChargeNB[nb];
537 if(fPadData[idCentral].fIX==0)
540 idLeft = fGetIdTotalData[fPadData[idCentral].fIX-1][fPadData[idCentral].fIY][1];
542 if(fPadData[idCentral].fIX==335)
545 idRight = fGetIdTotalData[fPadData[idCentral].fIX+1][fPadData[idCentral].fIY][1];
547 fRecX[nb] = (fPadData[idCentral].fRealX*fPadData[idCentral].fCharge
549 fPadData[idRight].fRealX*fPadData[idRight].fCharge
551 fPadData[idLeft].fRealX*fPadData[idLeft].fCharge
552 )/(fPadData[idCentral].fCharge + fPadData[idRight].fCharge + fPadData[idLeft].fCharge);
555 fAvgChargeX[nb] = fPadData[idCentral].fCharge;
561 bool AliHLTMUONHitReconstructor::MergeRecHits()
563 // Merge reconstructed hits first over same plane then bending plane with non-bending plane
565 int idCentralB,idCentralNB ;
569 float halfPadLengthX,halfPadLengthY;
571 // MERGE Bending Plane hits, which are placed side by side
572 for(int i=0;i<fCentralCountB-1;i++){
574 for(int j=i+1;j<fCentralCountB;j++){
576 if(fCentralChargeB[i]==fCentralChargeB[j]){
582 fPadData[fCentralChargeB[i]].fIY == fPadData[fCentralChargeB[j]].fIY
586 fPadData[fCentralChargeB[i]].fIX == fPadData[fCentralChargeB[j]].fIX + 1
588 fPadData[fCentralChargeB[i]].fIX == fPadData[fCentralChargeB[j]].fIX - 1
596 if(fAvgChargeY[i] > fAvgChargeY[j]){
597 fRecY[i] = (fRecY[i]*fAvgChargeY[i] + fRecY[j]*fAvgChargeY[j]
598 )/(fAvgChargeY[i] + fAvgChargeY[j]);
602 fRecY[j] = (fRecY[i]*fAvgChargeY[i] + fRecY[j]*fAvgChargeY[j]
603 )/(fAvgChargeY[i] + fAvgChargeY[j]);
606 }// search for higher charge
609 }//if fRecY[i] != 0.0
612 // MERGE Non Bending Plane hits, which are place side by side
613 for(int i=0;i<fCentralCountNB-1;i++){
615 for(int j=i+1;j<fCentralCountNB;j++){
617 if(fCentralChargeNB[i]==fCentralChargeNB[j]){
623 fPadData[fCentralChargeNB[i]].fIX == fPadData[fCentralChargeNB[j]].fIX
627 fPadData[fCentralChargeNB[i]].fIY == fPadData[fCentralChargeNB[j]].fIY + 1
629 fPadData[fCentralChargeNB[i]].fIY == fPadData[fCentralChargeNB[j]].fIY - 1
637 if(fAvgChargeX[i] > fAvgChargeX[j]){
638 fRecX[i] = (fRecX[i]*fAvgChargeX[i] + fRecX[j]*fAvgChargeX[j]
639 )/(fAvgChargeX[i] + fAvgChargeX[j]);
643 fRecX[j] = (fRecX[i]*fAvgChargeX[i] + fRecX[j]*fAvgChargeX[j]
644 )/(fAvgChargeX[i] + fAvgChargeX[j]);
646 }// search for higher charge
649 }//if fRecX[i] != 0.0
652 // Merge bending Plane hits with Non Bending
653 for(int b=0;b<fCentralCountB;b++){
655 idCentralB = fCentralChargeB[b];
656 padCenterXB = fPadData[idCentralB].fRealX;
658 halfPadLengthX = fgkHalfPadSize[fPadData[idCentralB].fPcbZone] ;
660 for(int nb=0;nb<fCentralCountNB;nb++){
662 idCentralNB = fCentralChargeNB[nb];
664 padCenterYNB = fPadData[idCentralNB].fRealY;
666 halfPadLengthY = fgkHalfPadSize[fPadData[idCentralNB].fPcbZone] ;
668 if(fabsf(fRecX[nb]) > fabsf(padCenterXB))
669 diffX = fabsf(fRecX[nb]) - fabsf(padCenterXB);
671 diffX = fabsf(padCenterXB) - fabsf(fRecX[nb]);
673 if(fabsf(padCenterYNB)>fabsf(fRecY[b]))
674 diffY = fabsf(padCenterYNB) - fabsf(fRecY[b]);
676 diffY = fabsf(fRecY[b]) - fabsf(padCenterYNB);
678 if(diffX < halfPadLengthX && diffY < halfPadLengthY ){//&& fPadData[idCentralB].fIY != 0){
680 // First check that we have not overflowed the buffer.
681 if((*fRecPointsCount) == fMaxRecPointsCount){
682 HLTError("Nof RecHit (i.e. %d) exceeds the max nof RecHit limit %d\n",(*fRecPointsCount),fMaxRecPointsCount);
686 //fRecPoints[(*fRecPointsCount)].fId = idCentralB;
687 fRecPoints[(*fRecPointsCount)].fX = fRecX[nb];
688 fRecPoints[(*fRecPointsCount)].fY = fRecY[b];
689 fRecPoints[(*fRecPointsCount)].fZ = fPadData[idCentralB].fRealZ;
690 //fRecPoints[(*fRecPointsCount)].fDetElemId = (AliHLTUInt32_t)fPadData[idCentralB].fDetElemId;
691 (*fRecPointsCount)++;
692 }//if lies wihtin 5.0 mm
693 }// condn over fRecX ! = 0.0
694 }// loop over NB side
695 }// condn on fRecY[b] != 0.0
696 }// loop over B side;
701 delete []fAvgChargeX;
702 delete []fAvgChargeY;