| 10 |
|
|
| 11 |
int CaloNotIntCut::Check(PamLevel2 *event) { |
int CaloNotIntCut::Check(PamLevel2 *event) { |
| 12 |
|
|
| 13 |
if ( (!(_xCaloAxis) || !(_yCaloAxis)) && !(_trkTrack) ) { // check that one of the two possible initializations has been correctly done |
#ifndef NO_CALOAXIS |
| 14 |
|
if ( (!(_xCaloAxis) || !(_yCaloAxis)) && !(_pamTrack) ) { // check that one of the two possible initializations has been correctly done |
| 15 |
return 0; |
return 0; |
| 16 |
} |
} |
| 17 |
|
#else |
| 18 |
if (!(_trkTrack)) { // CALO track |
if ( !(_pamTrack) ) { // check that the initialization has been correctly done |
| 19 |
|
return 0; |
| 20 |
|
} |
| 21 |
|
#endif /* NO_CALOAXIS */ |
| 22 |
|
|
| 23 |
|
#ifndef NO_CALOAXIS |
| 24 |
|
if (!(_pamTrack)) { // CALOAXIS track |
| 25 |
|
|
| 26 |
// energy released along the event axis in the calo / total energy release in the calo |
// energy released along the event axis in the calo / total energy release in the calo |
| 27 |
|
|
| 28 |
float qratio = ( _xCaloAxis->GetQaxis() + _yCaloAxis->GetQaxis() ) / event->GetCaloLevel2()->qtot; |
Double_t qtot = event->GetCaloLevel2()->qtot; |
| 29 |
|
if ( qtot>0 ) { |
| 30 |
|
|
| 31 |
|
Double_t qratio = ( _xCaloAxis->GetQaxis() + _yCaloAxis->GetQaxis() ) / qtot; |
| 32 |
|
|
| 33 |
if (! (qratio > _qRatioMin) ) { |
if (! (qratio > _qRatioMin) ) { |
| 34 |
return 1; |
return 1; |
| 35 |
} |
} |
| 36 |
|
|
| 37 |
|
} |
| 38 |
} |
} |
| 39 |
|
#endif /* NO_CALOAXIS */ |
| 40 |
|
|
| 41 |
if (_trkTrack) { // TRK track |
if (_pamTrack) { // PAMELA track |
| 42 |
|
|
| 43 |
return 2; // temporary |
Double_t qtot = event->GetCaloLevel2()->qtot; |
| 44 |
// Implement here the check using the tracker track. |
if ( qtot>0 ) { |
| 45 |
|
|
| 46 |
|
Double_t qratio = ( (*_pamTrack)->GetCaloTrack()->qtrack ) / qtot; |
| 47 |
|
|
| 48 |
|
if (! (qratio > _qRatioMin) ) { |
| 49 |
|
return 2; |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
} |
| 53 |
|
|
| 54 |
} |
} |
| 55 |
|
|