93 cout << endl <<
"-I- " << fName <<
": executing event with " <<
fDigis->GetEntriesFast() <<
" digis." << endl;
94 cout <<
"----------------------------------------------" << endl;
99 cerr <<
"-E- " << fName <<
"::Exec: No digi scheme!" << endl;
118 for (
Int_t iStation = 0; iStation < nStations; iStation++) {
120 Int_t nDigisFInStation = 0;
121 Int_t nDigisBInStation = 0;
124 for (
Int_t iSector = 0; iSector < nSectors; iSector++) {
128 set<Int_t> fSet, bSet;
130 cout <<
"-E- " << fName <<
"::Exec: sector " << sector->
GetSectorNr() <<
" of station "
131 << station->
GetStationNr() <<
"not found in front map!" << endl;
139 cout <<
"-E- " << fName <<
"::Exec: sector " << sector->
GetSectorNr() <<
" of station "
140 << station->
GetStationNr() <<
"not found in back map!" << endl;
147 Int_t nDigisFInSector = fSet.size();
148 Int_t nDigisBInSector = bSet.size();
149 nDigisFInStation += nDigisFInSector;
150 nDigisBInStation += nDigisBInSector;
153 nDigisF += nDigisFInStation;
154 nDigisB += nDigisBInStation;
164 cout <<
"-I- " << fName <<
":Event summary" << endl;
165 cout <<
" Active channels front side: " << nDigisF << endl;
166 cout <<
" Active channels back side : " << nDigisB << endl;
167 cout <<
" Real time : " <<
fTimer.RealTime() << endl;
173 cout << setw(15) << left << fName <<
": " << setprecision(4) << setw(8) << fixed << right <<
fTimer.RealTime()
362 set<Int_t>::iterator it1;
370 Int_t lastDigiNr = -1;
371 Int_t lastDigiPos = -1;
373 Int_t clusterMaxNr = -1;
374 Int_t clusterMaxPos = -1;
378 Int_t clusterBeginPos = 0;
379 Int_t clusterWidth = 0;
384 for (it1 = digiSet.begin(); it1 != digiSet.end(); it1++) {
389 digiSig = digi->GetADC();
391 if (lastDigiPos == -1) {
394 clusterBeginPos = digiPos;
397 if (digiPos == lastDigiPos + 1) {
399 if (digiSig == lastDigiSig) {
401 clusterHasPlateau =
kTRUE;
405 if (digiSig > lastDigiSig && lastDigiSig < clusterMaxSig) {
406 cluster->
SetMean(clusterMaxNr);
414 clusterWidth = lastDigiPos - clusterBeginPos + 1;
417 if (clusterHasPlateau) {
420 if (!clusterHasMinimum && !clusterHasPlateau) {
426 clusterHasPlateau =
kFALSE;
429 clusterBeginPos = digiPos;
431 }
else if (lastDigiPos >= 0) {
432 cluster->
SetMean(clusterMaxNr);
438 clusterWidth = lastDigiPos - clusterBeginPos + 1;
441 if (clusterHasPlateau) {
444 if (!clusterHasMinimum && !clusterHasPlateau) {
450 clusterHasPlateau =
kFALSE;
453 clusterBeginPos = digiPos;
455 if (digiSig > clusterMaxSig) {
456 clusterMaxNr = iDigi;
457 clusterMaxPos = digiPos;
458 clusterMaxSig = digiSig;
461 clusterWidth = lastDigiPos - clusterBeginPos + 1;
462 if (clusterWidth < 90)
466 cluster->
SetMean(clusterMaxNr);
472 clusterWidth = lastDigiPos - clusterBeginPos + 1;
475 if (clusterHasPlateau) {
478 if (!clusterHasMinimum && !clusterHasPlateau) {
484 clusterHasPlateau =
kFALSE;
487 clusterBeginPos = digiPos;
491 lastDigiPos = digiPos;
492 lastDigiSig = digiSig;
495 cluster->
SetMean(clusterMaxNr);
498 clusterWidth = lastDigiPos - clusterBeginPos + 1;
501 if (clusterHasPlateau) {
504 if (lastDigiPos && !clusterHasPlateau) {
513 map<Int_t, Int_t> channelSorted;
514 for (it1 = digiSet.begin(); it1 != digiSet.end(); it1++) {
523 for (
Int_t iter = 0; iter < 1100; iter++) {
524 iDigi = channelSorted[iter];
529 if (iFS >= channelSorted.size())
573 maxDigiSig = digi->GetADC() - plateau;
575 if (
TMath::Abs(plateau - maxDigiSig) < 0.0001)
589 chanADC = digi->GetADC();
590 chanADC = (chanADC < plateau ? 0 : chanADC - plateau);
592 sumWX += chanNr * chanADC;
598 cluster->
SetMean(sumWX / sumW);
600 if (sumW < maxDigiSig) {
601 cout <<
" MAX DIGI = " << maxDigiSig <<
", while SUMW = " << sumW << endl;
604 cout <<
"digi ADC = " << digi->GetADC() <<
" at channel# " << digi->
GetChannelNr() << endl;
617 cout <<
"============================================================" << endl;
618 cout <<
"===== " << fName <<
": Run summary " << endl;
619 cout <<
"===== " << endl;
620 cout <<
"===== Number of clusters : " << setw(8) << setprecision(2) <<
fNofClusters << endl;
621 cout <<
"===== Number of good clusters : " << setw(8) << setprecision(2) <<
fNofClustersGood <<
" ("
623 cout <<
"===== Number of plateau clusters : " << setw(8) << setprecision(2) <<
fNofClustersWP <<
" ("
625 cout <<
"===== Number of minimum clusters : " << setw(8) << setprecision(2) <<
fNofClustersWM <<
" ("
627 cout <<
"===== Longest cluster : " << setw(8) << setprecision(2) <<
fLongestCluster << endl;
628 cout <<
"===== Longest good cluster : " << setw(8) << setprecision(2) <<
fLongestGoodCluster << endl;
629 cout <<
"============================================================" << endl;