133 OutM.setf(ios::scientific,ios::floatfield);
134 OutV.setf(ios::scientific,ios::floatfield);
142 double* vect_ele = _vectorR;
143 double* vect_end = _vectorR + _nXtals;
144 int* xtal_ind = _xtalInd;
146 int* hits = _xtalHits;
148 while ( vect_ele < vect_end ) {
149 if ( *vect_ele != 0. ){
155 OutV << _nXtalsHit <<
" ";
159 while ( vect_ele < vect_end ) {
160 if ( *vect_ele != 0. ) {
161 OutV << *xtal_ind <<
" " << *hits <<
" " << *
hits_max <<
" "
193 for (
int i=0; i<nr_ele; i++) {
198 if (_vectorR[xtal_ind] == 0. ) {
202 _vectorR[xtal_ind] += vect_ele ;
203 _xtalInd[xtal_ind] = xtal_ind;
204 _xtalHits[xtal_ind] += hits;
214 bool successful =
true;
221 int* xRef =
new int[_nXtals];
222 memset(xRef, -1, (_nXtals*
sizeof(
int)));
225 for (
int _arrayIndx = 0;
226 _arrayIndx < _nXtals; _arrayIndx++) {
228 if ( _vectorR[_arrayIndx] > 0. ) {
230 _vectorR[_nXtalsHit] = _vectorR[_arrayIndx];
231 _xtalInd[_nXtalsHit] = _xtalInd[_arrayIndx];
232 _xtalHits[_nXtalsHit] = _xtalHits[_arrayIndx];
233 _xtalHitsMax[_nXtalsHit] = _xtalHitsMax[_arrayIndx];
234 xRef[_arrayIndx] = _nXtalsHit;