--- DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2009/02/03 13:57:15 1.53 +++ DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2014/01/16 15:29:47 1.55 @@ -697,8 +697,8 @@ int il = (int)GetLadder(i); double omega = 0.; - double beta = 0.; - double gamma = 0.; + // double beta = 0.;// EM GCC 4.7 + // double gamma = 0.; if( (is < 0 || is > 1 || ip < 0 || ip > 5 || il < 0 || il > 2) && true){ @@ -708,8 +708,8 @@ cout << " is ip il = "<0 define an inner fiducial volume) */ -Bool_t TrkTrack::IsInsideAcceptance(){ +// Bool_t TrkTrack::IsInsideAcceptance(){ + +// int ngf = TrkParams::nGF; +// for(int i=0; i= TrkParams::xGF_max[i] || +// yGF[i] <= TrkParams::yGF_min[i] || +// yGF[i] >= TrkParams::yGF_max[i] || +// false)return false; +// } +// return true; + +// } +Bool_t TrkTrack::IsInsideAcceptance(float toll){ + int ngf = TrkParams::nGF; for(int i=0; i= TrkParams::xGF_max[i] || - yGF[i] <= TrkParams::yGF_min[i] || - yGF[i] >= TrkParams::yGF_max[i] || - false)return false; + TrkParams::GF_element[i].CompareTo("S11") && + TrkParams::GF_element[i].CompareTo("S12") && + TrkParams::GF_element[i].CompareTo("S21") && + TrkParams::GF_element[i].CompareTo("S22") && + TrkParams::GF_element[i].CompareTo("T1") && + TrkParams::GF_element[i].CompareTo("CUF") && + TrkParams::GF_element[i].CompareTo("T2") && + TrkParams::GF_element[i].CompareTo("T3") && + TrkParams::GF_element[i].CompareTo("T4") && + TrkParams::GF_element[i].CompareTo("T5") && + TrkParams::GF_element[i].CompareTo("CLF") && + TrkParams::GF_element[i].CompareTo("T6") && + TrkParams::GF_element[i].CompareTo("S31") && + TrkParams::GF_element[i].CompareTo("S32") && + true)continue; + // apply condition only within the cavity +// cout << " -- "<= TrkParams::xGF_max[i] - toll || + yGF[i] <= TrkParams::yGF_min[i] + toll || + yGF[i] >= TrkParams::yGF_max[i] - toll || + false){ + + return false; + } } return true; +} + +/** + * Returns true if the track is inside one of the surfaces which define the + * geometrical acceptance. + * @param surf tag of the surface (possible values are: S11 S12 S21 S22 T1 + * CUF T2 T3 T4 T5 CLF T6 S31 S32). + * @param toll Tolerance around the nominal surface (toll>0 define an inner + * fiducial surface) +*/ +Bool_t TrkTrack::IsInsideGFSurface(const char* surf, float toll){ + + + int ngf = TrkParams::nGF; + bool SURFOK = false; + for(int i=0; i TrkParams::xGF_min[i] + toll && + xGF[i] < TrkParams::xGF_max[i] - toll && + yGF[i] > TrkParams::yGF_min[i] + toll && + yGF[i] < TrkParams::yGF_max[i] - toll && + true)return true; + } + } + if( !SURFOK )cout << " Bool_t TrkTrack::IsInsideGFSurface(char* surf, float toll) --> suface "<