Loading [MathJax]/extensions/tex2jax.js
 |
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 34 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 275 of file ZDC_PileUpTool.cxx.
277 bool zdcFound[2][4] = {{}};
278 bool rpdFound[2][16] = {{}};
279 bool branFound[2] = {};
280 for(
auto module : *zdcModuleContainer){
281 int iside = (
module->zdcSide() == -1) ? 0 : 1;
284 zdcFound[iside][
mod] =
true;
285 ATH_MSG_DEBUG(
"ZDC_PileUpTool::addEmptyWaveforms Found ZDC side " <<
module->zdcSide() <<
" module " <<
mod);
287 rpdFound[iside][
module->zdcChannel()] =
true;
288 ATH_MSG_DEBUG(
"ZDC_PileUpTool::addEmptyWaveforms Found RPD side " <<
module->zdcSide() <<
" channel " <<
module->zdcChannel());
290 branFound[iside] =
true;
295 for(
int iside : {0,1}){
296 int side = (iside == 0) ? -1 : 1;
298 if(!zdcFound[iside][
mod]){
299 ATH_MSG_DEBUG(
"ZDC_PileUpTool::addEmptyWaveforms Creating empty waveform for ZDC side " <<
side <<
" module " <<
mod);
305 ATH_MSG_DEBUG(
"ZDC_PileUpTool::addEmptyWaveforms Creating empty waveform for RPD side " <<
side <<
" channel " <<
channel);
310 ATH_MSG_DEBUG(
"ZDC_PileUpTool::addEmptyWaveforms Creating empty waveform for BRAN side " <<
side );
◆ createAndStoreWaveform()
Definition at line 366 of file ZDC_PileUpTool.cxx.
382 zdcModuleContainer->
back()->setZdcId(
id.get_identifier32().get_compact());
383 zdcModuleContainer->
back()->setZdcSide(
side);
384 zdcModuleContainer->
back()->setZdcModule(
module);
386 zdcModuleContainer->
back()->setZdcChannel(
channel);
394 float amplitude = 0,
t0 = 0;
395 bool doHighGain =
true;
396 std::shared_ptr<ZDCWaveformBase> waveformPtr;
397 std::shared_ptr<ZDCWaveformSampler> wfSampler;
◆ doZDClightGuideCuts()
Definition at line 316 of file ZDC_PileUpTool.cxx.
329 newCollection->
Insert(hit);
348 for(
int side : {0,1}){
360 newTimedCollection.
insert(0.0, newCollection);
362 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 436 of file ZDC_PileUpTool.cxx.
437 std::vector<unsigned int> wf = wfSampler->
Generate(amplitude,
t0);
438 std::vector<short unsigned int> retVal;
440 retVal.push_back(wf[
sample]);
◆ initialize()
StatusCode ZDC_PileUpTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Reimplemented from PileUpToolBase.
Definition at line 31 of file ZDC_PileUpTool.cxx.
35 const ZdcID* zdcId =
nullptr;
37 ATH_MSG_ERROR(
"execute: Could not retrieve ZdcID object from the detector store");
38 return StatusCode::FAILURE;
64 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 242 of file ZDC_PileUpTool.cxx.
246 CLHEP::HepRandomEngine* rngEngine = rngWrapper->
getEngine(ctx);
252 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 192 of file ZDC_PileUpTool.cxx.
194 ATH_MSG_DEBUG (
"ZDC_PileUpTool::prepareEvent() called for " << nInputEvents <<
" input events" );
207 return StatusCode::SUCCESS;
◆ processAllSubEvents() [1/2]
StatusCode ZDC_PileUpTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtual |
Reimplemented from PileUpToolBase.
Definition at line 117 of file ZDC_PileUpTool.cxx.
123 CLHEP::HepRandomEngine* rngEngine = rngWrapper->
getEngine(ctx);
130 if (!hitCollection.isValid()) {
131 ATH_MSG_ERROR(
"Could not get ZDC_SimFiberHit_Collection container " << hitCollection.name() <<
" from store " << hitCollection.store());
132 return StatusCode::FAILURE;
134 ATH_MSG_DEBUG(
"ZDC_SimFiberHitHitCollection found with " << hitCollection->size() <<
" hits");
146 moduleContainer->setStore( moduleAuxContainer.get() );
158 fillContainer(thpcZDC_Fiber, rngEngine, moduleContainer.get());
166 sumsContainer->setStore( sumsAuxContainer.get() );
169 for (
int iside : {-1, 0, 1}){
173 LucrodTriggerSideAmpAcc (*new_sum) = 42;
184 ATH_CHECK( moduleContainerH.record (std::move(moduleContainer), std::move(moduleAuxContainer)) );
187 ATH_CHECK( sumsContainerH.record (std::move(sumsContainer), std::move(sumsAuxContainer)) );
189 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 211 of file ZDC_PileUpTool.cxx.
214 ATH_MSG_DEBUG (
"ZDC_PileUpTool::processBunchXing() " << bunchXing );
216 for (; iEvt!=eSubEvents; ++iEvt) {
219 <<
" bunch crossing : " << bunchXing
220 <<
" time offset : " << iEvt->time()
221 <<
" event number : " << iEvt->ptr()->eventNumber()
222 <<
" run number : " << iEvt->ptr()->runNumber());
227 ATH_MSG_ERROR (
"SubEvent ZDC_SimFiberHit_Collection not found in StoreGate " << seStore.name() );
228 return StatusCode::FAILURE;
230 ATH_MSG_DEBUG (
"ZDC_SimFiberHit_Collection found with " << tmpColl->
size() <<
" hits" );
238 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 88 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 90 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