ATLAS Offline Software
Loading...
Searching...
No Matches
BPhysBlindingTool.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
5*/
6
13
14// $Id: $
15#ifndef BPHYSTOOLS_BPHYSBLINDINGTOOL_H
16#define BPHYSTOOLS_BPHYSBLINDINGTOOL_H
17
18// Framework includes
19#include "AsgTools/AsgTool.h"
20
21// System include(s):
22#include <memory>
23
24// Local includes
27
28
29// EDM includes
31
32namespace xAOD {
86 public asg::AsgTool, virtual public xAOD::IBPhysBlindingTool {
87
90
91 public:
94 BPhysBlindingTool(const std::string& name = "BPhysBlindingTool");
97 virtual StatusCode initialize() override;
98
101 virtual StatusCode finalize() override;
102
109 virtual float doBlind(const float& val) override;
110
120 virtual float doUnblind(const float& val) override;
121
131 virtual float doBlind(const float& val,
132 const bool& negativeSign,
133 const float& offset,
134 const float& factor) override;
135
148 virtual float doUnblind(const float& val,
149 const bool& negativeSign,
150 const float& offset,
151 const float& factor) override;
152
155 virtual StatusCode doBlind() override;
156
159 virtual StatusCode doUnblind() override;
160
161 protected:
165 virtual StatusCode doBlindingAction(bool unblind=false);
172 virtual bool pass(const SG::AuxElement& em, std::string hypo);
173
177 virtual std::vector<std::string> getTokens(std::string input,
178 std::string seperators);
182 virtual std::string vecToString(const std::vector<float>& v) const;
186 virtual std::string vecToString(const std::vector<bool>& v) const;
190 virtual StatusCode cacheEvent();
192
193 protected:
204 std::string m_varToBlindNames;
209 std::string m_blindingFlag;
215 std::vector<float> m_vOffsets;
221 std::vector<float> m_vFactors;
227 std::vector<bool> m_vNegSigns;
230 std::string m_blindKey;
233 std::string m_unblindKey;
235
242
249
263 private:
267 std::vector<std::string> m_vVarNames;
268
273
274 }; // class BPhysBlindingTool
275
276} // namespace xAOD
277
278#endif // BPHYSTOOLS_BPHYSBLINDINGTOOL_H
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Interface for dual-use tool for (un-)blinding of float values.
Provide simple asymmetric encryption for blinding of float values.
Base class for elements of a container that can have aux data.
Definition AuxElement.h:483
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
BPhysBlindingTool(const std::string &name="BPhysBlindingTool")
Declare the correct constructor for Athena.
std::vector< float > m_vFactors
Scale factors applied before blinding.
virtual StatusCode cacheEvent()
virtual StatusCode doBlindingAction(bool unblind=false)
std::vector< bool > m_vNegSigns
Flip signs to negative range?
std::string m_varToBlindNames
List of variables to blind.
virtual StatusCode doBlind() override
Perform blinding of requested variables.
virtual StatusCode doUnblind() override
Perform unblinding of requested variables.
std::vector< float > m_vOffsets
Offsets applied to values before blinding.
SimpleEncrypter m_senc
Instance of SimpleEncrypter.
std::string m_blindKey
Key for blinding.
std::vector< std::string > m_vVarNames
Vector of variable names.
virtual std::string vecToString(const std::vector< float > &v) const
Convert vector of floats to string.
xAOD::VertexContainer * m_vtxContainer
std::string m_blindingFlag
Flag to indicate candidates for blinding.
virtual std::vector< std::string > getTokens(std::string input, std::string seperators)
Tokenize a string using certain separators.
virtual StatusCode finalize() override
Method finalizing the tool.
virtual StatusCode initialize() override
Method initialising the tool.
xAOD::VertexAuxContainer * m_vtxAuxContainer
virtual bool pass(const SG::AuxElement &em, std::string hypo)
std::string m_unblindKey
Key for unblinding.
Interface for dual-use tool for blinding and unblinding certain float values provided as variables in...
Provide simple asymmetric encryption for blinding of float values.
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.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".