ATLAS Offline Software
LUCID_PileUpTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LUCID_DIGITIZATION_TOOL_H
6 #define LUCID_DIGITIZATION_TOOL_H
7 
9 
11 
14 
15 #include "xAODEventInfo/EventInfo.h" // SubEventIterator
16 #include "xAODEventInfo/EventAuxInfo.h"// SubEventIterator
17 
20 
21 #include "Gaudi/Property.h"
22 #include "GaudiKernel/ServiceHandle.h"
23 
24 #include <vector>
25 #include <utility> /* pair */
26 
27 namespace CLHEP {
28  class HepRandomEngine;
29 }
30 
32 
33 public:
34 
35  LUCID_PileUpTool(const std::string& type,
36  const std::string& name,
37  const IInterface* parent);
38 
39  virtual StatusCode initialize() override final;
40  virtual StatusCode finalize() override final;
41 
43  virtual StatusCode prepareEvent(const EventContext& ctx, const unsigned int nInputEvents) override final;
44 
46  virtual StatusCode processBunchXing(int bunchXing,
47  SubEventIterator bSubEvents,
48  SubEventIterator eSubEvents) override final;
51  // virtual bool toProcess(int bunchXing) const override final;
52 
54  virtual StatusCode mergeEvent(const EventContext& ctx) override final;
55 
57  virtual StatusCode processAllSubEvents(const EventContext& ctx) override final;
58 
59 private:
60 
61  ServiceHandle<PileUpMergeSvc> m_mergeSvc{this, "mergeSvc", "PileUpMergeSvc", ""};
62  ServiceHandle<IAthRNGSvc> m_randomSvc{this, "RndmSvc", "AthRNGSvc", ""};
63  Gaudi::Property<std::string> m_randomStreamName{this, "RandomStreamName", "LUCIDRndEng", ""};
64 
65  std::string m_dataObjectName;
67  std::string m_digitsContainerName;
68  std::string m_key_digitCnt;
69 
71 
72  ITHistSvc *m_digitHistSvc{};
73 
75 };
76 
77 #endif
LUCID_PileUpTool::mergeEvent
virtual StatusCode mergeEvent(const EventContext &ctx) override final
return false if not interested in certain xing times (in ns) implemented by default in PileUpToolBase...
Definition: LUCID_PileUpTool.cxx:180
LUCID_PileUpTool
Definition: LUCID_PileUpTool.h:31
LUCID_DigitizationToolBox
Definition: LUCID_DigitizationToolBox.h:19
LUCID_PileUpTool::m_mergeSvc
ServiceHandle< PileUpMergeSvc > m_mergeSvc
Definition: LUCID_PileUpTool.h:61
LUCID_PileUpTool::m_mergedhitList
LUCID_SimHitCollection * m_mergedhitList
Definition: LUCID_PileUpTool.h:74
AtlasHitsVector
Definition: AtlasHitsVector.h:33
LUCID_PileUpTool::m_dataObjectName
std::string m_dataObjectName
Definition: LUCID_PileUpTool.h:65
LUCID_PileUpTool::m_digitHistSvc
ITHistSvc * m_digitHistSvc
Definition: LUCID_PileUpTool.h:72
LUCID_PileUpTool::prepareEvent
virtual StatusCode prepareEvent(const EventContext &ctx, const unsigned int nInputEvents) override final
called before the subevts loop. Not (necessarily) able to access SubEvents
Definition: LUCID_PileUpTool.cxx:126
LUCID_DigitizationToolBox.h
LUCID_PileUpTool::m_SimHitCollectionName
std::string m_SimHitCollectionName
Definition: LUCID_PileUpTool.h:66
LUCID_PileUpTool::m_digitToolBox
LUCID_DigitizationToolBox * m_digitToolBox
Definition: LUCID_PileUpTool.h:70
LUCID_PileUpTool::m_key_digitCnt
std::string m_key_digitCnt
Definition: LUCID_PileUpTool.h:68
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LUCID_PileUpTool::processAllSubEvents
virtual StatusCode processAllSubEvents(const EventContext &ctx) override final
perform the digitization - used by LUCID_DigiTop::execute
Definition: LUCID_PileUpTool.cxx:192
CLHEP
STD'S.
Definition: IAtRndmGenSvc.h:19
LUCID_PileUpTool::m_digitsContainerName
std::string m_digitsContainerName
Definition: LUCID_PileUpTool.h:67
LUCID_PileUpTool::m_randomSvc
ServiceHandle< IAthRNGSvc > m_randomSvc
Definition: LUCID_PileUpTool.h:62
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LUCID_PileUpTool::LUCID_PileUpTool
LUCID_PileUpTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: LUCID_PileUpTool.cxx:19
LUCID_PileUpTool::initialize
virtual StatusCode initialize() override final
Definition: LUCID_PileUpTool.cxx:74
PileUpToolBase
Definition: PileUpToolBase.h:18
LUCID_SimHitCollection.h
EventAuxInfo.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
EventInfo.h
LUCID_PileUpTool::finalize
virtual StatusCode finalize() override final
Definition: LUCID_PileUpTool.cxx:234
LUCID_PileUpTool::m_randomStreamName
Gaudi::Property< std::string > m_randomStreamName
Definition: LUCID_PileUpTool.h:63
PileUpMergeSvc.h
the preferred mechanism to access information from the different event stores in a pileup job.
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LUCID_DigitContainer.h
SubEventIterator
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition: IPileUpTool.h:22
PileUpToolBase.h
helper base class IPileUpTool::toProcess().
LUCID_PileUpTool::processBunchXing
virtual StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents) override final
called for each active bunch-crossing to process current SubEvents bunchXing is in ns
Definition: LUCID_PileUpTool.cxx:139
IAthRNGSvc.h
ServiceHandle< PileUpMergeSvc >