38 declareInterface< IBPhysBlindingTool >(
this );
87 ATH_MSG_ERROR(
"You must at least set a key for blinding or unblinding!");
140 return StatusCode::SUCCESS;
156 ATH_MSG_INFO(Form(
"N_candidatesForBlindingSeen : %10ld",
160 ATH_MSG_INFO(Form(
"N_candidatesForUnblindingSeen : %10ld",
166 return StatusCode::SUCCESS;
173 return m_senc.encrypt(val);
180 return m_senc.decrypt(val);
186 const bool& negativeSign,
188 const float& factor) {
192 float cval = val*factor + offset;
195 bval =
m_senc.encrypt(cval);
196 if (negativeSign) bval *= -1.;
199 << val << Form(
" (%a) -> ", val)
200 << cval << Form(
" (%a)", cval));
209 const bool& negativeSign,
211 const float& factor) {
213 float bval(val), cval(val);
214 if (negativeSign) bval *= -1.;
216 if ( bval > 0. || !std::isnormal(bval) ) {
218 cval =
m_senc.decrypt(bval);
219 if ( factor != 0. ) {
220 cval = (cval - offset)/factor;
223 << val << Form(
" (%a)", val));
227 << val << Form(
" (%a) -> ", val)
228 << bval << Form(
" (%a)", bval));
245 return StatusCode::SUCCESS;
259 return StatusCode::SUCCESS;
282 long candidatesBlinded(0);
283 long candidatesUnblinded(0);
300 ++candidatesUnblinded;
306 SG::AuxElement::Decorator<float> floatDec(
m_vVarNames[iv]);
308 if ( floatDec.isAvailable(*vtx) ) {
309 float val = floatDec(*vtx);
316 << Form(
" (%a)", floatDec(*vtx)));
323 << Form(
" (%a)", floatDec(*vtx)));
342 return StatusCode::SUCCESS;
389 for (
const xAOD::Vertex* constVtx : *constVtxContainer) {
408 return StatusCode::SUCCESS;
416 if ( !hypo.starts_with(
"passed_") )
417 hypo =
"passed_" + hypo;
418 SG::AuxElement::Accessor<Char_t> flagAcc(hypo);
419 return flagAcc.isAvailable(em) && flagAcc(em) != 0;
424 std::vector<std::string>
434 std::string
str(
"[");
435 for (
unsigned int i=0; i<v.size(); ++i) {
436 str += std::to_string(v[i]);
437 if ( i < v.size()-1 )
str +=
",";
447 std::string
str(
"[");
448 for (
unsigned int i=0; i<v.size(); ++i) {
449 str += std::to_string(v[i]);
450 if ( i < v.size()-1 )
str +=
",";
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
DataModel_detail::const_iterator< DataVector > const_iterator
uint32_t runNumber() const
The current event's run number.
uint64_t eventNumber() const
The current event's event number.
std::vector< std::string > tokenize(std::string_view the_str, std::string_view delimiters)
Splits the string into smaller substrings.
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
EventInfo_v1 EventInfo
Definition of the latest event info version.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.