312 |
// |
// |
313 |
printf("\n Processed events: \n\n"); |
printf("\n Processed events: \n\n"); |
314 |
// |
// |
315 |
|
Int_t se = 5; |
316 |
|
bool isCOMP = 0; |
317 |
|
bool isFULL = 0; |
318 |
|
bool isRAW = 0; |
319 |
|
Int_t upnn = 0; |
320 |
|
Double_t prima = 0.; |
321 |
|
Double_t prmndp = 0.; |
322 |
|
calo = new CalorimeterLevel1(); |
323 |
for (Int_t i = 0; i < nevents; i++){ |
for (Int_t i = 0; i < nevents; i++){ |
324 |
//for (Int_t i = 0; i < 1000; i++){ |
//for (Int_t i = 0; i < 1000; i++){ |
325 |
//calo = new pamela::calorimeter::CalorimeterLevel1(); |
//calo = new pamela::calorimeter::CalorimeterLevel1(); |
|
calo = new CalorimeterLevel1(); |
|
326 |
evno = i; |
evno = i; |
327 |
if ( i%1000 == 0 && i > 0 ) printf(" %iK \n",i/1000); |
if ( i%1000 == 0 && i > 0 ) printf(" %iK \n",i/1000); |
328 |
// |
// |
371 |
// |
// |
372 |
// determine the section number |
// determine the section number |
373 |
// |
// |
374 |
Int_t se = 5; |
se = 5; |
375 |
if (l == 0 && m%2 == 0) se = 3; |
if (l == 0 && m%2 == 0) se = 3; |
376 |
if (l == 0 && m%2 != 0) se = 2; |
if (l == 0 && m%2 != 0) se = 2; |
377 |
if (l == 1 && m%2 == 0) se = 1; |
if (l == 1 && m%2 == 0) se = 1; |
379 |
// |
// |
380 |
// determine what kind of event we are going to analyze |
// determine what kind of event we are going to analyze |
381 |
// |
// |
382 |
bool isCOMP = 0; |
isCOMP = 0; |
383 |
bool isFULL = 0; |
isFULL = 0; |
384 |
bool isRAW = 0; |
isRAW = 0; |
385 |
if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1; |
if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1; |
386 |
if ( de->stwerr[se] & (1 << 17) ) isFULL = 1; |
if ( de->stwerr[se] & (1 << 17) ) isFULL = 1; |
387 |
if ( de->stwerr[se] & (1 << 3) ) isRAW = 1; |
if ( de->stwerr[se] & (1 << 3) ) isRAW = 1; |
438 |
if ( !done && (evento.base[l][m][pre] == 31000. || evento.base[l][m][pre] == 0.) ){ |
if ( !done && (evento.base[l][m][pre] == 31000. || evento.base[l][m][pre] == 0.) ){ |
439 |
tot0++; |
tot0++; |
440 |
evento.base[l][m][pre] = calib.sbase[l][m][pre]; |
evento.base[l][m][pre] = calib.sbase[l][m][pre]; |
441 |
Int_t upnn = n+16; |
upnn = n+16; |
442 |
if ( upnn > 96 ) n = 96; |
if ( upnn > 96 ) n = 96; |
443 |
for ( Int_t nn = n; nn<upnn; nn++ ){ |
for ( Int_t nn = n; nn<upnn; nn++ ){ |
444 |
evento.dexyc[l][m][nn] = de->dexyc[l][m][nn] ; |
evento.dexyc[l][m][nn] = de->dexyc[l][m][nn] ; |
463 |
}; |
}; |
464 |
if ( fcheck ) { |
if ( fcheck ) { |
465 |
memcpy(&evento2, &evento, sizeof(evento)); |
memcpy(&evento2, &evento, sizeof(evento)); |
466 |
Double_t prima = evento.base[l][m][pre]; |
prima = evento.base[l][m][pre]; |
467 |
CaloFindBaseRaw(calib,evento2,l,m,pre); |
CaloFindBaseRaw(calib,evento2,l,m,pre); |
468 |
diffbas[l][m][pre] = 0.; |
diffbas[l][m][pre] = 0.; |
469 |
if ( evento2.base[l][m][pre] != 31000. ) { |
if ( evento2.base[l][m][pre] != 31000. ) { |
470 |
Double_t prmndp = prima - evento2.base[l][m][pre]; |
prmndp = prima - evento2.base[l][m][pre]; |
471 |
if ( prmndp > 100000000. || prmndp < 100000000. ) prmndp = 0.; |
if ( prmndp > 100000000. || prmndp < 100000000. ) prmndp = 0.; |
472 |
diffbas[l][m][pre] = (float)prmndp; |
diffbas[l][m][pre] = (float)prmndp; |
473 |
calo->diffbas[l][m][pre] = (float)prmndp; |
calo->diffbas[l][m][pre] = (float)prmndp; |