ATLAS Offline Software
ALFA_PileUpTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ALFA_PILEUP_TOOL_H
6 #define ALFA_PILEUP_TOOL_H
7 
9 
10 #include "Gaudi/Property.h"
11 #include "GaudiKernel/ServiceHandle.h"
12 #include "GaudiKernel/ITHistSvc.h"
14 
16 
19 
22 
24 
25 #include <string>
26 #include <vector>
27 
28 namespace CLHEP {
29  class HepRandomEngine;
30 }
31 
33 
34  public:
35 
36  ALFA_PileUpTool(const std::string& type,
37  const std::string& name,
38  const IInterface* parent);
39 
40  virtual StatusCode initialize() override final;
41  virtual StatusCode finalize() override final;
42 
45  virtual StatusCode prepareEvent(const EventContext& ctx, const unsigned int nInputEvents) override final;
46 
49  int bunchXing,
50  SubEventIterator bSubEvents,
51  SubEventIterator eSubEvents
52  ) override final;
55  // virtual bool toProcess(int bunchXing) const;
56 
58  virtual StatusCode mergeEvent(const EventContext& ctx) override final;
59 
60  virtual StatusCode processAllSubEvents(const EventContext& ctx) override final;
61 
62  private:
63 
64  StatusCode recordCollection(ServiceHandle<StoreGateSvc>& evtStore, const std::string& key_digitCnt);
65 
66  void ALFA_MD_info(const ALFA_HitCollection*);
68 
69 
70  StatusCode fill_MD_DigitCollection(CLHEP::HepRandomEngine*);
71 
72  StatusCode recordODCollection(ServiceHandle<StoreGateSvc>& evtStore, const std::string& key_ODdigitCnt);
73 
76 
77 
78  StatusCode fill_OD_DigitCollection(CLHEP::HepRandomEngine*);
79  StatusCode XTalk();
80 
81 
82  ServiceHandle<PileUpMergeSvc> m_mergeSvc{this, "mergeSvc", "PileUpMergeSvc", ""};
83  ServiceHandle<IAthRNGSvc> m_randomSvc{this, "RndmSvc", "AthRNGSvc", ""};
84  Gaudi::Property<std::string> m_randomStreamName{this, "RandomStreamName", "ALFARndEng", ""};
85 
86  double m_E_fib[8][20][64]{};
87  double m_E_ODfib[8][2][3][30]{};
88 
89 
92  std::string m_key_DigitCollection;
94 
97 
98 
99  double m_sigma0{};
100  double m_sigma1{};
101  double m_meanE_dep{};
102  double m_meanN_photo{};
103  double m_mean{};
104  double m_stdDev{};
105  double m_AmplitudeCut{};
106 
109 
110  double m_cross_talk[8][127]{};
111  int m_fibres[8][20][64]{};
112 
113 
114 };
115 
116 #endif
ALFA_PileUpTool::m_fibres
int m_fibres[8][20][64]
Definition: ALFA_PileUpTool.h:111
ALFA_PileUpTool::ALFA_MD_info
void ALFA_MD_info(const ALFA_HitCollection *)
Definition: ALFA_PileUpTool.cxx:400
ALFA_ODDigitCollection.h
ALFA_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: ALFA_PileUpTool.cxx:244
ALFA_PileUpTool::m_meanN_photo
double m_meanN_photo
Definition: ALFA_PileUpTool.h:102
ALFA_PileUpTool::m_key_ODDigitCollection
std::string m_key_ODDigitCollection
Definition: ALFA_PileUpTool.h:93
AtlasHitsVector
Definition: AtlasHitsVector.h:33
ALFA_ODHitCollection.h
ALFA_PileUpTool::ALFA_OD_info
void ALFA_OD_info(const ALFA_ODHitCollection *)
Definition: ALFA_PileUpTool.cxx:491
ALFA_PileUpTool
Definition: ALFA_PileUpTool.h:32
ALFA_PileUpTool::m_AmplitudeCut
double m_AmplitudeCut
Definition: ALFA_PileUpTool.h:105
ALFA_PileUpTool::initialize
virtual StatusCode initialize() override final
Definition: ALFA_PileUpTool.cxx:94
ALFA_PileUpTool::m_mergedALFA_HitList
ALFA_HitCollection * m_mergedALFA_HitList
Definition: ALFA_PileUpTool.h:107
ALFA_PileUpTool::m_randomStreamName
Gaudi::Property< std::string > m_randomStreamName
Definition: ALFA_PileUpTool.h:84
ALFA_PileUpTool::m_ODdigitCollection
ALFA_ODDigitCollection * m_ODdigitCollection
Definition: ALFA_PileUpTool.h:96
ALFA_PileUpTool::recordCollection
StatusCode recordCollection(ServiceHandle< StoreGateSvc > &evtStore, const std::string &key_digitCnt)
Definition: ALFA_PileUpTool.cxx:330
ALFA_PileUpTool::m_meanE_dep
double m_meanE_dep
Definition: ALFA_PileUpTool.h:101
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ALFA_PileUpTool::fill_OD_DigitCollection
StatusCode fill_OD_DigitCollection(CLHEP::HepRandomEngine *)
Definition: ALFA_PileUpTool.cxx:629
ALFA_PileUpTool::m_SimODHitCollectionName
std::string m_SimODHitCollectionName
Definition: ALFA_PileUpTool.h:91
CLHEP
STD'S.
Definition: IAtRndmGenSvc.h:19
ALFA_PileUpTool::m_E_ODfib
double m_E_ODfib[8][2][3][30]
Definition: ALFA_PileUpTool.h:87
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TimedHitCollection.h
ALFA_DigitCollection.h
ALFA_PileUpTool::m_E_fib
double m_E_fib[8][20][64]
Definition: ALFA_PileUpTool.h:86
PileUpToolBase
Definition: PileUpToolBase.h:18
ALFA_PileUpTool::processAllSubEvents
virtual StatusCode processAllSubEvents(const EventContext &ctx) override final
Definition: ALFA_PileUpTool.cxx:117
ALFA_PileUpTool::recordODCollection
StatusCode recordODCollection(ServiceHandle< StoreGateSvc > &evtStore, const std::string &key_ODdigitCnt)
Definition: ALFA_PileUpTool.cxx:342
ALFA_PileUpTool::m_mergedALFA_ODHitList
ALFA_ODHitCollection * m_mergedALFA_ODHitList
Definition: ALFA_PileUpTool.h:108
ALFA_PileUpTool::m_sigma0
double m_sigma0
Definition: ALFA_PileUpTool.h:99
ALFA_DigitCollection
Definition: ALFA_DigitCollection.h:15
ALFA_PileUpTool::XTalk
StatusCode XTalk()
Definition: ALFA_PileUpTool.cxx:677
ALFA_PileUpTool::m_sigma1
double m_sigma1
Definition: ALFA_PileUpTool.h:100
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ALFA_PileUpTool::m_SimHitCollectionName
std::string m_SimHitCollectionName
Definition: ALFA_PileUpTool.h:90
ALFA_PileUpTool::finalize
virtual StatusCode finalize() override final
Definition: ALFA_PileUpTool.cxx:326
ALFA_PileUpTool::m_cross_talk
double m_cross_talk[8][127]
Definition: ALFA_PileUpTool.h:110
ALFA_PileUpTool::m_mergeSvc
ServiceHandle< PileUpMergeSvc > m_mergeSvc
Definition: ALFA_PileUpTool.h:82
ALFA_PileUpTool::m_key_DigitCollection
std::string m_key_DigitCollection
Definition: ALFA_PileUpTool.h:92
ALFA_PileUpTool::prepareEvent
virtual StatusCode prepareEvent(const EventContext &ctx, const unsigned int nInputEvents) override final
code taken from ZDC; author (highly) probably John Chapman called before the subevts loop.
Definition: ALFA_PileUpTool.cxx:223
ALFA_HitCollection.h
PileUpMergeSvc.h
the preferred mechanism to access information from the different event stores in a pileup job.
ALFA_PileUpTool::ALFA_PileUpTool
ALFA_PileUpTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: ALFA_PileUpTool.cxx:50
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ALFA_PileUpTool::m_digitCollection
ALFA_DigitCollection * m_digitCollection
Definition: ALFA_PileUpTool.h:95
SubEventIterator
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition: IPileUpTool.h:22
ALFA_PileUpTool::m_mean
double m_mean
Definition: ALFA_PileUpTool.h:103
PileUpToolBase.h
helper base class IPileUpTool::toProcess().
ALFA_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: ALFA_PileUpTool.cxx:299
ALFA_PileUpTool::fill_MD_DigitCollection
StatusCode fill_MD_DigitCollection(CLHEP::HepRandomEngine *)
Definition: ALFA_PileUpTool.cxx:537
ALFA_PileUpTool::m_randomSvc
ServiceHandle< IAthRNGSvc > m_randomSvc
Definition: ALFA_PileUpTool.h:83
TimedHitCollection
Definition: TimedHitCollection.h:15
ALFA_PileUpTool::m_stdDev
double m_stdDev
Definition: ALFA_PileUpTool.h:104
IAthRNGSvc.h
ServiceHandle< StoreGateSvc >
ALFA_ODDigitCollection
Definition: ALFA_ODDigitCollection.h:15