--- PamCut/MiscCuts/TrackRedGeomCut/TrackRedGeomCut.cpp 2010/01/18 16:34:18 1.1 +++ PamCut/MiscCuts/TrackRedGeomCut/TrackRedGeomCut.cpp 2010/07/08 10:43:10 1.1.2.1 @@ -11,10 +11,16 @@ int TrackRedGeomCut::Check(PamLevel2 *event) { - if ( (!(_xCaloAxis) || !(_yCaloAxis)) && !(_pamTrack) ) { // check that one of the two possible initializations has been correctly done +#ifndef NO_CALOAXIS + if ((!(_xCaloAxis) || !(_yCaloAxis)) && !(_pamTrack)) { // check that one of the two possible initializations has been correctly done return 0; } - +#else + if ( !(_pamTrack) ) { // check that the initialization has been correctly done + return 0; + } +#endif /* NO_CALOAXIS */ +#ifndef NO_CALOAXIS if (!(_pamTrack)) { // CALOAXIS track Double_t xCaloTrack; @@ -22,17 +28,18 @@ for (Int_t igf = 0; igf < TrkParams::nGF; igf++) { xCaloTrack = _xCaloAxis->par[0] + (_xCaloAxis->par[1]) * TrkParams::zGF[igf]; // cm - if (! (- _xDim/2. < xCaloTrack && xCaloTrack < _xDim/2.) ) { + if (!(-_xDim / 2. < xCaloTrack && xCaloTrack < _xDim / 2.)) { return 0; } yCaloTrack = _yCaloAxis->par[0] + (_yCaloAxis->par[1]) * TrkParams::zGF[igf]; // cm - if (! (- _yDim/2. < yCaloTrack && yCaloTrack < _yDim/2.) ) { + if (!(-_yDim / 2. < yCaloTrack && yCaloTrack < _yDim / 2.)) { return 0; } } } +#endif /* NO_CALOAXIS */ if (_pamTrack) { // PAMELA track @@ -41,13 +48,13 @@ for (int igf = 0; igf < TrkParams::nGF; igf++) { // loop on GF planes // check done for all 14 planes - if (!(- _xDim/2. < trkTrack->xGF[igf] && trkTrack->xGF[igf] < _xDim/2.)) + if (!(-_xDim / 2. < trkTrack->xGF[igf] && trkTrack->xGF[igf] < _xDim / 2.)) return 0; - if (!(- _yDim/2. < trkTrack->yGF[igf] && trkTrack->yGF[igf] < _yDim/2.)) + if (!(-_yDim / 2. < trkTrack->yGF[igf] && trkTrack->yGF[igf] < _yDim / 2.)) return 0; } // end loop on GF planes - + } return CUTOK;