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

#include <HIClusterGeo_HistoFiller.h>

Inheritance diagram for HIClusterGeo_HistoFiller:
Collaboration diagram for HIClusterGeo_HistoFiller:

Public Member Functions

 HIClusterGeo_HistoFiller (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~HIClusterGeo_HistoFiller ()=default
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) override
 Execute method with EventContext.
virtual StatusCode finalize () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual StatusCode execute ()
 Execute method without EventContext (deprecated).
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
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
const EventContext & getContext () const
 Deprecated methods (use the ones with EventContext).
bool filterPassed () const
void setFilterPassed (bool state) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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

TH1 * regAndGetTHF (const std::string &histName, const std::string &histTitle, int numBinsX, double xMin, double xMax, int numBinsY, double yMin, double yMax)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ServiceHandle< ITHistSvc > m_thistSvc {this, "THistSvc", "THistSvc"}
Gaudi::Property< std::string > m_histStream {this, "HistStream", "CLUSTERGEOFILLERSTREAM"}
Gaudi::Property< float > m_minFCalET {this, "minFCalET", 0.0, "minimum allowed FCal ET in TeV"}
Gaudi::Property< float > m_maxFCalET {this, "maxFCalET", 5.4, "maximum allowed FCal ET in TeV"}
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey {this, "EventInfoKey", "EventInfo", "name of EventInfo container"}
SG::ReadHandleKey< xAOD::VertexContainerm_vertexContainerKey {this, "VertexContainerKey", "PrimaryVertices", "name of VertexContainer"}
SG::ReadHandleKey< xAOD::CaloClusterContainerm_caloClusterContainerKey {this, "CaloClusterContainerKey", "HIClusters", "name of CaloClusterContainer"}
SG::ReadHandleKey< xAOD::HIEventShapeContainerm_hiEventShapeKey {this, "HIEventShapeKey", "CaloSums", "name of HIEventShapeContainer"}
std::unordered_map< int, TH2F * > m_histTileWeights
const int m_etaBins =100
const int m_phiBins =64
const int m_totalBins = (m_etaBins+2)*(m_phiBins+2)
TH2F * m_etaPhiMapping
DataObjIDColl m_extendedExtraObjects
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 27 of file HIClusterGeo_HistoFiller.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

◆ HIClusterGeo_HistoFiller()

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

Definition at line 7 of file HIClusterGeo_HistoFiller.cxx.

7 :
8 AthAlgorithm(name, pSvcLocator), m_etaPhiMapping(nullptr)
9{
10}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:

◆ ~HIClusterGeo_HistoFiller()

virtual HIClusterGeo_HistoFiller::~HIClusterGeo_HistoFiller ( )
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() [1/2]

virtual StatusCode AthAlgorithm::execute ( )
inlinevirtualinherited

Execute method without EventContext (deprecated).

Override this method if the EventContext is not needed.

Reimplemented in AthenaMonManager, AthPrescaler, BuildVertexPointingAlg, CP::AsgClassificationDecorationAlg, CP::AsgEnergyDecoratorAlg, CP::AsgEventScaleFactorAlg, CP::AsgLeptonTrackDecorationAlg, CP::AsgObjectScaleFactorAlg, CP::AsgPriorityDecorationAlg, CP::AsgSelectionAlg, CP::AsgShallowCopyAlg, CP::AsgUnionPreselectionAlg, CP::AsgUnionSelectionAlg, CP::AsgViewFromSelectionAlg, CP::AsgxAODNTupleMakerAlg, CP::BJetCalibrationAlg, CP::BootstrapGeneratorAlg, CP::BTaggingEfficiencyAlg, CP::BTaggingInformationDecoratorAlg, CP::BTaggingTriggerEfficiencyAlg, CP::BTaggingTriggerMatchingAlg, CP::ChargeSelectorAlg, CP::CopyNominalSelectionAlg, CP::DileptonInvariantMassSelectorAlg, CP::DileptonInvariantMassWindowSelectorAlg, CP::DileptonOSSFInvariantMassWindowSelectorAlg, CP::DiTauEfficiencyCorrectionsAlg, CP::DiTauMassCalculatorAlg, CP::DiTauSmearingAlg, CP::DiTauTruthMatchingAlg, CP::EgammaCalibrationAndSmearingAlg, CP::EgammaFSRForMuonsCollectorAlg, CP::EgammaIsolationCorrectionAlg, CP::EgammaIsolationSelectionAlg, CP::ElectronEfficiencyCorrectionAlg, CP::ElectronSiHitDecAlg, CP::EventCutFlowHistAlg, CP::EventFlagSelectionAlg, CP::EventSelectionByObjectFlagAlg, CP::EventStatusSelectionAlg, CP::FakeBkgCalculatorAlg, CP::InDetTrackBiasingAlg, CP::InDetTrackExtraVarDecoratorAlg, CP::InDetTrackSelectionAlg, CP::InDetTrackSmearingAlg, CP::JetCalibAlg, CP::JetCalibrationAlg, CP::JetDecoratorAlg, CP::JetFFSmearingAlg, CP::JetGhostMuonAssociationAlg, CP::JetModifierAlg, CP::JetNGhostSelectorAlg, CP::JetReclusteringAlg, CP::JetSelectionAlg, CP::JetTriggerDecoratorAlg, CP::JetUncertaintiesAlg, CP::JvtEfficiencyAlg, CP::JvtUpdateAlg, CP::KinematicHistAlg, CP::LeptonSFCalculatorAlg, CP::MCTCDecorationAlg, CP::MetadataHistAlg, CP::MetBuilderAlg, CP::MetMakerAlg, CP::MetSignificanceAlg, CP::MissingETPlusTransverseMassSelectorAlg, CP::MissingETSelectorAlg, CP::MuonCalibrationAndSmearingAlg, CP::MuonEfficiencyScaleFactorAlg, CP::MuonIsolationAlg, CP::MuonSelectionAlgV2, CP::MuonTriggerEfficiencyScaleFactorAlg, CP::NJetDecoratorAlg, CP::NLargeRJetMassWindowSelectorAlg, CP::NObjectMassSelectorAlg, CP::NObjectPtSelectorAlg, CP::ObjectCutFlowHistAlg, CP::OverlapRemovalAlg, CP::PhotonEfficiencyCorrectionAlg, CP::PhotonExtraVariablesAlg, CP::PhotonShowerShapeFudgeAlg, CP::PileupReweightingAlg, CP::PileupReweightingProvider, CP::PMGTruthWeightAlg, CP::RNtupleTreeMakerAlg, CP::RunNumberSelectorAlg, CP::RunPartonHistoryAlg, CP::SaveFilterAlg, CP::SecVertexTruthMatchAlg, CP::SSVWeightsAlg, CP::SumNLeptonPtSelectorAlg, CP::SysListDumperAlg, CP::SysTruthWeightAlg, CP::TauCombineMuonRMTausAlg, CP::TauEfficiencyCorrectionsAlg, CP::TauSmearingAlg, CP::TauTruthMatchingAlg, CP::TransverseMassSelectorAlg, CP::TreeFillerAlg, CP::TreeMakerAlg, CP::TrigEventSelectionAlg, CP::TrigGlobalEfficiencyAlg, CP::TrigMatchingAlg, CP::TrigPrescalesAlg, CP::VGammaORAlg, CP::xAODWriterAlg, CP::XbbEfficiencyAlg, CP::XbbInformationDecoratorAlg, DecoratePhotonPointingAlg, DecorateVertexScoreAlg, DumpEventDataToJsonAlg, DumpGeo, EL::AnaAlgorithm, EL::UnitTestAlg2, EL::UnitTestAlg3, EL::UnitTestAlg4, EL::UnitTestAlg5, EL::UnitTestAlg7, EventReco::KLFitterFinalizeOutputAlg, EventReco::RunKLFitterAlg, GRLSelectorAlg, IdDictCnvTest, InDetUpdateCaches, JetGlobalEventSetup, LArAutoCorrAlgToDB, LArAutoCorrFromStdNtuple, LArBadChannelHunter, LArBlockCorrections, LArCalibCopyAlg< CONDITIONSCONTAINER >, LArCalibCopyAlg< LArDAC2uAMC >, LArCalibCopyAlg< LArPhysWaveContainer >, LArCalibCopyAlg< LArTdriftComplete >, LArCalibPatchingAlg< CONDITIONSCONTAINER >, LArCalibPatchingAlg< LArAutoCorrComplete >, LArCalibPatchingAlg< LArCaliWaveContainer >, LArCalibPatchingAlg< LArMphysOverMcalComplete >, LArCalibPatchingAlg< LArRampComplete >, LArCalibValidationAlg< CONDITIONSCONTAINER, REFCONTAINER >, LArCalibValidationAlg< LArAutoCorrComplete, LArAutoCorrComplete >, LArCalibValidationAlg< LArCaliWaveContainer, LArCaliWaveContainer >, LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >, LArCalibValidationAlg< LArRampComplete, ILArRamp >, LArCaliWaveSelector, LArCompleteToFlat, LArDeltaRespPredictor, LArDSPThresholdFillInline, LArDuplicateConstants, LArFillDSPConfig, LArFlatFromFile, LArGeoWeightsFill, LArMasterWaveBuilder, LArMphysOverMcalFromTuple, LArOFCAlg, LArOFCBin_PhysCaliTdiffFromStdNtuple, LArOFCtoOFC, LArOFPhaseFill, LArParamsFromStdNtuple, LArPhysWaveFromAscii, LArPhysWaveFromStdNtuple, LArPhysWaveFromTuple, LArPhysWavePredictor, LArPhysWaveShifter, LArRampAdHocPatchingAlg, LArReadParamsFromFile< DATA >, LArReadParamsFromFile< LArCableAttenuationComplete >, LArReadParamsFromFile< LArCableLengthComplete >, LArReadParamsFromFile< LArCaliPulseParamsComplete >, LArReadParamsFromFile< LArDetCellParamsComplete >, LArReadParamsFromFile< LArEMEC_CphiComplete >, LArReadParamsFromFile< LArEMEC_HValphaComplete >, LArReadParamsFromFile< LArEMEC_HVbetaComplete >, LArReadParamsFromFile< LArMphysOverMcalComplete >, LArReadParamsFromFile< LArPhysCaliTdiffComplete >, LArReadParamsFromFile< LArRinjComplete >, LArReadParamsFromFile< LArTdriftComplete >, LArReadParamsFromFile< LArTshaperComplete >, LArRTMParamExtractor, LArShapeFromStdNtuple, LArTimePhysPrediction, LisNtuple, LVL1::eFEXDriver, LVL1::L1CaloTriggerTowerDecoratorAlg, LVL1::L1TopoSimulation, LVL1::TrigT1MBTS, OverlapRemovalGenUseAlg, PyAthena::Alg, SelectorBase< Derived >, SGInputLoader, SUSYToolsAlg, TBBPCRec, TBMWPCRec, TBScintillatorRec, TBTailCatcherRec, TBTrackInfoFromTag, TestAthenaConstraintFit, Trig::TrigMatchTestAlg, TrkEDMTestAlg, ZdcLEDNtuple, and ZdcNtuple.

Definition at line 76 of file AthAlgorithm.h.

76 {
77 throw GaudiException( "execute() or execute(const EventContext&) needs to be implemented", name(),
78 StatusCode::FAILURE );
79 }

◆ execute() [2/2]

StatusCode HIClusterGeo_HistoFiller::execute ( const EventContext & )
overridevirtual

Execute method with EventContext.

Override this method if acccess to the EventContext is needed.

Reimplemented from AthAlgorithm.

Definition at line 49 of file HIClusterGeo_HistoFiller.cxx.

50{
51
52 SG::ReadHandle<xAOD::EventInfo> eventInfo{m_eventInfoKey, ctx};
53 if (!eventInfo.isValid())
54 {
55 ATH_MSG_WARNING("Cannot get EventInfo with key " << m_eventInfoKey.key());
56 return StatusCode::SUCCESS;
57 }
58
59 if((eventInfo->errorState(xAOD::EventInfo::LAr) == xAOD::EventInfo::Error) ||
60 (eventInfo->errorState(xAOD::EventInfo::Tile) == xAOD::EventInfo::Error) ||
61 (eventInfo->isEventFlagBitSet(xAOD::EventInfo::Core, 18)) )
62 {
63 return StatusCode::SUCCESS;
64 }
65
66 // GRL selection will be done later by "makeHIResponse",
67 // here, we just save everything into separate histograms for each LB
68
69 // trigger decision tool is not needed if we use CC and PC streams
70
71 SG::ReadHandle<xAOD::VertexContainer> vertices{m_vertexContainerKey, ctx};
72 if(!vertices.isValid())
73 {
74 ATH_MSG_WARNING("Cannot get VertexContainer with key " << m_vertexContainerKey.key());
75 return StatusCode::SUCCESS;
76 }
77 if(vertices->size() <= 1)
78 {
79 // no vertex
80 return StatusCode::SUCCESS;
81 }
82
83 SG::ReadHandle<xAOD::CaloClusterContainer> caloClusters{m_caloClusterContainerKey, ctx};
84 if (!caloClusters.isValid())
85 {
86 ATH_MSG_WARNING("Cannot get CaloClusterContainer with key " << m_caloClusterContainerKey.key());
87 return StatusCode::SUCCESS;
88 }
89
90 SG::ReadHandle<xAOD::HIEventShapeContainer> hiEventShape{m_hiEventShapeKey, ctx};
91 if (!hiEventShape.isValid())
92 {
93 ATH_MSG_WARNING("Cannot get HIEventShapeContainer with key " << m_hiEventShapeKey.key());
94 return StatusCode::SUCCESS;
95 }
96
97 int currentLB = eventInfo->lumiBlock();
98 int currentRun = eventInfo->runNumber();
99
100 if (auto search = m_histTileWeights.find(currentLB); search == m_histTileWeights.end())
101 {
102 // if m_histTileWeights does not already have histogram forthis LB, allocate a new TH2F
103 // bins in Y: sum FCalET, sum ClusterET, sum FCalET^2, sum ClusterET^2, sum FCalET*ClusterET, number of events
104 TH2F * newHistTileWeights = static_cast<TH2F*>(regAndGetTHF(Form("h_clusterET_fcalET_%d_%d",currentRun,currentLB), ";bin ID;sum FCalET/clusterET/FCalET^2/clusterET^2/FCalET*clusterET/n_{events}", m_totalBins, -0.5, m_totalBins-0.5, 6,0.5,6.5));
105 if (newHistTileWeights == nullptr)
106 {
107 ATH_MSG_WARNING("Could not create histogram "<<Form("h_clusterET_fcalET_%d_%d",currentRun,currentLB)<<" that was supposed to be used for Run "<<currentRun<<" LB "<<currentLB);
108 return StatusCode::SUCCESS;
109 }
110
111 m_histTileWeights[currentLB] = std::move(newHistTileWeights);
112 }
113
114 auto currentHistTileWeights = m_histTileWeights.at(currentLB);
115
116 float fcalEt = hiEventShape->at(5)->et()*1e-6;
117 if(fcalEt<m_minFCalET || m_maxFCalET<fcalEt)
118 {
119 // remove in-time and out-of-time pile-up
120 return StatusCode::SUCCESS;
121 }
122
123 for(const auto* cluster : *caloClusters)
124 {
125 float eta = cluster->eta();
126 float phi = cluster->phi();
127 int binID = m_etaPhiMapping->FindBin(eta, phi);
128 float ET = cluster->e() * 1e-3 / std::cosh(eta);
129
130 currentHistTileWeights->Fill(binID, 1, fcalEt);
131 currentHistTileWeights->Fill(binID, 2, ET);
132 currentHistTileWeights->Fill(binID, 3, fcalEt*fcalEt);
133 currentHistTileWeights->Fill(binID, 4, ET*ET);
134 currentHistTileWeights->Fill(binID, 5, fcalEt*ET);
135 currentHistTileWeights->Fill(binID, 6, 1.);
136 }
137
138 return StatusCode::SUCCESS;
139}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
SG::ReadHandleKey< xAOD::HIEventShapeContainer > m_hiEventShapeKey
TH1 * regAndGetTHF(const std::string &histName, const std::string &histTitle, int numBinsX, double xMin, double xMax, int numBinsY, double yMin, double yMax)
Gaudi::Property< float > m_minFCalET
Gaudi::Property< float > m_maxFCalET
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusterContainerKey
std::unordered_map< int, TH2F * > m_histTileWeights
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
virtual bool isValid() override final
Can the handle be successfully dereferenced?
@ Tile
The Tile calorimeter.
@ Core
Core flags describing the event.
@ LAr
The LAr calorimeter.
@ Error
The sub-detector issued an error.
void search(TDirectory *td, const std::string &s, std::string cwd, node *n)
recursive directory search for TH1 and TH2 and TProfiles
Definition hcg.cxx:743
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)

◆ 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 & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 50 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ filterPassed()

bool AthAlgorithm::filterPassed ( ) const
inherited

Definition at line 94 of file AthAlgorithm.cxx.

94 {
95 return execState( Gaudi::Hive::currentContext() ).filterPassed();
96}

◆ finalize()

StatusCode HIClusterGeo_HistoFiller::finalize ( )
overridevirtual

Definition at line 141 of file HIClusterGeo_HistoFiller.cxx.

142{
143 return StatusCode::SUCCESS;
144}

◆ getContext()

const EventContext & AthAlgorithm::getContext ( ) const
inherited

Deprecated methods (use the ones with EventContext).

Definition at line 90 of file AthAlgorithm.cxx.

90 {
91 return Gaudi::Hive::currentContext();
92}

◆ initialize()

StatusCode HIClusterGeo_HistoFiller::initialize ( )
overridevirtual

Definition at line 29 of file HIClusterGeo_HistoFiller.cxx.

30{
31 ATH_CHECK( m_eventInfoKey.initialize() );
32 ATH_CHECK( m_vertexContainerKey.initialize() );
34 ATH_CHECK( m_hiEventShapeKey.initialize() );
35
36 ATH_CHECK( m_thistSvc.retrieve() );
37
38 m_histTileWeights.clear();
39
40 m_etaPhiMapping = static_cast<TH2F*>(regAndGetTHF("h_etaPhiMapping", ";eta;phi", m_etaBins, -5, 5, m_phiBins, -TMath::Pi(), TMath::Pi()));
41 if(m_etaPhiMapping==nullptr)
42 {
43 return StatusCode::FAILURE;
44 }
45
46 return StatusCode::SUCCESS;
47}
#define ATH_CHECK
Evaluate an expression and check for errors.
ServiceHandle< ITHistSvc > m_thistSvc

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

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 118 of file AthAlgorithm.h.

118{ return false; }

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

◆ regAndGetTHF()

TH1 * HIClusterGeo_HistoFiller::regAndGetTHF ( const std::string & histName,
const std::string & histTitle,
int numBinsX,
double xMin,
double xMax,
int numBinsY,
double yMin,
double yMax )
private

Definition at line 12 of file HIClusterGeo_HistoFiller.cxx.

13{
14 auto hist = std::make_unique<TH2F>(histName.c_str(), histTitle.c_str(), numBinsX, xMin, xMax, numBinsY, yMin, yMax);
15 if(m_thistSvc->regHist("/" + m_histStream + "/" + histName, std::unique_ptr<TH1>(std::move(hist))).isFailure())
16 {
17 return nullptr;
18 }
19
20 TH1 * tmpHist = nullptr;
21 if(m_thistSvc->getHist("/" + m_histStream + "/" + histName, tmpHist).isFailure())
22 {
23 return nullptr;
24 }
25
26 return static_cast<TH1*>(tmpHist);
27}
Gaudi::Property< std::string > m_histStream
tmpHist(what, wmin=-1e10, wmax=+1e10)
Definition fitman.py:146

◆ 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()

void AthAlgorithm::setFilterPassed ( bool state) const
inherited

Definition at line 98 of file AthAlgorithm.cxx.

98 {
99 execState( Gaudi::Hive::currentContext() ).setFilterPassed(state);
100}

◆ sysInitialize()

StatusCode AthAlgorithm::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, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
#define ATH_MSG_ERROR(x)
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

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

SG::ReadHandleKey<xAOD::CaloClusterContainer> HIClusterGeo_HistoFiller::m_caloClusterContainerKey {this, "CaloClusterContainerKey", "HIClusters", "name of CaloClusterContainer"}
private

Definition at line 44 of file HIClusterGeo_HistoFiller.h.

44{this, "CaloClusterContainerKey", "HIClusters", "name of CaloClusterContainer"};

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

const int HIClusterGeo_HistoFiller::m_etaBins =100
private

Definition at line 48 of file HIClusterGeo_HistoFiller.h.

◆ m_etaPhiMapping

TH2F* HIClusterGeo_HistoFiller::m_etaPhiMapping
private

Definition at line 50 of file HIClusterGeo_HistoFiller.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> HIClusterGeo_HistoFiller::m_eventInfoKey {this, "EventInfoKey", "EventInfo", "name of EventInfo container"}
private

Definition at line 42 of file HIClusterGeo_HistoFiller.h.

42{this, "EventInfoKey", "EventInfo", "name of EventInfo container"};

◆ 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 AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 121 of file AthAlgorithm.h.

◆ m_hiEventShapeKey

SG::ReadHandleKey<xAOD::HIEventShapeContainer> HIClusterGeo_HistoFiller::m_hiEventShapeKey {this, "HIEventShapeKey", "CaloSums", "name of HIEventShapeContainer"}
private

Definition at line 45 of file HIClusterGeo_HistoFiller.h.

45{this, "HIEventShapeKey", "CaloSums", "name of HIEventShapeContainer"};

◆ m_histStream

Gaudi::Property<std::string> HIClusterGeo_HistoFiller::m_histStream {this, "HistStream", "CLUSTERGEOFILLERSTREAM"}
private

Definition at line 38 of file HIClusterGeo_HistoFiller.h.

38{this, "HistStream", "CLUSTERGEOFILLERSTREAM"};

◆ m_histTileWeights

std::unordered_map<int, TH2F*> HIClusterGeo_HistoFiller::m_histTileWeights
private

Definition at line 47 of file HIClusterGeo_HistoFiller.h.

◆ m_maxFCalET

Gaudi::Property<float> HIClusterGeo_HistoFiller::m_maxFCalET {this, "maxFCalET", 5.4, "maximum allowed FCal ET in TeV"}
private

Definition at line 40 of file HIClusterGeo_HistoFiller.h.

40{this, "maxFCalET", 5.4, "maximum allowed FCal ET in TeV"};

◆ m_minFCalET

Gaudi::Property<float> HIClusterGeo_HistoFiller::m_minFCalET {this, "minFCalET", 0.0, "minimum allowed FCal ET in TeV"}
private

Definition at line 39 of file HIClusterGeo_HistoFiller.h.

39{this, "minFCalET", 0.0, "minimum allowed FCal ET in TeV"};

◆ m_phiBins

const int HIClusterGeo_HistoFiller::m_phiBins =64
private

Definition at line 48 of file HIClusterGeo_HistoFiller.h.

◆ m_thistSvc

ServiceHandle<ITHistSvc> HIClusterGeo_HistoFiller::m_thistSvc {this, "THistSvc", "THistSvc"}
private

Definition at line 37 of file HIClusterGeo_HistoFiller.h.

37{this, "THistSvc", "THistSvc"};

◆ m_totalBins

const int HIClusterGeo_HistoFiller::m_totalBins = (m_etaBins+2)*(m_phiBins+2)
private

Definition at line 49 of file HIClusterGeo_HistoFiller.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexContainerKey

SG::ReadHandleKey<xAOD::VertexContainer> HIClusterGeo_HistoFiller::m_vertexContainerKey {this, "VertexContainerKey", "PrimaryVertices", "name of VertexContainer"}
private

Definition at line 43 of file HIClusterGeo_HistoFiller.h.

43{this, "VertexContainerKey", "PrimaryVertices", "name of VertexContainer"};

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