ATLAS Offline Software
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 
43 
45 {
46  public:
47  EventReaderAlg( const std::string& name, ISvcLocator* pSvcLocator );
48 
49  virtual ~EventReaderAlg() = default;
50 
51  virtual StatusCode initialize() override;
52  virtual StatusCode execute() override;
53  virtual StatusCode finalize() override;
54 
55  private:
56  virtual StatusCode dumpEventInfo(SG::ReadHandle<xAOD::EventInfo> &ei);
57  virtual StatusCode dumpLumiblockInfo(SG::ReadHandle<xAOD::EventInfo> &ei);
58  virtual StatusCode dumpClusterCells(const xAOD::CaloCluster *cl, int clusIndex, const EventContext& ctx); // dump the cluster and its cells with calib.
59  virtual StatusCode dumpOfflineSS(const xAOD::Electron *electron);
60  virtual StatusCode dumpTruthParticle(SG::ReadHandle<xAOD::ElectronContainer> &electronSelectionCnt, SG::ReadHandle<xAOD::TruthParticleContainer> &truthParticleCnt);
61  virtual StatusCode dumpElectrons(const xAOD::Electron* electron);
62  virtual StatusCode dumpZeeCut(SG::ReadHandle<xAOD::EventInfo> &ei, SG::ReadHandle<xAOD::VertexContainer> &primVertexCnt, const EventContext& ctx);
63  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.
64  virtual StatusCode FillNTupleWithSelectedElectrons(SG::ReadHandle<xAOD::EventInfo> &ei, SG::ReadHandle<xAOD::VertexContainer> &primVertexCnt, SG::ReadHandle<xAOD::ElectronContainer> &electronSelectionCnt, std::string& eSelectionText, const EventContext& ctx);
65 
66  Gaudi::Property<bool> m_printCellsClus {this, "printCellsClus", false, "Print out the cluster cells basic info during the dump."};
67  Gaudi::Property<bool> m_doClusterDump {this, "doClusterDump", false, "Perform a cluster cell dump based on Cluster Container name m_clusterName"};
68  Gaudi::Property<bool> m_getAssociatedTopoCluster {this, "getAssociatedTopoCluster", true, "Get the topo cluster associated to a super cluster, which was linked to an Electron."};
69  Gaudi::Property<bool> m_skipEmptyEvents {this, "skipEmptyEvents", true, "If true, do not fill the event that has no reco electrons."};
70  Gaudi::Property<float> m_minZeeMassTP {this, "minZeeMassTP", 66, "Minimum value of Zee mass for checking the TP pairs (GeV)."};
71  Gaudi::Property<float> m_maxZeeMassTP {this, "maxZeeMassTP", 116, "Maximum value of Zee mass for checking the TP pairs (GeV)."};
72 
73  //##################
74  // Services and Keys
75  //##################
76 
78 
79  // Conditions data objects
80  SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"};
81  SG::ReadCondHandleKey<AthenaAttributeList> m_run2DSPThresholdsKey{this, "Run2DSPThresholdsKey","", "SG Key for thresholds to compute time and quality, run 2"};
82  SG::ReadCondHandleKey<AthenaAttributeList> m_EneRescalerFldr{this,"OflEneRescalerKey","/LAR/CellCorrOfl/EnergyCorr", "Key (=foldername) of AttrListCollection"};
83  SG::ReadCondHandleKey<LuminosityCondData> m_lumiDataKey{this,"LumiKey", "LuminosityCondData","SG Key of LuminosityCondData object"};
84  SG::ReadCondHandleKey<ILArPedestal> m_pedestalKey{this,"PedestalKey","LArPedestal","SG Key of Pedestal conditions object"};
85  SG::ReadCondHandleKey<LArADC2MeV> m_adc2MeVKey{this,"ADC2MeVKey","LArADC2MeV","SG Key of ADC2MeV conditions object"};
86  SG::ReadCondHandleKey<ILArOFC> m_ofcKey{this,"OFCKey","LArOFC","SG Key of OFC conditions object"};
87  SG::ReadCondHandleKey<ILArShape> m_shapeKey{this,"ShapeKey","LArShape","SG Key of Shape conditions object"};
88  SG::ReadCondHandleKey<ILArMinBiasAverage> m_minBiasAvgKey{this, "MinBiasAvgKey", "LArPileupAverageSym", "SGKey of LArMinBiasAverage object"};
89  SG::ReadCondHandleKey<LArHVCorr> m_offlineHVScaleCorrKey{this, "keyOfflineHVCorr", "LArHVScaleCorrRecomputed","Key for LArHVScaleCorr"};
90  SG::ReadCondHandleKey<ILArfSampl> m_fSamplKey{this, "fSamplKey", "LArfSamplSym","SG key of LArfSampl object."};
91  SG::ReadCondHandleKey<LArOnOffIdMapping> m_larCablingKey{this,"LArOnOffMapKey","LArOnOffIdMap"," SG Key of LArOnOffIdMapping object."};
92 
93  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoSgKey{this, "EventInfoContainerKey", "EventInfo", "Name of the EventInfo Container"};
94  SG::ReadHandleKey<xAOD::VertexContainer> m_primVertSgKey{this, "PrimaryVertexContainerKey", "PrimaryVertices", "Name of the PrimaryVertices Container"};
95  SG::ReadHandleKey<xAOD::CaloClusterContainer> m_caloClusSgKey{this, "CaloClusterContainerKey", "CaloCalTopoClusters", "Name of the CaloCluster Container"};
96  SG::ReadHandleKey<xAOD::ElectronContainer> m_myElecSelectionSgKey{this, "MyElectronSelectionKey", "MySelectedElectrons", "Name of the MySelectedElectrons Container"};
97  SG::ReadHandleKey<xAOD::TruthParticleContainer> m_truthParticleCntSgKey{this, "TruthParticleContainerKey", "TruthParticles", "Name of the TruthParticles Container"};
98  SG::ReadHandleKey<xAOD::ElectronContainer> m_electronCntSgKey{this, "ElectronContainerKey", "Electrons", "Name of the Electrons Container"};
99  SG::ReadHandleKey<xAOD::TruthEventContainer> m_truthEventCntSgKey{this, "TruthEventContainerKey", "TruthEvents", "Name of the TruthEvents Container"};
100  SG::ReadHandleKey<LArHitContainer> m_larEMBHitCntSgKey{this, "LArEMBHitContainerKey", "LArHitEMB", "Name of the LArHitEMB container"};
101  SG::ReadHandleKey<LArDigitContainer> m_larDigitCntSgKey{this, "LArDigitContainerKey", "LArDigitContainer_MC", "Name of the LArDigits container"};
102  SG::ReadHandleKey<LArRawChannelContainer> m_larRawChCntSgKey{this, "LArRawChannelContainerKey", "LArRawChannels", "Name of the LArRawChannel container"};
103  SG::ReadHandleKey<CaloCellContainer> m_allCaloCellCntSgKey{this, "CaloCellContainerKey", "AllCalo", "Name of the CaloCell container"};
104 
105  std::unique_ptr<LArDSPThresholdsFlat> m_run2DSPThresh = nullptr;
106 
107  const CaloNoise* m_noiseCDO = nullptr;
108  const LuminosityCondData* m_lumis = nullptr;
109  const ILArPedestal* m_peds = nullptr;
110  const LArADC2MeV* m_adc2MeVs = nullptr;
111  const ILArOFC* m_ofcs = nullptr;
112  const ILArShape* m_shapes = nullptr;
113  const ILArMinBiasAverage* m_minBiasAvgs = nullptr;
114  const LArHVCorr* m_oflHVCorr = nullptr;
115  const CaloCondBlobFlt* m_EneRescaler = nullptr;
116  const ILArfSampl* m_fSampl = nullptr;
117 
118  // LAr Tools
119  const LArOnlineID* m_onlineLArID = nullptr;
120  const LArOnOffIdMapping* m_larCabling = nullptr;
121  const CaloIdManager* m_caloIdMgr = nullptr;
122  const LArEM_ID* m_larem_id = nullptr;
123  const LArHEC_ID* m_larhec_id = nullptr;
124  const LArFCAL_ID* m_larfcal_id = nullptr;
125  const CaloCell_ID* m_calocell_id = nullptr;
126 
127 };
128 
129 
130 #endif
131 
132 
133 
EventReaderAlg::~EventReaderAlg
virtual ~EventReaderAlg()=default
EventReaderBaseAlg::initialize
virtual StatusCode initialize() override
Definition: EventReaderBaseAlg.cxx:12
EventReaderBaseAlg::execute
virtual StatusCode execute() override
Definition: EventReaderBaseAlg.cxx:15
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:77
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
ILArPedestal
Definition: ILArPedestal.h:12
TruthParticleContainer.h
EventReaderBaseAlg::finalize
virtual StatusCode finalize() override
Definition: EventReaderBaseAlg.cxx:18
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:59
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:195
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:32
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:45
ServiceHandle< ITHistSvc >
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20
ILArMinBiasAverage.h