ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CP::PhotonPointingTool Class Referenceabstract

Implementation for the photon pointing tool. More...

#include <PhotonPointingTool.h>

Inheritance diagram for CP::PhotonPointingTool:
Collaboration diagram for CP::PhotonPointingTool:

Public Member Functions

 PhotonPointingTool (const std::string &name)
 
virtual ~PhotonPointingTool ()
 
virtual void print () const =0
 Print the state of the tool. More...
 
virtual StatusCode sysInitialize ()
 Function initialising the tool in the correct way in Athena. 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 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
 
Function(s) implementing the asg::IAsgTool interface
virtual StatusCode initialize ()
 Function initialising the tool. More...
 
Function(s) implementing the IPhotonPointingTool interface
StatusCode updatePointingAuxdata (const xAOD::EgammaContainer &egammas) const
 Add calo and conversion (HPV) pointing variables. More...
 
std::pair< float, float > getCaloPointing (const xAOD::Egamma *egamma) const
 Return calo pointing variables. More...
 
std::pair< float, float > getConvPointing (const xAOD::Photon *photon) const
 Return conversion (HPV) pointing 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...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

float getCorrectedZ (float zPointing, float etas2) const
 
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

TH1F * m_zCorrection
 Create a proper constructor for Athena. More...
 
SG::ReadHandleKey< xAOD::EventInfom_evtInfo
 
SG::WriteDecorHandleKey< xAOD::EgammaContainerm_zvertex
 
SG::WriteDecorHandleKey< xAOD::EgammaContainerm_errz
 
SG::WriteDecorHandleKey< xAOD::EgammaContainerm_HPV_zvertex
 
SG::WriteDecorHandleKey< xAOD::EgammaContainerm_HPV_errz
 
bool m_isMC {}
 
std::string m_zOscFileMC
 
std::string m_zOscFileData
 
std::string m_zvertexDecorName
 
std::string m_errzDecorName
 
std::string m_HPV_zvertexDecorName
 
std::string m_HPV_errzDecorName
 
std::string m_ContainerName
 
MetaStore_t m_inputMetaStore
 Object accessing the input metadata store. More...
 
MetaStore_t m_outputMetaStore
 Object accessing the output metadata store. More...
 
bool m_beginInputFileCalled
 Flag helping to discover when the tool misses the opening of the first input file. More...
 
bool m_useIncidents
 
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
 

Callback functions helping in metadata reading/writing

void setUseIncidents (const bool flag)
 
virtual void handle (const Incident &inc)
 Function receiving incidents from IncidentSvc/TEvent. More...
 
virtual StatusCode beginInputFile ()
 Function called when a new input file is opened. More...
 
virtual StatusCode endInputFile ()
 Function called when the currently open input file got completely processed. More...
 
virtual StatusCode beginEvent ()
 Function called when a new events is loaded. More...
 
virtual StatusCode metaDataStop ()
 Function called when the tool should write out its metadata. More...
 

Detailed Description

Implementation for the photon pointing tool.

Takes photon shower shape and/or conversion vertex and extrapolates back to beamline

Author
Christopher Meyer chris.nosp@m..mey.nosp@m.er@ce.nosp@m.rn.c.nosp@m.h

Definition at line 35 of file PhotonPointingTool.h.

Member Typedef Documentation

◆ MetaStore_t

Type of the metadata store object in Athena.

Definition at line 66 of file AsgMetadataTool.h.

◆ MetaStorePtr_t

Type of the metadata store pointer in standalone mode.

Definition at line 68 of file AsgMetadataTool.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ PhotonPointingTool()

CP::PhotonPointingTool::PhotonPointingTool ( const std::string &  name)

Definition at line 30 of file PhotonPointingTool.cxx.

32  , m_zCorrection(nullptr)
33 {
34  declareProperty("isSimulation", m_isMC);
35  declareProperty("zOscillationFileMC", m_zOscFileMC = "PhotonVertexSelection/v1/pointing_correction_mc.root");
36  declareProperty("zOscillationFileData", m_zOscFileData = "PhotonVertexSelection/v1/pointing_correction_data.root");
37  declareProperty("zvertex", m_zvertexDecorName = "zvertex");
38  declareProperty("errz", m_errzDecorName = "errz");
39  declareProperty("HPV_zvertex", m_HPV_zvertexDecorName = "HPV_zvertex");
40  declareProperty("HPV_errz", m_HPV_errzDecorName = "HPV_errz");
41  declareProperty("ContainerName", m_ContainerName = "Photons");
42 }

◆ ~PhotonPointingTool()

CP::PhotonPointingTool::~PhotonPointingTool ( )
virtual

Definition at line 45 of file PhotonPointingTool.cxx.

46 {
47  SafeDelete(m_zCorrection);
48 }

Member Function Documentation

◆ beginEvent()

StatusCode asg::AsgMetadataTool::beginEvent ( )
protectedvirtualinherited

Function called when a new events is loaded.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in AsgElectronEfficiencyCorrectionTool, TrigConf::xAODConfigTool, TauAnalysisTools::TauSelectionTool, TauAnalysisTools::DiTauSelectionTool, TauAnalysisTools::CommonSmearingTool, TauAnalysisTools::DiTauEfficiencyCorrectionsTool, Trig::TrigDecisionTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, Trig::TrigConfBunchCrossingTool, xAODMaker::TriggerMenuMetaDataTool, and Trig::xAODBunchCrossingTool.

Definition at line 196 of file AsgMetadataTool.cxx.

196  {
197 
198  // Return gracefully:
199  return StatusCode::SUCCESS;
200  }

◆ beginInputFile()

StatusCode asg::AsgMetadataTool::beginInputFile ( )
protectedvirtualinherited

Function called when a new input file is opened.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in AsgElectronEfficiencyCorrectionTool, TrigConf::xAODConfigTool, PMGTools::PMGTruthWeightTool, BookkeeperTool, xAODMaker::FileMetaDataTool, BookkeeperDumperTool, Trig::TrigDecisionTool, xAODMaker::TriggerMenuMetaDataTool, xAODMaker::TruthMetaDataTool, Trig::xAODBunchCrossingTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, and TauAnalysisTools::TauSmearingTool.

Definition at line 180 of file AsgMetadataTool.cxx.

180  {
181 
182  // Return gracefully:
183  return StatusCode::SUCCESS;
184  }

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

◆ endInputFile()

StatusCode asg::AsgMetadataTool::endInputFile ( )
protectedvirtualinherited

Function called when the currently open input file got completely processed.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in BookkeeperTool, xAODMaker::FileMetaDataTool, BookkeeperDumperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 188 of file AsgMetadataTool.cxx.

188  {
189 
190  // Return gracefully:
191  return StatusCode::SUCCESS;
192  }

◆ 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

◆ getCaloPointing()

std::pair< float, float > CP::PhotonPointingTool::getCaloPointing ( const xAOD::Egamma egamma) const
virtual

Return calo pointing variables.

Implements CP::IPhotonPointingTool.

Definition at line 174 of file PhotonPointingTool.cxx.

175  {
176  if (egamma == nullptr) {
177  ATH_MSG_WARNING("Passed Egamma was a nullptr, returning (0,0).");
178  return std::make_pair(0,0);
179  }
180 
181  // Get the EventInfo
183  if(!eventInfo.isValid()){
184  ATH_MSG_WARNING("Couldn't retrieve EventInfo from TEvent, egamma won't be decorated.");
185  return std::make_pair(0, 0);
186  }
187 
188  // Beam parameters
189  double d_beamSpot = hypot(eventInfo->beamPosY(), eventInfo->beamPosX());
190  double phi_beamSpot = atan2(eventInfo->beamPosY(), eventInfo->beamPosX());
191 
192  // Photon variables
193  const xAOD::CaloCluster *cluster = egamma->caloCluster();
194  if (cluster == nullptr) {
195  ATH_MSG_WARNING("Couldn't retrieve CaloCluster from Photon, egammas won't be decorated.");
196  return std::make_pair(0, 0);
197  }
198 
199  float cl_e = cluster->e();
200  float etas1 = cluster->etaBE(1);
201  float etas2 = cluster->etaBE(2);
202  float phis2 = cluster->phiBE(2);
203  float cl_theta = 2.0*atan(exp(-1.0*cluster->eta()));
204 
205  // Shower depths
206  std::pair<float, float> RZ1 = CP::ShowerDepthTool::getRZ(etas1, 1);
207  std::pair<float, float> RZ2 = CP::ShowerDepthTool::getRZ(etas2, 2);
208 
209  // Calo cluster pointing calculation
210  double r0_with_beamSpot = d_beamSpot*cos(phis2 - phi_beamSpot);
211 
212  float s_zvertex = 0, s_errz = 0;
213  s_zvertex = (RZ1.second * (RZ2.first - r0_with_beamSpot) -
214  RZ2.second * (RZ1.first - r0_with_beamSpot)) /
215  (RZ2.first - RZ1.first);
216  s_zvertex = getCorrectedZ(s_zvertex, etas2);
217 
218  s_errz = 0.5 * (RZ2.first + RZ1.first) * (0.060 / sqrt(cl_e * 0.001)) /
219  (sin(cl_theta) * sin(cl_theta));
220 
221  return std::make_pair(s_zvertex, s_errz);
222  }

◆ getConvPointing()

std::pair< float, float > CP::PhotonPointingTool::getConvPointing ( const xAOD::Photon photon) const
virtual

Return conversion (HPV) pointing variables.

Implements CP::IPhotonPointingTool.

Definition at line 225 of file PhotonPointingTool.cxx.

226  {
227  if (photon == nullptr) {
228  ATH_MSG_WARNING("Passed Egamma was a nullptr, returning (0,0).");
229  return std::make_pair(0,0);
230  }
231 
232  // Get the EventInfo
234  if(!eventInfo.isValid()){
235  ATH_MSG_WARNING("Couldn't retrieve EventInfo from TEvent, photons won't be decorated.");
236  return std::make_pair(0, 0);
237  }
238 
239  // Beam parameters
240  double d_beamSpot = hypot(eventInfo->beamPosY(), eventInfo->beamPosX());
241  double phi_beamSpot = atan2(eventInfo->beamPosY(), eventInfo->beamPosX());
242 
243  // Photon variables
244  const xAOD::CaloCluster *cluster = photon->caloCluster();
245  if (cluster == nullptr) {
246  ATH_MSG_WARNING("Couldn't retrieve CaloCluster from Photon, photons won't be decorated.");
247  return std::make_pair(0, 0);
248  }
249 
250  float etas1 = cluster->etaBE(1);
251  float phis2 = cluster->phiBE(2);
252 
253  const xAOD::Vertex *conv = photon->vertex();
254  if (cluster == nullptr) {
255  ATH_MSG_WARNING("Couldn't retrieve conversion Vertex from Photon, photons won't be decorated.");
256  return std::make_pair(0, 0);
257  }
258 
259  float conv_x = conv->x();
260  float conv_y = conv->y();
261  float conv_z = conv->z();
262 
263  // Shower depths
264  std::pair<float, float> RZ1 = CP::ShowerDepthTool::getRZ(etas1, 1);
265 
266  // Photon conversion
267  double conv_r = hypot(conv_x, conv_y);
268 
269  // HPV pointing calculation
270  double phi_Calo = atan2(sin(phis2), cos(phis2));
271  double r0_with_beamSpot = d_beamSpot*cos(phi_Calo - phi_beamSpot);
272 
273  float s_zvertex = (RZ1.second*(conv_r - r0_with_beamSpot) - conv_z*(RZ1.first - r0_with_beamSpot)) / (conv_r - RZ1.first);
274 
275  float dist_vtx_to_conv = hypot(conv_r - r0_with_beamSpot, conv_z - s_zvertex);
276  float dist_conv_to_s1 = hypot(RZ1.first - conv_r, RZ1.second - conv_z);
277 
278  float error_etaS1 = 0.001; // FIXME is there a tool which provides a better value?
279  float s_errz = 0.0;
280 
281  if ((cluster->inBarrel() && !cluster->inEndcap()) ||
282  (cluster->inBarrel() && cluster->inEndcap() && cluster->eSample(CaloSampling::EMB1) > cluster->eSample(CaloSampling::EME1))) {
283  // Barrel case
284  float error_Z_Calo_1st_Sampling_barrel = error_etaS1*RZ1.first*fabs(cosh(etas1));
285  s_errz = error_Z_Calo_1st_Sampling_barrel*dist_vtx_to_conv/dist_conv_to_s1;
286  } else {
287  // Endcap case
288  float error_R_Calo_1st_Sampling_endcap = error_etaS1*cosh(etas1)*RZ1.first*RZ1.first/fabs(RZ1.second);
289  s_errz = error_R_Calo_1st_Sampling_endcap*fabs(sinh(etas1))*dist_vtx_to_conv/dist_conv_to_s1;
290  }
291 
292  return std::make_pair(s_zvertex, s_errz);
293  }

◆ getCorrectedZ()

float CP::PhotonPointingTool::getCorrectedZ ( float  zPointing,
float  etas2 
) const
private

Definition at line 167 of file PhotonPointingTool.cxx.

168  {
169  if (fabs(etas2) < 1.37) return zPointing;
170  return zPointing - m_zCorrection->Interpolate(etas2);
171  }

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

◆ handle()

void asg::AsgMetadataTool::handle ( const Incident &  inc)
protectedvirtualinherited

Function receiving incidents from IncidentSvc/TEvent.

Reimplemented in Trig::TrigDecisionTool.

Definition at line 130 of file AsgMetadataTool.cxx.

130  {
131 
132  // Tell the user what's happening:
133  ATH_MSG_VERBOSE( "Callback received with incident: " << inc.type() );
134 
135  // Call the appropriate member function:
136  if( inc.type() == IncidentType::BeginInputFile ) {
137  m_beginInputFileCalled = true;
138  if( beginInputFile().isFailure() ) {
139  ATH_MSG_FATAL( "Failed to call beginInputFile()" );
140  throw std::runtime_error( "Couldn't call beginInputFile()" );
141  }
142  } else if( inc.type() == IncidentType::EndInputFile ) {
143  if( endInputFile().isFailure() ) {
144  ATH_MSG_FATAL( "Failed to call endInputFile()" );
145  throw std::runtime_error( "Couldn't call endInputFile()" );
146  }
147  } else if( inc.type() == IncidentType::BeginEvent ) {
148  // If the tool didn't catch the begin input file incident for the
149  // first input file of the job, then call the appropriate function
150  // now.
151  if( ! m_beginInputFileCalled ) {
152  m_beginInputFileCalled = true;
153  if( beginInputFile().isFailure() ) {
154  ATH_MSG_FATAL( "Failed to call beginInputFile()" );
155  throw std::runtime_error( "Couldn't call beginInputFile()" );
156  }
157  }
158  if( beginEvent().isFailure() ) {
159  ATH_MSG_FATAL( "Failed to call beginEvent()" );
160  throw std::runtime_error( "Couldn't call beginEvent()" );
161  }
162 
163  #ifdef XAOD_STANDALONE
164  } else if( inc.type() == IncidentType::MetaDataStop ) {
165  if( metaDataStop().isFailure() ) {
166  ATH_MSG_FATAL( "Failed to call metaDataStop()" );
167  throw std::runtime_error( "Couldn't call metaDataStop()" );
168  }
169 
170  #endif // XAOD_STANDALONE
171  } else {
172  ATH_MSG_WARNING( "Unknown incident type received in AsgMetaDataTool: " << inc.type() );
173  }
174 
175  return;
176  }

◆ initialize()

StatusCode CP::PhotonPointingTool::initialize ( )
virtual

Function initialising the tool.

Reimplemented from asg::AsgTool.

Definition at line 51 of file PhotonPointingTool.cxx.

52 {
53  ATH_MSG_INFO("Initializing PhotonVertexSelectionTool..." << name());
54 
56 
57  if(m_ContainerName.empty()) m_ContainerName = "Photons";
58 
63 
64  ATH_CHECK(m_zvertex.initialize());
65  ATH_CHECK(m_errz.initialize());
66  ATH_CHECK(m_HPV_zvertex.initialize());
67  ATH_CHECK(m_HPV_errz.initialize());
68 
69  // Determine if this is MC or data
70  std::string dataType("");
71  m_isMC = true;
72  if (inputMetaStore()->contains<xAOD::FileMetaData>("FileMetaData")) {
73  const xAOD::FileMetaData* fmd = nullptr;
74  ATH_CHECK(inputMetaStore()->retrieve(fmd, "FileMetaData"));
75  std::string simType("");
76  const bool s = fmd->value(xAOD::FileMetaData::simFlavour, simType);
77  if (!s) {
78  ATH_MSG_DEBUG("no sim flavour from metadata: must be data");
79  m_isMC = false;
80  }
81  } else {
82  ATH_MSG_WARNING("Failed to retrieve FileMetaData : assuming to be MC");
83  }
84 
85 
86  std::string filepath = PathResolverFindCalibFile(m_isMC ? m_zOscFileMC :
88  TFile *file = TFile::Open(filepath.c_str(), "READ");
89 
90  if (file == nullptr) {
91  ATH_MSG_WARNING("Couldn't find file for z-correction: " << filepath.c_str());
92  ATH_MSG_WARNING("Failed to initialize.");
93  return StatusCode::FAILURE;
94  }
95 
96  TH1F *temp = nullptr;
97  file->GetObject("dz_trk_pointing_vs_etas2", temp);
98 
99  if (temp == nullptr) {
100  ATH_MSG_WARNING("Couldn't find 'dz_trk_pointing_vs_etas2' histogram in file: " << filepath.c_str());
101  ATH_MSG_WARNING("Failed to initialize.");
102  return StatusCode::FAILURE;
103  }
104 
105  bool status = TH1::AddDirectoryStatus();
106  TH1::AddDirectory(false);
107  m_zCorrection = dynamic_cast<TH1F*>(temp->Clone("zCorrection"));
108  SafeDelete(file);
109  TH1::AddDirectory(status);
110 
111  return StatusCode::SUCCESS;
112 }

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

◆ inputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::inputMetaStore ( ) const
inherited

Accessor for the input metadata store.

Definition at line 88 of file AsgMetadataTool.cxx.

88  {
89 
90 #ifdef XAOD_STANDALONE
91  return &m_inputMetaStore;
92 #else // XAOD_STANDALONE
93  return m_inputMetaStore;
94 #endif // XAOD_STANDALONE
95  }

◆ metaDataStop()

StatusCode asg::AsgMetadataTool::metaDataStop ( )
protectedvirtualinherited

Function called when the tool should write out its metadata.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in xAODMaker::FileMetaDataTool, BookkeeperTool, BookkeeperDumperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 204 of file AsgMetadataTool.cxx.

204  {
205 
206  // Return gracefully:
207  return StatusCode::SUCCESS;
208  }

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

◆ outputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::outputMetaStore ( ) const
inherited

Accessor for the output metadata store.

Definition at line 97 of file AsgMetadataTool.cxx.

97  {
98 
99 #ifdef XAOD_STANDALONE
100  return &m_outputMetaStore;
101 #else // XAOD_STANDALONE
102  return m_outputMetaStore;
103 #endif // XAOD_STANDALONE
104  }

◆ print() [1/2]

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

◆ print() [2/2]

virtual void asg::IAsgTool::print ( ) const
pure 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  }

◆ setUseIncidents()

void asg::AsgMetadataTool::setUseIncidents ( const bool  flag)
inlineprotectedinherited

Definition at line 132 of file AsgMetadataTool.h.

133  {
135  }

◆ sysInitialize()

StatusCode asg::AsgMetadataTool::sysInitialize ( )
virtualinherited

Function initialising the tool in the correct way in Athena.

This function is used to set up the callbacks from IncidentSvc in Athena at the right time during initialisation, without the user having to do anything special in his/her code.

Reimplemented from AthCommonDataStore< AthCommonMsg< AlgTool > >.

Definition at line 110 of file AsgMetadataTool.cxx.

110  {
111 
112 #ifndef XAOD_STANDALONE
113  if (m_useIncidents) {
114  // Connect to the IncidentSvc:
115  ServiceHandle< IIncidentSvc > incSvc( "IncidentSvc", name() );
116  ATH_CHECK( incSvc.retrieve() );
117 
118  // Set up the right callbacks: don't rethrow exceptions, any failure and we should end
119  incSvc->addListener( this, IncidentType::BeginEvent, 0, false );
120  }
121  // Let the base class do its thing:
122  ATH_CHECK( AlgTool::sysInitialize() );
123 
124 #endif // not XAOD_STANDALONE
125 
126  // Return gracefully:
127  return StatusCode::SUCCESS;
128  }

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

◆ updatePointingAuxdata()

StatusCode CP::PhotonPointingTool::updatePointingAuxdata ( const xAOD::EgammaContainer egammas) const
virtual

Add calo and conversion (HPV) pointing variables.

Implements CP::IPhotonPointingTool.

Definition at line 115 of file PhotonPointingTool.cxx.

116 {
117  const EventContext& ctx = Gaudi::Hive::currentContext();
118 
119  // create the decorators
124 
125  bool isDecorAvailable = s_zvertex.isAvailable();
126 
127  // Loop over photons and add calo pointing auxdata
128  std::pair<float, float> result;
129  for (const auto *egamma: egammas) {
130  if(egamma==nullptr){
131  ATH_MSG_DEBUG("Passed Egamma was a nullptr -- skipping");
132  continue;
133  }
134  // Get calo pointing variables
136 
137  // Set photon auxdata with new value
138  if(isDecorAvailable){
139  ATH_MSG_DEBUG("Called updatePointingAuxdata but decoration is already available");
140  }
141  else{
142  s_zvertex(*egamma) = result.first;
143  s_errz(*egamma) = result.second;
144  }
145 
146  // Get conv pointing variables
147  if (egamma->type() == xAOD::Type::Photon) {
148  const xAOD::Egamma *eg = static_cast<const xAOD::Egamma*>(egamma);
149  const xAOD::Photon *photon = dynamic_cast<const xAOD::Photon*>(eg);
150 
153  }
154 
155  // Set photon auxdata with new value
156  if(!isDecorAvailable){
157  s_HPV_zvertex(*egamma) = result.first;
158  s_HPV_errz(*egamma) = result.second;
159  }
160 
161  }
162 
163  return StatusCode::SUCCESS;
164 }

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

bool asg::AsgMetadataTool::m_beginInputFileCalled
privateinherited

Flag helping to discover when the tool misses the opening of the first input file.

Definition at line 126 of file AsgMetadataTool.h.

◆ m_ContainerName

std::string CP::PhotonPointingTool::m_ContainerName
private

Definition at line 68 of file PhotonPointingTool.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_errz

SG::WriteDecorHandleKey<xAOD::EgammaContainer> CP::PhotonPointingTool::m_errz
private

Definition at line 54 of file PhotonPointingTool.h.

◆ m_errzDecorName

std::string CP::PhotonPointingTool::m_errzDecorName
private

Definition at line 65 of file PhotonPointingTool.h.

◆ m_evtInfo

SG::ReadHandleKey<xAOD::EventInfo> CP::PhotonPointingTool::m_evtInfo
private
Initial value:
{
this,
"EventInfo",
"EventInfo",
"SG key of xAOD::EventInfo"
}

Definition at line 45 of file PhotonPointingTool.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_HPV_errz

SG::WriteDecorHandleKey<xAOD::EgammaContainer> CP::PhotonPointingTool::m_HPV_errz
private

Definition at line 56 of file PhotonPointingTool.h.

◆ m_HPV_errzDecorName

std::string CP::PhotonPointingTool::m_HPV_errzDecorName
private

Definition at line 67 of file PhotonPointingTool.h.

◆ m_HPV_zvertex

SG::WriteDecorHandleKey<xAOD::EgammaContainer> CP::PhotonPointingTool::m_HPV_zvertex
private

Definition at line 55 of file PhotonPointingTool.h.

◆ m_HPV_zvertexDecorName

std::string CP::PhotonPointingTool::m_HPV_zvertexDecorName
private

Definition at line 66 of file PhotonPointingTool.h.

◆ m_inputMetaStore

MetaStore_t asg::AsgMetadataTool::m_inputMetaStore
privateinherited

Object accessing the input metadata store.

Definition at line 119 of file AsgMetadataTool.h.

◆ m_isMC

bool CP::PhotonPointingTool::m_isMC {}
private

Definition at line 62 of file PhotonPointingTool.h.

◆ m_outputMetaStore

MetaStore_t asg::AsgMetadataTool::m_outputMetaStore
privateinherited

Object accessing the output metadata store.

Definition at line 121 of file AsgMetadataTool.h.

◆ m_useIncidents

bool asg::AsgMetadataTool::m_useIncidents
privateinherited

Definition at line 128 of file AsgMetadataTool.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.

◆ m_zCorrection

TH1F* CP::PhotonPointingTool::m_zCorrection
private

Create a proper constructor for Athena.

Correction histogram

Definition at line 43 of file PhotonPointingTool.h.

◆ m_zOscFileData

std::string CP::PhotonPointingTool::m_zOscFileData
private

Definition at line 63 of file PhotonPointingTool.h.

◆ m_zOscFileMC

std::string CP::PhotonPointingTool::m_zOscFileMC
private

Definition at line 63 of file PhotonPointingTool.h.

◆ m_zvertex

SG::WriteDecorHandleKey<xAOD::EgammaContainer> CP::PhotonPointingTool::m_zvertex
private

Definition at line 53 of file PhotonPointingTool.h.

◆ m_zvertexDecorName

std::string CP::PhotonPointingTool::m_zvertexDecorName
private

Definition at line 64 of file PhotonPointingTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
CP::PhotonPointingTool::m_isMC
bool m_isMC
Definition: PhotonPointingTool.h:62
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
asg::AsgMetadataTool::beginEvent
virtual StatusCode beginEvent()
Function called when a new events is loaded.
Definition: AsgMetadataTool.cxx:196
get_generator_info.result
result
Definition: get_generator_info.py:21
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ParticleTest.eg
eg
Definition: ParticleTest.py:29
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CP::PhotonPointingTool::getCaloPointing
std::pair< float, float > getCaloPointing(const xAOD::Egamma *egamma) const
Return calo pointing variables.
Definition: PhotonPointingTool.cxx:174
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
downloadSingle.dataType
string dataType
Definition: downloadSingle.py:18
asg::AsgMetadataTool::inputMetaStore
MetaStorePtr_t inputMetaStore() const
Accessor for the input metadata store.
Definition: AsgMetadataTool.cxx:88
xAOD::CaloCluster_v1::phiBE
float phiBE(const unsigned layer) const
Get the phi in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:680
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
CP::PhotonPointingTool::m_zOscFileData
std::string m_zOscFileData
Definition: PhotonPointingTool.h:63
asg::AsgMetadataTool::m_beginInputFileCalled
bool m_beginInputFileCalled
Flag helping to discover when the tool misses the opening of the first input file.
Definition: AsgMetadataTool.h:126
CP::PhotonPointingTool::m_zOscFileMC
std::string m_zOscFileMC
Definition: PhotonPointingTool.h:63
asg::AsgMetadataTool::endInputFile
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
Definition: AsgMetadataTool.cxx:188
asg::AsgMetadataTool::m_outputMetaStore
MetaStore_t m_outputMetaStore
Object accessing the output metadata store.
Definition: AsgMetadataTool.h:121
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
CP::PhotonPointingTool::m_zvertexDecorName
std::string m_zvertexDecorName
Definition: PhotonPointingTool.h:64
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
egamma
Definition: egamma.h:58
xAOD::FileMetaData_v1::value
bool value(MetaDataType type, std::string &val) const
Get a pre-defined string value out of the object.
Definition: FileMetaData_v1.cxx:195
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
xAOD::FileMetaData_v1::simFlavour
@ simFlavour
Fast or Full sim [string].
Definition: FileMetaData_v1.h:76
CP::PhotonPointingTool::m_HPV_errz
SG::WriteDecorHandleKey< xAOD::EgammaContainer > m_HPV_errz
Definition: PhotonPointingTool.h:56
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
xAOD::CaloCluster_v1::etaBE
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:644
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
CP::PhotonPointingTool::m_HPV_zvertexDecorName
std::string m_HPV_zvertexDecorName
Definition: PhotonPointingTool.h:66
xAOD::CaloCluster_v1::inEndcap
bool inEndcap() const
Returns true if at least one clustered cell in the endcap.
Definition: CaloCluster_v1.h:901
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::EgammaHelpers::numberOfSiTracks
std::size_t numberOfSiTracks(const xAOD::Photon *eg)
return the number of Si tracks in the conversion
Definition: PhotonxAODHelpers.cxx:57
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
CP::ShowerDepthTool::getRZ
static std::pair< float, float > getRZ(float eta, int sampling)
Shower depth in R,Z for the given sampling.
Definition: ShowerDepthTool.cxx:107
CP::PhotonPointingTool::m_errzDecorName
std::string m_errzDecorName
Definition: PhotonPointingTool.h:65
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
asg::AsgMetadataTool::beginInputFile
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
Definition: AsgMetadataTool.cxx:180
master.flag
bool flag
Definition: master.py:29
CP::PhotonPointingTool::m_HPV_errzDecorName
std::string m_HPV_errzDecorName
Definition: PhotonPointingTool.h:67
file
TFile * file
Definition: tile_monitor.h:29
xAOD::CaloCluster_v1::inBarrel
bool inBarrel() const
Returns true if at least one clustered cell in the barrel.
Definition: CaloCluster_v1.h:896
asg::AsgMetadataTool::metaDataStop
virtual StatusCode metaDataStop()
Function called when the tool should write out its metadata.
Definition: AsgMetadataTool.cxx:204
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
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
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::FileMetaData_v1
Class holding file-level metadata about an xAOD file.
Definition: FileMetaData_v1.h:34
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
CP::PhotonPointingTool::m_errz
SG::WriteDecorHandleKey< xAOD::EgammaContainer > m_errz
Definition: PhotonPointingTool.h:54
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
CP::PhotonPointingTool::m_zCorrection
TH1F * m_zCorrection
Create a proper constructor for Athena.
Definition: PhotonPointingTool.h:43
CP::PhotonPointingTool::getCorrectedZ
float getCorrectedZ(float zPointing, float etas2) const
Definition: PhotonPointingTool.cxx:167
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
asg::AsgMetadataTool::m_inputMetaStore
MetaStore_t m_inputMetaStore
Object accessing the input metadata store.
Definition: AsgMetadataTool.h:119
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
CP::PhotonPointingTool::m_evtInfo
SG::ReadHandleKey< xAOD::EventInfo > m_evtInfo
Definition: PhotonPointingTool.h:45
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
xAOD::CaloCluster_v1::eSample
float eSample(const CaloSample sampling) const
Definition: CaloCluster_v1.cxx:521
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:199
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
xAOD::Photon_v1
Definition: Photon_v1.h:37
asg::AsgMetadataTool
Base class for dual-use tools that provide file metadata access.
Definition: AsgMetadataTool.h:48
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CP::PhotonPointingTool::m_HPV_zvertex
SG::WriteDecorHandleKey< xAOD::EgammaContainer > m_HPV_zvertex
Definition: PhotonPointingTool.h:55
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
CP::PhotonPointingTool::getConvPointing
std::pair< float, float > getConvPointing(const xAOD::Photon *photon) const
Return conversion (HPV) pointing variables.
Definition: PhotonPointingTool.cxx:225
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
merge.status
status
Definition: merge.py:17
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
CP::PhotonPointingTool::m_ContainerName
std::string m_ContainerName
Definition: PhotonPointingTool.h:68
SG::DataProxy
Definition: DataProxy.h:44
CP::PhotonPointingTool::m_zvertex
SG::WriteDecorHandleKey< xAOD::EgammaContainer > m_zvertex
Definition: PhotonPointingTool.h:53
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::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
fitman.k
k
Definition: fitman.py:528
pdg_comparison.conv
conv
Definition: pdg_comparison.py:321
ServiceHandle< IIncidentSvc >
asg::AsgMetadataTool::m_useIncidents
bool m_useIncidents
Definition: AsgMetadataTool.h:128