ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
xAOD::BPhysBlindingTool Class Reference

#include <BPhysBlindingTool.h>

Inheritance diagram for xAOD::BPhysBlindingTool:
Collaboration diagram for xAOD::BPhysBlindingTool:

Public Member Functions

 BPhysBlindingTool (const std::string &name="BPhysBlindingTool")
 Declare the correct constructor for Athena. More...
 
virtual StatusCode initialize () override
 Method initialising the tool. More...
 
virtual StatusCode finalize () override
 Method finalizing the tool. More...
 
virtual float doBlind (const float &val) override
 Simply blind one positive float value. More...
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 
Methods to be called by user classes

Simply unblind one (positive) float value with corrections

Parameters
[in]val: Blinded float value.
[in]negativeSign: flip sign before unblinding
[in]offset: after unblinding, shift by offset
[in]factor: after unblinding, stretch by factor
Returns
Unblinded positive float value; same value as input on error.
virtual float doUnblind (const float &val) override
 Simply unblind one positive float value. More...
 
virtual float doBlind (const float &val, const bool &negativeSign, const float &offset, const float &factor) override
 Simply blind one (positive) float value with corrections. More...
 
virtual float doUnblind (const float &val, const bool &negativeSign, const float &offset, const float &factor) override
 Simply unblind one (positive) float value with corrections. More...
 
virtual StatusCode doBlind () override
 Perform blinding of requested variables. More...
 
virtual StatusCode doUnblind () override
 Perform unblinding of requested variables. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 
Perform blinding or unblinding action
virtual StatusCode doBlindingAction (bool unblind=false)
 
Utility methods

Check whether an element is marked as passing a hypothesis.

virtual bool pass (const SG::AuxElement &em, std::string hypo)
 
virtual std::vector< std::string > getTokens (std::string input, std::string seperators)
 Tokenize a string using certain separators. More...
 
virtual std::string vecToString (const std::vector< float > &v) const
 Convert vector of floats to string. More...
 
virtual std::string vecToString (const std::vector< bool > &v) const
 Convert vector of bools to string. More...
 
Cache current event.
virtual StatusCode cacheEvent ()
 

Protected Attributes

Job options

Vertex container name

std::string m_vertexContainerName
 
std::string m_varToBlindNames
 List of variables to blind. More...
 
std::string m_blindingFlag
 Flag to indicate candidates for blinding. More...
 
std::vector< floatm_vOffsets
 Offsets applied to values before blinding. More...
 
std::vector< floatm_vFactors
 Scale factors applied before blinding. More...
 
std::vector< boolm_vNegSigns
 Flip signs to negative range? More...
 
std::string m_blindKey
 Key for blinding. More...
 
std::string m_unblindKey
 Key for unblinding. More...
 
Containers
xAOD::VertexContainerm_vtxContainer
 
xAOD::VertexAuxContainerm_vtxAuxContainer
 
Event caching
int m_cachedRun
 
int m_cachedEvent
 
Counters
long m_eventsForBlindingSeen
 
long m_candidatesForBlindingSeen
 
long m_eventsForUnblindingSeen
 
long m_candidatesForUnblindingSeen
 
long m_eventsBlinded
 
long m_candidatesBlinded
 
long m_eventsUnblinded
 
long m_candidatesUnblinded
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

std::vector< std::string > m_vVarNames
 Vector of variable names. More...
 
SimpleEncrypter m_senc
 Instance of SimpleEncrypter. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 85 of file BPhysBlindingTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ BPhysBlindingTool()

xAOD::BPhysBlindingTool::BPhysBlindingTool ( const std::string &  name = "BPhysBlindingTool")

Declare the correct constructor for Athena.

Regular AsgTool constructor

Definition at line 25 of file BPhysBlindingTool.cxx.

26  : asg::AsgTool( name ),
27  m_vtxContainer(nullptr), m_vtxAuxContainer(nullptr),
28  m_cachedRun(-1), m_cachedEvent(-1),
33  m_eventsBlinded(0),
37 
38 #ifdef ASGTOOL_ATHENA
39  declareInterface< IBPhysBlindingTool >( this );
40 #endif // ASGTOOL_ATHENA
41 
42  // Vertex container
43  declareProperty("VertexContainerName", m_vertexContainerName = "");
44 
45  // List of variables to blind
46  // (as concatenated string using . as delimiter)
47  declareProperty("VarToBlindNames", m_varToBlindNames = "");
48 
49  // Flag to indicate candidates for blinding
50  // Left empty: Blind values for all candidates.
51  declareProperty("BlindingFlag" , m_blindingFlag = "");
52 
53  // Offsets applied to values before blinding
54  // List must have same length as VarToBlindNames or zero.
55  declareProperty("BlindingOffsets", m_vOffsets);
56 
57  // Scale factors applied before blinding
58  // List must have same length as VarToBlindNames or zero.
59  declareProperty("BlindingFactors", m_vFactors);
60 
61  // Flip signs to negative range?
62  declareProperty("NegativeSigns" , m_vNegSigns);
63 
64  // Key for blinding
65  declareProperty("BlindingKey" , m_blindKey = "");
66 
67  // Key for unblinding
68  declareProperty("UnblindingKey" , m_unblindKey = "");
69 
70  }

Member Function Documentation

◆ cacheEvent()

StatusCode xAOD::BPhysBlindingTool::cacheEvent ( )
protectedvirtual

Definition at line 351 of file BPhysBlindingTool.cxx.

351  {
352 
353  ATH_MSG_DEBUG("BPhysBlindingTool::cacheEvent -- begin");
354 
355  const xAOD::EventInfo* eventInfo = NULL;
356  ATH_CHECK(evtStore()->retrieve(eventInfo, "EventInfo"));
357 
358  if ( m_cachedRun != (int)eventInfo->runNumber() ||
359  m_cachedEvent != (int)eventInfo->eventNumber() ) {
360 
361  // note update
362  m_cachedRun = eventInfo->runNumber();
363  m_cachedEvent = eventInfo->eventNumber();
364 
365  ATH_MSG_DEBUG("BPhysBlindingTool::cacheEvent: caching now: "
366  << "run " << m_cachedRun << " event " << m_cachedEvent);
367 
368  // retrieve vertices container
369  m_vtxContainer = nullptr;
370  m_vtxAuxContainer = nullptr;
371 
372  if ( evtStore()->transientContains<xAOD::VertexContainer>(m_vertexContainerName) ) {
373  ATH_MSG_DEBUG("In transient store: " << m_vertexContainerName);
377  m_vertexContainerName+"Aux."));
378  } else {
379  ATH_MSG_DEBUG("Not in transient store: " << m_vertexContainerName);
380  const xAOD::VertexContainer* constVtxContainer = nullptr;
381  const xAOD::VertexAuxContainer* constVtxAuxContainer = nullptr;
382  ATH_CHECK(evtStore()->retrieve(constVtxContainer,
384  ATH_CHECK(evtStore()->retrieve(constVtxAuxContainer,
385  m_vertexContainerName+"Aux."));
386  // create a copy
390  for (const xAOD::Vertex* constVtx : *constVtxContainer) {
391  xAOD::Vertex* vtx = new xAOD::Vertex();
393  *vtx = *constVtx;
394  }
398  m_vertexContainerName+"Aux."));
399  }
400 
401  ATH_MSG_DEBUG("Found vertex collection with key "
403 
404  } // if new run/event
405 
406  ATH_MSG_DEBUG("BPhysBlindingTool::cacheEvent -- end");
407 
408  // Return gracefully:
409  return StatusCode::SUCCESS;
410  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ doBlind() [1/3]

StatusCode xAOD::BPhysBlindingTool::doBlind ( )
overridevirtual

Perform blinding of requested variables.

Implements xAOD::IBPhysBlindingTool.

Definition at line 237 of file BPhysBlindingTool.cxx.

237  {
238 
239  if ( m_blindKey == "" ) {
240  ATH_MSG_WARNING("Can not blind without blinding key!");
241  } else {
242  ATH_CHECK( doBlindingAction(false) );
243  }
244 
245  // Return gracefully:
246  return StatusCode::SUCCESS;
247  }

◆ doBlind() [2/3]

float xAOD::BPhysBlindingTool::doBlind ( const float val)
overridevirtual

Simply blind one positive float value.

Parameters
[in]val: positive float value to blind.
Returns
Blinded positive float value; same value as input on error.

Implements xAOD::IBPhysBlindingTool.

Definition at line 172 of file BPhysBlindingTool.cxx.

172  {
173 
174  return m_senc.encrypt(val);
175  }

◆ doBlind() [3/3]

float xAOD::BPhysBlindingTool::doBlind ( const float val,
const bool negativeSign,
const float offset,
const float factor 
)
overridevirtual

Simply blind one (positive) float value with corrections.

Parameters
[in]val: float value to blind.
[in]negativeSign: flip sign after blinding
[in]offset: before blinding, shift by offset
[in]factor: before blinding, stretch by factor
Returns
Blinded float value; same value as input on error.

Implements xAOD::IBPhysBlindingTool.

Definition at line 186 of file BPhysBlindingTool.cxx.

189  {
190 
191  // adjustment if requested
192  float bval(val);
193  float cval = val*factor + offset;
194  if ( cval > 0. ) {
195  // perform actual blinding
196  bval = m_senc.encrypt(cval);
197  if (negativeSign) bval *= -1.;
198  } else {
199  ATH_MSG_WARNING("Blinding: Corrected value not positive: "
200  << val << Form(" (%a) -> ", val)
201  << cval << Form(" (%a)", cval));
202  } // if cval > 0
203 
204  return bval;
205  }

◆ doBlindingAction()

StatusCode xAOD::BPhysBlindingTool::doBlindingAction ( bool  unblind = false)
protectedvirtual

Definition at line 271 of file BPhysBlindingTool.cxx.

271  {
272 
274 
275  // counters
276  if ( unblind ) {
278  } else {
280  }
281 
282  if ( m_vVarNames.size() > 0 ) {
283  long candidatesBlinded(0);
284  long candidatesUnblinded(0);
285  // loop over vertices
286  // int ivtx(0);
288  vtxItr = m_vtxContainer->begin();
289  vtxItr != m_vtxContainer->end(); ++vtxItr) {
290  // counters
291  if ( unblind ) {
293  } else {
295  }
296  const xAOD::Vertex* vtx = *vtxItr;
297  // check whether to apply (un-)blinding to this candidate
298  if ( m_blindingFlag == "" || pass(*vtx, m_blindingFlag) ) {
299  // counters
300  if ( unblind ) {
301  ++candidatesUnblinded;
302  } else {
303  ++candidatesBlinded;
304  }
305  // loop over variable names
306  for (size_t iv=0; iv<m_vVarNames.size(); ++iv) {
308  // check for variable
309  if ( floatDec.isAvailable(*vtx) ) {
310  float val = floatDec(*vtx);
311  if ( unblind ) {
312  // unblinding
313  floatDec(*vtx) = doUnblind(val, m_vNegSigns[iv],
314  m_vOffsets[iv], m_vFactors[iv]);
315  ATH_MSG_DEBUG("Unblind: " << val << Form(" (%a) -> ", val)
316  << floatDec(*vtx)
317  << Form(" (%a)", floatDec(*vtx)));
318  } else {
319  // blinding
320  floatDec(*vtx) = doBlind(val, m_vNegSigns[iv],
321  m_vOffsets[iv], m_vFactors[iv]);
322  ATH_MSG_DEBUG("Blind: " << val << Form(" (%a) -> ", val)
323  << floatDec(*vtx)
324  << Form(" (%a)", floatDec(*vtx)));
325  } // if unblind
326  } else {
327  ATH_MSG_WARNING("Missing variable " << m_vVarNames[iv]);
328  } // if isAvailable
329  } // for m_vVarNames
330  } // if blinding
331  } // for iv
332  // counters
333  if ( unblind ) {
334  m_candidatesUnblinded += candidatesUnblinded;
335  if ( candidatesUnblinded > 0 ) ++m_eventsUnblinded;
336  } else {
337  m_candidatesBlinded += candidatesBlinded;
338  if ( candidatesBlinded > 0 ) ++m_eventsBlinded;
339  }
340  } // if m_vVarNames.size()
341 
342  // Return gracefully:
343  return StatusCode::SUCCESS;
344  }

◆ doUnblind() [1/3]

StatusCode xAOD::BPhysBlindingTool::doUnblind ( )
overridevirtual

Perform unblinding of requested variables.

Implements xAOD::IBPhysBlindingTool.

Definition at line 251 of file BPhysBlindingTool.cxx.

251  {
252 
253  if ( m_unblindKey == "" ) {
254  ATH_MSG_WARNING("Can not unblind without unblinding key!");
255  } else {
256  ATH_CHECK( doBlindingAction(true) );
257  }
258 
259  // Return gracefully:
260  return StatusCode::SUCCESS;
261  }

◆ doUnblind() [2/3]

float xAOD::BPhysBlindingTool::doUnblind ( const float val)
overridevirtual

Simply unblind one positive float value.

Implements xAOD::IBPhysBlindingTool.

Definition at line 179 of file BPhysBlindingTool.cxx.

179  {
180 
181  return m_senc.decrypt(val);
182  }

◆ doUnblind() [3/3]

float xAOD::BPhysBlindingTool::doUnblind ( const float val,
const bool negativeSign,
const float offset,
const float factor 
)
overridevirtual

Simply unblind one (positive) float value with corrections.

Implements xAOD::IBPhysBlindingTool.

Definition at line 209 of file BPhysBlindingTool.cxx.

212  {
213 
214  float bval(val), cval(val);
215  if (negativeSign) bval *= -1.;
216  // if ( bval > 0. || isnan(bval) ) {
217  if ( bval > 0. || !std::isnormal(bval) ) {
218  // perform actual unblinding
219  cval = m_senc.decrypt(bval);
220  if ( factor != 0. ) {
221  cval = (cval - offset)/factor;
222  } else {
223  ATH_MSG_WARNING("Unblinding: BlindingFactor == 0!: "
224  << val << Form(" (%a)", val));
225  } // if m_vFactors[ivtx] != 0
226  } else {
227  ATH_MSG_WARNING("Unblinding: Corrected value not positive: "
228  << val << Form(" (%a) -> ", val)
229  << bval << Form(" (%a)", bval));
230  } // if bval > 0
231 
232  return cval;
233  }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode xAOD::BPhysBlindingTool::finalize ( )
overridevirtual

Method finalizing the tool.

Implements xAOD::IBPhysBlindingTool.

Definition at line 144 of file BPhysBlindingTool.cxx.

144  {
145 
146  ATH_MSG_DEBUG( "Finalizing xAOD::BPhysBlindingTool" );
147 
148  ATH_MSG_INFO("Statistics for " << name() << ":");
149  ATH_MSG_INFO(Form("N_eventsForBlindingSeen : %10ld",
151  ATH_MSG_INFO(Form("N_eventsBlinded : %10ld",
152  m_eventsBlinded));
153  ATH_MSG_INFO(Form("N_eventsForUnblindingSeen : %10ld",
155  ATH_MSG_INFO(Form("N_eventsUnblinded : %10ld",
157  ATH_MSG_INFO(Form("N_candidatesForBlindingSeen : %10ld",
159  ATH_MSG_INFO(Form("N_candidatesBlinded : %10ld",
161  ATH_MSG_INFO(Form("N_candidatesForUnblindingSeen : %10ld",
163  ATH_MSG_INFO(Form("N_candidatesUnblinded : %10ld",
165 
166  // Return gracefully:
167  return StatusCode::SUCCESS;
168  }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ getTokens()

std::vector< std::string > xAOD::BPhysBlindingTool::getTokens ( std::string  input,
std::string  seperators 
)
protectedvirtual

Tokenize a string using certain separators.

Definition at line 426 of file BPhysBlindingTool.cxx.

426  {
427 
428  std::vector<std::string> tokens;
429  boost::char_separator<char> sep(seperators.c_str());
430  typedef boost::tokenizer<boost::char_separator<char> > Tokenizer_t;
431  Tokenizer_t tokenizer(input, sep);
432  for (auto& token : tokenizer) {
433  tokens.push_back(token);
434  }
435  return tokens;
436  }

◆ initialize()

StatusCode xAOD::BPhysBlindingTool::initialize ( )
overridevirtual

Method initialising the tool.

Reimplemented from asg::AsgTool.

Definition at line 72 of file BPhysBlindingTool.cxx.

72  {
73 
74  // Greet the user:
75  ATH_MSG_DEBUG( "Initializing xAOD::BPhysBlindingTool" );
76 
77  // Setup of variables
78  if ( m_vertexContainerName == "" ) {
79  ATH_MSG_INFO("No vertex container name provided.");
80  }
81 
82  if ( m_varToBlindNames != "" ) {
84  }
85 
86  // Blinding and unblinding keys
87  if ( m_blindKey == "" && m_unblindKey == "" ) {
88  ATH_MSG_ERROR("You must at least set a key for blinding or unblinding!");
89  } else {
90  if ( m_blindKey != "" ) {
92  ATH_MSG_INFO("Setting blinding key.");
93  }
94  if ( m_unblindKey != "" ) {
96  ATH_MSG_INFO("Setting unblinding key.");
97  }
98  }
99 
100  // make sure offsets vector is of correct length
101  if ( m_vOffsets.size() < m_vVarNames.size() ) {
102  for (uint i=m_vOffsets.size(); i<m_vVarNames.size(); ++i) {
103  m_vOffsets.push_back(0.);
104  }
105  ATH_MSG_INFO("Extending BlindingOffsets list ...");
106  } else if ( m_vOffsets.size() > m_vVarNames.size() ) {
107  ATH_MSG_WARNING("BlindingOffsets list longer than VarToBlindNames.");
108  }
109 
110  // make sure scale factors vector is of correct length
111  if ( m_vFactors.size() < m_vVarNames.size() ) {
112  for (uint i=m_vFactors.size(); i<m_vVarNames.size(); ++i) {
113  m_vFactors.push_back(1.);
114  }
115  ATH_MSG_INFO("Extending BlindingOffsets list ...");
116  } else if ( m_vFactors.size() > m_vVarNames.size() ) {
117  ATH_MSG_WARNING("BlindingFactors list longer than VarToBlindNames.");
118  }
119 
120  // make sure negative signs vector is of correct length
121  if ( m_vNegSigns.size() < m_vVarNames.size() ) {
122  for (uint i=m_vNegSigns.size(); i<m_vVarNames.size(); ++i) {
123  m_vNegSigns.push_back(1.);
124  }
125  ATH_MSG_INFO("Extending NegativeSigns list ...");
126  } else if ( m_vNegSigns.size() > m_vVarNames.size() ) {
127  ATH_MSG_WARNING("NegativeSigns list longer than VarToBlindNames.");
128  }
129 
130  // some info for the job log
131  ATH_MSG_INFO("VertexContainerName : " << m_vertexContainerName);
132  ATH_MSG_INFO("BlindingFlag : " << m_blindingFlag);
133  ATH_MSG_INFO("VarToBlindNames : " << m_varToBlindNames);
134  ATH_MSG_INFO("BlindingOffsets : " << vecToString(m_vOffsets));
135  ATH_MSG_INFO("BlindingFactors : " << vecToString(m_vFactors));
136  ATH_MSG_INFO("NegativeSigns : " << vecToString(m_vNegSigns));
137  ATH_MSG_INFO("BlindingKey : " << m_blindKey);
138  ATH_MSG_INFO("UnblindingKey : " << m_unblindKey);
139 
140  // Return gracefully:
141  return StatusCode::SUCCESS;
142  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ pass()

bool xAOD::BPhysBlindingTool::pass ( const SG::AuxElement em,
std::string  hypo 
)
protectedvirtual

Definition at line 415 of file BPhysBlindingTool.cxx.

415  {
416 
417  if ( !hypo.starts_with( "passed_") )
418  hypo = "passed_" + hypo;
419  SG::AuxElement::Accessor<Char_t> flagAcc(hypo);
420  return flagAcc.isAvailable(em) && flagAcc(em) != 0;
421  }

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

◆ vecToString() [1/2]

std::string xAOD::BPhysBlindingTool::vecToString ( const std::vector< bool > &  v) const
protectedvirtual

Convert vector of bools to string.

Definition at line 453 of file BPhysBlindingTool.cxx.

454  {
455  std::string str("[");
456  for (unsigned int i=0; i<v.size(); ++i) {
457  str += std::to_string(v[i]);
458  if ( i < v.size()-1 ) str += ",";
459  }
460  str += "]";
461  return str;
462  }

◆ vecToString() [2/2]

std::string xAOD::BPhysBlindingTool::vecToString ( const std::vector< float > &  v) const
protectedvirtual

Convert vector of floats to string.

Definition at line 440 of file BPhysBlindingTool.cxx.

441  {
442  std::string str("[");
443  for (unsigned int i=0; i<v.size(); ++i) {
444  str += std::to_string(v[i]);
445  if ( i < v.size()-1 ) str += ",";
446  }
447  str += "]";
448  return str;
449  }

Member Data Documentation

◆ m_blindingFlag

std::string xAOD::BPhysBlindingTool::m_blindingFlag
protected

Flag to indicate candidates for blinding.

Left empty: Blind values for all candidates.

Definition at line 209 of file BPhysBlindingTool.h.

◆ m_blindKey

std::string xAOD::BPhysBlindingTool::m_blindKey
protected

Key for blinding.

Definition at line 230 of file BPhysBlindingTool.h.

◆ m_cachedEvent

int xAOD::BPhysBlindingTool::m_cachedEvent
protected

Definition at line 247 of file BPhysBlindingTool.h.

◆ m_cachedRun

int xAOD::BPhysBlindingTool::m_cachedRun
protected

Definition at line 246 of file BPhysBlindingTool.h.

◆ m_candidatesBlinded

long xAOD::BPhysBlindingTool::m_candidatesBlinded
protected

Definition at line 259 of file BPhysBlindingTool.h.

◆ m_candidatesForBlindingSeen

long xAOD::BPhysBlindingTool::m_candidatesForBlindingSeen
protected

Definition at line 255 of file BPhysBlindingTool.h.

◆ m_candidatesForUnblindingSeen

long xAOD::BPhysBlindingTool::m_candidatesForUnblindingSeen
protected

Definition at line 257 of file BPhysBlindingTool.h.

◆ m_candidatesUnblinded

long xAOD::BPhysBlindingTool::m_candidatesUnblinded
protected

Definition at line 261 of file BPhysBlindingTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eventsBlinded

long xAOD::BPhysBlindingTool::m_eventsBlinded
protected

Definition at line 258 of file BPhysBlindingTool.h.

◆ m_eventsForBlindingSeen

long xAOD::BPhysBlindingTool::m_eventsForBlindingSeen
protected

Definition at line 254 of file BPhysBlindingTool.h.

◆ m_eventsForUnblindingSeen

long xAOD::BPhysBlindingTool::m_eventsForUnblindingSeen
protected

Definition at line 256 of file BPhysBlindingTool.h.

◆ m_eventsUnblinded

long xAOD::BPhysBlindingTool::m_eventsUnblinded
protected

Definition at line 260 of file BPhysBlindingTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_senc

SimpleEncrypter xAOD::BPhysBlindingTool::m_senc
private

Instance of SimpleEncrypter.

Definition at line 272 of file BPhysBlindingTool.h.

◆ m_unblindKey

std::string xAOD::BPhysBlindingTool::m_unblindKey
protected

Key for unblinding.

Definition at line 233 of file BPhysBlindingTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_varToBlindNames

std::string xAOD::BPhysBlindingTool::m_varToBlindNames
protected

List of variables to blind.

(as concatenated string using . as delimiter)

Definition at line 204 of file BPhysBlindingTool.h.

◆ m_vertexContainerName

std::string xAOD::BPhysBlindingTool::m_vertexContainerName
protected

Definition at line 199 of file BPhysBlindingTool.h.

◆ m_vFactors

std::vector<float> xAOD::BPhysBlindingTool::m_vFactors
protected

Scale factors applied before blinding.

List must have same length as VarToBlindNames or zero. Applied before blinding/after unblinding.

Definition at line 221 of file BPhysBlindingTool.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vNegSigns

std::vector<bool> xAOD::BPhysBlindingTool::m_vNegSigns
protected

Flip signs to negative range?

List must have same length as VarToBlindNames or zero. Applied after blinding/before unblinding.

Definition at line 227 of file BPhysBlindingTool.h.

◆ m_vOffsets

std::vector<float> xAOD::BPhysBlindingTool::m_vOffsets
protected

Offsets applied to values before blinding.

List must have same length as VarToBlindNames or zero. Applied before blinding/after unblinding.

Definition at line 215 of file BPhysBlindingTool.h.

◆ m_vtxAuxContainer

xAOD::VertexAuxContainer* xAOD::BPhysBlindingTool::m_vtxAuxContainer
protected

Definition at line 240 of file BPhysBlindingTool.h.

◆ m_vtxContainer

xAOD::VertexContainer* xAOD::BPhysBlindingTool::m_vtxContainer
protected

Definition at line 239 of file BPhysBlindingTool.h.

◆ m_vVarNames

std::vector<std::string> xAOD::BPhysBlindingTool::m_vVarNames
private

Vector of variable names.

Definition at line 267 of file BPhysBlindingTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::BPhysBlindingTool::doBlindingAction
virtual StatusCode doBlindingAction(bool unblind=false)
Definition: BPhysBlindingTool.cxx:271
xAOD::BPhysBlindingTool::m_vtxAuxContainer
xAOD::VertexAuxContainer * m_vtxAuxContainer
Definition: BPhysBlindingTool.h:240
xAOD::BPhysBlindingTool::m_vtxContainer
xAOD::VertexContainer * m_vtxContainer
Definition: BPhysBlindingTool.h:239
xAOD::SimpleEncrypter::encrypt
virtual ULLI_t encrypt(ULLI_t x)
Encrypt a positive integer value.
Definition: SimpleEncrypter.cxx:120
xAOD::BPhysBlindingTool::m_eventsForUnblindingSeen
long m_eventsForUnblindingSeen
Definition: BPhysBlindingTool.h:256
xAOD::name
name
Definition: TriggerMenuJson_v1.cxx:29
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
xAOD::BPhysBlindingTool::m_varToBlindNames
std::string m_varToBlindNames
List of variables to blind.
Definition: BPhysBlindingTool.h:204
beamspotPlotBcids.k
k
Definition: beamspotPlotBcids.py:524
xAOD::VertexAuxContainer_v1
Temporary container used until we have I/O for AuxStoreInternal.
Definition: VertexAuxContainer_v1.h:32
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition: Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::BPhysBlindingTool::doUnblind
virtual StatusCode doUnblind() override
Perform unblinding of requested variables.
Definition: BPhysBlindingTool.cxx:251
xAOD::BPhysBlindingTool::m_cachedRun
int m_cachedRun
Definition: BPhysBlindingTool.h:246
xAOD::BPhysBlindingTool::m_eventsForBlindingSeen
long m_eventsForBlindingSeen
Definition: BPhysBlindingTool.h:254
xAOD::SimpleEncrypter::setPubKey
virtual void setPubKey(std::string keystr)
Set public key.
Definition: SimpleEncrypter.cxx:92
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
beamspotman.tokens
tokens
Definition: beamspotman.py:1284
xAOD::BPhysBlindingTool::doBlind
virtual StatusCode doBlind() override
Perform blinding of requested variables.
Definition: BPhysBlindingTool.cxx:237
xAOD::VertexContainer
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Definition: VertexContainer.h:14
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
xAOD::BPhysBlindingTool::vecToString
virtual std::string vecToString(const std::vector< float > &v) const
Convert vector of floats to string.
Definition: BPhysBlindingTool.cxx:440
xAOD::SimpleEncrypter::setPrivKey
virtual void setPrivKey(std::string keystr)
Set private key.
Definition: SimpleEncrypter.cxx:78
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
xAOD::BPhysBlindingTool::m_senc
SimpleEncrypter m_senc
Instance of SimpleEncrypter.
Definition: BPhysBlindingTool.h:272
xAOD::BPhysBlindingTool::m_blindingFlag
std::string m_blindingFlag
Flag to indicate candidates for blinding.
Definition: BPhysBlindingTool.h:209
xAOD::BPhysBlindingTool::m_vNegSigns
std::vector< bool > m_vNegSigns
Flip signs to negative range?
Definition: BPhysBlindingTool.h:227
xAOD::BPhysBlindingTool::m_candidatesUnblinded
long m_candidatesUnblinded
Definition: BPhysBlindingTool.h:261
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:58
xAOD::BPhysBlindingTool::m_unblindKey
std::string m_unblindKey
Key for unblinding.
Definition: BPhysBlindingTool.h:233
xAOD::VertexAuxContainer
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
Definition: VertexAuxContainer.h:19
lumiFormat.i
int i
Definition: lumiFormat.py:92
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::BPhysBlindingTool::m_vertexContainerName
std::string m_vertexContainerName
Definition: BPhysBlindingTool.h:199
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::BPhysBlindingTool::m_candidatesForUnblindingSeen
long m_candidatesForUnblindingSeen
Definition: BPhysBlindingTool.h:257
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::BPhysBlindingTool::m_cachedEvent
int m_cachedEvent
Definition: BPhysBlindingTool.h:247
xAOD::str
std::string str(const TrigT2MbtsBits_v1 &trigT2MbtsBits)
Definition: TrigT2MbtsBits_v1.cxx:37
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
xAOD::BPhysBlindingTool::m_vOffsets
std::vector< float > m_vOffsets
Offsets applied to values before blinding.
Definition: BPhysBlindingTool.h:215
grepfile.sep
sep
Definition: grepfile.py:38
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
xAOD::BPhysBlindingTool::getTokens
virtual std::vector< std::string > getTokens(std::string input, std::string seperators)
Tokenize a string using certain separators.
Definition: BPhysBlindingTool.cxx:426
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
python.PyAthena.v
v
Definition: PyAthena.py:157
xAOD::BPhysBlindingTool::pass
virtual bool pass(const SG::AuxElement &em, std::string hypo)
Definition: BPhysBlindingTool.cxx:415
a
TList * a
Definition: liststreamerinfos.cxx:10
xAOD::BPhysBlindingTool::m_blindKey
std::string m_blindKey
Key for blinding.
Definition: BPhysBlindingTool.h:230
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
xAOD::SimpleEncrypter::decrypt
virtual ULLI_t decrypt(ULLI_t x)
Decrypt a positive integer value.
Definition: SimpleEncrypter.cxx:132
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::BPhysBlindingTool::m_vFactors
std::vector< float > m_vFactors
Scale factors applied before blinding.
Definition: BPhysBlindingTool.h:221
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
xAOD::BPhysBlindingTool::m_eventsUnblinded
long m_eventsUnblinded
Definition: BPhysBlindingTool.h:260
xAOD::BPhysBlindingTool::m_vVarNames
std::vector< std::string > m_vVarNames
Vector of variable names.
Definition: BPhysBlindingTool.h:267
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
xAOD::BPhysBlindingTool::m_eventsBlinded
long m_eventsBlinded
Definition: BPhysBlindingTool.h:258
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
xAOD::BPhysBlindingTool::m_candidatesBlinded
long m_candidatesBlinded
Definition: BPhysBlindingTool.h:259
xAOD::BPhysBlindingTool::m_candidatesForBlindingSeen
long m_candidatesForBlindingSeen
Definition: BPhysBlindingTool.h:255
SG::DataProxy
Definition: DataProxy.h:44
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::BPhysBlindingTool::cacheEvent
virtual StatusCode cacheEvent()
Definition: BPhysBlindingTool.cxx:351
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.