|
ATLAS Offline Software
|
#include <PixelDigitizationTool.h>
Definition at line 38 of file PixelDigitizationTool.h.
◆ PixelDigitizationTool() [1/3]
PixelDigitizationTool::PixelDigitizationTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
pIID |
|
) |
| |
◆ PixelDigitizationTool() [2/3]
PixelDigitizationTool::PixelDigitizationTool |
( |
| ) |
|
|
private |
◆ PixelDigitizationTool() [3/3]
◆ addSDO()
Definition at line 279 of file PixelDigitizationTool.cxx.
282 std::vector<InDetSimData::Deposit> deposits;
290 const list_t& charges = (*i_chargedDiode).second.totalCharge().chargeComposition();
292 bool real_particle_hit =
false;
294 list_t::const_iterator EndOfChargeList = charges.end();
295 for (list_t::const_iterator i_ListOfCharges = charges.begin(); i_ListOfCharges != EndOfChargeList;
301 if (!real_particle_hit) {
302 real_particle_hit = trkLink.
isValid();
305 std::vector<InDetSimData::Deposit>::reverse_iterator theDeposit = deposits.rend();
306 std::vector<InDetSimData::Deposit>::reverse_iterator depositsR_end = deposits.rend();
307 std::vector<InDetSimData::Deposit>::reverse_iterator i_Deposit = deposits.rbegin();
308 for (; i_Deposit != depositsR_end; ++i_Deposit) {
309 if ((*i_Deposit).first == trkLink) {
310 theDeposit = i_Deposit;
316 if (theDeposit != depositsR_end) (*theDeposit).second += i_ListOfCharges->charge();
318 deposits.emplace_back(trkLink, i_ListOfCharges->charge());
324 std::move(deposits), (*i_chargedDiode).second.flag());
◆ digitizeEvent()
StatusCode PixelDigitizationTool::digitizeEvent |
( |
const EventContext & |
ctx | ) |
|
Definition at line 120 of file PixelDigitizationTool.cxx.
125 if (not pixelDetEleHandle.isValid() or elements ==
nullptr) {
127 return StatusCode::FAILURE;
130 std::unique_ptr<SiChargedDiodeCollection> chargedDiodes = std::make_unique<SiChargedDiodeCollection>();
131 std::vector<std::pair<double, double> > trfHitRecord;
132 std::vector<double> initialConditions;
134 std::vector<bool> processedElements;
140 CLHEP::HepRandomEngine* rndmEngine = rngWrapper->
getEngine(ctx);
151 (*firstHit)->getLayerDisk(),
152 (*firstHit)->getPhiModule(), (*firstHit)->getEtaModule());
158 if (sielement ==
nullptr) {
160 " Barrel=" << (*firstHit)->getBarrelEndcap() <<
" Layer=" << (*firstHit)->getLayerDisk() <<
" Eta=" <<
161 (*firstHit)->getEtaModule() <<
" Phi=" << (*firstHit)->getPhiModule());
162 ATH_MSG_ERROR(
"detector manager could not find element with id = " <<
id);
175 if (std::abs((*phit)->meanTime()) < 10000.0 *
CLHEP::ns) {
178 (*phit)->getPhiModule(), (*phit)->getEtaModule())));
188 for (
unsigned int itool = 0; itool <
m_chargeTool.size(); itool++) {
190 if (
m_chargeTool[itool]->induceCharge(*phit, *chargedDiodes, *sielement, *p_design, trfHitRecord,
191 initialConditions, rndmEngine, ctx) == StatusCode::FAILURE) {
195 initialConditions.clear();
196 trfHitRecord.clear();
202 ATH_MSG_DEBUG(
"in digitize elements with hits: ec - layer - eta - phi " <<
209 assert(idHash < processedElements.size());
210 processedElements[idHash] =
true;
217 for (
unsigned int itool = 0; itool <
m_fesimTool.size(); itool++) {
219 m_fesimTool[itool]->process(*chargedDiodes, *RDOColl, rndmEngine);
224 addSDO(chargedDiodes.get());
225 chargedDiodes->
clear();
236 for (
unsigned int i = 0;
i < processedElements.size();
i++) {
237 if (!processedElements[
i]) {
240 ATH_MSG_ERROR(
"PixelDetector element id hash is invalid = " <<
i);
245 ATH_MSG_DEBUG(
"In digitize of untouched elements: layer - phi - eta " <<
248 element->
identify()) <<
" - " <<
"size: " << processedElements.size());
256 for (
unsigned int itool = 0; itool <
m_fesimTool.size(); itool++) {
258 m_fesimTool[itool]->process(*chargedDiodes, *RDOColl, rndmEngine);
263 addSDO(chargedDiodes.get());
264 chargedDiodes->
clear();
271 return StatusCode::SUCCESS;
◆ filterPassed()
virtual bool PileUpToolBase::filterPassed |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ finalize()
StatusCode PixelDigitizationTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode PixelDigitizationTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ mergeEvent()
StatusCode PixelDigitizationTool::mergeEvent |
( |
const EventContext & |
ctx | ) |
|
|
overridevirtual |
◆ operator=()
◆ prepareEvent()
StatusCode PixelDigitizationTool::prepareEvent |
( |
const EventContext & |
ctx, |
|
|
unsigned int |
|
|
) |
| |
|
overridevirtual |
◆ processAllSubEvents() [1/2]
StatusCode PixelDigitizationTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
|
|
overridevirtual |
Reimplemented from PileUpToolBase.
Definition at line 66 of file PixelDigitizationTool.cxx.
76 if (!hitCollection.isValid()) {
78 "Could not get Pixel SiHitCollection container " << hitCollection.name() <<
" from store " <<
79 hitCollection.store());
80 return StatusCode::FAILURE;
86 ATH_MSG_DEBUG(
"SiHitCollection found with " << hitCollection->size() <<
" hits");
88 TimedHitCollList hitCollList;
93 for (
auto & iColl : hitCollList) {
107 ATH_MSG_DEBUG(
"SiTrackerHitCollection found with" << p_collection->size() <<
" hits");
114 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()
Reimplemented from PileUpToolBase.
Definition at line 373 of file PixelDigitizationTool.cxx.
375 ATH_MSG_VERBOSE(
"PixelDigitizationTool::processBunchXing() " << bunchXing);
379 return StatusCode::SUCCESS;
382 return StatusCode::SUCCESS;
389 TimedHitCollList hitCollList;
392 bSubEvents, eSubEvents).isSuccess()) &&
393 hitCollList.empty()) {
395 return StatusCode::FAILURE;
403 for (; iColl != endColl; ++iColl) {
408 "time index info. time: " << timeIndex.time() <<
" index: " << timeIndex.index() <<
" type: " <<
413 return StatusCode::SUCCESS;
◆ resetFilter()
virtual void PileUpToolBase::resetFilter |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ toProcess()
virtual bool PileUpToolBase::toProcess |
( |
int |
bunchXing | ) |
const |
|
inlineoverridevirtualinherited |
◆ m_chargeTool
ToolHandleArray<SensorSimTool> PixelDigitizationTool::m_chargeTool |
|
private |
◆ m_createNoiseSDO
Gaudi::Property<bool> PixelDigitizationTool::m_createNoiseSDO |
|
protected |
Initial value:{
this, "CreateNoiseSDO", false, "Set create noise SDO flag"
}
Definition at line 113 of file PixelDigitizationTool.h.
◆ m_detID
◆ m_energyDepositionTool
Initial value:{
this, "EnergyDepositionTool", "EnergyDepositionTool", "Energy deposition tool"
}
Definition at line 102 of file PixelDigitizationTool.h.
◆ m_fesimTool
Initial value:{
this, "FrontEndSimTools", {}, "List of Front-End simulation tools"
}
Definition at line 99 of file PixelDigitizationTool.h.
◆ 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_HardScatterSplittingMode
Gaudi::Property<int> PixelDigitizationTool::m_HardScatterSplittingMode |
|
private |
Initial value:{
this, "HardScatterSplittingMode", 0, "Control pileup & signal splitting"
}
Definition at line 80 of file PixelDigitizationTool.h.
◆ m_HardScatterSplittingSkipper
bool PixelDigitizationTool::m_HardScatterSplittingSkipper |
|
private |
◆ m_hitCollPtrs
◆ m_hitsContainerKey
Initial value:{
this, "InputObjectName", "", "Input HITS collection name"
}
Definition at line 63 of file PixelDigitizationTool.h.
◆ m_inputObjectName
std::string PixelDigitizationTool::m_inputObjectName |
|
private |
◆ 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_mergeSvc
◆ m_onlyHitElements
Gaudi::Property<bool> PixelDigitizationTool::m_onlyHitElements |
|
private |
Initial value:{
this, "OnlyHitElements", false, "Process only elements with hits"
}
Definition at line 86 of file PixelDigitizationTool.h.
◆ m_onlyUseContainerName
Gaudi::Property<bool> PixelDigitizationTool::m_onlyUseContainerName |
|
private |
Initial value:{
this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."
}
Definition at line 60 of file PixelDigitizationTool.h.
◆ m_pixelDetEleCollKey
Initial value:{
this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"
}
Definition at line 66 of file PixelDigitizationTool.h.
◆ m_pixelIDName
Gaudi::Property<std::string> PixelDigitizationTool::m_pixelIDName {this, "PixelIDName", "PixelID", "Pixel ID name"} |
|
private |
◆ m_rdoContainer
◆ m_rdoContainerKey
Initial value:{
this, "RDOCollName", "PixelRDOs", "RDO collection name"
}
Definition at line 72 of file PixelDigitizationTool.h.
◆ m_rndmSvc
◆ m_simDataColl
◆ m_simDataCollKey
Initial value:{
this, "SDOCollName", "PixelSDO_Map", "SDO collection name"
}
Definition at line 76 of file PixelDigitizationTool.h.
◆ m_timedHits
◆ 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.
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
void setIdentifier(Identifier id)
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
virtual IdentifierHash identifyHash() const override final
const std::string & name() const
Return the StoreGate ID for the referenced object.
SiChargedDiodeIterator end()
#define ATH_MSG_VERBOSE(x)
bool ignoreTruthLink(const T &p, bool vetoPileUp)
Helper function for SDO creation in PileUpTools.
std::vector< SiCharge > list_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
SiChargedDiodeIterator begin()
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
SiChargedDiodeMap::iterator SiChargedDiodeIterator
std::list< value_t > type
type of the collection of timed data object
virtual IdentifierHash identifyHash() const override final
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
a link optimized in size for a GenParticle in a McEventCollection
Identifier getId(const InDetDD::SiCellId &id) const
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
void insert(const PileUpTimeEventIndex &timeEventIndex, const AtlasHitsVector< HIT > *inputCollection)
void setDetectorElement(const InDetDD::SolidStateDetectorElementBase *SiElement)
void reserve(unsigned int numberOfHits)
reserve a timed vector numberOfHits in size.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
bool isValid() const
Validity check.
bool is_valid() const
Check if id is in a valid state.
int layer_disk(const Identifier &id) const
int eta_module(const Identifier &id) const
A wrapper class for event-slot-local random engines.
InDetRawDataCollection< PixelRDORawData > PixelRDO_Collection
StatusCode initialize(bool used=true)
size_type wafer_hash_max(void) const
std::size_t numberOfSiHits(const xAOD::TrackParticle *tp)
return the number of Si hits in the track particle
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
AtlasHitsVector< SiHit > SiHitCollection
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
int phi_module(const Identifier &id) const
a struct encapsulating the identifier of a pile-up event
virtual Identifier identify() const override final
identifier of this detector element (inline)
virtual Identifier identify() const override final