| 11 |
|
|
| 12 |
int TrackRedGeomCut::Check(PamLevel2 *event) { |
int TrackRedGeomCut::Check(PamLevel2 *event) { |
| 13 |
|
|
| 14 |
if ( (!(_xCaloAxis) || !(_yCaloAxis)) && !(_pamTrack) ) { // check that one of the two possible initializations has been correctly done |
#ifndef NO_CALOAXIS |
| 15 |
|
if ((!(_xCaloAxis) || !(_yCaloAxis)) && !(_pamTrack)) { // check that one of the two possible initializations has been correctly done |
| 16 |
return 0; |
return 0; |
| 17 |
} |
} |
| 18 |
|
#else |
| 19 |
|
if ( !(_pamTrack) ) { // check that the initialization has been correctly done |
| 20 |
|
return 0; |
| 21 |
|
} |
| 22 |
|
#endif /* NO_CALOAXIS */ |
| 23 |
|
#ifndef NO_CALOAXIS |
| 24 |
if (!(_pamTrack)) { // CALOAXIS track |
if (!(_pamTrack)) { // CALOAXIS track |
| 25 |
|
|
| 26 |
Double_t xCaloTrack; |
Double_t xCaloTrack; |
| 28 |
|
|
| 29 |
for (Int_t igf = 0; igf < TrkParams::nGF; igf++) { |
for (Int_t igf = 0; igf < TrkParams::nGF; igf++) { |
| 30 |
xCaloTrack = _xCaloAxis->par[0] + (_xCaloAxis->par[1]) * TrkParams::zGF[igf]; // cm |
xCaloTrack = _xCaloAxis->par[0] + (_xCaloAxis->par[1]) * TrkParams::zGF[igf]; // cm |
| 31 |
if (! (- _xDim/2. < xCaloTrack && xCaloTrack < _xDim/2.) ) { |
if (!(-_xDim / 2. < xCaloTrack && xCaloTrack < _xDim / 2.)) { |
| 32 |
return 0; |
return 0; |
| 33 |
} |
} |
| 34 |
|
|
| 35 |
yCaloTrack = _yCaloAxis->par[0] + (_yCaloAxis->par[1]) * TrkParams::zGF[igf]; // cm |
yCaloTrack = _yCaloAxis->par[0] + (_yCaloAxis->par[1]) * TrkParams::zGF[igf]; // cm |
| 36 |
if (! (- _yDim/2. < yCaloTrack && yCaloTrack < _yDim/2.) ) { |
if (!(-_yDim / 2. < yCaloTrack && yCaloTrack < _yDim / 2.)) { |
| 37 |
return 0; |
return 0; |
| 38 |
} |
} |
| 39 |
} |
} |
| 40 |
|
|
| 41 |
} |
} |
| 42 |
|
#endif /* NO_CALOAXIS */ |
| 43 |
|
|
| 44 |
if (_pamTrack) { // PAMELA track |
if (_pamTrack) { // PAMELA track |
| 45 |
|
|
| 48 |
for (int igf = 0; igf < TrkParams::nGF; igf++) { // loop on GF planes |
for (int igf = 0; igf < TrkParams::nGF; igf++) { // loop on GF planes |
| 49 |
|
|
| 50 |
// check done for all 14 planes |
// check done for all 14 planes |
| 51 |
if (!(- _xDim/2. < trkTrack->xGF[igf] && trkTrack->xGF[igf] < _xDim/2.)) |
if (!(-_xDim / 2. < trkTrack->xGF[igf] && trkTrack->xGF[igf] < _xDim / 2.)) |
| 52 |
return 0; |
return 0; |
| 53 |
if (!(- _yDim/2. < trkTrack->yGF[igf] && trkTrack->yGF[igf] < _yDim/2.)) |
if (!(-_yDim / 2. < trkTrack->yGF[igf] && trkTrack->yGF[igf] < _yDim / 2.)) |
| 54 |
return 0; |
return 0; |
| 55 |
|
|
| 56 |
} // end loop on GF planes |
} // end loop on GF planes |
| 57 |
|
|
| 58 |
} |
} |
| 59 |
|
|
| 60 |
return CUTOK; |
return CUTOK; |