ATLAS Offline Software
Loading...
Searching...
No Matches
EventReaderAlg.h
Go to the documentation of this file.
1// Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3#ifndef LARCLUSTERCELLDUMPER_EVENTREADERALG_H
4#define LARCLUSTERCELLDUMPER_EVENTREADERALG_H
5
7
9
10// Calibration constants
23
24#include "xAODEgamma/Egamma.h"
33
37
42#include "GaudiKernel/ITHistSvc.h"
43
44
46{
47 public:
48 EventReaderAlg( const std::string& name, ISvcLocator* pSvcLocator );
49
50 virtual ~EventReaderAlg() = default;
51
52 virtual StatusCode initialize() override;
53 virtual StatusCode execute() override;
54 virtual StatusCode finalize() override;
55
56 private:
57 virtual StatusCode dumpEventInfo(SG::ReadHandle<xAOD::EventInfo> &ei);
59 virtual StatusCode dumpClusterCells(const xAOD::CaloCluster *cl, int clusIndex, const EventContext& ctx); // dump the cluster and its cells with calib.
60 virtual StatusCode dumpOfflineSS(const xAOD::Electron *electron);
61 virtual StatusCode dumpTruthParticle(SG::ReadHandle<xAOD::ElectronContainer> &electronSelectionCnt, SG::ReadHandle<xAOD::TruthParticleContainer> &truthParticleCnt);
62 virtual StatusCode dumpElectrons(const xAOD::Electron* electron);
63 virtual StatusCode dumpZeeCut(SG::ReadHandle<xAOD::EventInfo> &ei, SG::ReadHandle<xAOD::VertexContainer> &primVertexCnt, const EventContext& ctx);
64 virtual StatusCode dumpPrimVertexAssocToElectron(const xAOD::Electron *el, SG::ReadHandle<xAOD::VertexContainer> &primVertexCnt, SG::ReadHandle<xAOD::EventInfo> & evtInfo); // follow the same rules determined by 'trackSelectionElectrons' routine.
65 virtual StatusCode FillNTupleWithSelectedElectrons(SG::ReadHandle<xAOD::EventInfo> &ei, SG::ReadHandle<xAOD::VertexContainer> &primVertexCnt, SG::ReadHandle<xAOD::ElectronContainer> &electronSelectionCnt, std::string& eSelectionText, const EventContext& ctx);
66
67 Gaudi::Property<bool> m_printCellsClus {this, "printCellsClus", false, "Print out the cluster cells basic info during the dump."};
68 Gaudi::Property<bool> m_doClusterDump {this, "doClusterDump", false, "Perform a cluster cell dump based on Cluster Container name m_clusterName"};
69 Gaudi::Property<bool> m_getAssociatedTopoCluster {this, "getAssociatedTopoCluster", true, "Get the topo cluster associated to a super cluster, which was linked to an Electron."};
70 Gaudi::Property<bool> m_skipEmptyEvents {this, "skipEmptyEvents", true, "If true, do not fill the event that has no reco electrons."};
71 Gaudi::Property<float> m_minZeeMassTP {this, "minZeeMassTP", 66, "Minimum value of Zee mass for checking the TP pairs (GeV)."};
72 Gaudi::Property<float> m_maxZeeMassTP {this, "maxZeeMassTP", 116, "Maximum value of Zee mass for checking the TP pairs (GeV)."};
73
74 //##################
75 // Services and Keys
76 //##################
77
79
80 // Conditions data objects
81 SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"};
82 SG::ReadCondHandleKey<AthenaAttributeList> m_run2DSPThresholdsKey{this, "Run2DSPThresholdsKey","", "SG Key for thresholds to compute time and quality, run 2"};
83 SG::ReadCondHandleKey<AthenaAttributeList> m_EneRescalerFldr{this,"OflEneRescalerKey","/LAR/CellCorrOfl/EnergyCorr", "Key (=foldername) of AttrListCollection"};
84 SG::ReadCondHandleKey<LuminosityCondData> m_lumiDataKey{this,"LumiKey", "LuminosityCondData","SG Key of LuminosityCondData object"};
85 SG::ReadCondHandleKey<ILArPedestal> m_pedestalKey{this,"PedestalKey","LArPedestal","SG Key of Pedestal conditions object"};
86 SG::ReadCondHandleKey<LArADC2MeV> m_adc2MeVKey{this,"ADC2MeVKey","LArADC2MeV","SG Key of ADC2MeV conditions object"};
87 SG::ReadCondHandleKey<ILArOFC> m_ofcKey{this,"OFCKey","LArOFC","SG Key of OFC conditions object"};
88 SG::ReadCondHandleKey<ILArShape> m_shapeKey{this,"ShapeKey","LArShape","SG Key of Shape conditions object"};
89 SG::ReadCondHandleKey<ILArMinBiasAverage> m_minBiasAvgKey{this, "MinBiasAvgKey", "LArPileupAverageSym", "SGKey of LArMinBiasAverage object"};
90 SG::ReadCondHandleKey<LArHVCorr> m_offlineHVScaleCorrKey{this, "keyOfflineHVCorr", "LArHVScaleCorrRecomputed","Key for LArHVScaleCorr"};
91 SG::ReadCondHandleKey<ILArfSampl> m_fSamplKey{this, "fSamplKey", "LArfSamplSym","SG key of LArfSampl object."};
92 SG::ReadCondHandleKey<LArOnOffIdMapping> m_larCablingKey{this,"LArOnOffMapKey","LArOnOffIdMap"," SG Key of LArOnOffIdMapping object."};
93
94 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoSgKey{this, "EventInfoContainerKey", "EventInfo", "Name of the EventInfo Container"};
95 SG::ReadHandleKey<xAOD::VertexContainer> m_primVertSgKey{this, "PrimaryVertexContainerKey", "PrimaryVertices", "Name of the PrimaryVertices Container"};
96 SG::ReadHandleKey<xAOD::CaloClusterContainer> m_caloClusSgKey{this, "CaloClusterContainerKey", "CaloCalTopoClusters", "Name of the CaloCluster Container"};
97 SG::ReadHandleKey<xAOD::ElectronContainer> m_myElecSelectionSgKey{this, "MyElectronSelectionKey", "MySelectedElectrons", "Name of the MySelectedElectrons Container"};
98 SG::ReadHandleKey<xAOD::TruthParticleContainer> m_truthParticleCntSgKey{this, "TruthParticleContainerKey", "TruthParticles", "Name of the TruthParticles Container"};
99 SG::ReadHandleKey<xAOD::ElectronContainer> m_electronCntSgKey{this, "ElectronContainerKey", "Electrons", "Name of the Electrons Container"};
100 SG::ReadHandleKey<xAOD::TruthEventContainer> m_truthEventCntSgKey{this, "TruthEventContainerKey", "TruthEvents", "Name of the TruthEvents Container"};
101 SG::ReadHandleKey<LArHitContainer> m_larEMBHitCntSgKey{this, "LArEMBHitContainerKey", "LArHitEMB", "Name of the LArHitEMB container"};
102 SG::ReadHandleKey<LArDigitContainer> m_larDigitCntSgKey{this, "LArDigitContainerKey", "LArDigitContainer_MC", "Name of the LArDigits container"};
103 SG::ReadHandleKey<LArRawChannelContainer> m_larRawChCntSgKey{this, "LArRawChannelContainerKey", "LArRawChannels", "Name of the LArRawChannel container"};
104 SG::ReadHandleKey<CaloCellContainer> m_allCaloCellCntSgKey{this, "CaloCellContainerKey", "AllCalo", "Name of the CaloCell container"};
105
106 std::unique_ptr<LArDSPThresholdsFlat> m_run2DSPThresh = nullptr;
107
108 const CaloNoise* m_noiseCDO = nullptr;
109 const LuminosityCondData* m_lumis = nullptr;
110 const ILArPedestal* m_peds = nullptr;
111 const LArADC2MeV* m_adc2MeVs = nullptr;
112 const ILArOFC* m_ofcs = nullptr;
113 const ILArShape* m_shapes = nullptr;
115 const LArHVCorr* m_oflHVCorr = nullptr;
117 const ILArfSampl* m_fSampl = nullptr;
118
119 // LAr Tools
120 const LArOnlineID* m_onlineLArID = nullptr;
122 const CaloIdManager* m_caloIdMgr = nullptr;
123 const LArEM_ID* m_larem_id = nullptr;
124 const LArHEC_ID* m_larhec_id = nullptr;
125 const LArFCAL_ID* m_larfcal_id = nullptr;
126 const CaloCell_ID* m_calocell_id = nullptr;
127
128};
129
130
131#endif
132
133
134
DataVector adapter that acts like it holds const pointers.
Hold luminosity data produced by LuminosityCondAlg.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
Class for storing a number of floats (Flt) and functions on those.
This class initializes the Calo (LAr and Tile) offline identifiers.
const ILArMinBiasAverage * m_minBiasAvgs
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoSgKey
SG::ReadHandleKey< LArDigitContainer > m_larDigitCntSgKey
SG::ReadHandleKey< xAOD::VertexContainer > m_primVertSgKey
Gaudi::Property< bool > m_skipEmptyEvents
SG::ReadCondHandleKey< LArOnOffIdMapping > m_larCablingKey
const LArEM_ID * m_larem_id
Gaudi::Property< bool > m_getAssociatedTopoCluster
SG::ReadCondHandleKey< ILArMinBiasAverage > m_minBiasAvgKey
SG::ReadCondHandleKey< LArADC2MeV > m_adc2MeVKey
const LArADC2MeV * m_adc2MeVs
virtual StatusCode dumpOfflineSS(const xAOD::Electron *electron)
virtual StatusCode dumpTruthParticle(SG::ReadHandle< xAOD::ElectronContainer > &electronSelectionCnt, SG::ReadHandle< xAOD::TruthParticleContainer > &truthParticleCnt)
const CaloCondBlobFlt * m_EneRescaler
SG::ReadHandleKey< xAOD::ElectronContainer > m_myElecSelectionSgKey
SG::ReadCondHandleKey< LuminosityCondData > m_lumiDataKey
Gaudi::Property< bool > m_printCellsClus
Gaudi::Property< float > m_minZeeMassTP
virtual StatusCode FillNTupleWithSelectedElectrons(SG::ReadHandle< xAOD::EventInfo > &ei, SG::ReadHandle< xAOD::VertexContainer > &primVertexCnt, SG::ReadHandle< xAOD::ElectronContainer > &electronSelectionCnt, std::string &eSelectionText, const EventContext &ctx)
const ILArShape * m_shapes
const ILArOFC * m_ofcs
virtual StatusCode dumpLumiblockInfo(SG::ReadHandle< xAOD::EventInfo > &ei)
EventReaderAlg(const std::string &name, ISvcLocator *pSvcLocator)
const ILArPedestal * m_peds
virtual StatusCode dumpClusterCells(const xAOD::CaloCluster *cl, int clusIndex, const EventContext &ctx)
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventCntSgKey
const LArFCAL_ID * m_larfcal_id
const LArOnlineID * m_onlineLArID
const LArHEC_ID * m_larhec_id
const CaloIdManager * m_caloIdMgr
virtual ~EventReaderAlg()=default
SG::ReadHandleKey< CaloCellContainer > m_allCaloCellCntSgKey
const ILArfSampl * m_fSampl
SG::ReadCondHandleKey< AthenaAttributeList > m_run2DSPThresholdsKey
SG::ReadHandleKey< LArRawChannelContainer > m_larRawChCntSgKey
const CaloNoise * m_noiseCDO
virtual StatusCode dumpEventInfo(SG::ReadHandle< xAOD::EventInfo > &ei)
virtual StatusCode dumpPrimVertexAssocToElectron(const xAOD::Electron *el, SG::ReadHandle< xAOD::VertexContainer > &primVertexCnt, SG::ReadHandle< xAOD::EventInfo > &evtInfo)
SG::ReadCondHandleKey< ILArfSampl > m_fSamplKey
virtual StatusCode dumpZeeCut(SG::ReadHandle< xAOD::EventInfo > &ei, SG::ReadHandle< xAOD::VertexContainer > &primVertexCnt, const EventContext &ctx)
SG::ReadHandleKey< LArHitContainer > m_larEMBHitCntSgKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleCntSgKey
SG::ReadCondHandleKey< ILArShape > m_shapeKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronCntSgKey
SG::ReadCondHandleKey< ILArOFC > m_ofcKey
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
Gaudi::Property< float > m_maxZeeMassTP
std::unique_ptr< LArDSPThresholdsFlat > m_run2DSPThresh
virtual StatusCode dumpElectrons(const xAOD::Electron *electron)
const LuminosityCondData * m_lumis
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusSgKey
const LArOnOffIdMapping * m_larCabling
Gaudi::Property< bool > m_doClusterDump
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
const CaloCell_ID * m_calocell_id
const LArHVCorr * m_oflHVCorr
SG::ReadCondHandleKey< LArHVCorr > m_offlineHVScaleCorrKey
SG::ReadCondHandleKey< AthenaAttributeList > m_EneRescalerFldr
ServiceHandle< ITHistSvc > m_ntsvc
virtual StatusCode initialize() override
EventReaderBaseAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode finalize() override
virtual StatusCode execute() override
Helper class for LArEM offline identifiers.
Definition LArEM_ID.h:111
Helper class for LArFCAL offline identifiers.
Definition LArFCAL_ID.h:49
Helper class for LArHEC offline identifiers.
Definition LArHEC_ID.h:76
Property holding a SG store/key/clid from which a ReadHandle is made.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Electron_v1 Electron
Definition of the current "egamma version".