74 |
// |
// |
75 |
//-------------------------------------- |
//-------------------------------------- |
76 |
/** |
/** |
77 |
* Evaluate the cluster signal including all adjacent strip with a significant signal ( s > cut*sigma ). |
* Evaluate the cluster signal including a maximum number of adjacent |
78 |
* @param cut Inclusion cut. |
* strips, around maxs, having a significant signal. |
79 |
|
* @param nstrip Maximum number of strips. |
80 |
|
* @param cut Inclusion cut ( s > cut*sigma ). |
81 |
|
* If nstrip<=0 only the inclusion cut is used to determine the cluster size. |
82 |
*/ |
*/ |
83 |
Float_t TrkCluster::GetSignal(Float_t cut){ |
Float_t TrkCluster::GetSignal(Int_t nstrip, Float_t cut){ |
84 |
Float_t s = 0; |
|
85 |
for(Int_t is = 0; is < CLlength; is++){ |
Float_t s = 0; |
86 |
Float_t scut = cut*clsigma[is]; |
|
87 |
if(clsignal[is] > scut) s += clsignal[is]; |
if( nstrip<=0 ){ |
88 |
|
// for(Int_t is = 0; is < CLlength; is++){ |
89 |
|
// Float_t scut = cut*clsigma[is]; |
90 |
|
// if(clsignal[is] > scut) s += clsignal[is]; |
91 |
|
// }; |
92 |
|
for(Int_t is = indmax+1; is < CLlength; is++){ |
93 |
|
Float_t scut = cut*clsigma[is]; |
94 |
|
if(clsignal[is] > scut) s += clsignal[is]; |
95 |
|
else break; |
96 |
|
}; |
97 |
|
for(Int_t is = indmax; is >=0; is--){ |
98 |
|
Float_t scut = cut*clsigma[is]; |
99 |
|
if(clsignal[is] > scut) s += clsignal[is]; |
100 |
|
else break; |
101 |
}; |
}; |
102 |
return s; |
return s; |
103 |
|
}; |
104 |
|
|
105 |
|
|
106 |
|
Int_t il = indmax; |
107 |
|
Int_t ir = indmax; |
108 |
|
Int_t inc = 0; |
109 |
|
|
110 |
|
if( clsignal[indmax] < cut*clsigma[indmax] ) return 0; |
111 |
|
|
112 |
|
while ( inc < nstrip ){ |
113 |
|
Float_t sl = -100000; |
114 |
|
Float_t sr = -100000; |
115 |
|
if( il >= 0 ) sl = clsignal[il]; |
116 |
|
if( ir < CLlength ) sr = clsignal[ir]; |
117 |
|
if( sl == sr && inc == 0 ){ |
118 |
|
s += clsignal[il]; //cout << inc<<" - "<< clsignal[il]<<" "<<s<<endl; |
119 |
|
il--; |
120 |
|
ir++; |
121 |
|
}else if ( sl >= sr && sl > cut*clsigma[il] && inc !=0 ){ |
122 |
|
s += sl;//cout << inc<<" - "<< clsignal[il]<<" "<<s<<endl; |
123 |
|
il--; |
124 |
|
}else if ( sl < sr && sr > cut*clsigma[ir] ){ |
125 |
|
s += sr;//cout << inc<<" - " << clsignal[ir]<<" "<<s<<endl; |
126 |
|
ir++; |
127 |
|
}else break; |
128 |
|
|
129 |
|
inc++; |
130 |
|
} |
131 |
|
return s; |
132 |
}; |
}; |
133 |
|
|
134 |
/** |
/** |
135 |
* Evaluate the cluster signal including a ( maximum ) fixed number of adjacent strips (with s>0) around the maxs. |
including a ( maximum ) fixed number of adjacent strips (with s>0) around the maxs. |
136 |
* @param nstrip Number of strips. |
* @param nstrip Number of strips. |
137 |
*/ |
*/ |
|
Float_t TrkCluster::GetSignal(Int_t nstrip){ |
|
|
|
|
|
Float_t s = 0; |
|
|
Int_t il = indmax; |
|
|
Int_t ir = indmax; |
|
|
Int_t inc = 0; |
|
|
|
|
|
while ( inc<nstrip ){ |
|
|
Float_t sl = 0; |
|
|
Float_t sr = 0; |
|
|
if( il >= 0 ) sl = clsignal[il]; |
|
|
if( ir < CLlength ) sr = clsignal[ir]; |
|
|
if( sl == sr && inc == 0 ){ |
|
|
s += clsignal[il]; |
|
|
il--; |
|
|
ir++; |
|
|
}else if ( sl >= sr && sl>0 && inc !=0){ |
|
|
s += sl; |
|
|
il--; |
|
|
}else if ( sl < sr && sr>0 ){ |
|
|
s += sr; |
|
|
ir++; |
|
|
}else break; |
|
|
|
|
|
inc++; |
|
|
} |
|
|
return s; |
|
|
}; |
|
|
/** |
|
|
* Evaluate the cluster signal-to-noise, as defined by Turchetta, including all adjacent strip with a significant signal ( s > cut*sigma ). |
|
|
* @param cut Inclusion cut. |
|
|
*/ |
|
|
Float_t TrkCluster::GetSignalToNoise(Float_t cut){ |
|
|
Float_t sn = 0; |
|
|
for(Int_t is = 0; is < CLlength; is++){ |
|
|
Float_t scut = cut*clsigma[is]; |
|
|
if(clsignal[is] > scut) sn += clsignal[is]/clsigma[is]; |
|
|
}; |
|
|
return sn; |
|
|
}; |
|
138 |
/** |
/** |
139 |
* Evaluate the cluster signal-to-noise, as defined by Turchetta, including a ( maximum ) fixed number of adjacent strips (with s>0) around the maxs. |
* Evaluate the cluster signal-to-noise, as defined by Turchetta, including a maximum number of adjacent strips, around maxs, having a significant signal. |
140 |
* @param nstrip Number of strips. |
* @param nstrip Maximum number of strips. |
141 |
|
* @param cut Inclusion cut ( s > cut*sigma ). |
142 |
|
* If nstrip<=0 only the inclusion cut is used to determine the cluster size. |
143 |
*/ |
*/ |
144 |
Float_t TrkCluster::GetSignalToNoise(Int_t nstrip){ |
Float_t TrkCluster::GetSignalToNoise(Int_t nstrip, Float_t cut){ |
145 |
|
|
146 |
Float_t sn = 0; |
Float_t sn = 0; |
147 |
Int_t il = indmax; |
|
148 |
Int_t ir = indmax; |
if( nstrip<=0 ){ |
149 |
Int_t inc = 0; |
for(Int_t is = indmax+1; is < CLlength; is++){ |
150 |
|
Float_t scut = cut*clsigma[is]; |
151 |
while ( inc<nstrip ){ |
if(clsignal[is] > scut) sn += clsignal[is]/clsigma[is]; |
152 |
Float_t sl = 0; |
else break; |
153 |
Float_t sr = 0; |
}; |
154 |
if( il >= 0 ) sl = clsignal[il]; |
for(Int_t is = indmax; is >=0; is--){ |
155 |
if( ir < CLlength ) sr = clsignal[ir]; |
Float_t scut = cut*clsigma[is]; |
156 |
if( sl == sr && inc == 0 ){ |
if(clsignal[is] > scut) sn += clsignal[is]/clsigma[is]; |
157 |
sn += clsignal[il]/clsigma[il]; |
else break; |
158 |
il--; |
}; |
|
ir++; |
|
|
}else if ( sl >= sr && sl>0 && inc !=0){ |
|
|
sn += sl/clsigma[il]; |
|
|
il--; |
|
|
}else if ( sl < sr && sr>0 ){ |
|
|
sn += sr/clsigma[ir]; |
|
|
ir++; |
|
|
}else break; |
|
|
|
|
|
inc++; |
|
|
} |
|
159 |
return sn; |
return sn; |
160 |
|
}; |
161 |
|
|
162 |
|
|
163 |
|
Int_t il = indmax; |
164 |
|
Int_t ir = indmax; |
165 |
|
Int_t inc = 0; |
166 |
|
|
167 |
|
if( clsignal[indmax] < cut*clsigma[indmax] ) return 0; |
168 |
|
|
169 |
|
while ( inc < nstrip ){ |
170 |
|
Float_t sl = -100000; |
171 |
|
Float_t sr = -100000; |
172 |
|
if( il >= 0 ) sl = clsignal[il]; |
173 |
|
if( ir < CLlength ) sr = clsignal[ir]; |
174 |
|
if( sl == sr && inc == 0 ){ |
175 |
|
sn += clsignal[il]/clsigma[il]; |
176 |
|
il--; |
177 |
|
ir++; |
178 |
|
}else if ( sl >= sr && sl > cut*clsigma[il] && inc !=0 ){ |
179 |
|
sn += sl/clsigma[il]; |
180 |
|
il--; |
181 |
|
}else if ( sl < sr && sr > cut*clsigma[ir] ){ |
182 |
|
sn += sr/clsigma[ir]; |
183 |
|
ir++; |
184 |
|
}else break; |
185 |
|
|
186 |
|
inc++; |
187 |
|
} |
188 |
|
return sn; |
189 |
}; |
}; |
190 |
/** |
/** |
191 |
* Evaluate the cluster multiplicity. |
* Evaluate the cluster multiplicity. |