37 return StatusCode::FAILURE;
47 unsigned size =
env.GetValue(
"Model__size" , 0 );
48 auto PreprocessingMode = GetValues<int>(
"Model__barcode",
env);
51 auto etmin = GetValues<float>(
"Model__etmin",
env );
52 auto etmax = GetValues<float>(
"Model__etmax",
env );
55 auto etamin = GetValues<float>(
"Model__etamin",
env );
56 auto etamax = GetValues<float>(
"Model__etamax",
env );
76 unsigned size =
env.GetValue(
"Threshold__size" , 0);
77 auto max_avgmu = GetValues<float>(
"Threshold__MaxAverageMu",
env );
80 auto etmin = GetValues<float>(
"Threshold__etmin",
env );
81 auto etmax = GetValues<float>(
"Threshold__etmax",
env );
83 auto etamin = GetValues<float>(
"Threshold__etamin",
env );
84 auto etamax = GetValues<float>(
"Threshold__etamax",
env );
86 auto slopes = GetValues<float>(
"Threshold__slope",
env );
88 auto offsets = GetValues<float>(
"Threshold__offset",
env );
103 return StatusCode::SUCCESS;
117 if ( eta < cutDef.etaMin() || eta >= cutDef.etaMax() )
continue;
118 return cutDef.accept( discr, avgmu );
135 if(eta<
model.etaMin() || eta >=
model.etaMax())
continue;
142 ATH_MSG_DEBUG(
"There is no model available for this cluster.");
155 std::vector< std::vector< float > >
inputs;
158 if ( PreprocessingMode == 0 ){
159 const std::vector<float> rings = ringsCluster->
rings();
160 std::vector<float> refRings(rings.size());
161 refRings.assign(rings.begin(), rings.end());
163 for(
auto &ring : refRings )
energy+=ring;
166 for(
auto &ring : refRings ) ring/=
energy;
169 inputs.push_back( refRings );
172 }
else if ( PreprocessingMode == 1){
174 const std::vector<float> rings = ringsCluster->
rings();
175 std::vector<float> refRings(rings.size());
176 refRings.assign(rings.begin(), rings.end());
178 std::vector<float> halfRings;
180 constexpr
int PS = 8;
181 constexpr
int EM1 = 64;
182 constexpr
int EM2 = 8;
183 constexpr
int EM3 = 8;
184 constexpr
int HAD1 = 4;
185 constexpr
int HAD2 = 4;
186 constexpr
int HAD3 = 4;
188 halfRings.insert(halfRings.end(), refRings.begin(), refRings.begin() +
PS/2);
189 halfRings.insert(halfRings.end(), refRings.begin() +
PS, refRings.begin() +
PS + (
EM1/2));
190 halfRings.insert(halfRings.end(), refRings.begin() +
PS +
EM1, refRings.begin() +
PS +
EM1 + (
EM2/2));
191 halfRings.insert(halfRings.end(), refRings.begin() +
PS +
EM1 +
EM2, refRings.begin() +
PS +
EM1 +
EM2 + (
EM3/2));
192 halfRings.insert(halfRings.end(), refRings.begin() +
PS +
EM1 +
EM2 +
EM3, refRings.begin() +
PS +
EM1 +
EM2 +
EM3 + (
HAD1/2));
198 for(
auto &ring : halfRings )
energy+=ring;
201 for(
auto &ring : halfRings ) ring/=
energy;
204 inputs.push_back( halfRings );
220 std::string::size_type
first(0);
221 std::string::size_type last(0);
225 if (
first == std::string::npos) {
234 if (last == std::string::npos) {
249 std::vector<T> CutVector;
250 std::string env_input(
env.GetValue(
input.c_str(),
""));
251 if (!env_input.empty()) {
252 std::string::size_type
end;
254 end = env_input.find(
';');
256 if(
strtof(env_input.substr(0,
end),myValue)){
257 CutVector.push_back(myValue);
259 if (
end != std::string::npos) {
260 env_input= env_input.substr(
end+1);
262 }
while (
end != std::string::npos);
271 std::vector<std::string> CutVector;
272 std::string env_input(
env.GetValue(
input.c_str(),
""));
273 if (!env_input.empty()) {
274 std::string::size_type
end;
276 end = env_input.find(
';');
277 CutVector.push_back( env_input.substr(0,
end) );
278 if (
end != std::string::npos) {
279 env_input= env_input.substr(
end+2);
281 }
while (
end != std::string::npos);
289 if (!ret.empty() && ret.front()==
'/') ret.erase(0, 1);