ATLAS Offline Software
Loading...
Searching...
No Matches
ForwardElectronToolsTestAlg Class Reference

#include <ForwardElectronToolsTestAlg.h>

Inheritance diagram for ForwardElectronToolsTestAlg:
Collaboration diagram for ForwardElectronToolsTestAlg:

Public Member Functions

 ForwardElectronToolsTestAlg (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~ForwardElectronToolsTestAlg ()=default
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual StatusCode finalize () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< AsgForwardElectronCalibrationToolm_calibTool
ToolHandle< IAsgElectronLikelihoodToolm_looseTool
ToolHandle< IAsgElectronLikelihoodToolm_mediumTool
ToolHandle< IAsgElectronLikelihoodToolm_tightTool
SG::ReadHandleKey< xAOD::ElectronContainerm_electronKey
SG::ReadHandleKey< xAOD::TruthParticleContainerm_truthKey
std::atomic< long > m_nEvents {0}
std::atomic< long > m_nElectrons {0}
std::atomic< long > m_nLoose {0}
std::atomic< long > m_nMedium {0}
std::atomic< long > m_nTight {0}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 19 of file ForwardElectronToolsTestAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ForwardElectronToolsTestAlg()

ForwardElectronToolsTestAlg::ForwardElectronToolsTestAlg ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 13 of file ForwardElectronToolsTestAlg.cxx.

15 : AnaReentrantAlgorithm(name, pSvcLocator)
16{}
AnaReentrantAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters

◆ ~ForwardElectronToolsTestAlg()

virtual ForwardElectronToolsTestAlg::~ForwardElectronToolsTestAlg ( )
virtualdefault

Member Function Documentation

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode ForwardElectronToolsTestAlg::execute ( const EventContext & ctx) const
overridevirtual

Definition at line 38 of file ForwardElectronToolsTestAlg.cxx.

39{
40 ++m_nEvents;
41
42 SG::ReadHandle<xAOD::ElectronContainer> electrons(m_electronKey, ctx);
43 if (!electrons.isValid()) return StatusCode::SUCCESS;
44
45 SG::ReadHandle<xAOD::TruthParticleContainer> truthParticles(m_truthKey, ctx);
46
47 // Skip events with no forward electrons
48
49 std::vector<const xAOD::Electron*> fwd_electrons;
50 for (const xAOD::Electron* el : *electrons) {
51 const xAOD::CaloCluster* cl = el->caloCluster();
52 if (cl && std::abs(cl->eta()) > 2.5 && std::abs(cl->eta()) <= 4.0)
53 {
54 fwd_electrons.push_back(el);
55 }
56 }
57 if (fwd_electrons.size() == 0) return StatusCode::SUCCESS;
58
59 for (const xAOD::Electron* el : fwd_electrons) {
60 const xAOD::CaloCluster* cluster = el->caloCluster();
61 const xAOD::TrackParticle* track = el->trackParticle();
62 if (!track) continue;
63
65
66 // --- Tool outputs ---
67 const double calibPt = m_calibTool->calibrate(ctx, el);
68 const double score = m_mediumTool->calculate(ctx, el);
69 const bool isLoose = static_cast<bool>(m_looseTool->accept(ctx, el));
70 const bool isMedium = static_cast<bool>(m_mediumTool->accept(ctx, el));
71 const bool isTight = static_cast<bool>(m_tightTool->accept(ctx, el));
72 if (isLoose) ++m_nLoose;
73 if (isMedium) ++m_nMedium;
74 if (isTight) ++m_nTight;
75
76 // --- Truth match ---
77 double truthPt = -1.;
78 double bestDR = 0.3;
79 if (truthParticles.isValid()) {
80 for (const xAOD::TruthParticle* tp : *truthParticles) {
81 if (!tp || std::abs(tp->pdgId()) != 11 || tp->status() != 1) continue;
82 double dr = deltaR(cluster->eta(), cluster->phi(), tp->eta(), tp->phi());
83 if (dr < bestDR) { bestDR = dr; truthPt = tp->pt() / 1000.; }
84 }
85 }
86
87 // =====================================================================
88 // Extract variables exactly as in AsgForwardElectronSelectorTool::getInputs()
89 // =====================================================================
90
91 // x1, x2 = calo eta and phi
92 double calo_eta = cluster->eta();
93 double calo_phi = cluster->phi();
94
95 // x3, x4 = track eta and phi
96 double track_eta = track->eta();
97 double track_phi = track->phi();
98
99 // x5 = HGTD time
100 double hgtd_time = track->time();
101
102 // x6, x7 = ITk hit counts
103 double pixels = el->trackParticleSummaryIntValue(xAOD::numberOfPixelHits);
104 double strips = el->trackParticleSummaryIntValue(xAOD::numberOfSCTHits);
105
106 // x8 to x14 = 7 calorimeter shower-shape moments
107 auto getMom = [&](xAOD::CaloCluster::MomentType type) -> double {
108 double val = 0.;
109 cluster->retrieveMoment(type, val);
110 return val;
111 };
112 double ENG_FRAC_MAX = getMom(xAOD::CaloCluster::ENG_FRAC_MAX);
113 double LONGITUDINAL = getMom(xAOD::CaloCluster::LONGITUDINAL);
115 double LATERAL = getMom(xAOD::CaloCluster::LATERAL);
116 double SECOND_R = getMom(xAOD::CaloCluster::SECOND_R);
118 double SECOND_ENG_DENS = getMom(xAOD::CaloCluster::SECOND_ENG_DENS);
119
120 // x15 to x18 = track-calo matching
121 auto getMatch = [&](xAOD::EgammaParameters::TrackCaloMatchType type) -> float {
122 float val = 0.f;
123 el->trackCaloMatchValue(val, type);
124 return val;
125 };
126 double delta_eta2 = getMatch(xAOD::EgammaParameters::deltaEta2);
127 double delta_phi2 = getMatch(xAOD::EgammaParameters::deltaPhi2);
128 double delta_phi_rescaled2 = getMatch(xAOD::EgammaParameters::deltaPhiRescaled2);
129 double delta_phi_last = getMatch(xAOD::EgammaParameters::deltaPhiFromLastMeasurement);
130
131 // x19-x25 - energy fractions (exactly as in getInputs())
132 const double caloE = cluster->e();
133 const double inv_E = (caloE != 0.) ? 1. / caloE : 0.;
134 using CS = CaloSampling::CaloSample;
135
136 double frac_EM_1 = cluster->energyBE(1) * inv_E;
137 double frac_EM_2 = cluster->energyBE(2) * inv_E;
138 double frac_EM_3 = cluster->energyBE(3) * inv_E;
139 double frac_HAD_0 = cluster->eSample(static_cast<CS>(CaloSampling::HEC0)) * inv_E;
140 double frac_HAD_1 = (cluster->eSample(static_cast<CS>(CaloSampling::HEC1)) +
141 cluster->eSample(static_cast<CS>(CaloSampling::FCAL0))) * inv_E;
142 double frac_HAD_2 = (cluster->eSample(static_cast<CS>(CaloSampling::HEC2)) +
143 cluster->eSample(static_cast<CS>(CaloSampling::FCAL1))) * inv_E;
144 double frac_HAD_3 = (cluster->eSample(static_cast<CS>(CaloSampling::HEC3)) +
145 cluster->eSample(static_cast<CS>(CaloSampling::FCAL2))) * inv_E;
146
147 double calo_pt = el->pt();
148
149 // =====================================================================
150 // Print in parseable format
151 // =====================================================================
152 if (msgLvl(MSG::DEBUG))
153 {
154 ATH_MSG_DEBUG("FWDEL_START");
155 ATH_MSG_DEBUG(" raw_pT=" << calo_pt/1000.
156 << " calib_pT=" << calibPt/1000.
157 << " truth_pT=" << truthPt
158 << " score_cpp=" << score
159 << " L=" << isLoose << " M=" << isMedium << " T=" << isTight);
160 ATH_MSG_DEBUG(" calo_eta=" << calo_eta
161 << " calo_phi=" << calo_phi
162 << " track_eta=" << track_eta
163 << " track_phi=" << track_phi
164 << " time=" << hgtd_time
165 << " pixels=" << pixels
166 << " strips=" << strips);
167 ATH_MSG_DEBUG(" ENG_FRAC_MAX=" << ENG_FRAC_MAX
168 << " LONGITUDINAL=" << LONGITUDINAL
169 << " SECOND_LAMBDA=" << SECOND_LAMBDA
170 << " LATERAL=" << LATERAL
171 << " SECOND_R=" << SECOND_R
172 << " CENTER_LAMBDA=" << CENTER_LAMBDA
173 << " SECOND_ENG_DENS=" << SECOND_ENG_DENS);
174 ATH_MSG_DEBUG(" delta_eta2=" << delta_eta2
175 << " delta_phi2=" << delta_phi2
176 << " delta_phi_rescaled2=" << delta_phi_rescaled2
177 << " delta_phi_last=" << delta_phi_last);
178 ATH_MSG_DEBUG(" calo_frac_EM_1=" << frac_EM_1
179 << " calo_frac_EM_2=" << frac_EM_2
180 << " calo_frac_EM_3=" << frac_EM_3
181 << " calo_frac_HAD_0=" << frac_HAD_0
182 << " calo_frac_HAD_1=" << frac_HAD_1
183 << " calo_frac_HAD_2=" << frac_HAD_2
184 << " calo_frac_HAD_3=" << frac_HAD_3);
185 ATH_MSG_DEBUG(" calo_pt=" << calo_pt);
186 ATH_MSG_DEBUG("FWDEL_END");
187 }
188 }
189 return StatusCode::SUCCESS;
190}
Scalar deltaR(const MatrixBase< Derived > &vec) const
#define ATH_MSG_DEBUG(x)
bool msgLvl(const MSG::Level lvl) const
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronKey
ToolHandle< IAsgElectronLikelihoodTool > m_tightTool
ToolHandle< IAsgElectronLikelihoodTool > m_looseTool
ToolHandle< AsgForwardElectronCalibrationTool > m_calibTool
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthKey
ToolHandle< IAsgElectronLikelihoodTool > m_mediumTool
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double e() const
The total energy of the particle.
float eSample(const CaloSample sampling) const
float energyBE(const unsigned layer) const
Get the energy in one layer of the EM Calo.
virtual double phi() const
The azimuthal angle ( ) of the particle.
MomentType
Enums to identify different moments.
@ SECOND_ENG_DENS
Second Moment in E/V.
@ SECOND_LAMBDA
Second Moment in .
@ LATERAL
Normalized lateral moment.
@ LONGITUDINAL
Normalized longitudinal moment.
@ ENG_FRAC_MAX
Energy fraction of hottest cell.
@ SECOND_R
Second Moment in .
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
bool CENTER_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool SECOND_R(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool SECOND_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
@ deltaPhiFromLastMeasurement
difference between the cluster phi (sampling 2) and the eta of the track extrapolated from the last m...
@ deltaEta2
difference between the cluster eta (second sampling) and the eta of the track extrapolated to the sec...
@ deltaPhiRescaled2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
@ deltaPhi2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TruthParticle_v1 TruthParticle
Typedef to implementation.
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Electron_v1 Electron
Definition of the current "egamma version".

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode ForwardElectronToolsTestAlg::finalize ( )
overridevirtual

Definition at line 192 of file ForwardElectronToolsTestAlg.cxx.

193{
194 const double n = m_nElectrons > 0 ? static_cast<double>(m_nElectrons) : 1.;
195 ATH_MSG_INFO("========================================");
196 ATH_MSG_INFO("Events processed : " << m_nEvents);
197 ATH_MSG_INFO("Forward electrons : " << m_nElectrons);
198 ATH_MSG_INFO("Pass Loose (90%) : " << m_nLoose << " (" << 100.*m_nLoose/n << "%)");
199 ATH_MSG_INFO("Pass Medium (80%) : " << m_nMedium << " (" << 100.*m_nMedium/n << "%)");
200 ATH_MSG_INFO("Pass Tight (70%) : " << m_nTight << " (" << 100.*m_nTight/n << "%)");
201 ATH_MSG_INFO("========================================");
202 return StatusCode::SUCCESS;
203}
#define ATH_MSG_INFO(x)

◆ initialize()

StatusCode ForwardElectronToolsTestAlg::initialize ( )
overridevirtual

Definition at line 18 of file ForwardElectronToolsTestAlg.cxx.

19{
20 ATH_CHECK(m_electronKey.initialize());
21 ATH_CHECK(m_truthKey.initialize());
22 ATH_CHECK(m_calibTool.retrieve());
23 ATH_CHECK(m_looseTool.retrieve());
24 ATH_CHECK(m_mediumTool.retrieve());
25 ATH_CHECK(m_tightTool.retrieve());
26 ATH_MSG_INFO("ForwardElectronToolsTestAlg initialised");
27 return StatusCode::SUCCESS;
28}
#define ATH_CHECK
Evaluate an expression and check for errors.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_calibTool

ToolHandle<AsgForwardElectronCalibrationTool> ForwardElectronToolsTestAlg::m_calibTool
private
Initial value:
{
this, "CalibrationTool", "FwdCalibTool", ""}

Definition at line 28 of file ForwardElectronToolsTestAlg.h.

28 {
29 this, "CalibrationTool", "FwdCalibTool", ""};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_electronKey

SG::ReadHandleKey<xAOD::ElectronContainer> ForwardElectronToolsTestAlg::m_electronKey
private
Initial value:
{
this, "ElectronContainerKey", "ForwardElectrons", ""}

Definition at line 37 of file ForwardElectronToolsTestAlg.h.

37 {
38 this, "ElectronContainerKey", "ForwardElectrons", ""};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_looseTool

ToolHandle<IAsgElectronLikelihoodTool> ForwardElectronToolsTestAlg::m_looseTool
private
Initial value:
{
this, "LooseTool", "FwdSelectorTool_Loose", ""}

Definition at line 30 of file ForwardElectronToolsTestAlg.h.

30 {
31 this, "LooseTool", "FwdSelectorTool_Loose", ""};

◆ m_mediumTool

ToolHandle<IAsgElectronLikelihoodTool> ForwardElectronToolsTestAlg::m_mediumTool
private
Initial value:
{
this, "MediumTool", "FwdSelectorTool_Medium", ""}

Definition at line 32 of file ForwardElectronToolsTestAlg.h.

32 {
33 this, "MediumTool", "FwdSelectorTool_Medium", ""};

◆ m_nElectrons

std::atomic<long> ForwardElectronToolsTestAlg::m_nElectrons {0}
private

Definition at line 42 of file ForwardElectronToolsTestAlg.h.

42{0}, m_nElectrons{0};

◆ m_nEvents

std::atomic<long> ForwardElectronToolsTestAlg::m_nEvents {0}
mutableprivate

Definition at line 42 of file ForwardElectronToolsTestAlg.h.

42{0}, m_nElectrons{0};

◆ m_nLoose

std::atomic<long> ForwardElectronToolsTestAlg::m_nLoose {0}
mutableprivate

Definition at line 43 of file ForwardElectronToolsTestAlg.h.

43{0}, m_nMedium{0}, m_nTight{0};

◆ m_nMedium

std::atomic<long> ForwardElectronToolsTestAlg::m_nMedium {0}
private

Definition at line 43 of file ForwardElectronToolsTestAlg.h.

43{0}, m_nMedium{0}, m_nTight{0};

◆ m_nTight

std::atomic<long> ForwardElectronToolsTestAlg::m_nTight {0}
private

Definition at line 43 of file ForwardElectronToolsTestAlg.h.

43{0}, m_nMedium{0}, m_nTight{0};

◆ m_tightTool

ToolHandle<IAsgElectronLikelihoodTool> ForwardElectronToolsTestAlg::m_tightTool
private
Initial value:
{
this, "TightTool", "FwdSelectorTool_Tight", ""}

Definition at line 34 of file ForwardElectronToolsTestAlg.h.

34 {
35 this, "TightTool", "FwdSelectorTool_Tight", ""};

◆ m_truthKey

SG::ReadHandleKey<xAOD::TruthParticleContainer> ForwardElectronToolsTestAlg::m_truthKey
private
Initial value:
{
this, "TruthParticleKey", "TruthParticles", ""}

Definition at line 39 of file ForwardElectronToolsTestAlg.h.

39 {
40 this, "TruthParticleKey", "TruthParticles", ""};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: