/[PAMELA software]/PamCut/MiscCuts/TrackRedGeomCut/TrackRedGeomCut.cpp
ViewVC logotype

Diff of /PamCut/MiscCuts/TrackRedGeomCut/TrackRedGeomCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by pam-fi, Mon Jan 18 16:34:18 2010 UTC revision 1.1.2.1 by pam-fi, Thu Jul 8 10:43:10 2010 UTC
# Line 11  Line 11 
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;
# Line 22  int TrackRedGeomCut::Check(PamLevel2 *ev Line 28  int TrackRedGeomCut::Check(PamLevel2 *ev
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    
# Line 41  int TrackRedGeomCut::Check(PamLevel2 *ev Line 48  int TrackRedGeomCut::Check(PamLevel2 *ev
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;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.23