|
ATLAS Offline Software
|
#include <ZDC_PileUpTool.h>
|
void | fillContainer (TimedHitCollection< ZDC_SimFiberHit > &, CLHEP::HepRandomEngine *, xAOD::ZdcModuleContainer *) |
|
void | fillContainer (const ZDC_SimFiberHit_Collection *, CLHEP::HepRandomEngine *, xAOD::ZdcModuleContainer *) |
|
TimedHitCollection< ZDC_SimFiberHit > | doZDClightGuideCuts (const ZDC_SimFiberHit_Collection *hitCollection) |
|
void | createAndStoreWaveform (const ZDC_SimFiberHit &hit, CLHEP::HepRandomEngine *, xAOD::ZdcModuleContainer *) |
|
void | addEmptyWaveforms (xAOD::ZdcModuleContainer *zdcModuleContainer, CLHEP::HepRandomEngine *rndEngine) |
|
std::vector< short unsigned int > | generateWaveform (std::shared_ptr< ZDCWaveformSampler > wfSampler, float amplitude, float t0) |
|
void | SetDumps (bool, bool) |
|
|
ZDC_SimFiberHit_Collection * | m_mergedFiberHitList {} |
|
const ZdcID * | m_ZdcID |
|
std::unique_ptr< xAOD::ZdcModuleContainer > | m_ZdcModuleContainer |
|
std::unique_ptr< xAOD::ZdcModuleAuxContainer > | m_ZdcModuleAuxContainer |
|
ServiceHandle< PileUpMergeSvc > | m_mergeSvc {this, "mergeSvc", "PileUpMergeSvc", ""} |
|
ServiceHandle< IAthRNGSvc > | m_randomSvc {this, "RndmSvc", "AthRNGSvc", ""} |
|
Gaudi::Property< std::string > | m_randomStreamName {this, "RandomStreamName", "ZDCRndEng", ""} |
|
SG::ReadHandleKey< ZDC_SimFiberHit_Collection > | m_SimFiberHitCollectionKey {this, "ZDC_SimFiberHit_CollectionName", "ZDC_SimFiberHit_Collection"} |
|
SG::WriteHandleKey< xAOD::ZdcModuleContainer > | m_ZdcModuleContainerName {this, "ZdcModuleContainerName", "ZdcModules"} |
|
SG::WriteHandleKey< xAOD::ZdcModuleContainer > | m_ZdcSumsContainerName {this, "ZdcSumsContainerName", "ZdcSums"} |
|
Gaudi::Property< std::string > | m_HitCollectionName |
|
Gaudi::Property< std::string > | m_outputContainerName |
|
Gaudi::Property< std::string > | m_configuration {this, "configuration" , "PbPb2023", "Named configuration to be used. Overwrites other properties if used" } |
|
Gaudi::Property< int > | m_Pedestal {this, "Pedestal" , 100 , "DC offset of the pulse in ADC" } |
|
Gaudi::Property< int > | m_numTimeBins {this, "MaxTimeBin" , 7 , "The number of time-slices after digitization(Typically 5 or 7)" } |
|
Gaudi::Property< double > | m_freqMHz {this, "freqMHz" , 40 , "Digitizer frequence in MHz" } |
|
Gaudi::Property< double > | m_zdct0 {this, "zdct0" , 40 , "Start time of the pulse in the digitization window" } |
|
Gaudi::Property< double > | m_rpdt0 {this, "rpdt0" , 40 , "Start time of the pulse in the digitization window" } |
|
Gaudi::Property< double > | m_zdcRiseTime {this, "zdcRiseTime" , 4 , "Rise time of the ZDC pulses" } |
|
Gaudi::Property< double > | m_zdcFallTime {this, "zdcFallTime" , 0.5 , "Fall time of the ZDC pulses" } |
|
Gaudi::Property< double > | m_rpdRiseTime {this, "rpdRiseTime" , 4 , "Rise time of the RPD pulses" } |
|
Gaudi::Property< double > | m_rpdFallTime {this, "rpdFallTime" , 0.5 , "Fall time of the RPD pulses" } |
|
Gaudi::Property< double > | m_qsfRiseTime {this, "qsfRiseTime" , 4 , "Rise time of the RPD pulses" } |
|
Gaudi::Property< double > | m_qsfFallTime {this, "qsfFallTime" , 4 , "Rise time of the RPD pulses" } |
|
Gaudi::Property< double > | m_qsfFilter {this, "qsfFilter" , 4 , "Rise time of the RPD pulses" } |
|
Gaudi::Property< float > | m_zdcAdcPerPhoton {this, "zdcAdcPerPhoton" , 0.000498 , "ADC counts per detected photon in the ZDCs" } |
|
Gaudi::Property< bool > | m_LTQuadStepFilt {this, "LTQuadStepFilt" , false , "Use LT Quad Step Filter waveform for ZDC channels" } |
|
Gaudi::Property< bool > | m_delayChannels {this, "delayChannels" , false , "Include delayed channels in the output" } |
|
Gaudi::Property< bool > | m_doRPD {this, "doRPD" , false , "Include RPD channels in the output" } |
|
Gaudi::Property< bool > | m_doBRAN {this, "doBRAN" , false , "Include BRAN channels in the output" } |
|
Gaudi::Property< std::vector< float > > | m_rpdAdcPerPhoton {this, "rpdAdcPerPhoton", {5.25 , 1.7}, "ADC counts per detected photon in the RPDs"} |
|
Definition at line 32 of file ZDC_PileUpTool.h.
◆ ZDC_PileUpTool()
ZDC_PileUpTool::ZDC_PileUpTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ addEmptyWaveforms()
void ZDC_PileUpTool::addEmptyWaveforms |
( |
xAOD::ZdcModuleContainer * |
zdcModuleContainer, |
|
|
CLHEP::HepRandomEngine * |
rndEngine |
|
) |
| |
|
private |
Definition at line 273 of file ZDC_PileUpTool.cxx.
275 bool zdcFound[2][4] = {{}};
276 bool rpdFound[2][16] = {{}};
277 bool branFound[2] = {};
278 for(
auto module : *zdcModuleContainer){
279 int iside = (
module->zdcSide() == -1) ? 0 : 1;
282 zdcFound[iside][
mod] =
true;
283 ATH_MSG_DEBUG(
"ZDC_PileUpTool::addEmptyWaveforms Found ZDC side " <<
module->zdcSide() <<
" module " <<
mod);
285 rpdFound[iside][
module->zdcChannel()] =
true;
286 ATH_MSG_DEBUG(
"ZDC_PileUpTool::addEmptyWaveforms Found RPD side " <<
module->zdcSide() <<
" channel " <<
module->zdcChannel());
288 branFound[iside] =
true;
293 for(
int iside : {0,1}){
294 int side = (iside == 0) ? -1 : 1;
296 if(!zdcFound[iside][
mod]){
297 ATH_MSG_DEBUG(
"ZDC_PileUpTool::addEmptyWaveforms Creating empty waveform for ZDC side " <<
side <<
" module " <<
mod);
303 ATH_MSG_DEBUG(
"ZDC_PileUpTool::addEmptyWaveforms Creating empty waveform for RPD side " <<
side <<
" channel " <<
channel);
308 ATH_MSG_DEBUG(
"ZDC_PileUpTool::addEmptyWaveforms Creating empty waveform for BRAN side " <<
side );
◆ createAndStoreWaveform()
Definition at line 364 of file ZDC_PileUpTool.cxx.
380 zdcModuleContainer->
back()->setZdcId(
id.get_identifier32().get_compact());
381 zdcModuleContainer->
back()->setZdcSide(
side);
382 zdcModuleContainer->
back()->setZdcModule(
module);
384 zdcModuleContainer->
back()->setZdcChannel(
channel);
392 float amplitude = 0,
t0 = 0;
393 bool doHighGain =
true;
394 std::shared_ptr<ZDCWaveformBase> waveformPtr;
395 std::shared_ptr<ZDCWaveformSampler> wfSampler;
◆ doZDClightGuideCuts()
Definition at line 314 of file ZDC_PileUpTool.cxx.
327 newCollection->
Insert(hit);
346 for(
int side : {0,1}){
358 newTimedCollection.
insert(0.0, newCollection);
360 return newTimedCollection;
◆ fillContainer() [1/2]
◆ fillContainer() [2/2]
◆ filterPassed()
virtual bool PileUpToolBase::filterPassed |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ finalize()
virtual StatusCode ZDC_PileUpTool::finalize |
( |
| ) |
|
|
inlinefinaloverridevirtual |
◆ generateWaveform()
std::vector< short unsigned int > ZDC_PileUpTool::generateWaveform |
( |
std::shared_ptr< ZDCWaveformSampler > |
wfSampler, |
|
|
float |
amplitude, |
|
|
float |
t0 |
|
) |
| |
|
private |
Definition at line 434 of file ZDC_PileUpTool.cxx.
435 std::vector<unsigned int> wf = wfSampler->
Generate(amplitude,
t0);
436 std::vector<short unsigned int> retVal;
438 retVal.push_back(wf[
sample]);
◆ initialize()
StatusCode ZDC_PileUpTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Reimplemented from PileUpToolBase.
Definition at line 29 of file ZDC_PileUpTool.cxx.
33 const ZdcID* zdcId =
nullptr;
35 ATH_MSG_ERROR(
"execute: Could not retrieve ZdcID object from the detector store");
36 return StatusCode::FAILURE;
62 return StatusCode::SUCCESS;
◆ initializeLHCf2022()
void ZDC_PileUpTool::initializeLHCf2022 |
( |
| ) |
|
◆ initializePbPb2015()
void ZDC_PileUpTool::initializePbPb2015 |
( |
| ) |
|
◆ initializePbPb2023()
void ZDC_PileUpTool::initializePbPb2023 |
( |
| ) |
|
◆ mergeEvent()
StatusCode ZDC_PileUpTool::mergeEvent |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtual |
return false if not interested in certain xing times (in ns) implemented by default in PileUpToolBase as FirstXing<=bunchXing<=LastXing
called at the end of the subevts loop. Not (necessarily) able to access SubEvents
Definition at line 240 of file ZDC_PileUpTool.cxx.
244 CLHEP::HepRandomEngine* rngEngine = rngWrapper->
getEngine(ctx);
250 return StatusCode::SUCCESS;
◆ prepareEvent()
StatusCode ZDC_PileUpTool::prepareEvent |
( |
const EventContext & |
ctx, |
|
|
const unsigned int |
nInputEvents |
|
) |
| |
|
finaloverridevirtual |
called before the subevts loop. Not (necessarily) able to access SubEvents
Definition at line 190 of file ZDC_PileUpTool.cxx.
192 ATH_MSG_DEBUG (
"ZDC_PileUpTool::prepareEvent() called for " << nInputEvents <<
" input events" );
205 return StatusCode::SUCCESS;
◆ processAllSubEvents() [1/2]
StatusCode ZDC_PileUpTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtual |
Reimplemented from PileUpToolBase.
Definition at line 115 of file ZDC_PileUpTool.cxx.
121 CLHEP::HepRandomEngine* rngEngine = rngWrapper->
getEngine(ctx);
128 if (!hitCollection.isValid()) {
129 ATH_MSG_ERROR(
"Could not get ZDC_SimFiberHit_Collection container " << hitCollection.name() <<
" from store " << hitCollection.store());
130 return StatusCode::FAILURE;
132 ATH_MSG_DEBUG(
"ZDC_SimFiberHitHitCollection found with " << hitCollection->size() <<
" hits");
144 moduleContainer->setStore( moduleAuxContainer.get() );
156 fillContainer(thpcZDC_Fiber, rngEngine, moduleContainer.get());
164 sumsContainer->setStore( sumsAuxContainer.get() );
167 for (
int iside : {-1, 1}){
171 LucrodTriggerSideAmpAcc (*new_sum) = 42;
182 ATH_CHECK( moduleContainerH.record (std::move(moduleContainer), std::move(moduleAuxContainer)) );
185 ATH_CHECK( sumsContainerH.record (std::move(sumsContainer), std::move(sumsAuxContainer)) );
187 return StatusCode::SUCCESS;
◆ processAllSubEvents() [2/2]
virtual StatusCode IPileUpTool::processAllSubEvents |
|
inherited |
dummy implementation to allow compilation while all Digitization packages are migrated to use this new interface.
◆ processBunchXing()
called for each active bunch-crossing to process current SubEvents bunchXing is in ns
Reimplemented from PileUpToolBase.
Definition at line 209 of file ZDC_PileUpTool.cxx.
212 ATH_MSG_DEBUG (
"ZDC_PileUpTool::processBunchXing() " << bunchXing );
214 for (; iEvt!=eSubEvents; ++iEvt) {
217 <<
" bunch crossing : " << bunchXing
218 <<
" time offset : " << iEvt->time()
219 <<
" event number : " << iEvt->ptr()->eventNumber()
220 <<
" run number : " << iEvt->ptr()->runNumber());
225 ATH_MSG_ERROR (
"SubEvent ZDC_SimFiberHit_Collection not found in StoreGate " << seStore.name() );
226 return StatusCode::FAILURE;
228 ATH_MSG_DEBUG (
"ZDC_SimFiberHit_Collection found with " << tmpColl->
size() <<
" hits" );
236 return StatusCode::SUCCESS;
◆ resetFilter()
virtual void PileUpToolBase::resetFilter |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ SetDumps()
void ZDC_PileUpTool::SetDumps |
( |
bool |
, |
|
|
bool |
|
|
) |
| |
|
private |
◆ toProcess()
virtual bool PileUpToolBase::toProcess |
( |
int |
bunchXing | ) |
const |
|
inlineoverridevirtualinherited |
◆ m_configuration
Gaudi::Property<std::string> ZDC_PileUpTool::m_configuration {this, "configuration" , "PbPb2023", "Named configuration to be used. Overwrites other properties if used" } |
|
private |
◆ m_delayChannels
Gaudi::Property<bool > ZDC_PileUpTool::m_delayChannels {this, "delayChannels" , false , "Include delayed channels in the output" } |
|
private |
◆ m_doBRAN
Gaudi::Property<bool > ZDC_PileUpTool::m_doBRAN {this, "doBRAN" , false , "Include BRAN channels in the output" } |
|
private |
◆ m_doRPD
Gaudi::Property<bool > ZDC_PileUpTool::m_doRPD {this, "doRPD" , false , "Include RPD channels in the output" } |
|
private |
◆ m_filterPassed
bool PileUpToolBase::m_filterPassed {true} |
|
protectedinherited |
◆ m_firstXing
Gaudi::Property<int> PileUpToolBase::m_firstXing |
|
protectedinherited |
Initial value:{this, "FirstXing", -999,
"First bunch-crossing in which det is live"}
Definition at line 54 of file PileUpToolBase.h.
◆ m_freqMHz
Gaudi::Property<double> ZDC_PileUpTool::m_freqMHz {this, "freqMHz" , 40 , "Digitizer frequence in MHz" } |
|
private |
◆ m_HitCollectionName
Gaudi::Property<std::string> ZDC_PileUpTool::m_HitCollectionName |
|
private |
Initial value:{this, "HitCollectionName" , "ZDC_SimFiberHit_Collection",
"Name of the input Collection of the simulation Hits"}
Definition at line 86 of file ZDC_PileUpTool.h.
◆ m_lastXing
Gaudi::Property<int> PileUpToolBase::m_lastXing |
|
protectedinherited |
Initial value:{this, "LastXing", 999,
"Last bunch-crossing in which det is live"}
Definition at line 56 of file PileUpToolBase.h.
◆ m_LTQuadStepFilt
Gaudi::Property<bool > ZDC_PileUpTool::m_LTQuadStepFilt {this, "LTQuadStepFilt" , false , "Use LT Quad Step Filter waveform for ZDC channels" } |
|
private |
◆ m_mergedFiberHitList
◆ m_mergeSvc
◆ m_numTimeBins
Gaudi::Property<int > ZDC_PileUpTool::m_numTimeBins {this, "MaxTimeBin" , 7 , "The number of time-slices after digitization(Typically 5 or 7)" } |
|
private |
◆ m_outputContainerName
Gaudi::Property<std::string> ZDC_PileUpTool::m_outputContainerName |
|
private |
Initial value:{this, "OutputContainerName" , "ZDC_SimModuleContainer",
"Name of the output ZDC module container"}
Definition at line 88 of file ZDC_PileUpTool.h.
◆ m_Pedestal
Gaudi::Property<int > ZDC_PileUpTool::m_Pedestal {this, "Pedestal" , 100 , "DC offset of the pulse in ADC" } |
|
private |
◆ m_qsfFallTime
Gaudi::Property<double> ZDC_PileUpTool::m_qsfFallTime {this, "qsfFallTime" , 4 , "Rise time of the RPD pulses" } |
|
private |
◆ m_qsfFilter
Gaudi::Property<double> ZDC_PileUpTool::m_qsfFilter {this, "qsfFilter" , 4 , "Rise time of the RPD pulses" } |
|
private |
◆ m_qsfRiseTime
Gaudi::Property<double> ZDC_PileUpTool::m_qsfRiseTime {this, "qsfRiseTime" , 4 , "Rise time of the RPD pulses" } |
|
private |
◆ m_randomStreamName
Gaudi::Property<std::string> ZDC_PileUpTool::m_randomStreamName {this, "RandomStreamName", "ZDCRndEng", ""} |
|
private |
◆ m_randomSvc
◆ m_rpdAdcPerPhoton
Gaudi::Property<std::vector< float> > ZDC_PileUpTool::m_rpdAdcPerPhoton {this, "rpdAdcPerPhoton", {5.25 , 1.7}, "ADC counts per detected photon in the RPDs"} |
|
private |
◆ m_rpdFallTime
Gaudi::Property<double> ZDC_PileUpTool::m_rpdFallTime {this, "rpdFallTime" , 0.5 , "Fall time of the RPD pulses" } |
|
private |
◆ m_rpdRiseTime
Gaudi::Property<double> ZDC_PileUpTool::m_rpdRiseTime {this, "rpdRiseTime" , 4 , "Rise time of the RPD pulses" } |
|
private |
◆ m_rpdt0
Gaudi::Property<double> ZDC_PileUpTool::m_rpdt0 {this, "rpdt0" , 40 , "Start time of the pulse in the digitization window" } |
|
private |
◆ m_SimFiberHitCollectionKey
◆ m_vetoPileUpTruthLinks
Gaudi::Property<int> PileUpToolBase::m_vetoPileUpTruthLinks |
|
protectedinherited |
Initial value:{this, "VetoPileUpTruthLinks", true,
"Ignore links to suppressed pile-up truth"}
Definition at line 58 of file PileUpToolBase.h.
◆ m_zdcAdcPerPhoton
Gaudi::Property<float > ZDC_PileUpTool::m_zdcAdcPerPhoton {this, "zdcAdcPerPhoton" , 0.000498 , "ADC counts per detected photon in the ZDCs" } |
|
private |
◆ m_zdcFallTime
Gaudi::Property<double> ZDC_PileUpTool::m_zdcFallTime {this, "zdcFallTime" , 0.5 , "Fall time of the ZDC pulses" } |
|
private |
◆ m_ZdcID
◆ m_ZdcModuleAuxContainer
◆ m_ZdcModuleContainer
◆ m_ZdcModuleContainerName
◆ m_zdcRiseTime
Gaudi::Property<double> ZDC_PileUpTool::m_zdcRiseTime {this, "zdcRiseTime" , 4 , "Rise time of the ZDC pulses" } |
|
private |
◆ m_ZdcSumsContainerName
◆ m_zdct0
Gaudi::Property<double> ZDC_PileUpTool::m_zdct0 {this, "zdct0" , 40 , "Start time of the pulse in the digitization window" } |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Auxiliary store for xAOD::ZdcModuleContainer_v2.
Helper class to provide type-safe access to aux data.
int module(const Identifier &id) const
std::vector< ALFA_RawData_p1 > t0
Class containing ZDC Module information.
#define ATH_MSG_VERBOSE(x)
ZDC_SimFiberHit_Collection::const_iterator ZDC_SimFiberHit_ConstIterator
const_iterator begin() const
void setWaveform(const std::string &, const std::vector< uint16_t > &)
bool nextDetectorElement(const_iterator &b, const_iterator &e)
sets an iterator range with the hits of current detector element returns a bool when done
CONT::const_iterator const_iterator
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
Identifier channel_id(int side, int module, int type, int channel) const
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
The Athena Transient Store API.
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
void insert(const PileUpTimeEventIndex &timeEventIndex, const AtlasHitsVector< HIT > *inputCollection)
void Add(int nphot, double edep)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
const T * back() const
Access the last element in the collection as an rvalue.
std::unique_ptr< base_value_type > unique_type
Type of a unique_ptr that can be used to insert elements into this container.
A wrapper class for event-slot-local random engines.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
const_iterator end() const
int side(const Identifier &id) const
Values of different levels (failure returns 0)
TimedVector::const_iterator const_iterator
int type(const Identifier &id) const
std::string ZdcModuleToString(const xAOD::ZdcModule &zm)
void push_back(const T &t)
int channel(const Identifier &id) const