ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
PFCellEOverPTool Class Reference

Class to store reference e/p mean and widths, as well as reference energy density radial profile fit parameters. More...

#include <PFCellEOverPTool.h>

Inheritance diagram for PFCellEOverPTool:
Collaboration diagram for PFCellEOverPTool:

Public Member Functions

 PFCellEOverPTool (const std::string &type, const std::string &name, const IInterface *parent)
 
 ~PFCellEOverPTool ()
 
StatusCode initialize ()
 
StatusCode fillBinnedParameters (eflowEEtaBinnedParameters *binnedParameters) const
 
StatusCode finalize ()
 
virtual StatusCode intialize ()
 
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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Types

enum  E_BINS {
  ENERGY_BIN_START = 0, E001bin = ENERGY_BIN_START, E003point5bin = 1, E010bin = 2,
  E020bin = 3, E032point5bin = 4, E040bin = 5, ENERGY_BIN_END = 6
}
 
enum  ETA_BINS {
  ETA_BIN_START = 0, eta050bin = ETA_BIN_START, eta100bin = 1, eta150bin = 2,
  eta250bin = 3, eta350bin = 4, eta450bin = 5, ETA_BIN_END = 6
}
 
enum  SHAPE_PARAMS {
  SHAPE_START = 0, NORM1 = SHAPE_START, WIDTH1 = 1, NORM2 = 2,
  WIDTH2 = 3, SHAPE_END = 4
}
 

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...
 

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< double > m_energyBinLowerBoundaries
 
std::vector< double > m_etaBinLowerBoundaries
 
std::vector< int > m_firstIntBinLowerBoundaries
 
std::vector< int > m_caloLayerBins
 
Gaudi::Property< std::string > m_referenceFileLocation {this,"referenceFileLocation","","Location for e/p and cell ordering reference files"}
 Location for e/p and cell ordering reference files (set to null value so one cannot use a wrong reference silently) 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

Class to store reference e/p mean and widths, as well as reference energy density radial profile fit parameters.

The data is input to an eflowEEtaBinnedParameters object in the execute method. Stores data at the uncalibrated (EM) scale and is used by default. This inherits from IEFlowCellEOverPTool.

Definition at line 15 of file PFCellEOverPTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ E_BINS

enum IEFlowCellEOverPTool::E_BINS
protectedinherited
Enumerator
ENERGY_BIN_START 
E001bin 
E003point5bin 
E010bin 
E020bin 
E032point5bin 
E040bin 
ENERGY_BIN_END 

Definition at line 45 of file IEFlowCellEOverPTool.h.

◆ ETA_BINS

enum IEFlowCellEOverPTool::ETA_BINS
protectedinherited
Enumerator
ETA_BIN_START 
eta050bin 
eta100bin 
eta150bin 
eta250bin 
eta350bin 
eta450bin 
ETA_BIN_END 

Definition at line 47 of file IEFlowCellEOverPTool.h.

◆ SHAPE_PARAMS

enum IEFlowCellEOverPTool::SHAPE_PARAMS
protectedinherited
Enumerator
SHAPE_START 
NORM1 
WIDTH1 
NORM2 
WIDTH2 
SHAPE_END 

Definition at line 49 of file IEFlowCellEOverPTool.h.

49 { SHAPE_START = 0, NORM1 = SHAPE_START, WIDTH1 = 1, NORM2 = 2, WIDTH2 = 3, SHAPE_END = 4 };

Constructor & Destructor Documentation

◆ PFCellEOverPTool()

PFCellEOverPTool::PFCellEOverPTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 19 of file PFCellEOverPTool.cxx.

23 {
24 
25  declareInterface<IEFlowCellEOverPTool>(this);
26 
27 }

◆ ~PFCellEOverPTool()

PFCellEOverPTool::~PFCellEOverPTool ( )
inline

Definition at line 21 of file PFCellEOverPTool.h.

21 {};

Member Function Documentation

◆ 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; }

◆ 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

◆ fillBinnedParameters()

StatusCode PFCellEOverPTool::fillBinnedParameters ( eflowEEtaBinnedParameters binnedParameters) const
virtual

Implements IEFlowCellEOverPTool.

Definition at line 95 of file PFCellEOverPTool.cxx.

95  {
96 
97  if (binnedParameters) {
98 
99  //The energy values in the json files are in GeV, but in athena we work in MeV
100  //so the energy values used by binnedParameters are converted to MeV
101  std::vector<double> energyBinLowerBoundaries_GeV;
102  for (auto energyBin : m_energyBinLowerBoundaries) energyBinLowerBoundaries_GeV.push_back(energyBin*Gaudi::Units::GeV);
103  binnedParameters->initialise(energyBinLowerBoundaries_GeV, m_etaBinLowerBoundaries);
104 
105  std::string path;
107 
108  std::ifstream inputFile_eoverp(path+"eOverP.json");
109  nlohmann::json json_eoverp;
110  inputFile_eoverp >> json_eoverp;
111 
112  std::ifstream inputFile_cellOrdering(path+"cellOrdering.json");
113  nlohmann::json json_cellOrdering;
114  inputFile_cellOrdering >> json_cellOrdering;
115 
116  //Loop over energy, eta and first int bins
117  //For each combination we set the e/p mean and width from the json file values
118  int energyBinCounter = -1;
119  for (auto thisEBin : m_energyBinLowerBoundaries){
120  energyBinCounter++;
121  std::stringstream currentEBinStream;
122  currentEBinStream << std::fixed << std::setprecision(0) << thisEBin;
123  std::string currentEBin = currentEBinStream.str();
124  int etaBinCounter = -1;
125  for (auto thisEtaBin : m_etaBinLowerBoundaries){
126  etaBinCounter++;
127  std::stringstream currentEtaBinStream;
128  currentEtaBinStream << std::fixed << std::setprecision(1) << thisEtaBin;
129  std::string currentEtaBin = currentEtaBinStream.str();
130  for (auto thisFirstIntRegionBin_Int : m_firstIntBinLowerBoundaries){
131  //enum version is used for the calls to binnedParameters APIs
132  auto thisFirstIntRegionBin = static_cast<eflowFirstIntRegions::J1STLAYER>(thisFirstIntRegionBin_Int);
133  //and string version is used to lookup values from the json file
134  std::string currentFirstIntBin = std::to_string(thisFirstIntRegionBin_Int);
135  std::string eOverPBin = "energyBinLowerBound_"+currentEBin+"_etaBinLowerBound_"+currentEtaBin+"_firstIntBinLowerBound_"+currentFirstIntBin;
136  if (json_eoverp.contains(eOverPBin+"_mean")){
137  binnedParameters->setFudgeMean(energyBinCounter,etaBinCounter,thisFirstIntRegionBin,json_eoverp[eOverPBin+"_mean"]);
138  ATH_MSG_DEBUG("Setting mean for bin " << eOverPBin << " to " << json_eoverp[eOverPBin+"_mean"]);
139  }
140  //DEBUG because this is expected to happen for some combinations (e.g HEC calo layers for tracks in the barrel)
141  else ATH_MSG_DEBUG("No mean found for bin " << eOverPBin);
142  if (json_eoverp.contains(eOverPBin+"_sigma")){
143  binnedParameters->setFudgeStdDev(energyBinCounter,etaBinCounter,thisFirstIntRegionBin,json_eoverp[eOverPBin+"_sigma"]);
144  ATH_MSG_DEBUG("Setting sigma for bin " << eOverPBin << " to " << json_eoverp[eOverPBin+"_sigma"]);
145  }
146  else ATH_MSG_DEBUG("No sigma found for bin " << eOverPBin);
147  for (auto thisLayerBin : m_caloLayerBins){
148  eflowCalo::LAYER thisLayerBinEnum = static_cast<eflowCalo::LAYER>(thisLayerBin);
149  std::string currentLayerBin = eflowCalo::name(thisLayerBinEnum);
150  std::string cellOrderingBin = eOverPBin + "_caloLayer_"+std::to_string(thisLayerBin);
151  if (json_cellOrdering.contains(cellOrderingBin+"_norm1")){
152  binnedParameters->setShapeParam(energyBinCounter,etaBinCounter,thisFirstIntRegionBin,thisLayerBinEnum,NORM1,json_cellOrdering[cellOrderingBin+"_norm1"]);
153  ATH_MSG_DEBUG("Setting norm1 for bin " << cellOrderingBin << " to " << json_cellOrdering[cellOrderingBin+"_norm1"]);
154  }
155  else ATH_MSG_DEBUG("No norm1 found for bin " << cellOrderingBin);
156  if (json_cellOrdering.contains(cellOrderingBin+"_sigma1")){
157  binnedParameters->setShapeParam(energyBinCounter,etaBinCounter,thisFirstIntRegionBin,thisLayerBinEnum,WIDTH1,json_cellOrdering[cellOrderingBin+"_sigma1"]);
158  ATH_MSG_DEBUG("Setting sigma1 for bin " << cellOrderingBin << " to " << json_cellOrdering[cellOrderingBin+"_sigma1"]);
159  }
160  else ATH_MSG_DEBUG("No sigma1 found for bin " << cellOrderingBin);
161  if (json_cellOrdering.contains(cellOrderingBin+"_norm2")){
162  binnedParameters->setShapeParam(energyBinCounter,etaBinCounter,thisFirstIntRegionBin,thisLayerBinEnum,NORM2,json_cellOrdering[cellOrderingBin+"_norm2"]);
163  ATH_MSG_DEBUG("Setting norm2 for bin " << cellOrderingBin << " to " << json_cellOrdering[cellOrderingBin+"_norm2"]);
164  }
165  else ATH_MSG_DEBUG("No norm2 found for bin " << cellOrderingBin);
166  if (json_cellOrdering.contains(cellOrderingBin+"_sigma2")){
167  binnedParameters->setShapeParam(energyBinCounter,etaBinCounter,thisFirstIntRegionBin,thisLayerBinEnum,WIDTH2,json_cellOrdering[cellOrderingBin+"_sigma2"]);
168  ATH_MSG_DEBUG("Setting sigma2 for bin " << cellOrderingBin << " to " << json_cellOrdering[cellOrderingBin+"_sigma2"]);
169  }
170  else ATH_MSG_DEBUG("No sigma2 found for bin " << cellOrderingBin);
171  }
172  }
173  }
174  }
175  }
176 
177  return StatusCode::SUCCESS;
178 
179 }

◆ finalize()

StatusCode PFCellEOverPTool::finalize ( )
virtual

Reimplemented from IEFlowCellEOverPTool.

Definition at line 181 of file PFCellEOverPTool.cxx.

181  {
182  return StatusCode::SUCCESS;
183 }

◆ initialize()

StatusCode PFCellEOverPTool::initialize ( )

Definition at line 29 of file PFCellEOverPTool.cxx.

29  {
30 
31  std::string path;
33 
34  ATH_MSG_INFO("Using reference file location " + path);
35 
36  std::ifstream binBoundariesFile(path+"binBoundaries.json");
37  nlohmann::json json_binBoundaries;
38  binBoundariesFile >> json_binBoundaries;
39 
40  //whilst for calo layers and first interaction regions we want to lookup the full set of bin values
41  auto fillBinValues = [](auto && binBoundaries, const nlohmann::json &json_binBoundaries, const std::string &binName){
42  if (json_binBoundaries.contains(binName)){
43  for (auto binBoundary : json_binBoundaries[binName]) binBoundaries.push_back(binBoundary);
44  return true;
45  }
46  else return false;
47  };
48 
49  bool filledBins = false;
50  std::string energyBinBoundaries = "energyBinBoundaries";
51  std::string etaBinBoundaries = "etaBinBoundaries";
52  std::string firstIntBinBoundaries = "firstIntBinBoundaries";
53  std::string caloLayerBinBoundaries = "caloLayerBinBoundaries";
54 
55  //here we verify we can load in the bin boundaries - if not we return a FAILURE code
56  //because particle flow cannot run correctly without these being loaded
57  filledBins = fillBinValues(m_energyBinLowerBoundaries, json_binBoundaries, energyBinBoundaries);
58  if (!filledBins) {
59  ATH_MSG_ERROR("Could not bin boundaries in json file: " << energyBinBoundaries);
60  return StatusCode::FAILURE;
61  }
62  //remove the last bin boundary - the e/p derivation code measures e/p in an energy range and our json
63  //contains the bin boundaries as usded by the e/p derivation code:
64  //https://gitlab.cern.ch/atlas-jetetmiss/pflow/commontools/EOverPTools/-/blob/0dee81d8823be1fd725af2cfe62391bcb904b683/EoverpNtupleAnalysis/Run_EoverP_Comparison.py#L100
65  //But e.g if the last pair if boundaries are 40 and 100 GeV we measure e/p between those values, but we
66  //want to allow any track with e > 40 GeV to find an e/p reference value.
67  //Note the same issue cannot occur for eta, calo layer or first interaction region bins
68  //because there is a hard upper limit from the detector geometry - so a track can never
69  //e.g have an eta above the final eta bin boundary
70  m_energyBinLowerBoundaries.pop_back();
71  filledBins = fillBinValues(m_etaBinLowerBoundaries, json_binBoundaries, etaBinBoundaries);
72  if (!filledBins) {
73  ATH_MSG_ERROR("Could not bin boundaries in json file: " << etaBinBoundaries);
74  return StatusCode::FAILURE;
75  }
76  filledBins = fillBinValues(m_firstIntBinLowerBoundaries, json_binBoundaries, firstIntBinBoundaries);
77  if (!filledBins) {
78  ATH_MSG_ERROR("Could not bin boundaries in json file: " << firstIntBinBoundaries);
79  return StatusCode::FAILURE;
80  }
81  filledBins = fillBinValues(m_caloLayerBins, json_binBoundaries, caloLayerBinBoundaries);
82  if (!filledBins) {
83  ATH_MSG_ERROR("Could not bin boundaries in json file: " << caloLayerBinBoundaries);
84  return StatusCode::FAILURE;
85  }
86 
87  ATH_MSG_DEBUG("Energy bin boundaries: " << m_energyBinLowerBoundaries);
88  ATH_MSG_DEBUG("Eta bin boundaries: " << m_etaBinLowerBoundaries);
89  ATH_MSG_DEBUG("First interaction region bin boundaries: " << m_firstIntBinLowerBoundaries);
90  ATH_MSG_DEBUG("Calo layer bin boundaries: " << m_caloLayerBins);
91 
92  return StatusCode::SUCCESS;
93 }

◆ 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.

◆ interfaceID()

const InterfaceID & IEFlowCellEOverPTool::interfaceID ( )
inlinestaticinherited

Definition at line 53 of file IEFlowCellEOverPTool.h.

54 {
55  return IID_IEFlowCellEOverPTool;
56 }

◆ intialize()

virtual StatusCode IEFlowCellEOverPTool::intialize ( )
inlinevirtualinherited

Definition at line 40 of file IEFlowCellEOverPTool.h.

40 {return StatusCode::SUCCESS;};

◆ 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  }

◆ 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.

◆ 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  }

Member Data Documentation

◆ m_caloLayerBins

std::vector<int> PFCellEOverPTool::m_caloLayerBins
private

Definition at line 32 of file PFCellEOverPTool.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_energyBinLowerBoundaries

std::vector<double> PFCellEOverPTool::m_energyBinLowerBoundaries
private

Definition at line 29 of file PFCellEOverPTool.h.

◆ m_etaBinLowerBoundaries

std::vector<double> PFCellEOverPTool::m_etaBinLowerBoundaries
private

Definition at line 30 of file PFCellEOverPTool.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_firstIntBinLowerBoundaries

std::vector<int> PFCellEOverPTool::m_firstIntBinLowerBoundaries
private

Definition at line 31 of file PFCellEOverPTool.h.

◆ m_referenceFileLocation

Gaudi::Property<std::string> PFCellEOverPTool::m_referenceFileLocation {this,"referenceFileLocation","","Location for e/p and cell ordering reference files"}
private

Location for e/p and cell ordering reference files (set to null value so one cannot use a wrong reference silently)

Definition at line 35 of file PFCellEOverPTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
eflowCalo::name
static const std::string & name(LAYER layer)
Definition: eflowCaloRegions.cxx:53
IEFlowCellEOverPTool::eta450bin
@ eta450bin
Definition: IEFlowCellEOverPTool.h:47
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:126
IEFlowCellEOverPTool::eta250bin
@ eta250bin
Definition: IEFlowCellEOverPTool.h:47
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
IEFlowCellEOverPTool::eta150bin
@ eta150bin
Definition: IEFlowCellEOverPTool.h:47
json
nlohmann::json json
Definition: HistogramDef.cxx:9
IEFlowCellEOverPTool::E040bin
@ E040bin
Definition: IEFlowCellEOverPTool.h:45
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
IEFlowCellEOverPTool::WIDTH2
@ WIDTH2
Definition: IEFlowCellEOverPTool.h:49
IEFlowCellEOverPTool::NORM2
@ NORM2
Definition: IEFlowCellEOverPTool.h:49
IEFlowCellEOverPTool::WIDTH1
@ WIDTH1
Definition: IEFlowCellEOverPTool.h:49
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
PFCellEOverPTool::m_etaBinLowerBoundaries
std::vector< double > m_etaBinLowerBoundaries
Definition: PFCellEOverPTool.h:30
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
PFCellEOverPTool::m_referenceFileLocation
Gaudi::Property< std::string > m_referenceFileLocation
Location for e/p and cell ordering reference files (set to null value so one cannot use a wrong refer...
Definition: PFCellEOverPTool.h:35
IEFlowCellEOverPTool::eta100bin
@ eta100bin
Definition: IEFlowCellEOverPTool.h:47
IEFlowCellEOverPTool::eta350bin
@ eta350bin
Definition: IEFlowCellEOverPTool.h:47
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
PathResolverFindCalibDirectory
std::string PathResolverFindCalibDirectory(const std::string &logical_file_name)
Definition: PathResolver.cxx:432
IEFlowCellEOverPTool::ENERGY_BIN_END
@ ENERGY_BIN_END
Definition: IEFlowCellEOverPTool.h:45
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
IEFlowCellEOverPTool::ETA_BIN_START
@ ETA_BIN_START
Definition: IEFlowCellEOverPTool.h:47
PFCellEOverPTool::m_caloLayerBins
std::vector< int > m_caloLayerBins
Definition: PFCellEOverPTool.h:32
IEFlowCellEOverPTool::IEFlowCellEOverPTool
IEFlowCellEOverPTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: IEFlowCellEOverPTool.h:34
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
IEFlowCellEOverPTool::E032point5bin
@ E032point5bin
Definition: IEFlowCellEOverPTool.h:45
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
IEFlowCellEOverPTool::ETA_BIN_END
@ ETA_BIN_END
Definition: IEFlowCellEOverPTool.h:47
eflowEEtaBinnedParameters::setFudgeStdDev
void setFudgeStdDev(int energyBin, int etaBin, eflowFirstIntENUM j1st, double fudgeStdDev)
Definition: eflowEEtaBinnedParameters.h:69
eflowEEtaBinnedParameters::setFudgeMean
void setFudgeMean(int energyBin, int etaBin, eflowFirstIntENUM j1st, double fudgeMean)
Definition: eflowEEtaBinnedParameters.h:63
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
eflowEEtaBinnedParameters::initialise
void initialise(const std::vector< double > &eBinBounds, const std::vector< double > &etaBinBounds, bool useAbsEta=true)
Definition: eflowEEtaBinnedParameters.cxx:33
IEFlowCellEOverPTool::E010bin
@ E010bin
Definition: IEFlowCellEOverPTool.h:45
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
IEFlowCellEOverPTool::SHAPE_END
@ SHAPE_END
Definition: IEFlowCellEOverPTool.h:49
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
IEFlowCellEOverPTool::eta050bin
@ eta050bin
Definition: IEFlowCellEOverPTool.h:47
eflowEEtaBinnedParameters::setShapeParam
void setShapeParam(int energyBin, int etaBin, eflowFirstIntENUM j1st, eflowCaloENUM layer, int paramNumber, double shapeParam)
Definition: eflowEEtaBinnedParameters.h:75
IEFlowCellEOverPTool::E001bin
@ E001bin
Definition: IEFlowCellEOverPTool.h:45
IEFlowCellEOverPTool::ENERGY_BIN_START
@ ENERGY_BIN_START
Definition: IEFlowCellEOverPTool.h:45
eflowCalo::LAYER
LAYER
Definition: eflowCaloRegions.h:36
a
TList * a
Definition: liststreamerinfos.cxx:10
h
PFCellEOverPTool::m_energyBinLowerBoundaries
std::vector< double > m_energyBinLowerBoundaries
Definition: PFCellEOverPTool.h:29
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
IEFlowCellEOverPTool::SHAPE_START
@ SHAPE_START
Definition: IEFlowCellEOverPTool.h:49
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
IEFlowCellEOverPTool::E020bin
@ E020bin
Definition: IEFlowCellEOverPTool.h:45
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
PFCellEOverPTool::m_firstIntBinLowerBoundaries
std::vector< int > m_firstIntBinLowerBoundaries
Definition: PFCellEOverPTool.h:31
IEFlowCellEOverPTool::NORM1
@ NORM1
Definition: IEFlowCellEOverPTool.h:49
histSizes.filledBins
def filledBins(h)
Definition: histSizes.py:11
fitman.k
k
Definition: fitman.py:528
IEFlowCellEOverPTool::E003point5bin
@ E003point5bin
Definition: IEFlowCellEOverPTool.h:45
eflowFirstIntRegions::J1STLAYER
J1STLAYER
Definition: eflowCaloRegions.h:58