1019 |
* by the intersection among magnet cavity, silicon-plane sensitive area and |
* by the intersection among magnet cavity, silicon-plane sensitive area and |
1020 |
* ToF sensitive area (nominal values from the official document used to |
* ToF sensitive area (nominal values from the official document used to |
1021 |
* calculate the geometrical factor) |
* calculate the geometrical factor) |
1022 |
|
* @param toll Tolerance around the nominal volume (toll>0 define an inner fiducial volume) |
1023 |
*/ |
*/ |
1024 |
Bool_t TrkTrack::IsInsideAcceptance(){ |
// Bool_t TrkTrack::IsInsideAcceptance(){ |
1025 |
|
|
1026 |
|
// int ngf = TrkParams::nGF; |
1027 |
|
// for(int i=0; i<ngf; i++){ |
1028 |
|
// if( |
1029 |
|
// xGF[i] <= TrkParams::xGF_min[i] || |
1030 |
|
// xGF[i] >= TrkParams::xGF_max[i] || |
1031 |
|
// yGF[i] <= TrkParams::yGF_min[i] || |
1032 |
|
// yGF[i] >= TrkParams::yGF_max[i] || |
1033 |
|
// false)return false; |
1034 |
|
// } |
1035 |
|
// return true; |
1036 |
|
|
1037 |
|
// } |
1038 |
|
Bool_t TrkTrack::IsInsideAcceptance(float toll){ |
1039 |
|
|
1040 |
|
|
1041 |
int ngf = TrkParams::nGF; |
int ngf = TrkParams::nGF; |
1042 |
for(int i=0; i<ngf; i++){ |
for(int i=0; i<ngf; i++){ |
1043 |
|
// |
1044 |
|
// cout << endl << TrkParams::GF_element[i]; |
1045 |
|
if( |
1046 |
|
TrkParams::GF_element[i].CompareTo("S11") && |
1047 |
|
TrkParams::GF_element[i].CompareTo("S12") && |
1048 |
|
TrkParams::GF_element[i].CompareTo("S21") && |
1049 |
|
TrkParams::GF_element[i].CompareTo("S22") && |
1050 |
|
TrkParams::GF_element[i].CompareTo("T1") && |
1051 |
|
TrkParams::GF_element[i].CompareTo("CUF") && |
1052 |
|
TrkParams::GF_element[i].CompareTo("T2") && |
1053 |
|
TrkParams::GF_element[i].CompareTo("T3") && |
1054 |
|
TrkParams::GF_element[i].CompareTo("T4") && |
1055 |
|
TrkParams::GF_element[i].CompareTo("T5") && |
1056 |
|
TrkParams::GF_element[i].CompareTo("CLF") && |
1057 |
|
TrkParams::GF_element[i].CompareTo("T6") && |
1058 |
|
TrkParams::GF_element[i].CompareTo("S31") && |
1059 |
|
TrkParams::GF_element[i].CompareTo("S32") && |
1060 |
|
true)continue; |
1061 |
|
// apply condition only within the cavity |
1062 |
|
// cout << " -- "<<xGF[i]<<" "<<yGF[i]; |
1063 |
if( |
if( |
1064 |
xGF[i] <= TrkParams::xGF_min[i] || |
xGF[i] <= TrkParams::xGF_min[i] + toll || |
1065 |
xGF[i] >= TrkParams::xGF_max[i] || |
xGF[i] >= TrkParams::xGF_max[i] - toll || |
1066 |
yGF[i] <= TrkParams::yGF_min[i] || |
yGF[i] <= TrkParams::yGF_min[i] + toll || |
1067 |
yGF[i] >= TrkParams::yGF_max[i] || |
yGF[i] >= TrkParams::yGF_max[i] - toll || |
1068 |
false)return false; |
false){ |
1069 |
|
|
1070 |
|
return false; |
1071 |
|
} |
1072 |
} |
} |
1073 |
return true; |
return true; |
1074 |
|
} |
1075 |
|
|
1076 |
|
/** |
1077 |
|
* Returns true if the track is inside one of the surfaces which define the |
1078 |
|
* geometrical acceptance. |
1079 |
|
* @param surf tag of the surface (possible values are: S11 S12 S21 S22 T1 |
1080 |
|
* CUF T2 T3 T4 T5 CLF T6 S31 S32). |
1081 |
|
* @param toll Tolerance around the nominal surface (toll>0 define an inner |
1082 |
|
* fiducial surface) |
1083 |
|
*/ |
1084 |
|
Bool_t TrkTrack::IsInsideGFSurface(const char* surf, float toll){ |
1085 |
|
|
1086 |
|
|
1087 |
|
int ngf = TrkParams::nGF; |
1088 |
|
bool SURFOK = false; |
1089 |
|
for(int i=0; i<ngf; i++){ |
1090 |
|
if( !TrkParams::GF_element[i].CompareTo(surf) ){ |
1091 |
|
SURFOK=true; |
1092 |
|
if( |
1093 |
|
xGF[i] > TrkParams::xGF_min[i] + toll && |
1094 |
|
xGF[i] < TrkParams::xGF_max[i] - toll && |
1095 |
|
yGF[i] > TrkParams::yGF_min[i] + toll && |
1096 |
|
yGF[i] < TrkParams::yGF_max[i] - toll && |
1097 |
|
true)return true; |
1098 |
|
} |
1099 |
|
} |
1100 |
|
if( !SURFOK )cout << " Bool_t TrkTrack::IsInsideGFSurface(char* surf, float toll) --> suface "<<surf<<" not defined "<<endl; |
1101 |
|
return false; |
1102 |
|
|
1103 |
} |
} |
1104 |
|
|
1105 |
/** |
/** |
1106 |
* Method to retrieve ID (0,1,...) of x-cluster (if any) associated to this track. |
* Method to retrieve ID (0,1,...) of x-cluster (if any) associated to this track. |
1107 |
* If no cluster is associated, ID=-1. |
* If no cluster is associated, ID=-1. |