Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
16 #include "LArElecCalib/ILArOFC.h"
18 #include "LArElecCalib/ILArfSampl.h"
19 #include "LArElecCalib/ILArShape.h"
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);
58  virtual StatusCode dumpLumiblockInfo(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;
114  const ILArMinBiasAverage* m_minBiasAvgs = nullptr;
115  const LArHVCorr* m_oflHVCorr = nullptr;
116  const CaloCondBlobFlt* m_EneRescaler = nullptr;
117  const ILArfSampl* m_fSampl = nullptr;
118 
119  // LAr Tools
120  const LArOnlineID* m_onlineLArID = nullptr;
121  const LArOnOffIdMapping* m_larCabling = 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 
EventReaderAlg::~EventReaderAlg
virtual ~EventReaderAlg()=default
EventReaderBaseAlg::initialize
virtual StatusCode initialize() override
Definition: EventReaderBaseAlg.cxx:21
EventReaderBaseAlg::execute
virtual StatusCode execute() override
Definition: EventReaderBaseAlg.cxx:24
EventReaderBaseAlg.h
CaloCondBlobFlt
Class for storing a number of floats (Flt) and functions on those.
Definition: CaloCondBlobFlt.h:29
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
EventReaderAlg::m_ntsvc
ServiceHandle< ITHistSvc > m_ntsvc
Definition: EventReaderAlg.h:78
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
ILArPedestal
Definition: ILArPedestal.h:12
TruthParticleContainer.h
EventReaderBaseAlg::finalize
virtual StatusCode finalize() override
Definition: EventReaderBaseAlg.cxx:27
LArHEC_ID
Helper class for LArHEC offline identifiers.
Definition: LArHEC_ID.h:85
ILArMinBiasAverage
Definition: ILArMinBiasAverage.h:13
LArHVCorr.h
ILArOFC.h
SG::ReadHandleKey< xAOD::EventInfo >
AthenaAttributeList.h
CaloCell_ID.h
LArADC2MeV.h
Egamma.h
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:62
LArOnOffIdMapping.h
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
ElectronContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArHVCorr
Definition: LArHVCorr.h:16
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
LuminosityCondData.h
Hold luminosity data produced by LuminosityCondAlg.
LArDSPThresholdsFlat.h
ILArOFC
Definition: ILArOFC.h:14
CaloNoise
Definition: CaloNoise.h:16
LuminosityCondData
Definition: LuminosityCondData.h:23
ILArShape.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
CaloNoise.h
LArOnlineID
Definition: LArOnlineID.h:20
LArDigitContainer.h
CaloCellContainer.h
xAOD::Electron_v1
Definition: Electron_v1.h:34
EventInfo.h
SG::ReadCondHandleKey< CaloNoise >
LArADC2MeV
Definition: LArADC2MeV.h:21
CaloCondBlobFlt.h
VertexContainer.h
ILArPedestal.h
LArHitContainer.h
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
CaloClusterContainer.h
CaloIdManager.h
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
TruthEventContainer.h
ILArShape
Definition: ILArShape.h:13
LArFCAL_ID
Helper class for LArFCAL offline identifiers.
Definition: LArFCAL_ID.h:60
EventReaderBaseAlg
Definition: EventReaderBaseAlg.h:20
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
PhotonContainer.h
LArRawChannelContainer.h
ILArfSampl.h
LArOnlineID.h
ILArfSampl
Definition: ILArfSampl.h:14
EventReaderAlg
Definition: EventReaderAlg.h:46
ServiceHandle< ITHistSvc >
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20
ILArMinBiasAverage.h